Anonymous

Changes

From Final Fantasy Inside

FF7/Battle/Battle Scenes/Battle AI Addresses

2,263 bytes added, 05:10, 23 May 2019
m
17 revisions imported
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! style="background:rgb(204,204,204)" | Address
! style="background:rgb(204,204,204)" colspan="2" | Value
|-
| 0x2000
| colspan="2" | Command Index of last action performed
|-
| 0x2008
| colspan="2" | Action Index of last action performed
|-
| 0x2010
| colspan="2" | Memory 1/2 Bank access value
|-
| 0x2018
| colspan="2" | DUMMY. Used in one script in a test enemy.
|-
| 0x2020
| colspan="2" | Battle Formation (side, pincer, pre-emptive, etc.)
|-
| 0x2038
|style="background:rgb(255,255,204)" colspan="2" | Limit Level. Only used by Vincent during transformation.
|-
| 0x2050
| colspan="2" | Active Actor List. A bit mask of all active (scripts enabled) actors.
|-
| 0x2060
| colspan="2" | Single bit indicating which actor owns the script that is currently executing. Changes as scripts are triggered.
|-
| 0x2070
| colspan="2" | Bit mask of actors indicating targets of the current action. Should be set prior to any action.
|-
| 0x2080
| colspan="2" | Bit mask of actors indicating actors the current actor considers as allies. Changes as scripts are triggered.
|-
| 0x2090
| colspan="2" | Bit mask of ''active'' actors indicating actors the current actor considers as allies. Changes as scripts are triggered.
|-
| 0x20A0
| colspan="2" | Bit mask of actors indicating actors the current actor considers as enemies. Changes as scripts are triggered.
|-
| 0x20B0
| colspan="2" | Bit mask of ''active'' actors indicating actors the current actor considers as enemies. Changes as scripts are triggered.
|-
| 0x20C0
| colspan="2" | Bit mask of active player's characters
|-
| 0x20E0
| colspan="2" | Bit mask of all active and inactive actors present in the battle.
|-
| 0x2110
|style="background:rgb(255,255,204)" colspan="2" | Set of flags indicating battle rewards (some functions unknown; most won't be set until end of battle).|-| style="background:rgb(204,204,255)" rowspan="6"|| 0x2111 | End battle; Marked as Escaped|-| 0x2112| End battle; Pose for Victory (if 0x2116 is unset)|-| 0x2113| End battle; No Reward|-| 0x2114| End battle (unsets 0x2113 unless escaped, unsets 0x2111 in that case)|-| 0x2115| (unsets 0x2112)|-| 0x2116 | No Victory Pose (unsets 0x2115)
|-
| 0x2120
| colspan="2" | Elements of last performed action.
|-
| 0x2140
| colspan="2" | Formation Index of the current battle.
|-
| 0x2150
| colspan="2" | Index of last performed action.|-| 0x2160| style="background:rgb(255,255,204)" colspan="2" | Some sort of flags (unknown effect).
|-
| style="background:rgb(204,204,255)" rowspan="6"|
| 0x2160
|style="background:rgb|-| 0x2161| Don't apply poison/regen?|-| 0x2162| Other battles in sequence|-| 0x2163| Empty all players' Limit Bars (255,255,204and other things)" |-| Some sort of flags 0x2164| Players can learn limits (unknown effectnever unset?).|-| 0x2165| No reward screen?
|-
| 0x2170
| colspan="2" | [[FF7/Battle/Special Attack Flags|Special Attack Flags]].
|-
| 0x2180
|style="background:rgb(255,255,204)" colspan="2" | Unknown(divisor of some sort related to limits)
|-
| 0x21A0
|style="background:rgb(255,255,204)" colspan="2" | Something to do with String display During Emerald Weapon battle, keeps track of how many eyes are active. (not sure whatPossible use in other battles, too).
|-
| 0x21C0
| colspan="2" | Party's Gil
|}
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! style="background:rgb(204,204,204)" | Address
! style="background:rgb(204,204,204)" colspan=2 | Value
|-
| 0x4000
| colspan=2 | Bitmask of current [[FF7/Battle/Status_Effects|Statuses]]|-| 0x4020| colspan=2 | Set of flags relating to situation.
|-
| style="background:rgb(204,204,255)" rowspan = 15 |
| 0x4020
| Set |-| 0x4021| Ally of flags relating current actor|-| 0x4022| |-| 0x4023| |-| 0x4024| |-| 0x4025| Defending|-| 0x4026| Back row|-| 0x4027| Attack connects|-| 0x4028| Immune to situation (defending, backrow, etc.).physical damage|-| 0x4029| Immune to magical damage|-| 0x402A| |-| 0x402B| Was covered / Defers damage|-| 0x402C| Immune to Death|-| 0x402D| Actor is dead|-| 0x402E| Actor is invisible
|-
| 0x4040
|stylecolspan="background:rgb(255,255,204)" 2 | UnknownActor Index
|-
| 0x4048
| colspan=2 | Level
|-
| 0x4058
| colspan=2 | Greatest Elemental Damage modifier (No damage, half, normal, etc.)
|-
| 0x4060
|stylecolspan="background:rgb2 | Character ID (255+10h) for playable Characters,255,204)" | UnknownInstance for enemies
|-
| 0x4068
| colspan=2 | Physical Attack Power
|-
| 0x4070
| colspan=2 | Magic Attack Power
|-
| 0x4078
| colspan=2 | Physical Evade
|-
| 0x4080
| colspan=2 | Idle Animation ID
|-
| 0x4088
| colspan=2 | Damaged Animation ID
|-
| 0x4090
| colspan=2 | Back Damage Multiplier
|-
| 0x4098
| colspan=2 | Model Size (default is 16)
|-
| 0x40A0
| colspan=2 | Dexterity
|-
| 0x40A8
| colspan=2 | Luck
|-
| 0x40B0
|style="background:rgb(255,255,204)" colspan=2 | Unknown Related to Idle Animations
|-
| 0x40B8
|stylecolspan="background:rgb2 | Character that was just covered. (255,255,204Character index +10h)" | Set to equal 0x4060 under unknown condition
|-
| 0x40C0
| colspan=2 | Target(s) of last action performed by actor
|-
| 0x40D0
| colspan=2 | Previous Attacker
|-
| 0x40E0
| colspan=2 | Previous Physical Attacker
|-
| 0x40F0
| colspan=2 | Previous Magical Attacker
|-
| 0x4100
| colspan=2 | Physical Defense Rating
|-
| 0x4110
| colspan=2 | Magical Defense Rating
|-
| 0x4120
| colspan=2 | Index of actor
|-
| 0x4130
| colspan=2 | Absorbed Elements
|-
| 0x4140
| colspan=2 | Current MP
|-
| 0x4150
| colspan=2 | Max MP
|-
| 0x4160
| colspan=2 | Current HP
|-
| 0x4180
| colspan=2 | Max HP|-| 0x41A0|style="background:rgb(255,255,204)" colspan=2 | Unknown (Used by Schizo's heads to tell the other head that it is dead. Maybe elsewhere?)
|-
| 0x4220
| colspan=2 | Initial Statuses
|-
| 0x4268
| colspan=2 | Magic Evade
|-
| 0x4270
| colspan=2 | Row
|-
| 0x4278
|style="background:rgb(255,255,204)" colspan=2 | Unknown(something to do with the camera?)
|-
| 0x4280
| colspan=2 | Gil stolen (Enemies only)
|-
| 0x4290
| colspan=2 | Item stolen (Enemies only)
|-
| 0x42A0
|style="background:rgb(255,255,204)" colspan=2 | Unknown Nullified Elements?
|-
| 0x42B0
| colspan=2 | AP actor is worth
|-
| 0x42C0
| colspan=2 | Gil actor is worth
|-
| 0x42E0
| colspan=2 | EXP actor is worth
|}
<br/>
<p>NOTES:<br/>
1 - Address values are only checked by the minimum value and 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 existsand is the placeholder for any summon models. 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>