Class change during battle?

Discussion in 'RPG Maker VX Ace' started by PKLpikachu, Jan 19, 2014.

Thread Status:
Not open for further replies.
  1. PKLpikachu

    PKLpikachu Veteran Veteran

    Messages:
    51
    Likes Received:
    33
    First Language:
    English
    Primarily Uses:
    RMVXA
    Hello!

    I know there's a similar topic about this but it doesn't bring up a couple issues that I'm having. I'm using a Skill that calls a Common Event. The Common Event uses the Change Class Event, but when I use it, the Actor's level goes down to one. Is there a way to retain the Actor's level when they change class?

    Also, is there a way to store equipment into variables so that the Actor equips them while switching classes?

    Ex: The Actor is currently equipped with a Sword and Armor. When they change class during the battle, they equip a Staff and Robe. When they change their class back during battle, they equip the same Sword and Armor from before.

    I would also like to do something similar with Skills.

    If this is at all possible, that would be great!
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    27,928
    Likes Received:
    6,304
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    yes, it is possible - but you need to make it so by event commands before and after the change class command.


    For example, before the class change you use control variable:game data to store the current level, then change the level back to that after the class change.


    same goes with the other options, although you'll probably have to use a control variable:script data sequence to store some of that info and use script commands to change it back.


    Changing the skills when changing classes will require a script - I think there is one written by tsukihime to do that - please search on the master script list, I don't have a link at the moment.
     
    #2
  3. PKLpikachu

    PKLpikachu Veteran Veteran

    Messages:
    51
    Likes Received:
    33
    First Language:
    English
    Primarily Uses:
    RMVXA
    I got the equipment to work, but level doesn't work. I stored the Actor's level into a variable and tried using this script:

    $game_actors[11].change_level($game_variables[1], false)But it gives me this error:

    [​IMG]

    And I have not found the script you are talking about. :(
     
    #3
  4. MagicMagor

    MagicMagor Veteran Veteran

    Messages:
    201
    Likes Received:
    36
    First Language:
    German
    The window for entering script as an event command automaticly enters a line break - which breaks your script.

    To shorten the line and avoid that, try this script:

    Code:
    x = $game_variables[1]$game_actors[11].change_level(x, false)
     
    #4
  5. PKLpikachu

    PKLpikachu Veteran Veteran

    Messages:
    51
    Likes Received:
    33
    First Language:
    English
    Primarily Uses:
    RMVXA
    Alright, I got everything working. Thank you all very much.
     
    #5
  6. Amendment50

    Amendment50 Veteran Veteran

    Messages:
    45
    Likes Received:
    4
    First Language:
    English
    For the record, the Tsukihime script Andar mentioned is the Class Changing script. Allows you to get rid of old skills and add new ones on class change.
     
    #6
  7. Shaz

    Shaz Veteran Veteran

    Messages:
    37,181
    Likes Received:
    11,048
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I think if you pass true to that method instead of false (which is the default, so really not needed anyway), it will retain the EXP after a class change, so the level will be correct for that EXP amount for the new class.


    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
     
    #7
Thread Status:
Not open for further replies.

Share This Page