Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

I'm sure this has a simple solution.

hydro

Member

Hello everyone,

Currently I am working on an RMXP project which requires alot of class changing for the characters.
I also have passive skills that add a certain percent of HP, STR, DEX, AGI, Etc. depending on the class.

Now, here's the problem. When I switch classes, the values for the characters stats are not correct.

I've been able to tinker around in Interpreter 6 script, and I have a pretty good Idea to fix it.

I was thinking, before Change class occurs, the Interpreter 6 will assign the base value of stats as assigned
in the database. Like so:
Code:
#--------------------------------------------------------------------------

  # * Change Actor Class

  #--------------------------------------------------------------------------

  def command_321

    # Get actor

    actor = $game_actors[@parameters[0]]

    # Change class

    if actor != nil

     [b] actor.maxhp = actor.base_maxhp[/b]

      actor.class_id = @parameters[1]

    end

    # Continue

    return true

  end

obviously the bold line has some incorrect variables as it does not work.
Any ideas on what variables to replace there?
 
How are you doing the passive skills? Keep in mind, by default when you switch classes, it doesn't automatically change the known skills. You keep the skills in the previous class.

What I would do is go into Game_Actor and find the base_stats and modify them in their own method after checking for the presence of skills. Then if you want the passive skills to change when the class changes, I would create a method that reassigns skills, then call that from the interpreter method.
 
Is passive skills a new VX thing or is this a script you're using for XP? I'd have to see exactly how they designed it to work, because there is more than 1 way I could think of making a 'passive' skill which changes a stat in an actor. But, as far as a script that'll change your skills respective with changing your class, I wrote something the other day for that...

Actors : Change Class Skills

...Paste that in somewhere and see if it fixes the problem, see if your stats and skills are changing in respect to your class (and please read the instructions/FAQ in the topic, because it does a little more than that.) If you can though, post the script or a demo because I don't know how your passive skills script works if problems are still occuring.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top