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 Posts

Latest Profile Posts

By the power of timezones! This picture shall still be posted on december 1st!!!
7xI2Gc2.jpg

This is not something I'd ever even considered but wow! What a way to use music in a game.
I am a complete fool. I went through the trouble of making a clone sprite and setting up a system to have the characters flash, when it turns out - I never noticed that the "._mainSprite" was the actual bitmap being used. I'm happy since that makes compatibility easier, but I also want to scream.
Synchronizing bust and sprite expressions! Plus using a phone behaviour :kaopride:
BVadZby.gif

Long gif tho, let it load first :kaoswt2:
Wondering how to force a Save State in VNMaker with a name and how to call it with a scene event in order to double check if this Save State exists or not. Phew... Leaving breadcrumbs for chapter DLCs to pickup would be more than half the fight in order to finish this visual novel :LZSsad:

Forum statistics

Threads
117,116
Messages
1,104,717
Members
153,156
Latest member
ridge_tim
Top