[Help] How to merge stats with another actor only in battle

ScyallGames

Villager
Member
Joined
Oct 19, 2018
Messages
13
Reaction score
3
First Language
English
Primarily Uses
RMMV
I'm wondering how I could achieve what is stated above. Where you merge or add the difference between your stats of another actor. I'm trying to create a game where you have a partner is a living weapon and when in battle you transform merging together sharing abilities and stats. the skills I could achieve with conditional branches but I can't seem to figure out how to do the stats merging and the after battle it goes back to normal. Any ideas how this could be done?
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
You could store the partner's stats in variables. Something like, set variable 1 to partner ATK, variable 2 to partner DEF, variable 3 to partner MAT, etc. Whatever stats you want to merge.

Then you can use the Change Parameter command on page 1 of Event Commands to increase the actor's various stats by those variables in whatever event you're using to handle the transformation. After the battle, you can then change the actor's stats by subtracting the variables.
 

ScyallGames

Villager
Member
Joined
Oct 19, 2018
Messages
13
Reaction score
3
First Language
English
Primarily Uses
RMMV
You could store the partner's stats in variables. Something like, set variable 1 to partner ATK, variable 2 to partner DEF, variable 3 to partner MAT, etc. Whatever stats you want to merge.

Then you can use the Change Parameter command on page 1 of Event Commands to increase the actor's various stats by those variables in whatever event you're using to handle the transformation. After the battle, you can then change the actor's stats by subtracting the variables.
That's the issue... I can't seem to figure out how to do it. I know how to set up the variables and everything but I can't figure out how to add the stats in battle and once out of battle remove the stats and now I just came up with something else... to remove and add party members once in and out of battle since your merging together.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
Here's one possible solution, though there are a number of ways you could approach this. For this example, we'll say that Harold merges with Therese.

Create a common event called merge. Here, you're going to set your variables, increase the actor's stats by those variables, remove the merged party member, then turn on a switch that keeps track of whether you're currently merged or not (useful for reverting at the end of battle). I also added in a line that will change the actor's graphic, to make it more obvious they've changed into something new.

You'll also want a common event that will revert these changes, so create one that basically does everything in reverse.

Now we'll make a skill called Merge. You can give it whatever icon and other settings you want, the important part is to call your Merge common event.

Now give that skill to your actor, and you should have the basics ready to go.




Immediately after the battle:

The reason you have the "Remove Merge" common event set to autorun with a condition of the Merge switch is that common events will not run from autorun or parallel process in the middle of battle. So your "Merge" common event turns the Merge switch on, then as soon as the battle is over and the player is back to a scene that would process common events, it will run, undo the merge, then turn the switch off so that it doesn't loop infinitely.

There are some other concerns I didn't address here, as well - what if Therese is dead? What if Therese is not in the party? What if you're already merged? You'll probably want to create a state that locks the Merge skill so that you can't try to Merge again if you're already merged.

If you want to give the merged party member a completely different set of skills, you'll probably want to change the class, too.

Hopefully this should give you some of the basic first steps to get going, though.
 

ScyallGames

Villager
Member
Joined
Oct 19, 2018
Messages
13
Reaction score
3
First Language
English
Primarily Uses
RMMV
Here's one possible solution, though there are a number of ways you could approach this. For this example, we'll say that Harold merges with Therese.

Create a common event called merge. Here, you're going to set your variables, increase the actor's stats by those variables, remove the merged party member, then turn on a switch that keeps track of whether you're currently merged or not (useful for reverting at the end of battle). I also added in a line that will change the actor's graphic, to make it more obvious they've changed into something new.

You'll also want a common event that will revert these changes, so create one that basically does everything in reverse.

Now we'll make a skill called Merge. You can give it whatever icon and other settings you want, the important part is to call your Merge common event.

Now give that skill to your actor, and you should have the basics ready to go.




Immediately after the battle:

The reason you have the "Remove Merge" common event set to autorun with a condition of the Merge switch is that common events will not run from autorun or parallel process in the middle of battle. So your "Merge" common event turns the Merge switch on, then as soon as the battle is over and the player is back to a scene that would process common events, it will run, undo the merge, then turn the switch off so that it doesn't loop infinitely.

There are some other concerns I didn't address here, as well - what if Therese is dead? What if Therese is not in the party? What if you're already merged? You'll probably want to create a state that locks the Merge skill so that you can't try to Merge again if you're already merged.

If you want to give the merged party member a completely different set of skills, you'll probably want to change the class, too.

Hopefully this should give you some of the basic first steps to get going, though.
Thanks a lot! You did more than enough for me I can figure out the rest and if not I'll be sure to let you know.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Are we allowed to post about non-RPG Maker games? And, if so, would any of you be interested in a short, proof of concept type non-euclidian puzzle game?
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?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:

Forum statistics

Threads
105,883
Messages
1,017,232
Members
137,607
Latest member
Maddo
Top