[RMVX ACE] MAKE AN ENEMY USE A SKILL AS SOON AS IT QUALIFIES
Posts
Pages:
1
I'm playing around in VX Ace at the moment - using Yanfly's FTB system - and I'm wondering if there's a way to make sure an enemy uses a skill as soon as it meets the prerequisites. In my case, I'm making an enemy's MP rise over the course of the battle, and having it cast a spell once it's at 100% MP. However, the enemy sits at 100% MP for one turn, uses a standard action, and the next turn, uses the 100% MP skill (if it can).
It looks like whether enemies can use a skill or not is evaluated as soon as the new turn begins, so if the enemy hits 100% MP during the player's actions (say, from the player hitting it with an enemy restoring skill) it doesn't know to use a different skill when its own turn comes around. Is there either a way to force it to reconsider its actions before it acts, or a script that allows it to interrupt and cast something immediately once it meets the parameters?
Thanks :D
It looks like whether enemies can use a skill or not is evaluated as soon as the new turn begins, so if the enemy hits 100% MP during the player's actions (say, from the player hitting it with an enemy restoring skill) it doesn't know to use a different skill when its own turn comes around. Is there either a way to force it to reconsider its actions before it acts, or a script that allows it to interrupt and cast something immediately once it meets the parameters?
Thanks :D
I can't help you too specifically without looking at the code for Yanfly's system, which I don't have to hand, but if I were doing something like that my approach would be to tweak the coding of enemies deciding what action to take so that they decide when they're actually taking their turn rather than when the overall turn starts.
Yea, I was trying something like that earlier. It looks like enemy actions are chosen in Battler_Base - The line looks like "$game_troop.make_actions" (something like that, I'm at work atm) and it tells every enemy to determine their action at the beginning of a new turn. I've been playing with it but I'm not sure where I can put it so each enemy determines their actions right before they act (or the whole troop decides when the players are done acting) - and I'm not sure if Yanfly's FTB messes with that at all.
It would require a pretty substantial change, I won't lie. It's not vastly difficult to have enemies decide on their actions independently of each other when their turn rolls around, but you have to restructure it a bit from the "decide on all your shit at once when the turn starts" code that's there already.
I'm sure you're not the only one who would like some sort of CTB-style "Hey, I want to decide on my shit when I have all the information!" enemy action choice (heck, I'll probably do this for my own game because I don't really want stupid enemies who are making decisions based on how things were a turn ago) so I might take a stab at implementing this soon.
I'm sure you're not the only one who would like some sort of CTB-style "Hey, I want to decide on my shit when I have all the information!" enemy action choice (heck, I'll probably do this for my own game because I don't really want stupid enemies who are making decisions based on how things were a turn ago) so I might take a stab at implementing this soon.
Pages:
1















