It doesn't do much on it's own, it was just a practice to get used to inputting AI without problems popping up. The whole code was:
Code: [Select]
Code:
01 01C060 004070 00##*11 000060 509060 0001 00009511 201801 20109001 201060 324470 00##*11 01A003 205002 42E0809011 01C003 205002 42E0809011 205003 42E08001 01A060 02329011 01C060 009093: **73
*: Set this to the current cell value of 73/End Script; it auto-updates as the script gets shorter/longer, at least in simple scripts like this.
**: The 93 here is optional, I use it to check if something is triggering. In the ** cell you'd enter a bit of text, like 'test' or something.
Which in the decompiler looks like:
If ( (LocalVar:01C0 == 0) )
{
LocalVar:0000 <- 80
TempGlobal <- &GlobalVar(0000)
Unknown(2018) <- GlobalAddress
If ( (GlobalAddress > 50) )
{
LocalVar:01A0 <- ActiveMask.Exp
LocalVar:01C0 <- ActiveMask.Exp
ActiveMask.Exp <- LocalVar:01A0 * 2
LocalVar:01C0 <- 0
Display String: ""EXP sum triggered""
}
SCRIPT END
One thing to note is that while this script did appear to trigger in battle, it was a half-finished prototype where I essentially gave up on the EXP thing and was just trying random combinations to get it working so don't worry about that bit where it says Active Mask or EXP. The '0' at [LocalVar:01C0 <- 0] was supposed to be a 1 too, can't remember why I wanted the script running every time I attacked.
I'll get yelled at again for being hazy on the actual details, but here's what the things in this script sort of are:
LocalVar: 0000, 0020, ..., 01C0
These are like temporary variables the battle engine uses. They're not related to the field variables, I don't think. Most of the enemies of the game use these to determine their attacks. They go up in 20's but I've seen Gjoerulv use 0010, 0030, etc. for his AIs so y'know. I generally use high numbers to avoid conflicts, so I'm using that 01C0 up there to shut it down after it's been run once (or at least, it would if that 0 toward the end was a 1).
GlobalVar: These are the ones that access field variables. Only Bank 1 is accessed, so first we need to specify which variable we want to read in this bank and we can use the battle engine's temporary variables to carry the numbers about. We want [80] in Bank 1, so:
LocalVar:0000 <- 80
My memory is very hazy at this point, but I most likely copied this from Jenova SYNTHESIS or Zombie Dragon who both use Global variables:
TempGlobal <- &GlobalVar(0000)
Unknown(2018) <- GlobalAddress
I'm not sure what that does, I'm afraid. But it seems to enable the If string that follows, and I think it didn't trigger whenever the value of [1][80] was set below 50; it's been a while since I used the script:
If ( (GlobalAddress > 50) )
So with the IF string triggering based on the value loaded from the variable, you can now adjust things like HP for enemies and other things. Now if you'll excuse me, I'm going to go hide before certain scary people find this post.