Difference between revisions of "FF8/Variables"
< FF8
Jump to navigation
Jump to search
my_wiki>Shard |
my_wiki>Shard |
||
Line 1: | Line 1: | ||
<noinclude>By [[User:Shard|Shard]]. | <noinclude>By [[User:Shard|Shard]]. | ||
− | Game variables can be accessed using the PSHM family of script functions, and can be written to by using the POPM family of functions. Which one you use depends on the variable. | + | Game variables can be accessed using the PSHM family of script functions, and can be written to by using the POPM family of functions. Which one you use depends on the size of the variable. |
+ | |||
+ | The variables are all stored in save files, with the save block starting at address 0xD10 on uncompressed PC saves. The parameter to access a variable in the game scripts is basically the offset from this point in the variable block. For example, getting main story progress (word 256) just gets the two bytes starting at address 0xD10 + 0x100 = 0xE10. I would assume the varmap is continuous in memory while the game is running as well. | ||
+ | |||
</noinclude> | </noinclude> | ||
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;" | {| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;" | ||
! style="background:rgb(204,204,204)" | Var type | ! style="background:rgb(204,204,204)" | Var type | ||
! style="background:rgb(204,204,204)" | Var Number | ! style="background:rgb(204,204,204)" | Var Number | ||
− | |||
! style="background:rgb(204,204,204)" | Description | ! style="background:rgb(204,204,204)" | Description | ||
|- | |- | ||
! align="left" | Word | ! align="left" | Word | ||
| 84 | | 84 | ||
− | |||
| Last area visited. This is related to [[FF8/Field/Script/Opcodes/133_SETPLACE|SETPLACE]] somehow.<sub>4</sub> | | Last area visited. This is related to [[FF8/Field/Script/Opcodes/133_SETPLACE|SETPLACE]] somehow.<sub>4</sub> | ||
|- | |- | ||
! align="left" | Word | ! align="left" | Word | ||
| 256 | | 256 | ||
− | |||
| Main Story quest progress. | | Main Story quest progress. | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 266 | | 266 | ||
− | |||
| World map version? (3=Esthar locations unlocked) | | World map version? (3=Esthar locations unlocked) | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 334 | | 334 | ||
− | |||
| Ultimecia Castle seals. See [[FF8/Field/Script/Opcodes/159_SEALEDOFF|SEALEDOFF]] for details. | | Ultimecia Castle seals. See [[FF8/Field/Script/Opcodes/159_SEALEDOFF|SEALEDOFF]] for details. | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 341 | | 341 | ||
− | |||
| Concert Crappiness (in FH). | | Concert Crappiness (in FH). | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 440 | | 440 | ||
− | |||
| "First time" dialogue flags. (+16 Nida) | | "First time" dialogue flags. (+16 Nida) | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 488 | | 488 | ||
− | |||
| Alternate Party Flags. Irvine +1/+16, Quistis +2/+32, Rinoa +4/+64, Zell +8/+128.<sub>1</sub> | | Alternate Party Flags. Irvine +1/+16, Quistis +2/+32, Rinoa +4/+64, Zell +8/+128.<sub>1</sub> | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 625 | | 625 | ||
− | |||
| Cutscene visited flags (+8 Zell's room) | | Cutscene visited flags (+8 Zell's room) | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 720 | | 720 | ||
− | |||
| Squall's costume (0=normal, 1=student, 2=SeeD, 3=Bandage on forehead) | | Squall's costume (0=normal, 1=student, 2=SeeD, 3=Bandage on forehead) | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 721 | | 721 | ||
− | |||
| Zell's Costume (0=normal, 1=student, 2=SeeD) | | Zell's Costume (0=normal, 1=student, 2=SeeD) | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 722 | | 722 | ||
− | |||
| Selphie's costume (0=normal, 1=student, 2=SeeD) | | Selphie's costume (0=normal, 1=student, 2=SeeD) | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 728 | | 728 | ||
− | |||
| Does lots of things.<sub>3</sub> | | Does lots of things.<sub>3</sub> | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 730 | | 730 | ||
− | |||
| Joined Garden Festival committee (1=yes, 0=no) | | Joined Garden Festival committee (1=yes, 0=no) | ||
|- | |- | ||
! align="left" | Byte | ! align="left" | Byte | ||
| 734 | | 734 | ||
− | |||
| Split Party Flags (+1 Zell, +2 Irvine, +4 Rinoa, +8 Quistis, +16 Selphie).<sub>2</sub> | | Split Party Flags (+1 Zell, +2 Irvine, +4 Rinoa, +8 Quistis, +16 Selphie).<sub>2</sub> | ||
|} | |} |
Revision as of 00:41, 26 May 2014
By Shard.
Game variables can be accessed using the PSHM family of script functions, and can be written to by using the POPM family of functions. Which one you use depends on the size of the variable.
The variables are all stored in save files, with the save block starting at address 0xD10 on uncompressed PC saves. The parameter to access a variable in the game scripts is basically the offset from this point in the variable block. For example, getting main story progress (word 256) just gets the two bytes starting at address 0xD10 + 0x100 = 0xE10. I would assume the varmap is continuous in memory while the game is running as well.
Var type | Var Number | Description |
---|---|---|
Word | 84 | Last area visited. This is related to SETPLACE somehow.4 |
Word | 256 | Main Story quest progress. |
Byte | 266 | World map version? (3=Esthar locations unlocked) |
Byte | 334 | Ultimecia Castle seals. See SEALEDOFF for details. |
Byte | 341 | Concert Crappiness (in FH). |
Byte | 440 | "First time" dialogue flags. (+16 Nida) |
Byte | 488 | Alternate Party Flags. Irvine +1/+16, Quistis +2/+32, Rinoa +4/+64, Zell +8/+128.1 |
Byte | 625 | Cutscene visited flags (+8 Zell's room) |
Byte | 720 | Squall's costume (0=normal, 1=student, 2=SeeD, 3=Bandage on forehead) |
Byte | 721 | Zell's Costume (0=normal, 1=student, 2=SeeD) |
Byte | 722 | Selphie's costume (0=normal, 1=student, 2=SeeD) |
Byte | 728 | Does lots of things.3 |
Byte | 730 | Joined Garden Festival committee (1=yes, 0=no) |
Byte | 734 | Split Party Flags (+1 Zell, +2 Irvine, +4 Rinoa, +8 Quistis, +16 Selphie).2 |
Notes
- 1. When the party splits in disc 2, each party member in the inactive party except Selphie has one of the eight bits changed for this variable. One member has a flag in the 4 most significant bits, and the other has a flag in the 4 least significant bits. It's done this way so that when the characters appear, they animate towards different locations in the field, rather than stacking on top of each other.
- 2. This byte contains flags for which characters are in Squall's party when the party splits in disc 2.
- 3. List of everything known that 728 holds throughout the game:
- SeeD field exam "Conduct" score (lose points when you do something wrong at Dollet).
- Tomb of the Unknown King student ID.
- Who you took to space in disc 3.
- 4. The field controlling restriction unlocking in Ultimecia's Castle uses this to figure out where to jump the party after they've broken a seal. It's unknown how SETPLACE actually sets this, it's not always related to the field ID or the SETPLACE parameter. This variable is also set at Balamb Garden's front gate manually.