kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
83
Reaction score
9
First Language
english
Primarily Uses
RMMV
I'm using Yanfly's Actor Transformation Script and my actors transform fine in battle and both stat boosts and appearance revert to normal once battle ends regardless but they keep the transformation appearance when KOed.
Can someone help me with adding in a line of code that will revert back their appearance after they fall, because the character still remains as they are, which makes the rest of the game scramble up because the program is looking for an image that isn't avaliable.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,966
Reaction score
16,019
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Thank you.



I can't find an Actor Transformation script. What is the plugin file name?

It would also help if you show the commands you've used to make and revert the transformation during battle.
 

kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
83
Reaction score
9
First Language
english
Primarily Uses
RMMV
[move]Plugin Support[/move]

I can't find an Actor Transformation script. What is the plugin file name?

It would also help if you show the commands you've used to make and revert the transformation during battle.
Sorry about that.
http://www.yanfly.moe/wiki/Actor_Transformations_(MV_Plugin_Tips_&_Tricks)
Here's the original script.

<Custom Apply Effect>
// Check if user is an actor.
if (user.isActor()) {
// Archive the previous settings.
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;
// Check if the actor ID is 2.
if (user.actorId() === 2) {
// The filename of the character graphic without the file extension.
var charName = 'Baihu Weretiger';
// The index of the character graphic used.
var charIndex = 0;
// The filename of the face graphic without the file extension.
var faceName = 'Baihu';
// The index of of the face graphic used.
var faceIndex = 0;
// The filename of the battler graphic without the file extension.
var battlerName = 'Baihu Weretiger';
}
// Changes the character image to the setting applied from above.
user.setCharacterImage(charName, charIndex);
// Changes the face image to the setting applied from above.
user.setFaceImage(faceName, faceIndex);
// Changes the battler image from the setting applied from above.
user.setBattlerImage(battlerName);
// Refreshes the user's appearance.
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>

And here's the command as it is setup in the character's skill.
 

kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
83
Reaction score
9
First Language
english
Primarily Uses
RMMV
Bringing Up My Post to refresh my request.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,681
Reaction score
2,596
First Language
Dutch
Primarily Uses
RMMV
I had a game using actor transformation and keep it when out of battle
by a weird glitch, even when died, and than out of battle keeps the appearance.

however, he did fix it by 1-2 lines adding if the actor died or not to make sure
the appearance is reverted, I can check tomorrow for you, or someone need
to give the line to you :)
 

kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
83
Reaction score
9
First Language
english
Primarily Uses
RMMV
I
I had a game using actor transformation and keep it when out of battle
by a weird glitch, even when died, and than out of battle keeps the appearance.

however, he did fix it by 1-2 lines adding if the actor died or not to make sure
the appearance is reverted, I can check tomorrow for you, or someone need
to give the line to you :)
If you would please gift me with those lines I would be grateful!
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,681
Reaction score
2,596
First Language
Dutch
Primarily Uses
RMMV
add this line when the battle is died:

JavaScript:
<Custom On Death Eval>
user.setBattlerImage("CHARACTER_FILENAME")
</Custom On Death Eval>

where CHARACTER_FILENAME is, is the name of the normal character filename.
the default one.

place that on top of the current code, than the code of tranformation below
and that should do the trick.
 

kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
83
Reaction score
9
First Language
english
Primarily Uses
RMMV
Like this correct?

- - - - -
Code:
<Custom On Death Eval>

user.setBattlerImage("+Baihu")

</Custom On Death Eval>



<Custom Apply Effect>

// Check if user is an actor.

if (user.isActor()) {

  // Archive the previous settings.

  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;

  // Check if the actor ID is 2.

  if (user.actorId() === 2) {

    // The filename of the character graphic without the file extension.

    var charName = 'Baihu Weretiger';

    // The index of the character graphic used.

    var charIndex = 0;

    // The filename of the face graphic without the file extension.

    var faceName = 'Baihu';

    // The index of of the face graphic used.

    var faceIndex = 0;

    // The filename of the battler graphic without the file extension.

    var battlerName = 'Baihu Weretiger';

}

  // Changes the character image to the setting applied from above.

  user.setCharacterImage(charName, charIndex);

  // Changes the face image to the setting applied from above.

  user.setFaceImage(faceName, faceIndex);

  // Changes the battler image from the setting applied from above.

  user.setBattlerImage(battlerName);

  // Refreshes the user's appearance.

  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>

- - - - - - -

Maybe I'm doing something wrong, because I'm still having the same problem.

add this line when the battle is died:

JavaScript:
<Custom On Death Eval>
user.setBattlerImage("CHARACTER_FILENAME")
</Custom On Death Eval>

where CHARACTER_FILENAME is, is the name of the normal character filename.
the default one.

place that on top of the current code, than the code of tranformation below
and that should do the trick.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,216
Reaction score
4,197
First Language
English
Primarily Uses
RMMV
A few notes for you.

1 - When putting code in your post, you should use the CODE tag (the </> icon on the edit bar). That preserves spaces, indentations, and prevents the forum from turning portions of your text into BBCode formatting.

2 - I don't know that this is specifically causing your problem, but it's a bad practice to have non-standard filenames. Even if they work correctly when testing on your system, they could cause malfunctions when you distribute the game to other people's computers. You should rename your files to get rid of spaces and special characters like +. You can look up what networking filename rules are specifically, but it's easiest to stick to letters, numbers, and dashes or underscores.

3 - I have no idea where @ShadowDragon got "Custom On Death Eval" from. It's not a Yanfly notetag as far as I know or can research. And even if it were, it wouldn't go in a state because states are automatically removed upon death, so your Custom Remove code is already happening then. He knows about a lot of plugins, so maybe he can explain what this is for.

4 - Your Custom Apply Effect code isn't right (and this is where my first suggestion about correct indentation comes into play). It is possible for it to try to change the actor's images with all of those variables being undefined.

Your Custom Remove itself looks correct to me. If you press F8 and go to the Console tab, do you get any errors?

Just to confirm, you are testing this in the game, not a Battle Test, and starting a new game, not loading a save?
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,681
Reaction score
2,596
First Language
Dutch
Primarily Uses
RMMV
@ATT_Turan that <custom On Death Eval> is from one of yanfly plugins,
and when I beta test a game, that uses transform, and died, when I continue
on the map, the transformation was still standing which shouldn't.

after he uses the code above, and died, the effect is removed.
it might work on death instantly, but if that was the case, than there is a bug
in yanfly plugin that ignores it as it didn't take effect.

it might be either state plugin of yanfly though, as I use 1 on remove a counter
as long as it has counters before it can die.

there is a transformation issue on death, but I dont know where, but when died,
the state stays when you die, no matter the counter.

while you fix alot of yanfly bugs in the plugins that ignores or not metioned
before, you can check the transformation plugin if there is something if you
die, the effect is removed, but it isn't the case though.

like an example:

Actor 1 has transformation for 5 turns, you die in 2nd turn and beat the enemy in
the 4th turn, you go to the map, staying in the transformed way.

but the boost are gone, so I cannot explain why.

@kaleemmcintyre is your character filename +Baihu? as I dont see many
sheets call like that "+Name" rather with either Name (for 8 sheet) or $ for single.
so double check that part.

I dont know if you use any state plugins, buff/stateCore or PassiveState might
have the <custom death on eval> code.

can you show the plugin list you use?
 

kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
83
Reaction score
9
First Language
english
Primarily Uses
RMMV
@ATT_Turan that <custom On Death Eval> is from one of yanfly plugins,
and when I beta test a game, that uses transform, and died, when I continue
on the map, the transformation was still standing which shouldn't.

after he uses the code above, and died, the effect is removed.
it might work on death instantly, but if that was the case, than there is a bug
in yanfly plugin that ignores it as it didn't take effect.

it might be either state plugin of yanfly though, as I use 1 on remove a counter
as long as it has counters before it can die.

there is a transformation issue on death, but I dont know where, but when died,
the state stays when you die, no matter the counter.

while you fix alot of yanfly bugs in the plugins that ignores or not metioned
before, you can check the transformation plugin if there is something if you
die, the effect is removed, but it isn't the case though.

like an example:

Actor 1 has transformation for 5 turns, you die in 2nd turn and beat the enemy in
the 4th turn, you go to the map, staying in the transformed way.

but the boost are gone, so I cannot explain why.

@kaleemmcintyre is your character filename +Baihu? as I dont see many
sheets call like that "+Name" rather with either Name (for 8 sheet) or $ for single.
so double check that part.

I dont know if you use any state plugins, buff/stateCore or PassiveState might
have the <custom death on eval> code.

can you show the plugin list you use?

I was using the sideview actor name for my character. So maybe that's what the problem is?

Also, here are my plugins. Is there anyway to fully expand this in engine, as there are a few more at the bottom? I'm not really good with programming, I just plug-in scripts and go from there.

1665078742600.png
 

kaleemmcintyre

Blue Dragon
Veteran
Joined
Jan 23, 2013
Messages
83
Reaction score
9
First Language
english
Primarily Uses
RMMV
A few notes for you.

1 - When putting code in your post, you should use the CODE tag (the </> icon on the edit bar). That preserves spaces, indentations, and prevents the forum from turning portions of your text into BBCode formatting.

2 - I don't know that this is specifically causing your problem, but it's a bad practice to have non-standard filenames. Even if they work correctly when testing on your system, they could cause malfunctions when you distribute the game to other people's computers. You should rename your files to get rid of spaces and special characters like +. You can look up what networking filename rules are specifically, but it's easiest to stick to letters, numbers, and dashes or underscores.

3 - I have no idea where @ShadowDragon got "Custom On Death Eval" from. It's not a Yanfly notetag as far as I know or can research. And even if it were, it wouldn't go in a state because states are automatically removed upon death, so your Custom Remove code is already happening then. He knows about a lot of plugins, so maybe he can explain what this is for.

4 - Your Custom Apply Effect code isn't right (and this is where my first suggestion about correct indentation comes into play). It is possible for it to try to change the actor's images with all of those variables being undefined.

Your Custom Remove itself looks correct to me. If you press F8 and go to the Console tab, do you get any errors?

Just to confirm, you are testing this in the game, not a Battle Test, and starting a new game, not loading a save?
1. Thanks. Didn't know you could do that!
2. Ahhhh...ok.
3. ...uhhh ok? I just really plug and play for my games.
4. ...crap. Ok!
5. Um...there doesn't seem to be an error.
6. I was using it in Battle Test...hadn't thought to start a new game.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,216
Reaction score
4,197
First Language
English
Primarily Uses
RMMV
that <custom On Death Eval> is from one of yanfly plugins,
and when I beta test a game, that uses transform, and died, when I continue
on the map, the transformation was still standing which shouldn't.
Which one? It's not in the documentation for Buffs and States, Skill Core, Auto Passive States, or the Core Engine.

It's also not listed on Yanfly's MV notetags reference list: http://www.yanfly.moe/wiki/Category:Notetags_(MV)

It won't help the OP if they don't have the correct plugin installed.

while you fix alot of yanfly bugs...you can check the transformation plugin if there is something if you
die, the effect is removed, but it isn't the case though.

Actor 1 has transformation for 5 turns, you die in 2nd turn and beat the enemy in
the 4th turn, you go to the map, staying in the transformed way.
Transformation isn't actually a plugin, it's just a Tip & Trick on using the code in state notetags. It's referred to kind of a lot and most people seem to have no problem with it, so I am inclined to think any actual problems are due to incorrect testing (like it seems to be here) or conflicts with something else.

But if it is a big deal, it's pretty easy to give your Transformation state a Custom Respond Effect that determines whether an attack killed you and put the transform back code into that. That should happen before you are considered dead and given the death state, so it should circumvent any issues. Or even stick it onto a Custom Apply on your death state.

@kaleemmcintyre :

0 - We're not supposed to post multiple times in a row. If you forgot to say something, there's an Edit button on the bottom of the post. If you want to refer to multiple people, you can simply Reply to them both, or use the +Quote button or @tag them.

3. ...uhhh ok? I just really plug and play for my games.
I'm not positive what you mean by that, but you should always know what things do when you're putting them into your game. If that's a plugin, you should read through the instructions and the plugin parameters. Even if there's stuff that you don't understand or don't need, you know it exists.

If it's code from someone else, you need to know where it came from - like in this case, ShadowDragon swears this notetag helps his project, but neither of us know what plugin you need to make it do anything.

As far as your code being broken, you just need to delete the closing brace from after "var battlerName =" and put it after the user.refresh() (so you'll have two in a row there).

All of that code should only be happening if it's the correct actor.

6. I was using it in Battle Test...hadn't thought to start a new game.
That's very important. Once you start using any plugins, Battle Test is not reliable, as it doesn't do a full game load. You need to be trying this out in a play test, see if you actually have any problem.
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,681
Reaction score
2,596
First Language
Dutch
Primarily Uses
RMMV
@ATT_Turan it's not my project as I dont use transformation, I beta tested
a game with this exact issue that had it before :)

he added that custom death tag when the player dies, it revert back, otherwise
it stays on if there are still counters on them.

so something isn't triggered somewhere :)

so I dont know what exact plugin uses it. (as I reported that bug to him),
so after he added it, the transformation worked correctly upon dieing instantly.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,216
Reaction score
4,197
First Language
English
Primarily Uses
RMMV
it's not my project as I dont use transformation, I beta tested a game with this exact issue that had it before
I understand. Well, I submit that
A - That's not from a Yanfly plugin, and
B - There's an easier way he could've accomplished it :wink:
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,681
Reaction score
2,596
First Language
Dutch
Primarily Uses
RMMV
@ATT_Turan

might be, but it might be WAY_CustomOnDeathEval that uses that tag.
so it might be that he uses that one in order to make it to work.

but if there is a better way like adding a line on "death", it can work too.
so if it works, it works :)
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

I was just too curious, so I tried to solve the problem by roughly writing the specifications of the RPG Maker style system (like a p' language).

I can able to see that ChatGPT-3 understands the problem well and proposes a solution according to the specifications I defined.

Adobe Premiere just crashed so hard it broke my GPU drivers sending me on a DDU quest. Why does this company with it's awful software subscription model and bloated software still dominate the industry? :rolleyes: Can we collectively agree to not support this company any more?
Stage 1 Card.png
struture-wise, my game operates more like a beat 'em up than an rpg. so each area of the city you run around in counts as a stage when you first get there. A silhouette of the boss/bosses will be in these stage intro pics, along with the stage name.
I still do this kinda stuff and I think this came out really, really well. Solo violin really helps this piece shine.
Currently at beginner level, checking tutorials on YT and Skillshare

Forum statistics

Threads
127,034
Messages
1,183,384
Members
166,925
Latest member
a4file
Top