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 other words, the Enemy Transform Trick is rather unintuitive compared to the Actor Transformation Trick.
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:
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.
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>
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 other words, the Enemy Transform Trick is rather unintuitive compared to the Actor Transformation Trick.
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 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:
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.
Any help would be appreciated. And thanks in advance.