[FFVII] Is it possible to alter actor AP worth from a battle script?

  • Thread starter Thread starter Husbjörn
  • Start date Start date
Status
Not open for further replies.
H

Husbjörn

Guest
I noticed that the experience and gil rewards for defeating an enemy can be altered by changing its 0x42e0 and 0x42c0 values.
this page similarly suggests that tha AP value resides at offset 0x42b0.
It however turned out that changing this value has no discernible effect at all. I first thought that it might be that something else has the final say in what the AP value will be, but upon checking the value stored at Actor<word>[0x42b0] with the following simple counter script, it appears that this isn't even set to the actor's AP value as set in scene.bin at all:


0000| 02    2060        # Push self mask value
0003| 02    42B0        # Push AP reward offset value
0006| 80                # Resolve AP reward value of self and push it onto the top of the stack (as a 16-bit word)
0007| 61    03E8        # Push constant 16-bit word value (1000; corresponds to actor AP value set in scene.bin)
000A| 40                # Push true if the top values of the stack (popped) are equal, or false otherwise
000B| 70    0015        # Jump to offset if the values were not equal
000E| 93    "Equal\0"
0015| 93    "Not equal\0"
0026| 73


Memory scanning further reveals that the actual location of the AP value once loaded into RAM is always 15 bytes prior to the gil value, which is 4 bytes wide and followed immediately by the EXP value, occupying another 4 bytes. It is off course possible that the actual memory used by the process does not reflect the actor-data offsets used by the 0x80 instruction and no, altering the value at Actor<word>[0x4248] does not change the AP value either.


Is the memory offset suggested by the above wiki link incorrect or is something else at play here? Any thoughts or theories?

Edit: and what the heck, when previewing this post I notice that it automatically shows "off course" as "off course" even though it doesn't say that in the textarea I submitted? Some easter egg trolling?  ::)
Edit 2: apparently it happens in the final post as well; just to be clear "of course" is spelled with an "of" not an "off", unless you want the whole meaning changed... x)
 
So THAT'S what's going on. I thought it was odd that everyone was suddenly saying 'off course' all of a sudden, but I figured it was just some trend that had caught on 'cause of that Battle Square typo. Should it be changed, though? No, way!
 
So THAT'S what's going on. I thought it was odd that everyone was suddenly saying 'off course' all of a sudden, but I figured it was just some trend that had caught on 'cause of that Battle Square typo. Should it be changed, though? No, way!
Nah, I added it to the board's word filter.
 
Haha, I see. I wasn't aware of such a typo in the battle square, might have to go re-explore now.

As for the actual topic in question it unfortunately doesn't seem like the AP value can be changed from a script; I used the following to brute force change most any non-animation related actor value and still it stays the same:
Code: [Select]
Code:
12 206011 40488060 019012 206011 40508060 019012 206011 40588060 019012 206011 40688060 019012 206011 40708060 019012 206011 40788060 019012 206011 40908060 019012 206011 40988060 019012 206011 40A08060 019012 206011 40A88060 019012 206011 40B08060 019012 206011 40B88060 019012 206011 40C08060 019012 206011 40C88060 019012 206011 40D08060 019012 206011 40D88060 019012 206011 40E08060 019012 206011 40E88060 019012 206011 40F08060 019012 206011 40F88060 019012 206011 41008060 019012 206011 41088060 019012 206011 41108060 019012 206011 41188060 019012 206011 41208060 019012 206011 41288060 019012 206011 41308060 019012 206011 41388060 019012 206011 41408060 019012 206011 41488060 019012 206011 41508060 019012 206011 41588060 019012 206011 41608060 019012 206011 41688060 019012 206011 41708060 019012 206011 41788060 019012 206011 41808060 019012 206011 41888060 019012 206011 41908060 019012 206011 41988060 019012 206011 41A08060 019012 206011 41A88060 019012 206011 41B08060 019012 206011 41B88060 019012 206011 41C08060 019012 206011 41C88060 019012 206011 41D08060 019012 206011 41D88060 019012 206011 41E08060 019012 206011 41E88060 019012 206011 41F08060 019012 206011 41F88060 019012 206011 42008060 019012 206011 42088060 019012 206011 42108060 019012 206011 42188060 019012 206011 42208060 019012 206011 42288060 019012 206011 42308060 019012 206011 42388060 019012 206011 42408060 019012 206011 42488060 019012 206011 42508060 019012 206011 42588060 019012 206011 42608060 019012 206011 42688060 019012 206011 42708060 019012 206011 42788060 019012 206011 42808060 019012 206011 42888060 019012 206011 42908060 019012 206011 42988060 019012 206011 42A08060 019012 206011 42A88060 019012 206011 42B08060 019012 206011 42B88060 019012 206011 42C08060 019012 206011 42C88060 019012 206011 42D08060 019012 206011 42D88060 019012 206011 42E08060 019012 206011 42E88060 019012 206011 42F08060 019012 206011 42F88060 019012 206011 43008060 019012 206011 43088060 019012 206011 43108060 019012 206011 43188060 019012 206011 43208060 019012 206011 43288060 019012 206011 43308060 019012 206011 43388060 019012 206011 43408060 019012 206011 43488060 019012 206011 43508060 019012 206011 43588060 019012 206011 43608060 019012 206011 43688060 019012 206011 43708060 019012 206011 43788060 019012 206011 43808060 019012 206011 43888060 019012 206011 43908060 019012 206011 43988060 019012 206011 43A08060 019012 206011 43A88060 019012 206011 43B08060 019012 206011 43B88060 019012 206011 43C08060 019012 206011 43C88060 019012 206011 43D08060 019012 206011 43D88060 019012 206011 43E08060 019012 206011 43E88060 019012 206011 43F08060 019012 206011 43F88060 019073
Might have to go off the course then...  ;)
 
Last edited:
I typed up an actual answer to this question, but it appears to have gotten lost. :(

No. You cannot dynamically change AP values through AI. It only reads from the entry in the scene.bin file. Severely missed opportunity there. It would be really cool to have enemies change state and be worth more AP when in "magically charged." EXP and Gil can still be edited though, but I don't think EXP is ever changed in vanilla.
 
Missed opportunity indeed!
Out of curiosity, does any encounter have a non-static gil reward? (I haven't actually played through the game in ages).
 
Missed opportunity indeed!
Out of curiosity, does any encounter have a non-static gil reward? (I haven't actually played through the game in ages).
An enemy called TrickPlay does this action called Gold Mountain that increases dropped gil by 800 every time it does it. I don't think there's another example in all of the vanilla game that does this for gil or EXP, but both should be possible.
 
An enemy called TrickPlay does this action called Gold Mountain that increases dropped gil by 800 every time it does it. I don't think there's another example in all of the vanilla game that does this for gil or EXP, but both should be possible.
Ah yes I remember that one, though I don't think I ever realized that increased the dropped gil. That's pretty cool!
 
I never did either, but that's because gil is WAY too easy to come by... totally breaks the mechanics.

I am thinking of making it so that only bosses drop it (from the enemy side) in my difficulty mod.  Certainly I won't allow huge gil gains.
 
Status
Not open for further replies.
Back
Top