Keeping XP while class change

Discussion in 'RPG Maker MV' started by omeg, Aug 22, 2019.

  1. omeg

    omeg Veteran Veteran

    Messages:
    57
    Likes Received:
    9
    First Language:
    french
    Primarily Uses:
    RMMV
    Hello guys !

    Today i try to balance stats beetween ennemies and heros but i need to set class first and check behavior ^^

    I Use geowill change class plugin for the change class(because he got a clear menu with requirement and etc) but when i change class A to class B levels goes 1 instead of keeping the original level .
    So i try many thing via lunatic command plugin and some feature like "keepxp: true" or some command like this one :

    <Custom Equip Requirement Condition>

    if ($gameParty.members().level >= 5) {

    condition = true;

    } else {

    condition = false;

    }

    </Custom Equip Requirement Condition>

    So i actually look after one of these solutions and my poor coding knowledge restrain me :keeping the xp when the class change(actually i only use one command plugin to do it "StartClassChange")
    OR
    put some requirement in my weapon/armor making possible to wear the weapon since the character is level 5 or since level 1 if it his in a specific class.
    ex peasant as to be level 5 to wield the sword but barbarian can do it lv1.

    Sorry its very long but was needed i think ^^
     
    #1
  2. Bex

    Bex Veteran Veteran

    Messages:
    1,217
    Likes Received:
    273
    First Language:
    German
    Primarily Uses:
    RMMV
    Dont mark the initialise Box when changing class should do the trick in normal mv.
    If you use Plugins which offer Optional functions, like leveling up each single class by its own, than i have no clue on
    how to undo that. Can you give a Link to the Plugin you mentioned?
     
    #2
  3. omeg

    omeg Veteran Veteran

    Messages:
    57
    Likes Received:
    9
    First Language:
    french
    Primarily Uses:
    RMMV
    #3
  4. Restart

    Restart Veteran Veteran

    Messages:
    203
    Likes Received:
    133
    First Language:
    English
    Primarily Uses:
    RMMV
    Unfamiliar with the plugin, but try changing
    Code:
    Game_Actor.prototype.classChange = function(classId){
    this._classId = classId;
    this.resetSkills();
    
    this.chgExp(this._exp[this._classId] || 0);
    to

    Code:
    Game_Actor.prototype.classChange = function(classId){ 
    var oldclass =this._classId;
    this._classId = classId;
    this.resetSkills();
    
    this.chgExp(this._exp[oldclass] || 0);
     
    #4
    HoneyBourbun likes this.
  5. omeg

    omeg Veteran Veteran

    Messages:
    57
    Likes Received:
    9
    First Language:
    french
    Primarily Uses:
    RMMV
    Hummmm yessssss ,tahts work perfectly fine =)

    You make me save so much time :)
     
    #5
  6. Andar

    Andar Veteran Veteran

    Messages:
    28,348
    Likes Received:
    6,454
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    the easiest way would have been to use control variable to store the actor XP before the class change, and then use change xp command to give that xp back after the class change...
     
    #6
  7. omeg

    omeg Veteran Veteran

    Messages:
    57
    Likes Received:
    9
    First Language:
    french
    Primarily Uses:
    RMMV
    @Andar ty for your help but like i said this way doesnt work for me because of the plugin(its seem) but just changing the line of code gave by @Restart make the process automatic with this plugin =)
     
    #7

Share This Page