Okay, so here's my first attempt at a script for an invisible status monitor monster, to be added to every formation to supplement battle function.
EDIT: Eureka! I've got a working proof-of-concept. It's a little slow, but it functions as intended.
Quote:Old post:
Code:
[Script generated by: Final Fantasy 3us Multi Editor, Coded by Lord J]
[FF3usME version: 6.8.0]
[File version: 1.00]
[Section: Monster Battle Scripts]
[script #-1] ; orig idx=0, "Guard", nb. bytes=185
FC 1C 00 00 ; Executes commands, even if Quick is in effect
FB 01 36 ; Target self becomes invincible
FB 07 36 ; Target self becomes untargetable
FC 13 01 01 ; If 1 monster(s) or less remain
F5 00 01 00 ; Monsters are killed, suddently
FE ; End If and reset targeting
FC 0D 56 0C ; If variable VAR086 is greater than or equal to 12
F8 56 00 ; Set VAR086 to 0
FE ; End If and reset targeting
FC 0D 56 0B ; If variable VAR086 is greater than or equal to 11
F8 56 81 ; 1 added to VAR086
FC 08 37 02 ; If target all monsters except self is affected by status Poison
69 ; Poisoned
FE ; End If and reset targeting
FC 0D 56 0A ; If variable VAR086 is greater than or equal to 10
F8 56 81 ; 1 added to VAR086
FC 08 37 15 ; If target all monsters except self is affected by status Shell
6A ; Warded
FE ; End If and reset targeting
FC 0D 56 09 ; If variable VAR086 is greater than or equal to 9
F8 56 81 ; 1 added to VAR086
FC 08 37 0D ; If target all monsters except self is affected by status Muddle
6B ; Muddled
FE ; End If and reset targeting
FC 0D 56 08 ; If variable VAR086 is greater than or equal to 8
F8 56 81 ; 1 added to VAR086
FC 08 37 16 ; If target all monsters except self is affected by status Safe
6C ; Protected
FE ; End If and reset targeting
FC 0D 56 07 ; If variable VAR086 is greater than or equal to 7
F8 56 81 ; 1 added to VAR086
FC 08 37 0C ; If target all monsters except self is affected by status Berserk
6D ; Berserk
FE ; End If and reset targeting
FC 0D 56 06 ; If variable VAR086 is greater than or equal to 6
F8 56 81 ; 1 added to VAR086
FC 08 37 13 ; If target all monsters except self is affected by status Haste
6E ; Hastened
FE ; End If and reset targeting
FC 0D 56 05 ; If variable VAR086 is greater than or equal to 5
F8 56 81 ; 1 added to VAR086
FC 08 37 00 ; If target all monsters except self is affected by status Dark
6F ; Blinded
FE ; End If and reset targeting
FC 0D 56 04 ; If variable VAR086 is greater than or equal to 4
F8 56 81 ; 1 added to VAR086
FC 08 37 12 ; If target all monsters except self is affected by status Slow
70 ; Plasma
FE ; End If and reset targeting
FC 0D 56 03 ; If variable VAR086 is greater than or equal to 3
F8 56 81 ; 1 added to VAR086
FC 08 37 0B ; If target all monsters except self is affected by status Mute
71 ; Snare
FE ; End If and reset targeting
FC 0D 56 02 ; If variable VAR086 is greater than or equal to 2
F8 56 81 ; 1 added to VAR086
FC 08 37 14 ; If target all monsters except self is affected by status Stop
72 ; Cave In
FE ; End If and reset targeting
FC 0D 56 01 ; If variable VAR086 is greater than or equal to 1
F8 56 81 ; 1 added to VAR086
FC 08 37 0F ; If target all monsters except self is affected by status Sleep
73 ; Snowball
FE ; End If and reset targeting
FC 0D 56 00 ; If variable VAR086 is greater than or equal to 0
F8 56 81 ; 1 added to VAR086
FC 08 37 17 ; If target all monsters except self is affected by status Reflect
74 ; Surge
FE ; End If and reset targeting
FF ; End first wave of attack
FF ; End
Unfortunately it's not behaving as intended. I was trying to get the statuses to cycle each time this 'monster' got a turn, so that it would display something different. However, it seems to exclusively favor conditions near the bottom of the script, which is bizarre because other enemies with variable timers (Like the Imperial Airforce Base) appear to be arranged the same way and work as intended. For instance, if any enemy has sleep, the status monitor will never cast the spell associated with Safe.
Any pointers on what I'm doing wrong here? Is there a better way to set up a monster spell cycle?
Have a weird follow-up question, now. Enemies are only allowed three unique palettes per battle formation... how does the game determine which palettes to use? Are they indexed by monster number, or by formation position? That is, if I put in a fourth enemy type in a single battle but it's in the last or nearest-to-last formation slot, will it use the palette of an already-loaded enemy?
I ask because my current approach adds an enemy to every encounter, and while this enemy will be invisible I don't want its palette mussing up the others in the fight.