FF7 AI question again...

  • Thread starter Thread starter Armorvil
  • Start date Start date
Status
Not open for further replies.
New question. I'm a little annoyed that the Seizure / Dual status has no visuals when enemies are under this status, so I've been thinking of a way to let the player know that it worked.

There is the possibility of mixing Dual & Dual Drain with Blind. Since Blind doesn't work on enemies, I could make it so its graphical effect becomes Dual's. Only drawback is, when this particular magic would be used against characters, characters would also lose accuracy because of Blind...

The other option is to make use of AI, so a message at the top of the screen tells you that it worked. I would have to insert this code in every enemy's AI, or maybe I could insert it in the characters' AI to gain space. And of course, I don't know how to create such a code... ...I guess something like :

- If [target] is inflicted with Dual + Dual Drain,
- Displays message "Seizure connects !"

would work. I know the 93 opcode can display messages, it is with the first line I'd need help with.
For a playable character, put this on each one's General Counter:
Code: [Select]
Code:
02  206000  401380              ; they have the "Dual" status02  206000  401B80              ; they have the "DualDrain" status50              ; they have both statuses70  XXXX12  206011  40808060  YY          ; I don't know the value for this.90              ; This would change their idle animation loop. You can change it to the "shock damage" animation, but it might not loop. It WOULD make them look like they're having seizures though and not make it look like they're blind.93  "<Char> started convulsing"60  2260  0092              ; double-check this with Hojo's Pre-battle and Death scripts. He's got some odd command index that pauses action while a string is being displayed. This is optional, of course....     <-- 70 points here
You could do a similar thing on the enemy, but instead of changing their idle animation (most enemies only have one damage animation) you could inflict blind:

12  2060
10  401A
80
60  01
90
 
Thank you very much for taking the time to think about the code and to share the info :)

Still, I'm confused. I don't really need a code to change the player-characters' behavior when they're hit with Seizure (they already kneel and anyone with half a brain would notice their HP being drained away). Only the enemies'. I was hoping a code that checks for the enemies' status could be implemented in the party members' AI, but chances are it's not possible (oh yeah, and now that I think about it, is there a way to make use of the Formations' AI ? Because right now, if you try to edit them in any version of PrC, it crashes (it not really crashes, since you can edit the AI and leave the menu, but you won't be able to go back into the Fomation's AI menu afterwards)). End of parenthesis.

Back to the subject at hand. Actually, forget about Blind & animations. I just want a script that tells you that Seizure connects if the enemy is under the status (with a message at the top of the screen). It doesn't even have to be enemy-specific ; if I use the Seizure magic on a Cokatrice and the message "Enemy started convulsing" displays (thanks for the wording, by the way :D), anyone with half a brain should know that it is the Cokatrice that is now under Seizure ^^

Taking a look at your code, would adding this script under all non-Seizure-immuned enemies' General Counter scripts work ?

Code: [Select]
Code:
02  206000  401380              ; they have the "Dual" status02  206000  401B80              ; they have the "DualDrain" status50              ; they have both statuses70  XXXX93  "The enemy started convulsing"
Small question though : what is the XXXX refering to ? Is it an address ? The enemy's ID ?...

(also, fun fact in the game mechanics : it looks like enemies that have less than ~40 HP are immune to Dual+Dual Drain, even if you didn't make them immune. In my mod, the MP enemies had 32 HP and didn't take damage from seizure. When I increased their HP to 40, the status worked  and decreased their HP to 8 (weird that the status wore off before it killed them, even though I already knew Dual has a limited duration. The Dual status sure lasts long enough to kill Cloud at full health, with any amount of HP... ...It may be because Regen isn't as effective on enemies as it is on characters, and since Dual is an inversed Regen...) 8-))

EDIT:

Nah, I just tried the above code in General Counter without the 70 XXXX part, and it doesn't work : the message "The enemy starts convulsing" always displays as a counter-attack, no matter what I hit it with (sword attack, Bolt, etc.). Perhaps the 70 XXXX would fix this, but I have no idea which values to insert instead of the XXXX.

EDIT 2:

I figured it out by myself :D. It's a JMP command, of course. Makes sense. So I just had to enter the address to jump to when the conditions aren't met (0031), and the message stops popping up when Seizure doesn't connect. I'm glad that I'm not entirely clueless with AI stuff. Thanks again NFITC1, now it works perfectly :D
 
Last edited:
Proof in video ^^

It's the first video I make with my ipod, and -promise- the last time that I record a video vertically. That was a bad idea.

EDIT:

Oh crap, I just realized something. This JMP command is bad, since it will be different for every enemy in the game. I thought I'd just have to copy/paste the code to all the enemies in all the scenes... ...Tedious and time-consuming of course (I already did it with the enemies that die when they have 0 MP, so I'm not afraid of that), but not as much as also having to enter the hundreds of different JMP addresses ! :o Now I'm scared that this project will forever take my sanity away.

Isn't there a way to make such a code work for all enemies, without having to copy-paste it to all the enemies AND edit the JMP addresses ? Please, tell me there is way... ... ...If not, well, I'll just have to get to work. Tell the guys up there that they'll need more than that to make me quit ! :P

EDIT 2:

Mmm... ...Maybe I don't need to update the JMP address for each enemy after all : about those that already have a General Counter script, can I just paste my code at address 0x000, insert 90h at the end of the seizure code to separate it from the other counter scripts, and make the JMP opcode target said 90h ?
 
Last edited:
Yeah, I own the official version, but won't distribute it on the forums.
 
No thanks Vgr, I already have what I need. I just wanted to try the ipod ;)
 
The trial version of fraps has a watermark, n'est-ce pas?

Camstudio would be better. Some people complain about it, but it works on my machine™
 
OK, I had a problem with the enemies that already had a General Counter script. A crash, because of the 90h I added at the end of the script. It isn't a good way to separate different portions of code (and I'd like to know how to safely do that, actually).

In any case, I decided to use the Magic Counter script for those enemies instead, and it worked perfectly :) A good thing rare are the enemies that have both a Magic Counter and a General Counter AI script. ...Anyways, this little adventure made me uncover a new PrC bug, but I'll mention it in the PrC thread.
 
Last edited:
I didn't realize earlier, but inside wallmarket.dat or proudclod.dat, you have a lot of useful addresses/values. Suddenly, everything becomes a lot easier to understand (and thanks for writing your tutorials NFITC1, they're awesome).

Little question : I looked through the addresses listed in the dat files, and couldn't find values for equipped stuff. It would be amazing if you could make an accessory like the Medic Armlet, that would grant the Auto-Potion ability or double the efficiency of restorative items & abilities. But you'd need the AI to check for the presence of this armlet first - and it doesn't seem possible. Or is it ?
 
Last edited:
Hehe, Armorvil... This data is in the exe/MNUs... Did you think of that "$%?$ Cat's bell hehe?
 
Status
Not open for further replies.
Back
Top