guys I wanted to know because I wanted to code for my game a new type of system
instead the characters have a "level"
I wanted to have her class with level
if I explain
example you have the class "goddess" who are level 4 so it will be mark level 4
but the other class "warrior" is level 2
(and obviously you can change it but that's not the thing I want to know I already know how to change a class)
and obviously they not have level for the player only class level!
so after I want to make a way class not evolve in level unless you spend "Gp" (god point) who are obviously just the exp
it is possible to do that or no the coding is to much hard coded for that?
thanks for your further answer 🙂
For an easy solution, couldn't you just create every char multiple times, once for each class?
/edit: Otherwise you would extend the Game_Actor class with a new Hash, that says something like:
@class_levels = { 1 => 10, 2 => 5}where you use the class ids as keys and the levels as values.
Upon changing the class you would then change the player level according to the stored values and write back the current level to the corresponding class.
For the leveling up part, you would have to further modify the code to not automatically gain levels with enough Exp or track "Gp" as its own variable inside the actor.
I'm at work and don't have RM access, so i can't work out something concrete ^^
Nan "the easy solution" is like abandonning the challenge this how we improve in everything if we not force ourself to continue even this hard we will not improve at all so yes I choose the hard road but at least I will improve
(sorry haha that's my artist spirit who speak now xD)
As an addendum to lavra's explanation, by default actors store their exp for different classes separately anyway, so they technically already have "class levels" but don't display them. It's not that hard to create a window showing the different classes an actor has and what level they're at, it just requires some inventive use of the @exp variable.
yeah it seem legit so in simple I could just make the level get changed..the question how to save the separate level because it have to retain class have different level
and for the fact stopping auto-leveling I discover how to stop doing that haha
According to the code i posted, your level should change automatically, once you change classes. To prevent automatic level ups you would need to change the method gain_exp:
def gain_exp(exp) change_exp(self.exp + (exp * final_exp_rate).to_i, true)end
You don't want to touch the underlying change_exp method, because it is responsible for keeping your class levels apart. The easiest way would be to take the exp gained as calculated in the method above and store it in a different variable. Then, upon spending exp to level up, you would call change_exp.
So, basically, you delay the original gain_exp method.