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

2D RPG Quickstart

  • START 2D RPG Quickstart
  • 01 Initial 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
  • END 2D RPG Quickstart

3D RPG Quickstart

  • START 3D RPG Quickstart
  • 01 Initial 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
  • END 3D RPG Quickstart

Status System Setup

  • START Status System Setup
  • 01 Status Values
  • 02 Status Development
  • 03 Attack/Defence Modifiers
  • 04 Status Effects
  • 05 Formulas
  • 06 Ability & Item Types
  • 07 Abilities Part 1: Attacks
  • 08 Abilities Part 2: Support & Sabotage
  • 09 Abilities Part 3: Elemental Magic
  • 10 Items
  • 11 Equipment Part 1: Slots & Slot Set Templates
  • 12 Equipment Part 2: Weapons
  • 12.5 (Optional) Equipment Part 2.5: Weapons
  • 13 Equipment Part 3: Shields, Armor & Accessories
  • 13.5 (Optional) Equipment Part 3.5: Shields, Armor & Accessories
  • 14 Equipment Part 4: Available Equipment Templates
  • 15 Loot
  • 16 Battle AIs
  • 17 Combatants Part 1: General Settings
  • 18 Combatants Part 2: Players
  • 19 Combatants Part 3: Enemies
  • 20 Combatant Groups
  • END Status System Setup

3D RPG Playground

  • START 3D RPG Playground
  • 01 Player Setup
  • 02 Start Menu
  • 03 First Interaction
  • 04 Music
  • 05 Areas
  • 06 Collecting Items
  • 07 Displaying Equipment
  • 08 Combatant Prefabs, Icons & Portraits
  • 09 Combatant Animations
  • 10 Camera Positions
  • ANIM 01 Battle Start/End Schematics
  • ANIM 02 Use, Cast & Camera
  • ANIM 03 Abilities & Items
  • ANIM 04 Physical Attacks
  • ANIM 05 Special Actions
  • BATTLE 01 Battle Menu
  • BATTLE 02 Prepare for Battle
  • TURN 01 Turn Based Setup
  • TURN 02 Turn Order HUD
  • ATB 01 Active Time Setup
  • ATB 02 Cast Times
  • ATB 03 Timebar HUD
  • BATTLE 03 The First Battle
  • BATTLE 04 Hunting Move AI
  • BATTLE 05 Spawning Combatants
  • 11 Save Games
  • MENU 01 UI Boxes
  • MENU 02 Template HUDs
  • MENU 03 Overview Menu
  • MENU 04 Menu Screens
  • 12 Shop
  • BATTLE 06 Random Battles
  • DUNGEON 01 Enter the Dungeon
  • DUNGEON 02 The Trapdoor
  • DUNGEON 03 Enemies on Level 1 & 2
  • DUNGEON 04 Traps on Level 3
  • DUNGEON 05 Going Deeper
  • 13 Bestiary (+MENU+ANIM)
  • QUEST 01 Hunting Quests (+MENU)
  • QUEST 02 Guard NPC
  • QUEST 03 Forest Ruin Cheese
  • QUEST 04 Witch NPC with Cheese
  • QUEST 05 Quest Mark HUDs
  • 14 Research Trees (+MENU)
  • CRAFT 01 Crafting Materials
  • CRAFT 02 Crafting Recipes
  • CRAFT 03 Crafting Menu
  • CRAFT 04 Crafting Proficiency & Critical Crafting
  • CRAFT 05 Materials Loot
  • 15 Changing Choice Dialogue
  • 16 Follow Me!
  • BATTLE 07 Sequence Loot Dialogue

3D Action RPG

  • START 3D Action RPG
  • 01 Status System Setup
  • 02 Player Setup
  • 03 Player Weapon
  • 04 Player Attacks
  • 05 Enemy: Chomper
  • 06 Chomper Attack
  • 07 Hit & Death
  • 08 HUDs
  • 09 Rolling on the Floor
  • 10 Enemy: Spitter
  • 11 Spit Attack
  • 12 Potion
  • 13 Grenade
  • 14 Item HUD
  • 15 Enemy: Grenadier
  • 16 Grenadier Melee Attacks
  • 17 Grenadier Flamethrower
  • 18 Item Drops
  • END 3D Action RPG

2D Grid Battle RPG

  • START 2D Grid Battle RPG
  • 01 Player Setup
  • 02 Prefab & Music Setup
  • 03 Randomizing Combatants
  • 04 UI Setup
  • 05 Battle Start, End & Phase Schematics
  • 06 Battle System Setup
  • 07 Battle Grid Setup
  • 08 Grid Move
  • 09 Forest Battle Grid
  • 10 Battle AI
  • 11 Ability Ranges
  • 12 Death & Use Schematics
  • 13 Attack Schematic
  • 14 Shoot Schematics
  • 15 Battle Selection Interaction
  • END 2D Grid Battle RPG

Schematics

  • Simple Start Schematic
  • Battle Start Schematic
  • Battle End Schematic
  • Moving to Target and Back
  • Animating a Base Attack
  • Animating a Magic Ability
  • Grid Movement
  • Open and Close UI Animations
  • Flying Text Mover

UI Setups

  • Unity UI: Initial Setup
  • Unity UI: TextMesh Pro Setup
  • Unity UI: UI Box
  • Unity UI: Flying Text
  • Unity UI: Dragging Notification
  • Unity UI: Canvas with Screen Space Camera
  • Unity UI: Interaction HUD
  • Unity UI: Simple Player HUD
  • Unity UI: Quest HUD
  • Unity UI: Shortcuts HUD
  • Unity UI: Currency HUD
  • Unity UI: Tooltip HUD
  • Unity UI: Control HUD
  • Unity UI: Attack Modifiers
  • Unity UI: Defence Modifiers

Gameplay Bits

  • Combining Input Origins
  • Combining Status Value Flying Texts
  • Fun With Flying Text
  • HUD Effects With Conditional Schematics
  • Inventory Containers
  • Multi Interaction Controllers
  • World Space HUD
  • World Space Dialogue
  • Home
  • Guide
  • Tutorials
  • 2D RPG Quickstart
  • 11 First Enemies & Battle AI

11 First Enemies & Battle AI

Table of Contents
  • Battle AIs
    • 0: Random Ability 25%
      • Battle AI Settings
      • Chance
      • Ability
    • 1: Random Ability 50%
      • Battle AI Settings
      • Chance
    • 2: Random Ability 75%
      • Battle AI Settings
      • Chance
  • Combatants General Settings
    • Battle Settings > Default Battle AI
  • Blue Mushroom
    • Content Information
    • Base Settings > Prefab Settings
    • Status Settings
      • Status Value Settings > Status Values
      • Status Value Settings > Experience Reward
    • Attacks & Abilities > Ability Development
  • Red Mushroom
    • Content Information
    • Base Settings > Prefab Settings
    • Status Settings
      • Status Value Settings > Status Values
      • Status Value Settings > Experience Reward
    • Battle Settings > Battle AI
  • Combatant Groups
    • Combatants > Combatant 0
    • Combatants > Combatant 1
  • Save Changes

In this tutorial we’ll set up some simple battle AIs and two enemy combatants.

Before diving into the battle system, we set up two enemies for the player to fight – a blue and a red mushroom.

The enemies will attack with the base attack (Attack ability) and randomly with a Poison Attack – we’ll set up battle AIs to handle this.

Battle AIs #

AI controlled combatants use battle AIs to select their actions in battle. Learn more about battle AIs in this documentation.

A combatant’s default action in battle is using their base attack, when no battle AI is used or no useable action was found, they’ll use their base attack.

We’ll make a very simple setup where the enemies use a random ability that’s available to the combatant (for our mushrooms it’s the Poison Attack) with a chance of 25, 50 or 75% – otherwise they’ll use their base attack.

Open the Makinom editor and navigate to Battles > Battle AI, we’ll change the Default battle AI and add additional battle AIs.

0: Random Ability 25% #

Has a 25% chance to use a random ability (available to the combatant).

In case the chance fails, this battle AI ends, continuing with the next battle AI fo the combatant (or using the base attack if no other battle AI is available).

Battle AI Settings #

  • Name
    Set to: Random Ability 25%

Chance #

Add Node > Base > Chance

Does chance checks and performs a next node based on it.

The a default chance check is already set up for us (Range 0), so let’s change.

  • Minimum Range
    Select Value > Value.
    Set the value to 0.
  • Maximum Range
    Select Value > Value.
    Set the value to 25.

Ability #

Add Node > Action > Ability

Uses an ability of the combatant – we’ll use a random ability.

The node is connected to the 0 – 25 next slot of the Chance node.

  • Use Random Ability
    Enable this setting
    This’ll use a random ability available to the combatant.
  • Use Highest Level
    Enable this setting.
    This’ll use the highest available (and usable) level that’s available to the combatant.
    We don’t really use abilities with multiple levels in this tutorial series, but it’s still a good practice.

1: Random Ability 50% #

Has a 50% chance to use a random ability (available to the combatant).

Copy the Random Ability 25% battle AI and change the following settings.

Battle AI Settings #

  • Name
    Set to: Random Ability 50%

Chance #

  • Maximum Range
    Select Value > Value.
    Set the value to 50.

2: Random Ability 75% #

Has a 75% chance to use a random ability (available to the combatant).

Copy the Random Ability 50% battle AI and change the following settings.

Battle AI Settings #

  • Name
    Set to: Random Ability 75%

Chance #

  • Maximum Range
    Select Value > Value.
    Set the value to 75.

Combatants General Settings #

Next, we’ll set up the default battle AI for all combatants – we’ll use the Random Ability 25% battle AI.

Navigate to Combatants > Combatants > General Settings.

Battle Settings > Default Battle AI #

Click on Add Battle AI.

  • Battle AI
    Select Random Ability 25%.

Blue Mushroom #

Navigate to Combatants > Combatants and add a new combatant.

Content Information #

  • Name
    Set to: Blue Mushroom

Base Settings > Prefab Settings #

  • Prefab
    Select the MushroomBlue prefab.
    You can find it in Assets/Tutorial Assets/Prefabs/Combatants/Enemies/.

Since our enemies are simple sprites without any animations, we don’t need to worry about the Update Mode or the used animation system for them.

Status Settings #

Our enemies don’t use a status development, i.e. they’ll have fixed status values. We’ll also set a level for them.

  • Start Level
    Set to 2.

Status Value Settings > Status Values #

Click on Set Default to add all Normal type status values with a default start value.

I’ll just list the status values and their start value here – i.e. you need to change the Start Value setting for each of the Initial Status Value settings.

  • Max HP
    Set to 16.
  • Max MP
    Set to 10.
  • ATK
    Set to 6.
  • DEF
    Set to 5.
  • MATK
    Set to 1.
  • MDEF
    Set to 5.

Status Value Settings > Experience Reward #

We’ll define the EXP the player receives when defeating this enemy here.

Click on Add Experience Reward.

  • Status Value
    Select EXP.
  • Reward Value
    Select Value > Value.
    Set the value to 3.

Attacks & Abilities > Ability Development #

We’ll add the Poison Attack to the combatant’s abilities.

Click on Add Ability.

  • Learn At Level
    Set to 1.
    This is the level at which the ability will become available.
  • Ability
    Select Poison Attack.

That’s it for our first enemy!

Red Mushroom #

The red mushroom is similar to the blue mushroom, just a bit stronger, and using the ability more often.

Copy the Blue Mushroom combatant and change the following settings.

Content Information #

  • Name
    Set to: Red Mushroom

Base Settings > Prefab Settings #

  • Prefab
    Select the MushroomRed prefab.

Status Settings #

  • Start Level
    Set to 3.

Status Value Settings > Status Values #

I’ll just list the status values and their start value here – i.e. you need to change the Start Value setting for each of the Initial Status Value settings.

  • Max HP
    Set to 35.
  • Max MP
    Set to 10.
  • ATK
    Set to 8.
  • DEF
    Set to 6.
  • MATK
    Set to 1.
  • MDEF
    Set to 8.

Status Value Settings > Experience Reward #

  • Reward Value
    Select Value > Value.
    Set the value to 4.

Battle Settings > Battle AI #

We’ll override the default battle AI to use the 50% chance for using an ability.

  • Replace Default
    Enable this setting.
    This’ll replace the default battle AI of the general settings.
    Otherwise, the battle AI of the combatant will be used first, followed by the default battle AI (if no action was found or the battle AI is used in queue mode).

Click on Add Battle AI.

  • Battle AI
    Select Random Ability 50%.

Combatant Groups #

Combatant groups can be used by battles, combatant spawners, etc. to create predefined groups. Learn more about combatant groups in this documentation.

We’ll set up a group with our two mushrooms – the group will have 2 of them, but each is randomly selected, so the group could be 2 red or 2 blue, or 1 red and 1 blue.

Navigate to Combatants > Combatant Groups, we’ll change the Default group.

  • Name
    Set to: Mushroom x2

Combatants > Combatant 0 #

This is the first combatant of the group.

  • Use Random Combatant
    Enable this setting.
    This’ll let us add multiple combatants for this group position, using 1 randomly.

Change the combatant of the already added Random Combatant 0.

  • Combatant
    Select Blue Mushroom.

Copy the random combatant and change the following setting.

  • Combatant
    Select Red Mushroom.

Combatants > Combatant 1 #

We’ll just copy Combatant 0, since we want to use the same setup for the 2nd combatant of the group.

No changes needed to the setup.

Save Changes #

And that’s it for now!

Save the changes using the Save Settings button at the bottom of the editor.

 

Next, we’ll set up our battle system.

Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Updated on March 6, 2023
Table of Contents
  • Battle AIs
    • 0: Random Ability 25%
      • Battle AI Settings
      • Chance
      • Ability
    • 1: Random Ability 50%
      • Battle AI Settings
      • Chance
    • 2: Random Ability 75%
      • Battle AI Settings
      • Chance
  • Combatants General Settings
    • Battle Settings > Default Battle AI
  • Blue Mushroom
    • Content Information
    • Base Settings > Prefab Settings
    • Status Settings
      • Status Value Settings > Status Values
      • Status Value Settings > Experience Reward
    • Attacks & Abilities > Ability Development
  • Red Mushroom
    • Content Information
    • Base Settings > Prefab Settings
    • Status Settings
      • Status Value Settings > Status Values
      • Status Value Settings > Experience Reward
    • Battle Settings > Battle AI
  • Combatant Groups
    • Combatants > Combatant 0
    • Combatants > Combatant 1
  • Save Changes
Sitemap
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK
  • Contact
  • Blog
  • Makinom
  • gamingislove.com
Categories
  • News (60)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (130)
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!