- Joined
- Mar 19, 2014
- Messages
- 2
- Reaction score
- 0
- First Language
- Eng
- Primarily Uses
By now you're probably familiar with Yanfly's Enemy Transformation Trick.
I'm an user of sv_battlers for enemies (no static images). And I'm also mostly code-illiterate.
And I've been thinking of using the Enemy Transformation Trick to change the enemy sv_battler appearance depending on it's current State. This is downright vital for the key feature in my game (Romantic Encounters you can control directly.)
I've found two problems with this Trick, however.
In contrast, this Code works wonders and then some. With this, my actors can change sv_battlers at a moment's notice, based on their current State. It works perfectly with the system I am implementing, and I'd like the Enemy Transformation to work like this.
In other words, I'd like if the Enemy Transformation Trick worked more like the Actor Transformation Trick. Now the question is:
Any help would be appreciated. And thanks in advance.
Code:
<Custom Apply Effect>
if (user.isEnemy()) {
user._prevEnemyId = user._enemyId;
var transformEnemyId = 2;
user.transform(transformEnemyId);
}
</Custom Apply Effect>
<Custom Remove Effect>
if (user.isEnemy()) {
var transformEnemyId = user._prevEnemyId;
user.transform(transformEnemyId);
user._prevEnemyId = undefined;
}
</Custom Remove Effect>
And I've been thinking of using the Enemy Transformation Trick to change the enemy sv_battler appearance depending on it's current State. This is downright vital for the key feature in my game (Romantic Encounters you can control directly.)
I've found two problems with this Trick, however.
1) If I hit my enemy a second time with the same transformation skill, the enemy loses it's original enemy Id, and won't turn back once the status effect fades away.
I need the enemy to remember it's original enemy Id, and go back to it regardless of how many times they get hit by the same transformation attack.
In other words, the Enemy Transform Trick is rather unintuitive compared to the Actor Transformation Trick.2) The transformation skill will always transform the target into the same Enemy Id. In other words, if I use the Transformation skill on an Angel or a Slime, the result will always be a Vampire (or the enemy Id I set for default).
But I need the Transformation to change based on the Target. AKA Biting an Angel will turn them into a Vampire Angel, while biting a Slime will transform them into a Vampire Slime. (This is just an example.)
Code:
<Custom Apply Effect>
if (user.isActor()) {
user._prevCharName = user._prevCharName || user._characterName;
user._prevCharIndex = user._prevCharIndex || user._characterIndex;
user._prevFaceName = user._prevFaceName || user._faceName;
user._prevFaceIndex = user._prevFaceIndex || user._faceIndex;
user._prevBattlerName = user._prevBattlerName || user._battlerName;
if (user.actorId() === 1) {
var charName = 'HaroldSSJ';
var charIndex = 0;
var faceName = 'HaroldSSJ';
var faceIndex = 0;
var battlerName = 'Harold_SSJ1';
} else if (user.actorId() === 2) {
var charName = 'ThereseSSJ';
var charIndex = 0;
var faceName = 'ThereseSSJ';
var faceIndex = 0;
var battlerName = 'Therese_SSJ1';
user.setCharacterImage(charName, charIndex);
user.setFaceImage(faceName, faceIndex);
user.setBattlerImage(battlerName);
user.refresh();
}
</Custom Apply Effect>
<Custom Remove Effect>
var charName = user._prevCharName;
var charIndex = user._prevCharIndex;
var faceName = user._prevFaceName;
var faceIndex = user._prevFaceIndex;
var battlerName = user._prevBattlerName;
user.setCharacterImage(charName, charIndex);
user.setFaceImage(faceName, faceIndex);
user.setBattlerImage(battlerName);
user._priorityCharacterName = undefined;
user._priorityCharacterIndex = undefined;
user._prevFaceName = undefined;
user._prevFaceIndex = undefined;
user._priorityFaceName = undefined;
user._priorityFaceIndex = undefined;
user._prevFaceName = undefined;
user._prevFaceIndex = undefined;
user._priorityBattlerName = undefined;
user._prevBattlerName = undefined;
user.refresh();
</Custom Remove Effect>
In other words, I'd like if the Enemy Transformation Trick worked more like the Actor Transformation Trick. Now the question is:
1) Is it possible to reuse or remake the Actor Transformation code to work on sv_battler enemies?
I've been thinking of a work-around using Static Image Battlers, and the Weak Enemy Plugin to change enemy States. But I'd like to at least try and keep the battlers animated.2) If not, is there a way to alter the Enemy Transformation Trick to fix the two limitations mentioned above?
Any help would be appreciated. And thanks in advance.

