FF6 Hacking
Help with an enemy's AI Script - 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: Help with an enemy's AI Script (/thread-2827.html)



Help with an enemy's AI Script - Blue Mage Gab - 03-15-2015

Later today, I was going to release my second boss hack, but something in its AI Script "forbids" it from being the perfect product.
For you to understand, I will put here the first few bytes that actually have something to do with my request:

Lore: Quasar
Targeting: self
Lore: Big Guard
Targeting: use normal targeting
.
.
.
.
End first wave of attack
.
End

When the script reaches the "End' point, it will start all over from the Quasar lore. And now, here's what I want to do: I want my monster to cast only the first time the AI Script executes. When it starts all over from Quasar, I want it to somehow "jump" the next two bytes. Is it possible?


RE: Help with an enemy's AI Script - Tenkarider - 03-15-2015

1) If you want to build up a cycle of attack packs, then what you want to do is command wait until next action and reset target; (something similar should be description)

2) If you want to evolve the AI of the boss through the battle, then you should use a variable between 0 and 3(0,1,2,3) and use it for count his phases and check which actions to use according to the current value of the variable;

3) If it's just a starting battle set of action, then you should still use a variable, but it's better to use one of the 8 bits of that var(bits 0,1,2,3,4,5,6,7)
WARNING: never use as counter a variable which uses bits, those have to be used as 8 flag slots, and adding/subtracting numbers to it will make them swap in a totally umpredictable way.


RE: Help with an enemy's AI Script - HatZen08 - 03-15-2015

You will need to use conditional opcodes. I generally use the Magitek status as a flag for battle initialization. In ff6usme, I unset the Magitek status at the battle start up. Then, I set the “attack first” flag and set the script like this:

Code:
If target self doesn't have Magitek status
    Monster gains hidden status: Magitek
    Lore: Quasar
End if
… continue normal script

The traditional way is to use variable opcodes instead of status opcodes. However, you must consider that multiple monsters, present at battle, may conflict over the use of the used variables. In normal conditions, every monster in the formation should use only his own variable, to avoid conflict between its use.

You can find the list of conditional opcodes here.


RE: Help with an enemy's AI Script - Tenkarider - 03-16-2015

If you do in this way, then there's a flaw: you have to ban Rippler, or you'll be able to do magitek and skrew this and that...


RE: Help with an enemy's AI Script - HatZen08 - 03-16-2015

I agree. For this setup to work, attacks must never set or unset the Magitek status for a monster. No attack in the game can do it, except for the bugged Rippler spell.

Rippler is bugged because it can switch status that shouldn't never be switched. It is an error with the code of its special effect. It is notorious for switching the dog block status. Rippler can remove Interceptor from shadow permanently. If you mess around with another special status, it can do another interesting effects. As example, the Morph status can give Strago a feminine silhouette (The sprite of Terra as Esper).

Rippler should be used with care because of these bugs. You can consult a bug fix for Rippler here.