Skip to content

Enemy Formations

Enemy Formations

Enemy Formations represent a group of enemies that can be fought together as a single battle encounter. Each formation defines which enemies are present, where they appear on the battlefield, the music that plays, and the conditions that determine victory, defeat, and escape.

A formation can be authored as a fixed roster, where the same enemies appear every time, or as a Formation Table, where rows are rolled against a chance evaluation method to assemble a randomized roster when the battle begins.

![Database.EnemyFormations](Database.EnemyFormations.png)

Note: Fixed rosters are typical for scripted encounters and bosses, while Formation Tables are typical for random and chance encounters where variety is desired. The chance evaluation method on a Formation Table is shared with Loot Tables, Shop Categories, and other weighted containers, and behaves the same way in each.

Properties

System

Name Explanation Type
Chance Evaluation Method Controls how the Formation Table is rolled when Uses Random Table is enabled. See Singular, Cumulative, and Reroll for the behavior of each method. Chance Evaluation Method
Custom Music The custom music to play during battle. Music
Defeat Conditions The conditions required to occur for defeat. Battle Condition
Enemies The enemies that compose a formation. Enemy Formation Item
Escape Chance The base chance, from 0 to 100, that the party rolls under to escape this battle. Has no effect when Is Escapable is disabled. Number
Formation Table The table to generate the enemy formation from. Enemy Formation Table Row
Is Escapable Whether the enemy formation can be escaped. Toggle
Name The name of the enemy formation. String
Use Custom Music Whether to use custom music during the battle. Toggle
Uses Random Table When enabled, the Enemies list is ignored and the formation roster is rolled from the Formation Table each time the battle begins. Toggle
Victory Conditions The conditions required to occur for victory. Battle Condition

Enemy Formation Item

Properties

System

Name Explanation Type
Enemy The index of the enemy in the database. Enemy
Random Rank Maximum The maximum rank to randomly set the enemy at. Number
Random Rank Minimum The minimum rank to randomly set the enemy at. Number
Rank The rank of the enemy to use. Variable or Value
Use Random Rank Whether to randomly set the rank of the enemy. Toggle
X The x coordinate to adjust the enemy position by. Number
Y The y coordinate to adjust the enemy position by. Number
Z The z coordinate to adjust the enemy position by. Number

Enemy Formation Table Row

Properties

System

Name Explanation Type
Chance The chance of occurrence. Number
Enemy The enemy formation item to use on the random occurrence. Enemy Formation Item

Chance Evaluation Method

Name Explanation
Singular Only one item will result. Calculates the total sum of all chances and picks a single result from the weighted range.
Cumulative Each roll is evaluated against the total of all rows. Can generate every result, using a single random number against the cumulative sum.
Reroll Each row is independently re-evaluated with its own random roll against the maximum chance. Can generate every result.