-
Notifications
You must be signed in to change notification settings - Fork 51
Battle Patch
Any mod folder can have a file BattlePatch.txt
.
The purpose of that file is to modify battles, enemies and their attacks outside of the binary format of the battle datas (dbfile0000.raw16.bytes).
The format of BattlePatch.txt
is line-based.
Lines starting with //
are comment lines and are ignored.
Each line can be either a selector (select a battle, a battle pattern, an enemy or an attack) or a field modifier.
For each line, the leading and trailing spaces and symbols =
are ignored, so selectors can be enclosed within that symbol for readability.
This file is also the only way to exceed some of integral native limits (such as Max HP being capped at 65,535) or use Memoria features that are not present in the battle binary format.
For example, the following lines increase Necron's Max HP to 100,000:
== Battle: 938 == = Enemy: 0 = MaxHP: 100000
Battles can be selected either by their numerical ID or by their name ID using the Battle
keyword.
The list of battles with their IDs can be found here.
Examples:
// Select Necron's battle using its numerical ID (but don't do anything with it) == Battle: 938 == // Select Necron's battle using its name ID instead == Battle: BSC_CW_E086 ==
A pattern ("Group" in the tool Hades Workshop) is a disposition of the enemies, mainly used to define different possible number of enemies.
The AP reward is defined per pattern.
Patterns can be selected by their index (starting with 0
) using the Pattern
keyword.
They can be selected only if a battle was previously selected.
Examples:
// Select the battle against Garuda(s) on the World map's forest and make its 2nd pattern (the one in which 2 Garudas are fought) give 4 AP == Battle: BSC_WM_1606 == = Pattern: 1 = AP: 4
Enemies can be selected either by their index (starting with 0
) or by their name using one of the keywords Enemy
, EnemyByName
or AnyEnemyByName
.
The two first keywords can be used only if a battle was previously selected.
The last keyword will select all the enemies with the given name across all the battles.
Examples:
// Select the enemy Beatrix when fought in Burmecia and increase her max HP == Battle: BSC_BU_E015 == = EnemyByName: Beatrix = MaxHP: 20000 // Decrease the speed of Beatrix for all 3 of the battles against her = AnyEnemyByName: Beatrix = Speed: 20
As for enemies, enemy attacks can be selected either by their index (starting with 0
) or by their name using one of the keywords Attack
, AttackByName
or AnyAttackByName
.
The two first keywords can be used only if a battle was previously selected.
The last keyword will select all the attacks with the given name across all the battles.
Examples:
// Select the enemy's spell Fire used by Black Waltz 1 and increase its power == Battle: BSC_IC_E011 == = AttackByName: Fire = Power: 20 // Select all the spells Silence used by any enemy and set their base accuracy to 50% = AnyAttackByName: Silence = Rate: 50
The following fields can be modified once a battle is selected:
Keyword | Field type | Description |
---|---|---|
SpecialStart | Boolean (true/false) | Define whether a battle's start should be handled by its event script |
BackAttack | Boolean (true/false) | When enabled, the battle is always a back attack |
NoGameOver | Boolean (true/false) | When enabled, a loss ends the battle without triggering a game over |
NoExp | Boolean (true/false) |
Unused/dummied; use AfterEvent: false to disable battle rewards
|
WinPose | Boolean (true/false) | When disabled, the victory fanfare doesn't play nor the characters' winning pose |
Runaway | Boolean (true/false) | When disabled, the player cannot run away |
NoNeighboring | Boolean (true/false) | When enabled, all the enemies are out of reach |
NoMagical | Boolean (true/false) | When enabled, magic spells cannot be used |
ReverseAttack | Boolean (true/false) | When enabled, the Ipsen curse is applied on weapon attacks |
FixedCamera1 | Boolean (true/false) | When enabled, prevent a couple of camera movements |
FixedCamera2 | Boolean (true/false) | When enabled, prevent a couple of camera movements |
AfterEvent | Boolean (true/false) | When disabled, the reward screens are not displayed and no reward is given |
FieldBGM | Boolean (true/false) | When enabled, the music background is assumed to be handled by the field |
Preemptive | Boolean (true/false) | When enabled, the battle is always preemptive in favor of the player |
BattleBackground | BBG name | The battleground in which the battle takes place |
The following fields can be modified once a pattern is selected. The number of enemies and their type cannot be modified yet.
Keyword | Field type | Description |
---|---|---|
Rate | Integer | Percentage of getting this pattern rather than others (assuming the sum of the rates of the patterns before it is less than 100) |
Camera | Integer | The index of the camera movements opening the battle and the default camera point of view |
AP | Integer | The number of AP given as a reward |
The following fields can be modified after one or several enemies are selected:
Keyword | Field type | Description |
---|---|---|
ResistStatus | Status | Comma-separated list of status(es) against which the enemy is immune |
AutoStatus | Status | Comma-separated list of status(es) that the enemy keeps during the whole fight |
InitialStatus | Status | Comma-separated list of status(es) that the enemy gets at the start of the battle |
MaxHP | Integer | The enemy's max HP |
MaxMP | Integer | The enemy's max MP |
WinGil | Integer | The gil reward when defeating the enemy |
WinExp | Integer | The experience reward when defeating the enemy |
WinItems | 4x Item |
The 4 items reward when defeating the enemy (use 255 or NoItem for empty slots)
|
WinItemRates | 4x Integer |
The 4 item drop rates (256 means 100%; the default rates are WinItemRates: 256 96 32 1 )
|
StealItems | 4x Item |
The 4 items that can be stolen to the enemy (use 255 or NoItem for empty slots)
|
StealItemRates | 4x Integer |
The 4 item steal rates (256 means 100%; the default rates are WinItemRates: 256 64 16 1 )
|
GuardElement | Bit flags (element) |
The enemy's elemental immunities (eg. 1 for Fire or 3 for both Fire and Ice)
|
AbsorbElement | Bit flags (element) |
The enemy's elemental absorptions (eg. 1 for Fire or 3 for both Fire and Ice)
|
HalfElement | Bit flags (element) |
The enemy's elemental resistances (eg. 1 for Fire or 3 for both Fire and Ice)
|
WeakElement | Bit flags (element) |
The enemy's elemental weaknesses (eg. 1 for Fire or 3 for both Fire and Ice)
|
BonusElement | Bit flags (element) |
The enemy's elemental boosts (eg. 1 for Fire or 3 for both Fire and Ice)
|
Level | Integer | The enemy's level (max is 255) |
Category | Bit flags (category) |
The enemy's category (eg. 3 for both Humanoid and Beast)
|
HitRate | Integer | Unused field |
Speed | Integer | The enemy's speed (max is 255) |
Strength | Integer | The enemy's strength (max is 255) |
Magic | Integer | The enemy's magic (max is 255) |
Spirit | Integer | The enemy's spirit (max is 255) |
PhysicalDefence | Integer | The enemy's defence (max is 255) |
PhysicalEvade | Integer | The enemy's evade (max is 255) |
MagicalDefence | Integer | The enemy's magic defence (max is 255) |
MagicalEvade | Integer | The enemy's magic evade (max is 255) |
BlueMagic | Integer (spell ID) | The Blue magic learned when eating the enemy |
WinCard | Integer (card ID) | The enemy's card drop |
WinCardRate | Integer | The enemy's card drop rate (256 means 100%) |
OutOfReach | Boolean (true/false) | Whether the enemy is out or reach |
TextureFiles | List of file paths |
List of custom texture files or assets
Examples: TextureFiles: CustomTextures/Dragon_0.png CustomTextures/Dragon_1.png
will seek the files FF9_Data/CustomTextures/Dragon_X.png in the mod folder and use them for re-texturing the enemy
or TextureFiles: models/4/20/20_0 models/4/20/20_1
will seek the assets Assets/Resources/Models/4/20/20_X.png in the p0data4.bin archive and use them for re-texturing the enemy
|
SupportingAbilityFile | File path | The path to a text file containing Supporting ability features used by the enemy or by player characters when they transform into that enemy |
WeaponModel | Model name ID |
A (weapon) model attached to the enemy's main model, eg. WeaponModel: GEO_WEP_B1_041
|
WeaponAttachment | Integer (bone ID) |
The bone to which the weapon model is attached
The default weapon attachments when the enemy uses a player character model are: 19 (Zidane), 17 (Vivi), 15 (Dagger), 16 (Steiner), 6 (Freya), 14 (Quina), 15 (Eiko), 16 (Amarant), 14 (Blank), 16 (Beatrix) |
TranceGlowingColor | 3x Integer |
The glowing RGB color for the enemy's trance, when the enemy has access to trance
The default color is TranceGlowingColor: 255 96 96
|
MaxDamageLimit | Integer |
The damage/heals limit for the attacks used by the enemy (default is 9999 )
|
MaxMpDamageLimit | Integer |
The MP damage/heals limit for the attacks used by the enemy (default is 999 )
|
The following fields can be modified after one or several attacks are selected:
Keyword | Field type | Description |
---|---|---|
ScriptId | Integer |
The ID of the attack script, defined by the scripts in StreamingAssets/Scripts/Sources/Battle/
|
Power | Boolean (true/false) | The attack's power (max is 255) |
Elements | Bit flags (element) |
The attack's element (eg. 1 for Fire or 3 for both Fire and Ice)
|
Rate | Integer | The attack's rate/accuracy (max is 255) |
Category | Bit flags (category) | The attack's category/flags |
AddStatusNo | Integer |
The status set (as defined in StatusSets.csv ) for scripts allowing it
|
MP | Integer | The MP cost |
Type | Bit flags (type) | The attack's type/flags |
VfxIndex | Special effect | The attack's main SFX ID (for enemies, it only affects the SFX of Return Magic) |
Vfx2 | Special effect | The attack's secondary SFX ID |
SequenceFile | File path |
A path to a custom attack sequence
Example: SequenceFile: CustomSequences/Dragon_Magic.seq
will seek the file FF9_Data/CustomSequences/Dragon_Magic.seq in the mod folder and use it as a custom attack sequence
|
Target | TargetType | Unused for enemy attacks |
DefaultAlly | Boolean (true/false) | Unused for enemy attacks |
DisplayStats | TargetDisplay | Unused for enemy attacks |
ForDead | Boolean (true/false) | Whether the attack targets KO characters |
DefaultCamera | Boolean (true/false) | Whether the alternative camera should be always used or randomly used |
DefaultOnDead | Boolean (true/false) | Whether KO'ed characters should be targeted in priority |
MorphForceAccess | Boolean (true/false) |
For player characters transforming into the enemy: make sure that the attack is added to the command's attack list (by default, an enemy attack is added if its ScriptId is anything but 64 )
|
MorphDisableAccess | Boolean (true/false) | For player characters transforming into the enemy: make sure that the attack is not added to the command's attack list and is not added as the default Attack command |
AlternateIdleAccess | Boolean (true/false) | For player characters transforming into the enemy: make sure that the attack is only accessible in the alternate stance |