Okay, I understand how to change classes in RMVXA, the real question is whether or not I can make it so that when changing classes, the stat values for characters involved stays the same or go up depending on the parameters? The best example I can give to illustrate this point is that in the course of the game, a character goes from one class to another and since I don't know the level of the character or its guaranteed value in each of the parameters, I can't just put in the specific value. What I don't want is to penalize the player for grinding and have them grind more to make up the sudden change in power.
Think of what I'm trying is similar to a class advancement like in Fire Emblem. When advancing classes, stats either decrease by a tiny bit or get boosted up.
I don't know if I'm going to have to create a ruby script for this or just an event.
This can be done through eventing, if I understand you properly. What you have to do is store the actor's stats in variables before switching class, then immediately after switching class, use the Change Parameter command to set the parameters to 0, then to change the actor's stats to what they were before the switch by increasing them, because for some stupid reason you can only increase and decrease parameters.
I'll use MaxHP as an example; you'd have to do this for each of the stats (Level, Exp, MaxHP, MaxMP, HP, MP, Attack, Defense, Magic, Magic Defense, Agility and Luck).
@>Variable Operation: [0001:Storage1] = [Erik]'s Maximum HP # Do this for each stat, each with their own storage variable.
@>Change Class: [Erik], [Monk] # The class changing.
@>Change Parameter: [Erik], Maximum HP - 9999 # Do this for each stat, resetting the parameter to 0.
@>Change Parameter: [Erik], Maximum HP + Variable [0001:Storage1] # Do this for each stat, adding the old parameter to the new one via the corresponding variable.
MaxHP can't be set to 0; it's minimum is 1. So you'll have to be sure to subtract that extra one from the value of the the previous HP stored in the variable too account for this. Otherwise, changing job will have the effect of increasing HP by 1 each time. Obviously not a desired effect, and it has the potential to be abused.
I'm fairly sure all of the other stats can be set to 0, but since I don't have VXA on the laptop I can't check the scripts for this.
Quote from: Logan on March 21, 2012, 10:41:54 AM
MaxHP can't be set to 0; it's minimum is 1. So you'll have to be sure to subtract that extra one from the value of the the previous HP stored in the variable too account for this. Otherwise, changing job will have the effect of increasing HP by 1 each time. Obviously not a desired effect, and it has the potential to be abused.
Also that.
Thanks everyone. Also, now I'm wondering how to ensure that the stats increase after the class change in a way to not make the stats go down as well.
For example, say I want a character's attack/strength at level 100 to be 100 and I set the level 1 attack to 0 and the value from the class change is 50. I think what I may want to do is use a conditional branch to compare the character's attack/Strength value to the current position on the slope and if the current value is higher than the projected amount for the class, to increase the stat by a little amount so that over time, the two will catch up.
I could be over-complicating things though. What do you guys think?