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

Have you ever been truly comfortable? This weekend I experienced it for the first time in my 33 years on this planet. Try to get comfy, friends.
Every once in a while I check to see if my planned game titles are taken or trademarked. Still okay. I plan to take my time for the sake of quality, but at the same time it feels like a race against some hidden dev out there who also plans to publish or register the same title.
Who else here likes frogs? I sure do like them squishy beings! :rwink:

froggy.png
Only the goggles are imported ... not the eyes
a lot of my maps and battlebacks are me redrawing base rpg maker mv stuff to match with my own artwork... sometimes it comes out ok lol.

Forum statistics

Threads
117,191
Messages
1,105,336
Members
153,319
Latest member
RhemeChan
Top