For a certain formation mold, this script generates and interprets the rewriting caused by the sketch glitch. The output of the script is a csv file. Here is the description of the content of the spreadsheet. When a cell contains multiple elements separated by a dash, then the sketch glitch cause this element to be overwritten multiple times.
Spell setup = XXYY
- XX: Aiming byte of 28th spell
01 (Allies or enemies, single): Safe, Haste, Bserk, Rflect, Shell, Vanish, Life, Life 2 03 (Allies, single target): Antdot, Remedy, Regen, Life 3 04 (Allies and enemies, multi target): Quake, W Wind, Merton 21 (Allies or enemies, single or multi target): Float, Cure, Cure 2, Cure 3 29 (Allies or enemies, multi or single target): Haste 2 41 (Enemies or allies, single target): Poison, Drain, Break, Doom, Pearl, Flare, Scan, Slow, Rasp, Mute, Sleep, Muddle, Stop, Imp, Osmose, Dispel 61 (Enemies or allies, single or multi target): Fire, Ice, Bolt, Fire 2, Ice 2, Bolt 2, Bio, Fire 3, Ice 3, Bolt 3 6A (Enemies, multi target): X-Zone
- YY: Queue of 28th spell availability Bit 7: Is the spell currently castable?
Bit 0-6: Past values. Every time the character is casting a spell, or get Imped/Deimped, the game checks if the spell is castable, and push bit 0 to the queue if castable, 1 if not. Inited as FF
Command slot = Name (XX/YY/ZZ)
- XX: Command id
- YY: Command availability -> Bit 7: Is the command useable?
- ZZ: Command aiming -> See under
Item slot = Name * Quantity (XX/YY/ZZ)
- XX: Item flags
08: Is a shield 10: Is a weapon 20: Can be thrown 40: Is a tool 80: Not usable as an item in battle
- YY: Item targeting
01: Affects single ally or enemy 02: Affects enemies or allies only 04: Affects all allies and enemies 08: Affects all allies or all enemies 10: Auto-accept default selection 20: Multiple selection possible 40: Enemy selected by default 80: Random selection among all enemies and allies
- ZZ: Item equipability
01: Onscreen character 0 can't equip item 02: Onscreen character 1 can't equip item 04: Onscreen character 2 can't equip item 08: Onscreen character 3 can't equip item
Magic slot = Name (XX/YY/ZZ)
- XX: Spell availability -> See above
- YY: Spell aiming -> See above
- ZZ: Spell cost
Engulf variables
- $3A8A -> Characters that have been engulfed
- $3A8D -> Active characters at the beginning of the fight
- $3EBC -> Bit 7 is set if engulf conditions are met:
- At least one character engulfed ($3A8A != 0)
- All characters at the beginning of the battle have been engulfed ($3A8A == $3A8D)