Help using Actor Transformations (YEP MV Plugin Tips & Tricks)

Hi !

I'm making various skills.
These are skills that power up (or transform) the user.
So if I use the skill, I want to convert only the Facechip of the act.
So I found Actor Transformations in Yanfly's Tip & Trick.

http://www.yanfly.moe/wiki/Actor_Transformations_(MV_Plugin_Tips_&_Tricks)

However, this tip&trick is a bit far from what I use because it's a technique that many characters share the same skill.
In my case, each character has its own transformation technology, so there's no need to check it out like that.
But I don't know how to change it to be applied.
Can you help me?

What I want.
Act 106 receives State 89 using Skill 195
The facechip of Act 106 will then be replaced by the image of column 0 1 of image named FACE-1.
Then when the state is released (after the battle), it returns to its original state.
OH... NVM guys...

Code:
<Custom Apply Effect>
if (user.isActor()) {
  user._prevFaceName = user._prevFaceName || user._faceName;
  user._prevFaceIndex = user._prevFaceIndex || user._faceIndex;
    var faceName = 'MY TEXT BLABLA';
    var faceIndex = 0;
  user.setFaceImage(faceName, faceIndex);
  user.refresh();
}
</Custom Apply Effect>

<Custom Remove Effect>
var faceName = user._prevFaceName;
var faceIndex = user._prevFaceIndex;
user.setFaceImage(faceName, faceIndex);
user._prevFaceName = undefined;
user._prevFaceIndex = undefined;
user._priorityFaceName = undefined;
user._priorityFaceIndex = undefined;
user._prevFaceName = undefined;
user._prevFaceIndex = undefined;
user.refresh();
</Custom Remove Effect>

I solved it with this.
Hello, i'm also using this and I don't understand what I'm doing wrong?

I only want to change the battler image to 'Arjan1' for 3 turns -_-


<Custom Apply Effect>
if (user.isActor() ) {
user._prevBattlerName = user._prevBattlerName || user._battlerName;
var battlerName = Arjan2 ;
user.setBattlerImage(battlerName);
user.refresh();
}
</Custom Apply Effect>

<Custom Remove Effect>
var battlerName = user._prevBattlerName;
user.setBattlerImage(battlerName);
user._priorityBattlerName = undefined;
user._prevBattlerName = undefined;
user.refresh();
</Custom Remove Effect>
Hello, i'm also using this and I don't understand what I'm doing wrong?

I only want to change the battler image to 'Arjan1' for 3 turns -_-


<Custom Apply Effect>
if (user.isActor() ) {
user._prevBattlerName = user._prevBattlerName || user._battlerName;
var battlerName = Arjan2 ;
user.setBattlerImage(battlerName);
user.refresh();
}
</Custom Apply Effect>

<Custom Remove Effect>
var battlerName = user._prevBattlerName;
user.setBattlerImage(battlerName);
user._priorityBattlerName = undefined;
user._prevBattlerName = undefined;
user.refresh();
</Custom Remove Effect>


You said want change to Arjan1 but your code...
var battlerName = Arjan2 ;
You type the Arjan2 ...

And, although I don't know much about Battler
Perhaps this is the image of the character used in the side view battle, right?
Please check if the name of the file 'Arjan1' or 'Arjan2' is correct.

And you have to tell us exactly what doesn't work.

ex)
State is applied but the image does not change.
Or does an error message appear when the image changes.
Or does the transformation work, but the image does not return when the state be released..
etc...

I don't know much about the js, but explaining it in detail will help you get the answer.
I wanted to change it to Arjan2.

Sorry for the confusion. I mistyped.

I copied your code and simply changed everything to match for the Battler, using Yanfly’s notes, but it simply doesn’t change the battler.
I wanted to change it to Arjan2.

Sorry for the confusion. I mistyped.

I copied your code and simply changed everything to match for the Battler, using Yanfly’s notes, but it simply doesn’t change the battler.

Of course I think you are using it, but are these two plugins properly applied?
If so, I honestly don't know.
The note script I used was made to change only the face chip when transformed, and return to the original face when released.
In the case of the battler, I haven't assumed it.
I don't use the side view, so it will be difficult to answer correctly.
Of course I think you are using it, but are these two plugins properly applied?
If so, I honestly don't know.
The note script I used was made to change only the face chip when transformed, and return to the original face when released.
In the case of the battler, I haven't assumed it.
I don't use the side view, so it will be difficult to answer correctly.

yep. I also double checked the order to make sure they weren’t off one spot in the plugin manager.

I might just have to go a different route or try something else I’d I can’t figure it out.
I know the mods will get mad at me for necro-posting, but I found this thread because I had the same problem as Zakarijazh here. Though I doubt they'll find any use in this now, somebody else might stumble here looking for a solution just like I did. So I'll leave it here anyway.

To be more specific on my issue, in various attempts, the battler image just wouldn't change when the state was applied.

However, the following code worked for me. All I wanted to do was change the battler, so that's all I did. Hope this helps someone. ^.^ :

<Custom Apply Effect> if (user.isActor()) { user._prevBattlerName = user._prevBattlerName || user._battlerName; // The filename of the battler graphic without the file extension. var battlerName = 'Actor1_2'; user.setBattlerImage(battlerName); user.refresh(); } </Custom Apply Effect> <Custom Remove Effect> // Retrieve archived settings. var charName = user._prevCharName; var charIndex = user._prevCharIndex; var faceName = user._prevFaceName; var faceIndex = user._prevFaceIndex; var battlerName = user._prevBattlerName; // Changes the character image to the archived setting. user.setCharacterImage(charName, charIndex); // Changes the face image to the archived setting. user.setFaceImage(faceName, faceIndex); // Changes the battler image from the archived setting. user.setBattlerImage(battlerName); // Clear archived data. 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; // Refreshes the user's appearance. user.refresh(); </Custom Remove Effect>
I know the mods will get mad at me for necro-posting, but I found this thread because I had the same problem as Zakarijazh here.
The problem with Zak's post three years ago was they didn't correctly follow the instructions in the Tip & Trick article.

The filename needed to be in quotations to be a string; just typing letters like that makes JavaScript think it's another variable.

(in fact, if you opened up the console after using the skill, you'd see an undefined reference error)
I know the mods will get mad at me for necro-posting, but I found this thread because I had the same problem as Zakarijazh here. Though I doubt they'll find any use in this now, somebody else might stumble here looking for a solution just like I did. So I'll leave it here anyway.

To be more specific on my issue, in various attempts, the battler image just wouldn't change when the state was applied.

However, the following code worked for me. All I wanted to do was change the battler, so that's all I did. Hope this helps someone. ^.^ :

<Custom Apply Effect> if (user.isActor()) { user._prevBattlerName = user._prevBattlerName || user._battlerName; // The filename of the battler graphic without the file extension. var battlerName = 'Actor1_2'; user.setBattlerImage(battlerName); user.refresh(); } </Custom Apply Effect> <Custom Remove Effect> // Retrieve archived settings. var charName = user._prevCharName; var charIndex = user._prevCharIndex; var faceName = user._prevFaceName; var faceIndex = user._prevFaceIndex; var battlerName = user._prevBattlerName; // Changes the character image to the archived setting. user.setCharacterImage(charName, charIndex); // Changes the face image to the archived setting. user.setFaceImage(faceName, faceIndex); // Changes the battler image from the archived setting. user.setBattlerImage(battlerName); // Clear archived data. 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; // Refreshes the user's appearance. user.refresh(); </Custom Remove Effect>



I will definitely keep this in mind when using it in the future!
Even though this is a necro post, I think it's great if it helps someone!
No one gets mad about necroposting. It’s just something we’re asked to address. In fact, I feel pretty damn neutral about it if someone is trying to post an answer. Thank you for the contribution, though it looks like OP had already solved their problem in 2020, so we will set sail to this particular thread. The other poster can make their own thread if they come back.

Original thread: https://forums.rpgmakerweb.com/threads/help-using-actor-transformations-yep-mv-plugin-tips-tricks.123436/