Actor transformation plugin (replace him with another actor from the database)!

RPG_itch_Studio

Veteran
Veteran
Joined
Jan 20, 2018
Messages
83
Reaction score
16
First Language
English
Primarily Uses
RMMV
I want to create a skill, that when used, transforms the actor to another actor from the database. For instance, I create the character and create another character as the transformed state and during battle, when the skill is used, the first actor is replaced by the second. I am using custom battlers (Vibrato's + YED_SideviewBattler plugin) which means that Yanfly's "Actor Transformation" tutorial cannot be applied in this case.
 

BlueWulf

Veteran
Veteran
Joined
Sep 18, 2018
Messages
31
Reaction score
10
First Language
Italian
Primarily Uses
RMMV
I assume you want the new actor to also have different parameters and skills?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
Yanfly's plugins should allow thia code in the skills as a custom eval:

Code:
for (var i in $gameParty.battleMembers()) {
if (user == $gameParty.battleMembers()[i]) {
$gameParty.battleMembers[i] = $gameActors.actor(your transformed actor's id)
break;
}
}
Didn't test it though, so not sure if it works as you described.
 

RPG_itch_Studio

Veteran
Veteran
Joined
Jan 20, 2018
Messages
83
Reaction score
16
First Language
English
Primarily Uses
RMMV
Yanfly's plugins should allow thia code in the skills as a custom eval:

Code:
for (var i in $gameParty.battleMembers()) {
if (user == $gameParty.battleMembers()[i]) {
$gameParty.battleMembers[i] = $gameActors.actor(your transformed actor's id)
break;
}
}
Didn't test it though, so not sure if it works as you described.
I used the code above with custom eval (skill core & buffstate core) but it did not work!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,370
Reaction score
7,678
First Language
German
Primarily Uses
RMMV
the problem here is that actor transformation is strongly affected by the battleplugins - a lot of battlesystems store actor in their own ways, ignoring changes to the default data after the battle has started.

you'll need to give a full list of your battle plugins with links to the plugins you're using, so that a specific transformation command compatible to your selection of plugins can be found or written.
 

RPG_itch_Studio

Veteran
Veteran
Joined
Jan 20, 2018
Messages
83
Reaction score
16
First Language
English
Primarily Uses
RMMV
the problem here is that actor transformation is strongly affected by the battleplugins - a lot of battlesystems store actor in their own ways, ignoring changes to the default data after the battle has started.

you'll need to give a full list of your battle plugins with links to the plugins you're using, so that a specific transformation command compatible to your selection of plugins can be found or written.
The battle plugin I am using is Yanfly Battle Engine Core.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,370
Reaction score
7,678
First Language
German
Primarily Uses
RMMV
You need to give the full list, preferably as screenshot of your plugin manager - not only the core script.
And you should give links to the websites wwhere you got the plugins so that the people helping you don't need to search.
 

RPG_itch_Studio

Veteran
Veteran
Joined
Jan 20, 2018
Messages
83
Reaction score
16
First Language
English
Primarily Uses
RMMV
You need to give the full list, preferably as screenshot of your plugin manager - not only the core script.
And you should give links to the websites wwhere you got the plugins so that the people helping you don't need to search.
Here is a screenshot of the plugins. All of them are from yanfly.moe.
 

Attachments

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,370
Reaction score
7,678
First Language
German
Primarily Uses
RMMV
wrong plugin order
please change your plugin order to follow the order given on yanfly's website, delete all older savefile (changing the order will make them incompatible) and then try again with the code given above.

EDIT:
And why did you state in your first post that you're using YED-Sideview plugin if you're using YEP animated battlers instead?
 

RPG_itch_Studio

Veteran
Veteran
Joined
Jan 20, 2018
Messages
83
Reaction score
16
First Language
English
Primarily Uses
RMMV
wrong plugin order
please change your plugin order to follow the order given on yanfly's website, delete all older savefile (changing the order will make them incompatible) and then try again with the code given above.

EDIT:
And why did you state in your first post that you're using YED-Sideview plugin if you're using YEP animated battlers instead?
I have used the code above in a project with no plugins at all, and it still didn't work. I created a javascript event (database) with that code but it didn't do anything.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,370
Reaction score
7,678
First Language
German
Primarily Uses
RMMV
that code REQUIRES yanfly's plugins, by default no notetag has any function.
But yanfly's plugins will only work correctly if in the correct order.

So far there is no wonder that it never works for you, because you didn't test it with the correct setup.
and please answer the question I edited in, it seems that you basically have some wrong assumptions on how plugins work...
 

RPG_itch_Studio

Veteran
Veteran
Joined
Jan 20, 2018
Messages
83
Reaction score
16
First Language
English
Primarily Uses
RMMV
that code REQUIRES yanfly's plugins, by default no notetag has any function.
But yanfly's plugins will only work correctly if in the correct order.

So far there is no wonder that it never works for you, because you didn't test it with the correct setup.
and please answer the question I edited in, it seems that you basically have some wrong assumptions on how plugins work...
I am sorry, but you misunderstood me! As I said before I created a javascript event (see picture) with that code but it didn't work. I also tried with yanfly plugins (with and without YED-Sideview plugin), by using custom eval as Poryg suggested but no luck. If you can get it work, please feel free to notice me.
 

Attachments

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,370
Reaction score
7,678
First Language
German
Primarily Uses
RMMV
the code you were given is NOT for a script command, it was to be placed as a custom eval notetag on the notebox of skills. It will have absolutely no use executed in any other place (as you already have found out).

@Poryg can you give the OP a screenshot to show where it is to be placed? I currently have no operation project or MV ready to make such a screenshot.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
I'm currently at work, so it's going to take me at least 13 hours before I can.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
Sorry for not answering. I completely forgot about this :D

I found out that using $gameParty._members is completely useless, because that's just a return function.
However, this should work. At least works for me.
Code:
<Custom Apply Effect>
for (var i in $gameParty._actors) {
if (user.actorId() == $gameParty._actors[i]) {
$gameParty._actors[i] = 2;
SceneManager._scene.refreshStatus();
}
}
</Custom Apply Effect>
And this is my state:
Screenshot_26.png

I don't understand why would you want to do this, since it carries its problems (which I'm sure you will find out soon). But nevermind.
 

RPG_itch_Studio

Veteran
Veteran
Joined
Jan 20, 2018
Messages
83
Reaction score
16
First Language
English
Primarily Uses
RMMV
The script works fine, thank you. However, it took some time to get it to work (at least for me), and for that reason I uploaded some screenshots which other folks may use as a tutorial.
 

Attachments

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

"You can thank my later", "But you haven't done anything", "Well, that's why ..."
Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

Forum statistics

Threads
105,884
Messages
1,017,238
Members
137,608
Latest member
Arm9
Top