Final Fantasy VI/Monster Script Format

From Data Crystal
< Final Fantasy VI
Revision as of 12:58, 4 April 2013 by HatZen08 (talk | contribs) (Created page with "Final Fantasy VI - Monsters Script ==#$F0: Execute random spell== : Syntax: #$F0 <spell 1> <spell 2> <spell 3> : Execute one of three available spells to use. If the F1 comma...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Final Fantasy VI - Monsters Script

#$F0: Execute random spell

Syntax: #$F0 <spell 1> <spell 2> <spell 3>
Execute one of three available spells to use. If the F1 command is used and the target is valid, the default target of spells will be changed.

#$F1: Set targets

Syntax: #$F1 <target>
Try to change the target for the next executed spell. If the target is invalid, the instruction will fail.
  • <target> values:
    • #$00: Terra
    • #$01: Locke
    • #$02: Cyan
    • #$03: Shadow
    • #$04: Edgar
    • #$05: Sabin
    • #$06: Celes
    • #$07: Strago
    • #$08: Setzer
    • #$09: Relm
    • #$0A: Mog
    • #$0B: Gau
    • #$0C: Gogo
    • #$0D: Umaro
    • #$0E: Banon
    • #$0F: Leo
    • #$30: Monster ID 1
    • #$31: Monster ID 2
    • #$32: Monster ID 3
    • #$33: Monster ID 4
    • #$34: Monster ID 5
    • #$35: Monster ID 6
    • #$36: Self
    • #$37: All monsters (excluding itself)
    • #$38: All monsters
    • #$39: Random monster (excluding itself)
    • #$3A: Random monster
    • #$3B: All characters with Dead status
    • #$3C: Random character with Dead status
    • #$3D: All monsters with Dead status
    • #$3E: All monsters with Dead status
    • #$3F: All characters with Wall status
    • #$40: Random character with Wall status
    • #$41: All monsters with Wall status
    • #$42: Random monster with Wall status
    • #$43: All characters
    • #$44: Random character
    • #$45: Last attacking character/monster
    • #$46: All characters and monsters
    • #$47: Default spell target
    • #$48: Character ID 1
    • #$49: Character ID 2
    • #$4A: Character ID 3
    • #$4B: Character ID 4
    • #$4C: All targets or one random target (excluding itself)
    • #$4D: Last target of "Targetting" spell

#$F2: Formation change

Syntax: #$F2 #$00 <formation (low byte)> <formation (high byte)>
The instruction changes the actual enemy formation to a new one. This instruction has glitches and should be used with care.
  • The highest bit of the formation determinates if the monsters will use its actual or max HP.

#$F3: Display message

Syntax: #$F3 <message (low byte)> <message (high byte)>
Display a message.

#$F4: Use command

Syntax: #$F4 <commamnd 1> <command 2> <command 3>
Try to randomly use a character command, based in three commands available. The majority of the commands don't work and have glitches. This instruction should be used with care.

#$F5: Change enemies

Syntax: #$F5 <animation> <HP flags> <monsters bitfield>
The instruction changes between active and inactive enemies without changing the monster formation.
  • <HP flags> values:
    • #$00: Unhide and sets max HP
    • #$01: Hide and nulls HP
    • #$02: Unhide without changing HP
    • #$03: Hide and sets max MP
    • #$04: Hide without changing HP

#$F6: Throw or use items

Syntax: #$F6 <Usage flag> <Item 1> <Item 2>
The instruction throw or use items, based in the <Usage flag>. One of the two available items is choose at random.

#$F7: Special event

Syntax: #$F7 <Event ID>
Triggers a special event.

#$F8: Arithmetic Variable manipulation

Syntax: #$F8 <Variable ID> <Operation>
The instruction change variables values based in arithmetic operations.
The two highest bits of <Operation> determinate the operation. The other six bytes determinate the value for the operation.
  • Two highest bits of <Operation> values:
    • 00 bits: Set variable
    • 01 bits: Set variable
    • 10 bits: Add variable
    • 11 bits: subtract variable

#$F9: Bit Variable manipulation

Syntax: #$F9 <Operation> <Variable ID> <Related bits>
The instruction changes variables based in bits operations.
  • <Operation> values:
    • #$00: Toggle bits
    • #$01: Set bits
    • #$02: Clear bits

#$FA: Use animation

Syntax: #$FA <Animation> <monsters bitfield> <unknown>
The instruction executes a graphical animation for the specified enemies.
  • <Animation> values:
    • #$00: Monster stays, flashes red
    • #$01: Monster moves back, 1 step, slow
    • #$02: Monster moves forward, 1 step, slow
    • #$03: Monster moves back, 1 step, fast
    • #$04: Monster moves forward, 1 step, quick
    • #$05: Characters run to the right
    • #$06: Characters run to the left
    • #$07: Monster moves back, 3 steps, fast
    • #$08: Monster moves forward, 3 steps, quick
    • #$09: Unknow
    • #$0A: Head appears and screen shakes. (Kefka spell)
    • #$0B: Monster stays, flashes
    • #$0C: monster stays, flashes
    • #$0D: Boss death animation

#$FB: Miscellaneous

Syntax: #$FB <Opcode> <Target> <Complement>
The instruction does different miscellaneous operations, based in <Opcode>. The operations determinate if the <Complement> byte will be used.
  • <Opcode> values:
    • #$00: Sets the battle timer to zero.
    • #$01: Target becomes invincible.
    • #$02: Ends the battle.
    • #$03: Adds Gau to party.
    • #$04: Sets the global timer to zero.
    • #$05: Cancels invincibility.
    • #$06: Target becomes targettable.
    • #$07: Target becomes untargettable.
    • #$08: Unknow.
    • #$09: Ends combat.
    • #$0A: Nothing.
    • #$0B: Set permanent status. Status are set by <Complement>.
    • #$0C: Unset permanent status. Status are unset by <Complement>.

#$FC: Conditional execution

Executes a set of instructions, if the conditions are meet. It uses the first argument as the identifier of the condition. The other bytes complements the necessary data to check the conditions.
  • FC 01 <command ID> 00
Execute if the last attack was the command <command ID>.
  • FC 02 <spell ID> 00
Execute if the last attack was the spell <spell ID>.
  • FC 03 <item ID> 00
Execute if the last attack was the use of the item <item ID>
  • FC 04 <elements bitfield> 00
Execute if the last attack was one of the elements in the <elements bitfield>.
  • FC 05 00 00
Execute if the monster was attacked.
  • FC 06 <target> <HP>
Execute if the target HP is below the referenced <HP> * 128.
  • FC 07 <target> <MP>
Execute if the target MP is below the referenced <MP>.
  • FC 08 <target> <status>
Execute if the target <target> has the status <status>. If true, it also sets the target for the next attack.
  • FC 09 <target> <status>
Execute if the target <target> doesn't have the status <status>. If true, it also sets the target for the next attack.
  • FC 0A 00 00
Never executes.
  • FC 0B
Execute if the battle timer is more than
  • FC 0C <variable> <value>
Execute if the value of the variable <variable> is less than <value>.
  • FC 0D <variable> <value>
Execute if the value of variable <variable> is greater or equal than <value>.
  • FC 0E <target> <level>
Execute if the target level is less than <level>.
  • FC 0F <target> <level>
Execute if the target level is equal or greater than <Level>.
  • FC 10 00 00
Execute if there is only one kind of enemy.
  • FC 11 <monsters bitfield> 00
Execute if the monsters specified in the <monsters bitfield> are alive.
  • FC 12 <monsters bitfield> 00
Execute if the monsters specified in the <monsters bitfield> are dead.
  • FC 13 <character/monster> <number>
Execute if the number of alive character or monsters are greater than <number>
    • Note: #$00 is used for characters and otherwise is used for monsters.
  • FC 14 <variable> <bitfield>
Execute if the bits specified in <bitfield> are set in <variable>.
  • FC 15 <variable> <bitfield>
Execute if the bits specified in <bitfield> are unset in <variable>.
  • FC 16
Execute if global timer is greater than
  • FC 17 <target> 00
Execute if the target <target> is valid.
  • FC 18 <target> 00
Execute if Gau isn't in the party.
  • FC 19 <monster ID> 00
Execute if monster has the <monster ID> in the formation.
  • FC 1A <target> <elements bitfield>
Execute if target is weak against one element in <elements bitfield>
  • FC 1B <low battle formation> <high battle formation>
Execute if battle formation is equal to <battle formation>
  • FC 1C 00 00
Always execute.

#$FD: Wait next turn

Syntax: #$FD
Wait for the monster next turn. It resets targetting.

#$FE: End of conditional

Syntax: #$FE
Ends the conditional instruction #$FC. It resets targetting.

#$FF: End of script

Syntax: #$FF
The instruction is used to identify the end of the script for the monster. There is two blocks of instructions for monsters and they must end with the 0xFF instruction. The first block is executed in every monster turn. The second block is used in every monster counter.