Skip to content
PhoenixBound edited this page Mar 2, 2024 · 17 revisions

List of files used:

  • BattleSprites/
  • enemy_configuration_table.yml
  • enemy_groups.yml
  • map_enemy_groups.yml

Battle Sprites

The enemies' in-battle sprites can be found in the BattleSprites/ directory. The filenames correspond with the numbers that identify them. You can change the color palette to any 15 colors, plus one color the game will use as transparency.

Enemy Statistics

Here's an example entry from enemy_configuration_table.yml:

3:
  '"The" Flag': 'true'
  Action 1: 4
  Action 1 Argument: 0
  Action 2: 4
  Action 2 Argument: 0
  Action 3: 4
  Action 3 Argument: 0
  Action 4: 95
  Action 4 Argument: 0
  Action Order: 0
  Boss Flag: 'false'
  Death Sound: normal
  Death Text Pointer: $ef6d96
  Defense: 108
  Encounter Text Pointer: $ef78b8
  Experience points: 1566
  Final Action: 0
  Final Action Argument: 0
  Fire vulnerability: 100%
  Flash vulnerability: 70%
  Freeze vulnerability: 100%
  Gender: neutral
  Guts: 5
  HP: 202
  Hypnosis/Brainshock vulnerability: 50%
  Initial Status: normal
  Item Dropped: 7
  Item Rarity: 16/128
  Level: 22
  Luck: 8
  Max Call: 0
  Mirror Success Rate: 50
  Miss Rate: 1
  Money: 77
  Movement pattern: 21
  Music: 98
  Name: Armored Frog
  Offense: 37
  Overworld Sprite: 280
  PP: 0
  Paralysis vulnerability: 50%
  Row: 1
  Run Flag: 'true'
  Speed: 7
  Type: normal
  Unknown: 2

Ye gods above! Let's examine that methodically.

  • "The" Flag - Whether or not the game should display a "the" before the enemy's name: true or false
  • Action 1, Action 2, Action 3, Action 4 - Actions from battle_action_table.yml - please note that when an enemy is executing this action, the party in the battle action entries means the enemy group, whereas enemy indicates the player characters. A list of action IDs can be found here (this list is incomplete). The associated Argument specifies an option to be passed to the action, which has a different meaning depending on the action (it could be an item number, or an enemy number if the enemy is calling for help).
  • Final Action - Indicates an action to be executed by the enemy once it has been defeated, Final Action Argument being its argument.
  • Action Order - Provides the order used by the enemy to run through each action:
    • 0 - random order,
    • 1 - random order where action 1 is favored with a 50% chance, then action 2 with a 25% chance, then actions 3 and 4, each with a 12.5% chance,
    • 2 - cycles through each action in order,
    • 3: staggered order, which gives a 50% chance of choosing either action 1 or 2 the first turn, then a 50% chance of choosing either action 3 or 4 the next turn, and then it repeats.
  • Boss Flag - Setting this to true makes it so you can't run away from this enemy, and that when you defeat it, the rest of the enemies onscreen will die as well. If you want to make a boss where the other enemies don't die when it dies, leave this set to false and enable the Run Flag (below). Please note that this flag does not control whether or not you get the boss swirl - Enemy groups 448 and above all have boss swirls. The rest of them are all normal.
  • Death Sound - Possible values: normal or boss
  • Death Text Pointer - The text to display when the enemy is defeated. For example, newEnemyStuff.FirstBossDeath points to a text block called "FirstBossDeath" in "newEnemyStuff.ccs", a CCScript file you might want to create.
  • Encounter Text Pointer - Indicates the location of the text to display once the enemy has been encountered. The format is the same as above.
  • Defense, Guts, HP, Level, Luck, Offense, PP and Speed - Represents the enemy's statistic levels, much like the player's levels. Level itself is used to determine whether the enemy should run away on sight or not.
  • Experience points - How many experience points the enemy is worth
  • Fire/Flash/Freeze/Hypnosis/Brainshock/Paralysis vulnerability - Describes how the enemy should be affected by specified attack or effect: if it is an attack, the percentage represents the damage that should be dealt to the enemy instead of the one it would normally receive; if it is a status effect, it is the chance that the effect will succeed.
  • Gender - Controls how the enemy will be referred to in the battle text: male, female, or neutral
  • Initial Status - Use this if you want the enemy to have a status affect at the start of the battle. Possible values: normal, asleep, cannot concentrate, feeling strange, psi shield alpha, psi shield beta, shield alpha, and shield beta
  • Item Dropped - Put an item number (from item_configuration_table.yml) here
  • Item Rarity - Possible values: 1/128, 2/128, 4/128, 8/128, 16/128, 32/128, 64/128, or 128/128
  • Max Call - The maximum number of enemies that can answer this enemy's calls for help
  • Mirror Success Rate - The percentage that Poo's Mirror ability will succeed with this enemy (this value has no % percent sign in front of it)
  • Miss Rate - How accurate the enemy will be at attacking the party. Possible values: 0 for "always hit" through 16 for "always miss"
  • Money - How much money the enemy drops upon defeat
  • Movement pattern - The movement pattern this enemy should use on the world map
  • Music - Which song gets used for battle music (see EBMusEd's BGM list for which song ID number to use)
  • Name - Unsurprisingly, the name of the enemy.
  • Overworld Sprite - Which sprite group to use for this enemy on the world map. The ID number to use here corresponds with the filenames of the images in SpriteGroups/
  • Row - The row the enemy should appear in when the battle begins
  • Run Flag - Whether or not the player can run from this enemy: true or false
  • Type - Possible values: normal, metal, and insect
  • Unknown - This possibly has something to do with the enemy's IQ stat, but we don't know if it ever gets used for anything

See also: the Enemy Configuration Table page on DataCrystal, and the enemy_data structure in ebsrc.

Enemy Groups

The groups of enemies encountered in battle are described in enemy_groups.yml, and allow you to control what types of enemies should be available in one group initially, what backgrounds should be displayed (see below for configuring these), and more. For example, let's take the group that makes up the Titanic Ant boss:

450:
  Background 1: 170
  Background 2: 169
  Enemies:
  - {Amount: 1, Enemy: 37}
  - {Amount: 2, Enemy: 209}
  Fear event flag: 0
  Fear mode: run away if flag is unset
  Letterbox Size: 0
  • Background 1 and Background 2 - Two battle backgrounds, as defined in bg_data_table.yml. If only one is specified, it should have a color depth of 4; if two are specified, they should have color depths of 2.
  • Enemies - a list of enemies to add to the enemy group, with the following format: {Amount: number_of_enemies, Enemy: ID_of_enemy}, where the ID references the IDs of enemy_configuration_table.yml.
  • Fear event flag - Specifies the flag which will determine the enemy group's fleeing behavior, as set with the next property.
  • Fear mode - Describes the way the enemy group will behave according to the specified flag; it can either be run away if flag is unset or run away if flag is set.
  • Letterbox Size - Indicates the size of the black bars at the top and bottom of the screen when entering battle mode; it can go from 0 to 3.

Boss Battle Swirls and invulnerability after battles

There are two properties that are controlled by the ID of the enemy group itself, instead of having a field in the table for them. These are:

  • All enemy groups less than 448 will make the party flash in the overworld and be temporarily invincible after winning.
  • All enemy groups with numbers 448 and above will have the boss battle swirl

If you want to change this cutoff point, and move it to earlier or later group numbers, use this simple ASM patch (Thanks Messianic!):

//Moving Boss Swirl to battle group X instead of 448
ROM[0xC25FC9] = CMP_i(0x##)
ROM[0xC2E94E] = CMP_i(0x##)

Adding these groups to the map

However, defining the enemy groups is insufficient for them to be used; you also need to specify how they should be handled on the map in map_enemy_groups.yml; you can later use these definitions in the EB Project Editor. Each map group is divided into two sub-groups, the first to be used before the flag is set, the second used after the flag is set. Each sub-group randomly selects an enemy group to present to the player. For example, here is the definition for one of the groups found early on in Onett, initially made up of Spiteful Crows, later on made up of Starmen and Evil Eyes:

1:
  Event Flag: 0x84
  Sub-Group 1:
    0: {Enemy Group: 1, Probability: 2}
    1: {Enemy Group: 2, Probability: 3}
    2: {Enemy Group: 3, Probability: 3}
  Sub-Group 1 Rate: 5
  Sub-Group 2:
    0: {Enemy Group: 4, Probability: 2}
    1: {Enemy Group: 5, Probability: 2}
    2: {Enemy Group: 6, Probability: 2}
    3: {Enemy Group: 7, Probability: 2}
  Sub-Group 2 Rate: 8

This syntax should look pretty familiar to you by now.

  • Event Flag - The flag which, when set, specifies that Sub-Group 2 should be used; when unset, Sub-Group 1 will be used.
  • Sub-Group 1 and Sub-Group 2 - List the enemy groups which could be selected randomly (using its Probability), specified by their ID from enemy_groups.yml. The probabilities in each sub-group must add up to 8.
  • Sub-Group 1/2 Rate - Specifies the chance, expressed as a percentage without the percentage sign, that a group will spawn.
Clone this wiki locally