Yanfly Class Change - Learning Previous Skills

Discussion in 'RGSSx Script Support' started by onipunk, May 16, 2019.

  1. onipunk

    onipunk Archmage of Procrastination Veteran

    Messages:
    246
    Likes Received:
    156
    Location:
    Glasgow, Scotland
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'm using the Yanfly Class Change plugin for VX Ace and nearly everything is perfect, however I would like for actors to automatically learn all the skills they would have learned up until that level if they change class. I'm not using independent job levels as I want the player to be able to switch up their tactics on the fly and don't want them to have to grind a job from Level 1 to 20 just to be at par with the rest of the party.

    For example, say the character is currently in a Mage class and is level 5, and switches to the Knight class. They don't learn the Knight skills from levels 1-4 automatically. Is there anything I can add in the script to write the actor level to a variable, subtract 1, decrease the actor's level by the result and then increase it by the result again? I've done this method through event commands and it works fine, I just don't know enough about scripting and code to implement it into the script itself.

    Any help would be very much appreciated, thanks!
     
    #1
  2. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,772
    Likes Received:
    805
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    actor.init_skills
    that's the call for resetting all the skills.

    should be called right after changing class.
     
    #2
    mathmaster74 likes this.
  3. onipunk

    onipunk Archmage of Procrastination Veteran

    Messages:
    246
    Likes Received:
    156
    Location:
    Glasgow, Scotland
    First Language:
    English
    Primarily Uses:
    RMVXA
    You absolute legend, that worked perfectly. Been sitting here racking my brains trying to figure out how to code this and in the end it only needed one line, bloody typical. Cheers mate, and thanks for the super quick response. Guess we can close this, now!
     
    #3
    mathmaster74 likes this.

Share This Page