Shapeshift skill for merging stats of 2 actors

Reigan

Villager
Member
Joined
May 3, 2018
Messages
5
Reaction score
0
First Language
Slovak
Primarily Uses
RMMV
Hi everyone.

I'm sorry for my inexperience but I have yet another problem in my game.
I wanted to create a skill that would set the player into a "Hero form". In the game, the player meets a soul of a deceased hero who is guiding and helping the player on their quests.
The player should have an option to enter the "Hero form", which should result in change of their appearance, stats and equip for the duration of the battle.

My first thought was making a common event for that skill, but I got into 2 major problems.

1st:
My common event looks like this:
ForumCommonEvent.jpg
As you can see I created variables to store each stat of our player since I will need them to return to normal afterwards.
The visual changes successfully as well as the equip, but there is no result in changing the player's stats. The script should have worked for that but it didn't for to me an unknown reason.

2nd:
I have no idea how to make it turn back to normal (setting hero mode off and returning player's graphics, equip and stats) after the battle ends :D
My first guess was to make the skill turn on a state, but states can't use common events (which is really stupid in my opinion).

My final idea is to make a 3rd actor for whom I would manually set the stats to correspond to the stats I would want to get as well as the look or equip, but since the 2nd actor (the hero we take stats from) will be able to level up later in the game, the stats wouldn't necessarily be the same as if I used the method I proposed first.

If anyone has any ideas on how to get this working, please write it in the comments.
Thanks a lot
 

_Leviathan

Envious
Member
Joined
May 3, 2018
Messages
17
Reaction score
16
First Language
English
Primarily Uses
RMMV
You want the three following changes when entering Hero Form; Stat changes, visual changes, as well as equipment changes. Am I correct so far? As you said, states cannot run common events in vanilla, but neither can they change equipment. If so, then you must find another way.

I haven't got the time to test this out so I can't guarantee it'll work, but here's something I came up with. You will need Yanfly's help for this, so go check out his tips on Actor Transformations and Power Up Transformations.

Why not make a skill that adds the Power Up state for the user which provides stat bonuses as well as changes the actor images, and have the skill run a commont event afterwards which replaces the actors equipment? Using a.addState(0) in the skill formula, you can add the desired state to the user. Just replace 0 with the state ID. You can use Yanfly's method of changing the actor image for the duration of the state, and apply whatever buffs you feel like are necessary. Actor image changes will revert back to the original once the state is removed. With the common event, you can replace your actors equipment, and maybe even run a little message box. Granted, common events always run last.

I'm not sure what you'll do about the equipment, though. Maybe you can just add a parallel process onto every map which checks if the player has 'Hero Sword' in his inventory, and removes it after the battle is over. Yes, that should work.
 

Reigan

Villager
Member
Joined
May 3, 2018
Messages
5
Reaction score
0
First Language
Slovak
Primarily Uses
RMMV
It's a neat idea, but the problem is that the stats the "Hero form" should have are fixed by the stats of 2 actors.
What do I mean by this:
Hero form MaxHP = Player MaxHP + Hero MaxHP
The main reason why my method doesn't work is that I can't manipulate these stats by the commands I found at:
Even though this document should have correct script calls for RPG Maker MV, the ones for getting the values of actor's stats like:
$gameActors.actor(1).param[2] for example should get me an INT value of the said actor's Attack stat, but it doesn't.

Your idea could work if I could run these script calls, since I could access the actors' stats one by one and merge them by a script, but I can't. There is still an option to create fixed stats for the Hero form, but that would kind of kill the mechanic of "merging 2 actors".
 

_Leviathan

Envious
Member
Joined
May 3, 2018
Messages
17
Reaction score
16
First Language
English
Primarily Uses
RMMV
Ah, my apologies. I hadn't noticed that. That was careless of me.

If you can't use the script to create the desired effect, why not have the variable be set from the "Game Data -> Actor-> Hero Parameter?" It has the same effect: replaces a variable with a set number. It's quite simple, you don't need a script to set a parameter as a variable -- but I'm sure you already found this out by yourself. Reverting an actors parameters back to normal without growth in it would however require you to remove all equipment before setting the variable. You'll have to do the same before setting your original equipment back on.

... However, I could not find a way to return equipment ID as a variable either. I'm not very acquainted with JavaScript, so you'll have to summon someone who can help. I'll be looking into this as well and see if I can find out anything.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I spoke with hudell and many programmer about the Window_BattleLog class and we all just agreed to pretend this class just doesn't exists lol
I haven't been able to solidify a cohesive plot so dropped out of a game jam but, on a fun note, I pre-ordered MZ today! :LZSwink:
So I just spent the weekend...playing my own game. The one I released last year. Yep you heard that right.
Goal for MZ? None... I'm still curious how to finish my VXA project and how it looks like when it actually finished. Which will take at least another two years. Coming late again to the party.

Forum statistics

Threads
100,657
Messages
978,132
Members
132,268
Latest member
janetjoradan
Top