Changes

Jump to navigation Jump to search

FF7/Battle/Battle Scenes/Battle AI Addresses

3,180 bytes added, 21:26, 14 June 2012
Actor Specific: Still not competely done...
==Actor Specific==
These values are reflections of a given actor's status. They include some obvious things like Statuses, Level, HP, MP, etc and a few abstract things like Animation IDs for reactions. Every actor has their own copy of these values that reflects their instance. These values are accessed by masking the address with a specific actor(s) in the script. Using the mask will let the script interpreter know which set of physical addresses to use.
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
|}
<br/>
<p>Thanks to unchecked memory leaks<sup>1</sup>, any actor can directly access another actor's script values. The following table is to be read across to show what address should be used to access another actor's values starting at 4000. For example, Actor 2 can use 4D00 to access Actor6's values. Also, Actor 8 can use 2540 to access Actor 1's values.{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204,204,204)" | Actors<sup>2</sup>! style="background:rgb(204,204,204)" | Actor 0! style="background:rgb(204,204,204)" | Actor 1! style="background:rgb(204,204,204)" | Actor 2! style="background:rgb(204,204,204)" | Actor 3! style="background:rgb(204,204,204)" | Actor 4! style="background:rgb(204,204,204)" | Actor 5! style="background:rgb(204,204,204)" | Actor 6! style="background:rgb(204,204,204)" | Actor 7! style="background:rgb(204,204,204)" | Actor 8! style="background:rgb(204,204,204)" | Actor 9! style="background:rgb(204,204,204)" | RAVs<sup>3</sup>|-! style="background:rgb(204,204,204)" | Actor 0| *| 4340| 4680| 49C0| 4D00| 5040| 5380| 56C0| 5A00| 5D40| 6080|-! style="background:rgb(204,204,204)" | Actor 1| 2220| *| 4340| 4680| 49C0| 4D00| 5040| 5380| 56C0| 5A00| 5D40|-! style="background:rgb(204,204,204)" | Actor 2| 2220| 2540| *| 4340| 4680| 49C0| 4D00| 5040| 5380| 56C0| 5A00|-! style="background:rgb(204,204,204)" | Actor 3| 2220| 2540| 2880| *| 4340| 4680| 49C0| 4D00| 5040| 5380| 56C0|-! style="background:rgb(204,204,204)" | Actor 4| 2220| 2540| 2880| 2BC0| *| 4340| 4680| 49C0| 4D00| 5040| 5380|-! style="background:rgb(204,204,204)" | Actor 5| 2220| 2540| 2880| 2BC0| 2F00| *| 4340| 4680| 49C0| 4D00| 5040|-! style="background:rgb(204,204,204)" | Actor 6| 2220| 2540| 2880| 2BC0| 2F00| 3240| *| 4340| 4680| 49C0| 4D00|-! style="background:rgb(204,204,204)" | Actor 7| 2220| 2540| 2880| 2BC0| 2F00| 3240| 3580| *| 4340| 4680| 49C0|-! style="background:rgb(204,204,204)" | Actor 8| 2220| 2540| 2880| 2BC0| 2F00| 3240| 3580| 38C0| *| 4340| 4680|-! style="background:rgb(204,204,204)" | Actor 9| 2220| 2540| 2880| 2BC0| 2F00| 3240| 3580| 38C0| 3C00| *| 4340|}This is mostly unhelpful as formations can vary greatly and actors can still indirectly access each other's values based on controllable conditions. There are lots of examples of indirect access, the memory leak trick is just interesting.</p><br/><p>NOTES:<br/>1 - These Address values are only checked by the minimum valueand stored accordingly. The structure in memory stores the Global Variables first, the Actor Variables second, and the Random Access Variables last. Technically, a value of 0xFFFF could be used as an address, but that would result in a memory leak producing erratic results.<br/>2 - Actors 0-2 are player controlled characters, Actors 4-9 are enemies. Actor 3 is a omnipresent battle actor that holds formation AI, if it exists. It does nothing on its own and is only used in a few boss battles.<br/>3 - This will access the Random Access Variables starting at 0x0000. This is stupid as it requires more work to get to them. Don't do it this way!<br/></p>
Anonymous user

Navigation menu