Arsist

Veteran
Veteran
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.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,003
First Language
English
Primarily Uses
RMVXA
I am uncertain whether your "let's say I'm using" those scripts is a hypothetical or an actual description.  If you're using one, then you need to give a link to it because whatever is suggested will have to fit that.

Make 2 versions of your enemy.  In the troop event, set it to whatever conditions you require and use the Enemy Transform command on the third tab of the Event Command Menu.  Transform into your second version.
 
Last edited by a moderator:

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,075
First Language
Portuguese
Primarily Uses
Other
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.
Does that happen on the map or the battle?

My guess is that you just need to change some of the Game_Battler and Game_BattlerBase class attributes of the enemy.
 

Arsist

Veteran
Veteran
Joined
May 16, 2014
Messages
140
Reaction score
10
Primarily Uses
The scripts used aren't relevant to the script I'm requesting because they don't change around the way enemy states, buffs, and HP/MP/TP are handled. I was just giving a reason for wanting it.

However, they are http://rpgmaker.net/scripts/253/ and 

http://himeworks.com/2013/04/enemy-re-position/

Troop members are instances of a database enemy. When you transform an enemy, it switches to an instance of a different enemy in the database.

It'd be like adding the state poison to the last party member then removing that actor then adding a different one. That member in the last index won't have poison anymore because states aren't stored in the index, they're stored in the actor itself, just as states are stored in the instance of an enemy.

I'm referring to in-battle.
 
Last edited by a moderator:

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
608
Reaction score
320
First Language
German
Primarily Uses
The "Enemy Transform" command ksjp17 mentioned should already preserve those values:

TransformPreservesStats.jpg

Transforming an enemy only gives that enemy a new database reference to change its stats, behaviour and appearence, it does not replace the actual battler instance you are fighting.

Are you using scripts besides those you linked?
 
Last edited by a moderator:

Latest Threads

Latest Profile Posts

Broke: Relating to and acting like Sephiroth
Woke: Relating to and acting like Kefka
Took me almost a year to flesh out this concept but hey, now it works.
01.gif
Part 1 of 24 pieces of our world map
I've finished (most of) the sprites for two of my main characters, Ashlyn and Lizzabelle. And I've already drawn actual artwork of Lizzabelle and Suki months ago. I can't wait to show some of my stuff. I'm hesitant because their outfits aren't my own original design, which must be changed before I get too serious with this.
Heh, um. I've spent $1500~ so far for my game. Most of that went into purchasing some software I need, as well as some commissions. But still, I didn't realize I had spent so much since the beginning of October.

Do not trust me with money, lol.

Forum statistics

Threads
116,987
Messages
1,103,562
Members
152,868
Latest member
c_alex078
Top