Author Topic: Pre-attack script for character AI?  (Read 2332 times)

quantumpencil

  • *
  • Posts: 72
    • View Profile
Pre-attack script for character AI?
« on: 2014-12-17 03:33:34 »
I've been trying to implement some new status ailments into a mod I'm working on via character AI. I was wondering if there is a script for "pre-attack" similar to the one enemies have in their own scripts? I saw a few people discussing a pre-attack script online (Particularly Yojimbo, who used it to make a cool poison disease status) but I don't see a pre-attack script in wal-market.

This is how I want to implement Vanish. I want to add general counter scripts that will respond to certain actions by setting a character's 41f0 value to 1. Then, in a pre-turn script that gives the character a 9/10 chance to have 255 physical evade, and add general counter scripts to remove the status by unflagging that index. The game doesn't seem to use the values at 41f0 and later for very much, so it should work if there is a pre-attack script.

Thanks,

QP

EDIT: It seems post-attack script is actually pre-attack script, based on my testing. Zombie, Disease, and Blink are now successfully implemented =D

« Last Edit: 2014-12-17 04:21:18 by quantumpencil »

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Pre-attack script for character AI?
« Reply #1 on: 2014-12-17 12:58:03 »
It seems post-attack script is actually pre-attack script, based on my testing. Zombie, Disease, and Blink are now successfully implemented =D

Yeah, this has been known for a while and never fixed actually. The reason it's listed as Post Attack is because I tested it based on order of strings displayed after an attack, but these didn't show up until after the action was complete so I assumed they happened after everything else. Turns out they happen first, but the string doesn't display until later. Hojo's init script makes me think strings display before or during actions too, but that doesn't always seem to work.