FF6 Hacking
Chasing the coward - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: Chasing the coward (/thread-2924.html)



Chasing the coward - Tenkarider - 07-18-2015

Hi! Hello

I wanted to try planning some smart AI for some enemy, one in particular is targeting and attacking with stronger attacks the party, when they're trying to running away from battle.
i dunno if exists a way to detect right the running away animation as a status or something, probably not, yet i might try to count at the start of the battle how much allies are there, and then if they suddenly are lower than the starting number, i might assume that someone managed to escape and so trigger stronger attacks.

The question is... how to do that, without exchanging one dead / in air ally due to jump for someone out of battle? (ran away, sneeze and engulf should be the same status)

Besides i realized some time ago that it's possible to target an ally, while above the sky in jumping animation, i wonder if there's also a way to detect that he's actually jumping and not just target all allies just to be sure to hit the jumping guy...


RE: Chasing the coward - madsiur - 07-18-2015

$3A74 hold the characters that are alive and present (1 bit per character). You could compare that value at the beginning and during battle (the initial value should be stored elsewhere). As for coding the actual AI command, I don't really know how to go with that but you could look at existing conditionals.


RE: Chasing the coward - Tenkarider - 07-18-2015

$3A74 holds both death and disappear? about counting the characters at the beginning i already know how to do it, you don't even need of creating new AI commands for that(Ultimate Czar Dragon counts present characters at the beginning of the last form)

Still i need of distinguish death from dissappear... how 'bout that?


RE: Chasing the coward - madsiur - 07-18-2015

There's a check made for dead characters starting at C2/5E10. I'm unsure what $3018,Y holds though.


RE: Chasing the coward - Tenkarider - 07-19-2015

I see... so you say that if that check is false and $3A74 is set, then i might detect someone who disappeared?


Besides i believe there was a second way too: in Edrin's AI upgrade patch he added a bunch of status checks too, if i'm not wrong he added a check on "ran away" status... too bad that for some reason it's right the status check that crush his patch... it's like AI status check command is located elsewhere and so the command access to an empty space of the rom.
Unfortunately i don't know where that piece of code might be now, or i might copy it and so add one/more status check to my hack... Sad


RE: Chasing the coward - Catone - 07-19-2015

What about C2/115E: (Characters trying to run)?

Or would the temporary bytes set at C2/20E8, refers to temporary animation bits. As in can you check for the animation of running instead of the status?

Another option, at C2/20F8 is listed as "save running characters". Can that be checked elsewhere?

Again at C2/2128 "mark character as successfully running", then "mark runner to be removed".

Point is, well two of them actually, can you check for the animation and/or if they are being "marked" during all this, is checking for the mark possible?

Yet another theory, worst case could you just add an extra bit set during the stuff listed above? If done as I think, would "mark the coward" if there was a run attempt.


RE: Chasing the coward - Tenkarider - 07-19-2015

To be more precise, i don't wanna target one running character in particular: it's just enough that the enemies are aware there was an attempt of running away... starting from that point they become wild 'till the end of the battle, now i wonder if it's possible to deal directly with running away code... anyone knows where's the code that handle escaping from battle? i might editing that, when the code is triggered, it also sets one battlevar bit(one variable which resets after the battle) and so the enemies have in their AI a check on that battle var bit... souds good?
It appearently seems the easiest way, i believe...


RE: Chasing the coward - Catone - 07-19-2015

That's the code I was talking about, least that is were it seems to start doing the checks for CAN they run.

Could probably back track it a bit and find it sooner.

Course, the button press detect (since "run" is just a command)could be handled it C1/.