- Joined
- May 16, 2014
- Messages
- 140
- Reaction score
- 10
- Primarily Uses
Let's say that I'm using a custom AI and custom enemy sprite position script, and I wanted to have it so that in certain instances, an enemy transforms into a different version of themselves, say, you have a front-row Sahagin that changes into a back-row Sahagin. It's still the same Sahagin, but its AI changes and it moves back on the battlefield. Instead of having to create countless conditional AIs for a single enemy based on their battle position, I could instead create multiple instances of the same type of enemy, only, with a different AI pattern. Even if not using a custom AI script, you'd be limiting your action condition possibilities by going "If state 'Back Row' is applied" or "If state 'Front Row' is applied".
However, transforming an enemy makes them lose all their buffs, states, and their HP and MP is restored, as all of such things are stored in an enemy instance and not in the index of the enemy.
What I'm requesting is the ability to, with a script call, transform an enemy of an index of x while having their newly-transformed enemy instance obtain all changes to HP/MP/TP, all buffs, and all states.
What the script would probably do is, before the enemy is transformed, the script creates an array of all applied states and buffs and their remaining turns, then records the difference between Max HP/MP/TP. The enemy transforms, the states and buffs are all applied, then their HP/MP/TP is changed to fit what it was before.
However, transforming an enemy makes them lose all their buffs, states, and their HP and MP is restored, as all of such things are stored in an enemy instance and not in the index of the enemy.
What I'm requesting is the ability to, with a script call, transform an enemy of an index of x while having their newly-transformed enemy instance obtain all changes to HP/MP/TP, all buffs, and all states.
What the script would probably do is, before the enemy is transformed, the script creates an array of all applied states and buffs and their remaining turns, then records the difference between Max HP/MP/TP. The enemy transforms, the states and buffs are all applied, then their HP/MP/TP is changed to fit what it was before.
Last edited by a moderator:

