hmm... i figured that it would be the key to changing the camera in battle. oh well.
anyway, i am trying to figure out what each of the flags in the escapable byte(s) is for... so far they are all on by default, and bit 2 seems to handle the escaping, if it is off, there is no escape. trying to learn what the others are... bit 1 seems to be off all of the time, could be what turns on/off the spoils pages, have to get back on that one
. bit 4 is off in some of the later reactor 1 fights, and seems to do nothing when turned off... could be dealing with the specific area, since GH has it off as well. get back when i determine more about it.
all on seems to act like the normal battle, but something has to be different since on of the normally off flags is set. whatever these enable/disable is probably anything from a wide range of things.
going to make a list of used values to see if i can narrow down the usage more.
bit 3 may be used as something for side attacks, since air buster has this turned off in his fight.
ok, values i have seen are:
FF, FD, FB, F9, F7, F3, F1, EF, ED, EB, E9, E3
bits seen disabled are bits 1-4, and any combination of that (sans all four off, most off is all but 1)
f3 is used in the bizarro sephy fights (first formation in each, not sure which is used), f1 is used in all sephy fights, and air buster. e3 is used in the diamond weapon formations, and ruby has ef, so maybe bit 1 has something to do with temporary escape prevention?
0x11 seems to be always ff as well, so i think it was just used as a placeholder for something, something that was removed at some point, or just to make it an exact 20 bytes, so should have no real use.
ah... ok, so far this is what i have:
bit 0 - ?
bit 1 - ?
bit 2 - on, escapable, off no escape
bit 3 - on, victory dance, off, no victory, fade to spoils pages
bit 4 - ? (may have something to do with enemies with special death animations, like how the sword dance enemy, as well as many other machine enemies break apart rather than just fade away)
bit 5-7 - unused?
hmm.. i noticed accidentally that in terence's enemy mechanics guide that the levrikon enemy uses the camera data in it's ai to use an extra attack if the conditions are right:
AI: Setup
{
If ([2020] == 2) Then
{
[0000] = 1
}
}
AI: Main
{
If ([0000] == 0) Then
{
Choose Random Opponent
1/4 Chance: Use Flaming Peck on Target
3/4 Chance: Use Bird Kick on Target
} Else {
Choose Random Opponent
1/4 Chance: Use Bird Kick on Target
3/4 Chance: Use Flaming Peck on Target
[0000] = 0
}
}
when exactly would it do this, becuase it could answer what the third set of data would be for, since it seems to be looking for that information. and in the ai itself, i noticed that the other enemies handle the chocobo script, as in when you can catch it, not the chocobo... that is pretty strange to me...
and introducing the initial camera data... offset 0x13 of setup 1. i am guessing it is from specific set starting places, so tweaking it may not be as easy as the actual camera final position.
now i know these are known, but i don't see them listed out anywhere, so here goes... for the formation type (offset 0x12 of setup 1):
00 - normal fight
01 - preemptive
02 - back attack
03 - side attack
04 - attacked from both sides (pincer attack, reverse side attack)
05 - another attack from both sides battle (different maybe?)
06 - another side attack
07 - a third side attack
08 - a normal battle that locks you in the front row, change command is disabled
i am guessing that the different side/attack from the side battles are just for different starting formations. kinda hard to tell by using the first enemy fight, since the enemies do not move where they are supposed to, like your party does - they have to be programmed into position by the formation data. command 08 would be a nice addition to a difficulty mod by disabling the back row for your party, which is an evil thing when the enemies are powerful
.
as of right now, setup 1 should be around 99% figured out... just a few flags to learn and that should be all... the same could be said for setup 2, all we need to know is how the second and third are called upon. i guess i should hit up the formations themselves to see what i can uncover there.
hmm... al that isn't really known well is the one unknown, and the initial flags, and it will take some time to look through it all, but i already know bit 0 in the first byte of flags is initial invisibility. bit 1 seems to be dealing with side attacks, and how you receive back attack damage. if no enemy had this flag disabled, you will not receive any back attack damage at all it seems, and it has to be set on the side that is at your back, or else it would be happening in reverse, taking back attack damage when facing the enemy.
the value at offset 0xa seems to make certain rows normally unreachable until the rows in front of them are killed (but can be hit with ranged and magical attacks). i tested this on the back attack triple blood taste battle (a battle normally using this unknown), which had it's unknown the same as it's row, and i could normally attack the back row even without long range attacks. so i am guessing that the value is essentially used like "if the value is less than the row, then all enemies within that row must be killed before able to be hit by short range attacks". 0 seems to be like an off switch, and is off in most battles.
the value does not have to be set in only back attacks either, it can be done in any type of fight. there is even at least one normal fight in the game which uses this ability... an example would be formation 0179, a singe whole eater, and two hedgehog pies... the back row hedgehog cannot be attacked with short range attacks until the front two are killed.
the second hell house (hidden one) is packing the invisible flag, and bits 4 and 3 off as well, so it uses two at once. bit 4 is the main ai flag, and bit 3 is the targetable flag... it seems like the flags that are able to be set in the ai are initially set here, so 4020-403f should be able to be set from the formation data initially if i am right, and it keeps the same order as in the ai.
i guess not... turning on what should have been the physical/magical resistances did nothing, so maybe it is just the first 8 that are in the same order then?
ok, to make it easier to read the previous findings for the initial flags (first byte only):
bit 0 - invisibility flag
bit 1 - side attack flag (changes facing, needed for those "behind" the party, usually the left side of the screen)
bit 2 - probably the same as the 4022 flag in the ai
bit 3 - targetable flag
bit 4 - main ai flag
bit 5 - ?
bit 6 - ?
bit 7 - ? (could be current facing, which deals with back/side attacks, and switches when attacked from an enemy with the same facing, because that is when back attack damage occurs)
i think that is enough for tonight... my eyes hurt
.
ok, addition to the 0xa offset unknown... it acts more like this - if an enemy is currently in the 2nd row with one value there, and an enemy is in the first row with the same value, it is unreachable with short range attacks until the front row one is killed. this can be with multiple numbers as well... if there are four enemies, two front, two back, and the front were to have, say 1 and 2, and same for the back, then only one back row enemy could be reached if the enemy in front of it (same number) were killed, but the other would still remain out of reach. this is also true for multiple rows. i used the 5x proto machinegun battle, setting each one's row higher than the next (1-5), and set all of their 0xa values to 1... i could only attack one at a time with cloud's sword, though i could freely attack with magic just the same.
setting someone to 3 makes you unable to hit with short range attacks as long as there are any in the front row with a 1 or 2, so a group of five, two set to 1, and two set to 2 (or any combo really, just one would work) would block access to the one set to 3 (if it was behind everyone... if it were in row 2 with the second set of each, it would be able to be hit then), until ALL enemies were killed in front of it.
ok, this is how the flow works: if there is a 1 in front of a 2 or 3, they are out of short range until it is killed. if a 2 is in front of a 3, the three isn't able to be hit just the same, so all 1's and 2's need to be killed for a three to be killed (if it is in the row(s) behind the 1's and 2's). the same is for 4,5,6, but they will not work with 1,2,3, only with their own group. also, if a 3 is in the front row, any 1's or 2's behind it cannot be reached until the 3 is killed, kind of reversing the usual role.