Attack.Out Battle Event Conditionals
Attack.Out Battle Event Conditionals define what conditions must be met for a certain event to trigger, e.g. Dialog between units, choices (save algus/defeat death corps), etc.
This editor is contained in Raven's spreadsheet compilation, and can be downloaded here:
http://ffhacktics.com/smf/index.php?action=dlattach;topic=7271.0;attach=8754
A tutorial by RavenofRazgriz for this program can be found here:
http://ffhacktics.com/smf/index.php?topic=6694.0
Command Reference
All command IDs and parameters are halfword (2-byte) values. The names in the table for the commands and parameters are arbitrary since they don't actually have names in the code, but the names used here should hopefully be descriptive.
These were determined by going through the code that handles the conditionals. For the ASM routine, see Process Scenario Conditional.
ID | Hex | Signature | Description | Notes |
---|---|---|---|---|
1 | 01 | IsVariableEqualToValue(Variable, Value) | Passes check if value of Variable == Value. | |
2 | 02 | IsVariableGreaterThanOrEqualToValue(Variable, Value) | Passes check if value of Variable >= Value. | |
3 | 03 | IsVariableLessThanOrEqualToValue(Variable, Value) | Passes check if value of Variable <= Value. | |
4 | 04 | IsUnitPresent(UnitID) | Passes check if unit is present. | |
5 | 05 | IsUnitHPGreaterThanOrEqualToValue(UnitID, Value) | Passes check if specified unit HP >= Value. | Often used as an "Is Unit Alive" check (with Value set to 1). Straight HP check. |
6 | 06 | IsUnitHPLessThanOrEqualToValue(UnitID, Value) | Passes check if specified unit HP <= Value. | Often used as an "Is Unit KOed" check (with Value set to 0). Straight HP check. |
7 | 07 | IsUnitHPGreaterThanOrEqualToPercent(UnitID, Value) | Passes check if specified unit HP percent (out of max HP) >= Percent. | Calculation for HP percent is (HP * 100) / (MaxHP + 1) |
8 | 08 | IsUnitHPLessThanOrEqualToPercent(UnitID, Value) | Passes check if specified unit HP percent (out of max HP) <= Percent. | Calculation for HP percent is (HP * 100) / (MaxHP + 1) |
9 | 09 | IsUnitMPGreaterThanOrEqualToValue(UnitID, Value) | Passes check if specified unit MP >= Value. | |
10 | 0A | IsUnitMPLessThanOrEqualToValue(UnitID, Value) | Passes check if specified unit MP <= Value. | |
11 | 0B | IsUnitActiveTurn(UnitID) | Passes check if the specified unit has the Active Turn. | |
13 | 0D | IsRamzaEquippedWithItem(ItemID) | Passes check if Ramza is equipped with the specified item. | Checks all equipment slots for the item. |
14 | 0E | AreWarFundsGreaterThanOrEqualToValue(UselessParam, Value) | Passes check if War Funds (Variable 0x2c) >= Value. | First parameter is ignored. Functionally identical to IsVariableGreaterThanOrEqualToValue(0x2c, Value). |
15 | 0F | AreWarFundsLessThanOrEqualToValue(UselessParam, Value) | Passes check if War Funds (Variable 0x2c) <= Value. | First parameter is ignored. Functionally identical to IsVariableLessThanOrEqualToValue(0x2c, Value). |
16 | 10 | IsDateGreaterThanOrEqual(Month, Day, UselessParam) | Passes check if current Month and Day >= specified Month and Day. | Last parameter is ignored. |
17 | 11 | IsDateLessThanOrEqual(Month, Day, UselessParam) | Passes check if current Month and Day <= specified Month and Day. | Last parameter is ignored. |
18 | 12 | AreCasualtiesGreaterThanOrEqualToValue(Value, UselessParam) | Passes check if Casualties (Variable 0x62) >= Value. | Last parameter is ignored. Functionally identical to IsVariableGreaterThanOrEqualToValue(0x62, Value). |
19 | 13 | AreCasualtiesLessThanOrEqualToValue(Value, UselessParam) | Passes check if Casualties (Variable 0x62) <= Value. | Last parameter is ignored. Functionally identical to IsVariableLessThanOrEqualToValue(0x62, Value). |
22 | 16 | AreAllEnemiesDefeated() | Passes check if all enemies are defeated. | |
24 | 18 | IsUnitAtLocation(UnitID, X, Y, UpperLevel) | Passes check if specified unit is at the specified location. | |
25 | 19 | RunScenario(ScenarioID) | Runs the specified scenario. | |
37 | 25 | IsAnyTeamUnitAtLocation(TeamID, X, Y, UpperLevel) | Passes check if any unit with the specified TeamID is at the specified location. | The game actually checks the Palette # of the unit, not the team it is on. |