ORK Framework Logo - RPG Editor for Unity
  • ORK 4 BETA
  • Features
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK

ORK 4 Documentation

  • Getting Started
    • Welcome
    • First Steps (Unity)
  • Features
    • The Status System
    • Schematics
    • Schematic Nodes
    • Dialogue Importer
    • Variables
    • Selected Data
  • Components
    • Battle Components
    • Combatant Components
    • Control Components
    • Cursor Prefab Components
    • Game Starters
    • Interactable Components
    • Move AI Components
    • Scene Setup Components
  • Editor
    • The ORK 4 Editor
    • Sections & Sub-Sections
    • Node Editor
    • Schematic Editor
    • Asset Sources
    • Unity Overlay Toolbar
  • Section: System
    • System Settings
    • Languages
    • Organizer Types
    • Game States & Conditions
    • General Condition Templates
    • Object Pools
    • Prefab Savers
    • Scene Connections
  • Section: Controls
    • Game Controls
    • Interaction Settings
    • Player Controls
    • Camera Controls
    • Input Keys
    • Control Maps
    • Camera Positions
    • Battle Camera
  • Section: Gameplay
    • Game Settings
    • Formulas
    • Difficulties
    • Shortcut Slots & Settings
    • Custom Settings & Global Custom Settings
    • Global Machines
    • Machine Templates
  • Section: Status
    • Status Values
    • Status Effects
    • Attack Modifiers
    • Defence Modifiers
    • Abilities & Ability Developments
    • Status Developments
    • Research Trees
    • Damage Types
    • Status Bonuses & Templates
    • Status Condition Templates
  • Section: Inventory
    • Inventory Settings
    • Inventory Containers
    • Currencies
    • Items
    • AI Rulesets
    • Crafting Recipes
    • Equipment Slots & Slot Set Templates
    • Equipment & Available Equipment Templates
    • Shops
    • Loot
  • Section: Combatants
    • Combatants
    • Combatant Groups
    • Class Slots
    • Classes
    • Factions & Faction Benefits
    • Animations
    • Move AIs
    • Formations
    • Action Combos
  • Section: Battles
    • Battle Systems
    • Turn Based Battles
    • Active Time Battles
    • Real Time Battles
    • Phase Battles
    • Battle Spots
    • Battle AIs
    • Battle Actions Settings
    • Special Commands Settings
    • Target Settings
    • Target Selection Templates
    • Battle Range Templates
    • Battle Grid Settings
    • Battle Grid Highlights
    • Battle Grid Cell Types
    • Battle Grid Formations
  • Section: Content
    • Content Types
    • Music
    • Sound Templates
    • Areas
    • Teleports
    • Quests & Quest Tasks
    • Logs & Log Texts
    • Object Contents
  • Section: UI
    • UI Settings
    • UI Layers
    • UI Layouts
    • UI Boxes
    • HUDs
    • Notifications
    • Cursor Settings
  • Section: Menus
    • Start Menu
    • Save Game Settings
    • Option Categories
    • Menu Screens
    • Menu Requirements
    • Battle Menus
    • Loot Dialogues
    • Item Collection
    • Combatant Selections
    • Quantity Selections
    • Shop Layouts
  • Section: Texts
    • Text Settings
    • Formatting Settings
    • Flying Texts
    • Use Cost Display
    • Status Preview Display
    • Bonus Display
    • Status Change Display
    • Console Settings & Console Types
    • Text Codes
  • Sections: Editor
    • Editor Settings
    • Backups
    • Variables
    • Plugins
  • Scripting
    • Access Handler
    • Custom Nodes
    • Custom Save Data
    • Custom Component Save Data

ORK 4 Tutorials

  • ORK 4 Unity Quickstart Tutorials (3D)
    • ORK 4 Unity Quickstart 3D
    • 01 Initial ORK Setup
    • 02 Player Setup
    • 03 Music & Scenes
    • 04 UI System Setup
    • 05 UI Boxes
    • 06 Flying Texts
    • 07 Status Values
    • 08 Status Effects
    • 09 First Abilities
    • 10 Fighter Setup
    • 11 First Enemies & Battle AI
    • 12 Battle System Setup
    • 13 Animating Battle Start and End
    • 14 Random Battles
    • 15 Animating Actions
    • 16 Player Battle HUD
    • 17 Elemental Attacks
    • 18 Animating More Actions
    • 19 Inventory & Loot
    • 20 Equipment
    • 21 Loot, Start Equipment & Viewers
    • 22 Magic Abilities
    • 23 Caster Setup
    • 24 More Enemies
    • 25 Start Menu & Save Games
    • 26 Menu Screens
    • 27 Interactions
    • 28 Item Collectors
    • Quickstart Extended
  • Battle Tutorials
    • Adding Active Time Battles
    • Adding Phase Battles
    • Hit & Miss
    • Critical Hits
    • Cast Time
    • Grid 01: Battle Grid Setup
    • Grid 02: Highlights
    • Grid 03: Cell Types
    • Grid 04: Move Command
    • Grid 05: Scene Grid Setup
    • Grid 06: Battle Ready
    • Grid 07 Use & Affect Ranges
    • Grid 08: Better Camera Control
  • Gameplay Tutorials
    • Multiple Interaction Controllers
    • Player Group Spawn & Follow
    • Spawn Hunting Enemies
    • Gamepad Controls (Unity Input System)
    • Combined Inputs
    • Quests 01: Menu Screen
    • Quests 02: Hunting
    • Quests 03: Collect Potion Materials
    • Quests 04: Collect Equipment Materials
    • Quests 05: Quest Mark HUDs
    • Crafting 01: Menu Screen
    • Crafting 02: Materials & Recipes
    • Crafting 03: Getting Materials
    • Crafting 04: Proficiency & Critical Outcome
    • Shop
    • Inventory Containers
  • Schematics Tutorials
    • UI Animation Schematics
    • Flying Text Animation Schematics
    • HUD Conditional Schematics
  • UI Tutorials
    • Unity UI: Initial Setup
    • Unity UI: Status Value UI Setup
    • Unity UI: Status Effect UI Setup
    • Unity UI: Shortcut UI Setup
    • Unity UI: Dragging Notification
    • Unity UI: Interaction HUD
    • Unity UI: Shortcut HUD
    • Unity UI: Turn Order HUD
    • Unity UI: Cast Time HUD
    • Unity UI: Quest HUD
    • Unity UI: Tooltip HUD
    • Unity UI: Move Range HUD

ORK 4 Extensions

  • Plugins
    • Save Game Compression Plugin
  • Schematic Nodes
    • Footstepper Nodes (Unity)
  • Scripts
    • A* Pathfinding Movement Component (Unity)
    • PolyNav 2D Movement Component (Unity)
    • Cinemachine Camera Control Type (Unity)
    • Rewired Input Key (Unity)
    • Unity Legacy Input Key (Unity)
    • Core GameKit Wrapper (Unity)
    • Pool Boss Wrapper (Unity)
View Categories
  • Guide
  • ORK 4
  • ORK 4 Tutorials
  • Battle Tutorials

Grid 07 Use & Affect Ranges

In this tutorial we’ll set up larger use ranges and affect ranges for magic attack spells.

This tutorial is part 7 of a mini-series covering grid battles. You can find the start of this series here.

We’ve got working grid battles, but currently, all actions have a use range of 1. That’s fine for the physical attacks, which should be used on targets directly neighbouring the user. However, the magic spells should be useable at a larger distance.

We’ll set up a use range that uses a larger range but only cells in a cone shape in front of the user for all magic attack spells. We also add an affect range of 1 – i.e. beside the selected target, all enemies within a grid distance of 1 will also be affected. Support spells will get a higher use range

We’ll set up:

  • battle range template for the new use range
  • 2 target selection templates
  • updating spell and support content types
  • add orientation command to battle menu

This tutorial is based on the ORK 4 Unity Quickstart 3D tutorials and using a phase battle system, but can be used in any project and with any battle system.

Battle Range Template #

We’ll start with a new battle range template, setting up a grid range that uses a grid mask to define which cells to use.

Open the ORK editor, navigate to Battles > Battle Range Template and add a new template.

  • Name
    Set to: Grid Front 5

Grid Shape #

The grid shape settings are only used in grid battles.

  • Shape Type
    Select: Mask
  • Range
    Set to: 5
  • Local Space
    Enable
    The orientation of the mask will be based on the combatant’s rotation.

Click on Create Grid Mask. This’ll create the mask with the defined range – if you change the range, you’ll have to create the mask again.

You can select and deselect cells by clicking on them. Select all cells in a cone shape in front of the origin cell (green cell at the center). The result should look like this:

We’ll also add Line of Sight checks and have blocked cells prevent using cells behind them.

  • Use Line of Sight
    Enable
  • LOS Blocked Cells
    Enable
  • LOS Allied Combatants
    Disable
  • LOS Enemy Combatants
    Disable

Target Selection Templates #

We’ll use the new battle range template in a target selection template – targeting enemies and adding an affect range of 1.

For support spells, we’ll add another new template with a reguar range of 3.

Enemy Single Grid Magic Range 5 #

Navigate to Battles > Target Selection Templates and add a new template.

  • Name
    Set to: Enemy Single Grid Magic Range 5

Target Settings #

The default setup is already what we need, targeting a single enemy.

  • Target Type
    Select: Enemy
  • Target Ranget
    Select: Single

Use Range Setting #

We’ll override the default use range.

  • Own Use Range
    Enable

Click on Add Range.

  • Range Type
    Select: Template
  • Template
    Select: Grid Front 5
  • Grid Battles
    Select: Yes
    I.e. this use range is only used in grid battles.

Affect Range Settings #

  • Affect Range
    Select: Calculation
    The affect range will be used when the action is calculated – i.e. the affected targets are not available in schematics.

Click on Add Range.

  • Range Type
    Select: Template
  • Template
    Select: Range 1
  • Grid Battles
    Select: Yes

Ally Single Grid Range 3 #

Add a new template.

  • Name
    Set to: Ally Single Grid Range 3

Target Settings #

  • Target Type
    Select: Ally
  • Target Ranget
    Select: Single

Use Range Setting #

  • Own Use Range
    Enable

Click on Add Range.

  • Range Type
    Select: Template
  • Template
    Select: Range 3
  • Grid Battles
    Select: Yes

Updating Content Types #

Since our abilities use the Target Selection Settings defined by their content types, all we have to do is update the content types for Spells and Support abilities.

Spells #

Navigate to Content > Content Types and select the Spells type.

Base Settings > Target Selection Settings #

  • Target Selection Type
    Select: Template
  • Template
    Select: Enemy Single Grid Magic Range 5

Support #

Select the Support type.

Base Settings > Target Selection Settings #

  • Target Selection Type
    Select: Template
  • Template
    Select: Ally Single Grid Range 3

Battle Menu #

Since the attack spells now depend on the rotation of the user, we’ll add the grid orientation command to the battle menu.

Navigate to Menus > Battle Menus and select the Default battle menu.

Copy Option 1 (the Grid Move command) and change the newly added copy (Option 2).

  • Type
    Select: Grid Orientation

Save Changes #

And that’s it for the use/affect range setup.

Don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.

Testing #

Hit play and start a battle.

https://orkframework.com/wp-content/uploads/ork4_tutorials_gameplay__battle_grid_range_demo.mp4

The new orientation and use/affect ranges are working, great!

The next part of the grid mini-series will set up a new camera control that’ll be used during grid battles.

Table of Contents
  • Battle Range Template
    • Grid Shape
  • Target Selection Templates
    • Enemy Single Grid Magic Range 5
      • Target Settings
      • Use Range Setting
      • Affect Range Settings
    • Ally Single Grid Range 3
      • Target Settings
      • Use Range Setting
  • Updating Content Types
    • Spells
      • Base Settings > Target Selection Settings
    • Support
      • Base Settings > Target Selection Settings
  • Battle Menu
  • Save Changes
  • Testing
Sitemap
  • ORK 4 BETA
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK
  • Contact
  • Blog
  • Makinom
  • gamingislove.com
Categories
  • News (73)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (156)
Search

© 2015 Gaming is Love e.U.

Disclosure: This site may contain affiliate links, which means I may receive a commission if you click a link and purchase something that I have recommended. While clicking these links won’t cost you any money, they will help me fund my development projects while recommending great assets!