Author Topic: FF8 Fieldscript  (Read 2598 times)

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
FF8 Fieldscript
« on: 2006-07-09 21:17:14 »
I've been going back and forth over FF7's fieldscript system and I think that headway can be made to FF8's.

The script system seems pretty complex and was written to be "future proof" to a degree. This means I highly doubt that the script system was scrapped between FF7 Parasite Eve, and FF8.

Here's some assumptions.

The script system is "entity  based". This means that objects like Squall, drawpoints, and other people are all entity "units" that have a series of scripts attached to them.

All scripts must be initialized. This is usally done with the first script. One of Hiroki's (an event programmer for FF7 and FF8) "bad habits" is to call the init script "dic". (I think short for "director") Almost always the init script will have a CHAR, PC, TLKON, VISI, or SOLID command. (These are all two byte opcodes that are easy to find)

The entity themselves are named in *plain text*. This is true in FF8 as well as I've seen the "dic" lables

each entity has 32 "script slots" looked up with a table. If there is only two scripts used, then scripts 3 to 32 just repeat the last lookup address.

So if you were to look at the FF8 script file, you would find the following...

-[List of entities in plain text]  <--- look for a "dic" initialization label.

-[a script lookup table for each] <--  this will have double-byte value that go up and then repeat to fill the remaining slots.

-[the script data] <---- look for byte sequences such as the following at the beginning,
[A0 00] --> CHAR(0) this defines the main character, almost always the character you contol.
[A1 00] --> PC(0)  This defines which will be the controllable character
[7E 01] - TLKON (1) --> turns talking on
[C7 01] - SOLID (1)  ---> Makes the character "solid" so it doesn't walk through other entities
[A4 00] - VISI (01)   ---> makes the entity visiable.

Happy hunting!
« Last Edit: 2006-07-09 21:19:06 by halkun »