Class System

Last Updated: 2012.08.06
Download Link
Github Link

This script adds the ability for your player to freely change the classes of actors outside of battle from a menu. When changing classes, this script gives the option for the developer to choose whether or not classes have their own levels (causing the actor’s level to reset back to the class’s level) or to maintain the current level. In addition to providing the ability to change classes, equipping a subclass is also doable, and the mechanics of having a subclass can also be defined within this script.


The “Class” menu item can be set to appear with a switch. Likewise, it can also be enabled and disabled through the use of a switch. If you do not wish to use these functions, just set the switch ID’s to 0 and they’ll always be on.

Classes can be changed for both primary and subclasses. Equipping a subclass can have a positive impact on an actor. Most notably, increasing the stats of an actor (by an adjustable rate). For those who wish to hide/show or disable/enable the “Primary” or “Subclass” commands, they can be done so through the aid of switches. Like with the “Class” menu item, setting the switch to 0 will ignore this and always have them appear.

Also note that classes have levels now. Developers can choose to maintain the levels or not, but if they choose not to, the stat boost will be based on the level of the class when equipped as a subclass.

Subclasses can add their skill types to become usable for actors. For example, the Warrior class comes with the “Battle” skill type. By subclassing into a Berserker, Eric gains access to the “Berserk” skill type. This skill type inheritance can be enabled/disabled in the script.

Subclasses can influence equippable items and allow actors to wear items not normally allowed within their class. For instance, Eric as a Berserker can only equip axes. Now, he’s able to wield swords since he subclassed as a Warrior. This can be applied to both weapons and armours. This feature can be disabled within the script.

Have actors start out with unlocked classes instead of having just their primary class available. Since there are multiple ways developers would like class unlocking to be handled, I’ll be including those methods in potential future add-ons for this script. For now, there are script calls you can use to unlock classes:


This allows actor x to unlock class y, making it available for switching in and out in the Class scene.


This causes actor x to remove class y from being able to switch to and from. If the actor is currently class y, the class will not be removed. If the actor’s current subclass is y, the subclass will be unequipped.

Icons and help descriptions for classes can be set through the aid of notetags. While these aren’t used anywhere else besides the class change scene, it does add that consistency for the game that you see everywhere else. These tags go into the class noteboxes:

<icon: x>

Sets the icon representing the class to x.

<help description>
</help description>

Sets the text used for the help window in the class scene. Multiple lines in the notebox will be strung together. Use | for a line break.

And that’s all, folks!

379 comments on “Class System

    • Hey Yanfly is there anyway to set it up so when you change your class your characters portrait changes to match (and you know a way to disable this feature for certain characters)

  1. Pingback: [WIP] YEA’s Mechanism Add-on – Slot Battle | Yami World

    • Oh right, something useful: the only change I could think of is allowing for certain classes to be used ONLY as subclasses, and tied to specific classes. For example, a game could use subclasses to determine weapon type – the Lancer subclass would allow the Warrior and Paladin classes to equip spears and raise their AGI, but only those two classes would have access to the Lancer subclass.

    • Any chance of seeing this any time in the future? I am converting a project from XV to XV Ace, and your old script could do it, but this new one can’t and I sort of need it for the system I have in place.

  2. You know, I was wondering if this would make an appearance. You pump out scripts too fast for my wonders to become questions, it almost makes me think you’re in my head.

  3. Love this, but…
    Maybe I’m missing something or I haven’t found it on the script… is there a way to make the skills usable only if you are on the class you learned them? How it is now if you learn Berserker’s Roar as a Warrior then change to a Mage (with the Special Skill skill type) you can still use Berserker’s Roar. If you learn Fire as a Mage and change to a Knight (with the Magic skill type) you shoudn’t be able to use Fire… I guess I could use Hide Menu skills but it would be a pain to make a hide eval for every skill, and skills multiple classes learn.

  4. Is it possible to make something which doesn’t enable subclass, but let you only switch between primary classes? Because if i have 2 primary classes, disabling the subclass menu, it doesn’t let me switch between them.

  5. Pingback: Final Fantasy Tactics Param Growth Bonus « Ramiro's Script Collection for ACE

  6. Hey Yanfly i like ur Scripts :3 About half of your scripts are in my Ace Project ^^”
    I want to suggest a little Script Idea … How about a Skilltree-System? Like in Wow/Diablo and so on … with adjustable tree numbers for each class (1, 2 or 3) … and now my last words … sry for my bad english XD

  7. Hello, I’m a Japanese user.
    This scripts are really awesome.
    Equipped weapons or armors  increase in number after the class change.
    I dunno why.  I don’t use other scripts.

  8. Pingback: RGSS3: Gender Requirements « Bubble Blog

  9. Pingback: YEA – Weapon Attack Replace | Yanfly Channel

  10. Great script YF!

    Is it possible to have a skill have to meet these conditions to show itself in the Magic window?

    1. The skill is contained in the subclass set on the actor.
    2. If not set as the subclass, the skill is contained in the class set on the actor.

  11. Could this script add a max level feature to classes? I don’t know how complicated it could be adding a level to classes along with actor’s.
    What i’m referring to is something like: warrior’s max level is 30, and it’s level cannot exceed that even if the player keeps getting exp, which would go to the actor’s level instead.

  12. Perhaps I’m simply doing something wrong, but I was noticing that when subclassing I could access both primary and subclass’s skill types in the menu, but while using Battle Commands List only the primary skill types (and command skills) were showing up in battle.

    • Make sure in the class script, SUBCLASS_SKILL_TYPES is true.
      Make sure in Battle Command List, DEFAULT_ACTOR_COMMANDS has “SUBCLASS LIST” somewhere.

      • Oh man, I feel quite silly. I totally blanked on actually placing subclass list in the custom commands. Thank you so much.

  13. I need a little help here! I did classes to have their own subclasses like these:
    Warrior evolves to Knight evolves to Platine Knight
    Soldier Dark Knight
    Guard Paladin

    And this same system to all other classes but the problem is that when the player begin he can set a class by his own but the others appear on the menu and i think that the hide option hide all the classes by type don’t? So i want just to hide certain classes to make appear just the classes conected to what the player selected, how i could do this if u may help me?

    • If you want to unlock a certain class for a particular at any moment you have to call this script:


      It allows you to unlock the class for a specific actor. It sounds like you’ll need to combine it with this script:


      So that you can unlock any previous class that you don’t want.

      However, from the sounds of it you want the class to be unlocked/locked after changing from one class to another, and the script itself doesn’t support that option. Although you can try the “Class Unlock Level” add-on and see if that works for you.

  14. Would it be possible to add a small feature to this script? If you’re not taking requests, then just let me know either way, it would be most appreciated.

    The feature I was wondering about was allowing an optional setting in the module that would allow the SUBCLASS to be the one that gains the experience, when the actor has a sub-class, otherwise it would default to the main class gaining the experience.

  15. Found a little bug ( I think, not sure if it was intentional ).

    When you equip a class it adds on HP and MP to the maximum but ignores the current HP and MP. When you unequip the class it removes HP and MP from the maximum AND the current.

    If I constantly equip and unequip the same class the HP depletes until the character dies and the MP drains to 0.

    Nice script though :)

    • No it doesn’t. Equipping a subclass or changing primary classes will keep the HP totals relative to each other percentage-wise. Make sure you have ordered your scripts correctly.

      • Oh, no :(

        Been testing away with only the 3 class change scripts (in the correct order this time hehe).

        It works fine for me to begin with but for some reason after a battle where I level up, it does the same thing in my earlier post, with the character’s HP and MP depleting if I keep equipping and unequipping the class.

        I tried the same thing but without levelling up after the battle and it seemed fine.

      • That’s because it’s not the exact values after such. The percentage rounds downward upon finalizing an HP amount. The percentage from that would different whenever recalculated.

    • can you make it possible to change classes during battle? (and change stats inkind?) i wont be having HP set to a class and instead the actor, so those %’s wont matter, id like this VERY much

  16. Hello there!!

    Thanks for your amazing work. I know you don’t take request but I think this would be an awesome addon for your class system.

    First of all, I It would be very useful to make the subclasses level up and let gaining EXP or JP points. Also, it would be very nice, if in the case of EXP gain a rate of total exp.

    Also like Pinka says it would be useful also a notetag for your adjust limits script for limit the level of each class.

    Thanks yor yor efforts!!

  17. How does the script handle custom equip slots, set up by the Ace Equip Engine?
    Do custom equip slots change with primary class and can can we configure it to base the equip types off the secondary classes?

  18. Pingback: Ubuntu 11.10 « Imagina y Programa

  19. Pingback: Yokonet » Ubuntu 11.10

  20. Having a method to specify classes to some actors would be a useful tool for developers too. A lot of effort has to go into preventing actors from using certain classes when there are a lot of actors and a lot of classes (I have 32 actors and 40 classes for my game…)
    Awesome work though :)

  21. Is there any way to have actor level and class level exclusive? So I could keep getting general stats with the actor level, but have abilities/traits/skills tied to class level?

  22. Maybe I’m missing something here, but is it possible to adjust the subclass stat gains so that they more properly “hybridize” the classes?

    What I guess I’m saying is that, anytime you add a subclass, the subclass stat rate is added onto whatever stats you had for your primary class. But I’d rather it be more like the way you had it in the YERD script. Here’s an example.

    Suppose I have a warrior/tank-type class. Fights with swords, all that type stuff. Let’s call it class A. Naturally, (s)he’s going to have some high HP, probably high attack and defense, and relatively low magic attack and magic defense. But I want to use a subclass that’s more tiered toward magic, possibly because of skills that class has access to – let’s call that class B. Naturally, if your game makes any sense, magic-geared classes are going to have low HP, attack and defense, high MP, magic attack and magic defense. The way the script is now, if I have Class A as my primary and Class B as a sub, a percentage of Class B’s stats are added onto Class A. But in YERD, IIRC, the classes’ stats were averaged together, with the programmer being able to script how much weight the primary class or subclass had on the final stat calculation. In other words, if you had a Knight/Mage combo, the stats would resemble a mix of those two classes instead of a percentage of one stacked on top of the other. There was a trade-off. You could hybridize those two classes and thus get access to the skills from both classes, making for more versatility, but you wouldn’t get the full tanking ability of the Knight, nor the full casting ability and magic-based stats of the mage. I’m not confusing anyone at all, am I?

    • Never mind this…I solved it and I feel immensely proud of myself because scripting is SO not my thing. :-) Now I’m with immac on the experience bit. Maybe with enough fiddling around, I’ll happen upon something again.

    • BTW, for the sake of anyone that’s wondering about this same question, the way I did it was to change this script’s line 640. Should be under “alias method: param_base” and initially read:

      result += subclass.params[param_id, slevel] * subclass_rate

      Which I figured out is the parameter “stack” – in other words, what this line of code means is that the parameters of your actor’s subclass, at whatever level that subclass is, will be multiplied by the subclass rate that you may or may not have adjusted at the top of the script.

      Example: Say, for the sake of an extremely boring argument, your character’s a level 10 in his/her primary class and has 800 HP and 80 of MP, ATK, DEF, etc.

      Your subclass is level 5 and the stats for that particular class at level are 400 HP, and 40 of everything else.

      What the above line of code does is looks for the data for your subclass at level 5 and multiplies it by the subclass rate you set at SUBCLASS_STAT_RATE. Let’s say that’s 0.25, or 25%. So, 25% of each stat is added to the parameters of your primary class. That’s 100 HP, and then 10 MP, ATK, DEF, etc added on to your 800/80… – so your character’s final stats would be 900 HP /90 MP /90 ATK /90 DEF/90 MAT /90 MDF/90 AGI/90 LUK.

      But I wanted to try a different way – more like the way Yanfly had it in the old school Subclass script(s), where your characters’ parameters are a weighted average of the primary and subclasses. So, after a bit of digging to find out where the coding is for accessing the main class parameters, I came up with this line:

      result = (self.class.params[param_id, @level] * (1 – subclass_rate)) + (subclass.params[param_id, slevel] * subclass_rate)

      That’s going to be all one line, BTW. Now, instead of adding a portion of the subclass’s parameters onto the parameters of the primary class, it averages them together according to what your SUBCLASS_STAT_RATE is. So if it’s 25%, like in the example above, then the script takes 100%-25% of the main class’s parameters – that’s 75 percent – and adds them to the 25% of the subclass’s parameters. But if you want the split to be 60/40, just change the SUBCLASS_STAT_RATE to 0.4. Is it perfect? Probably not, but it sure served my purposes.

      • i found that this only gave me errors but when i re wrote it it works properly as far as i can tell :D here you go

        result = (self.class.params[param_id, @level]) * (1 – subclass_rate) + (subclass.params[param_id,slevel] * subclass_rate)

      • Both lines of code don’t work for me, whether it’s:
        result = (self.class.params[param_id, @level] * (1 – subclass_rate)) + (subclass.params[param_id, slevel] * subclass_rate)

        or this:
        result = (self.class.params[param_id, @level]) * (1 – subclass_rate) + (subclass.params[param_id,slevel] * subclass_rate)

        It always says this error:
        unexpected tIDENTIFIER, expecting ‘)’

        Also, I’ve made
        MAINTAIN_LEVELS = true # Maintain through all classes.

        instead of false. Not sure if it may cause trouble

  23. I have a doubt, Is it possible to get both equipped classes, the class and the subclass, experience? say i want a char that has available several classes, but i want some of them to be sublass only, but they do not level up while equipped they are lvl 1 always, and the other option would be maintain levels but i don’t want to all of the classes for that character have the same level if you are not using them.

  24. Whenever I have a character switch from Warrior to Rogue, he remains able to access his Warrior skills. Then if I switch him to Mage, he retains the Rogue skills and the Warrior skills in addition to the Mage skills.

    Do I have something set up wrong? I want Warrior skills to stay exclusive to Warrior, Mage to Mage, etc.

    It might have something to do with that they all share the same skill type. I only have two skill types, one for Class Skills and one for skills unique to the character. Warrior, Rogue, and Mage all use Class Skills, so that might have something to do with the wrong skills sticking around.

    • Something like that can be fixed by making class specific skill types. However, I have like, 20 subclasses, so thats alot of skill types for me to be making >_>

  25. Scratch that, it crashes regardless of whether the actor already has one. The only trigger seems to be trying to change subclass after you’ve already changed primary class. The error is:

    undefined method “*” for nil:NilClass

  26. Okay, last post here I swear. For those who want to use the class system in conjunction with adjust limits, make sure you have adjust limits after the class system scripts. Derp!

  27. Not sure what I am doing wrong, but it seems to sorta work… I have 4 main classes: Fighter, Ranger, Thief, and Mage. Each has 4 subclasses. One of the subclasses of mage appears on all of the class choices…. I am pulling my hair out as to why. Also, fighter appears as a choice for all primary choices.. I don’t even want to have the ability to change primary, at least at the moment. My 4 main classes DO NOT have the tag on them. And all of my subclasses are set as N being whatever Primary class they are linked…. Why is witch and fighter still showing up?!?!?!?

    • In reply to my last. Seems Fighter showed up because it was in slot 1… I moved it and it no longer appeared. The witch, and now others appeared (albeit grayed), because I had set starting conditions for them. Is there a way to have them hidden from actors who will never use them?

  28. Okay, so for me, if I have this script in Materials, I get this error:


    stack level too deep”

  29. I have a question for anyone who may know the answer, is it possible to set this script up where only 1 character has the ability to change classes, and that 1 character must use an ability to do so. this ability will change him back to his normal class at the end of combat? im looking for a shapeshift type of script and cant seem to find one that works with yanfly scripts. i need a skill that will change the characters class and face pic to that of another class (werewolf), this skill will last for a certain amount of rounds or until combat ends whichever come first, at which time the character will turn back to his normal class and gain his normal face pic. does anyone know how to do this? any assistance would be awesome.

    thank you

    • You can make it where if the ability is used, a switch is turned on through a common event (and change the face graphics too). After battle, if the switch is on, have the character switch back to whatever class you want them to go to and revert the face graphics.

  30. hey just one tiny little thing i noticed if you turn all the settings to 0 in this section some pieces still work while others are turned off ? not sure if its just me

    SWITCH_SHOW_CLASS = 0 # Switch that shows Class in Main Menu.
    SWITCH_ENABLE_CLASS = 0 # Switch that enables Class in Main Menu.

    oh and i was wondering if there is any way to preset the subclass for the actors? or just manually pick from the class menu? thank you very much for another amazing script!!

  31. Is there any way to change the script so that more then one subclass can be equipped? Just curious, I love this script!

  32. i dont if this is bug or not. but the classes level exceeds level 99, although i set the level limit to 99. no problem with the actors level. once my actors are level 99, it will stop gaining level (well of course). but the primary class still gaining exp although it’s level 99, it still continue to level upto 9000+ i dont know if it exceeds Lv9999+

      • I fixed it..
        put this in at line 607 (If you haven’t edited it to much) Instead of Previous class_level

        # new method: class_level Edited by DisturbedInside
        # Please don’t sue me Mr. Yanfly!!
        def class_level(class_id)
        return @level if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
        temp_class = $data_classes[class_id]
        @exp[class_id] = 0 if @exp[class_id].nil?
        #declare a max level (using EXP)
        #If you can’t find it, go to the class database and select exp curve
        #then switch view to total at the top
        @exp[max_level] = 2547133 #This is the value to change. It declares a max level
        #You need to calculate how much exp for max level
        #Do it manually if using Yanfly-Adjusting Limits
        #To calculate max level exp if using Yanfly-adjusting limits is all math!!

        # Level 99 = 2547133
        # to calculate past there…. have to add on multiples of 50744
        # Level 110 = 3156061
        # To go from 99 -> 110 have to add on 12 multiples of 50744.
        n = 1
        loop do
        break if temp_class.exp_for_level(n+1) > @exp[class_id]
        n += 1
        #add a restriction to “kick out” of loop if exp exceeds max level exp
        break if temp_class.exp_for_level(n+1) > @exp[max_level]
        return n

  33. Is there anyway to enable special class names for specific types of class combinations? Like say Warrior/Priest would be Templar or Archer/Thief would be Assassin. Just purely cosmetic.

  34. Hmm, is there any possible way to make the sub class HALF the level of the main one if its leveled? E.G Lv 12 Cleric as a sub class, and level 6 Monk as the main class would equal = Lv 6 Monk / 3 Cleric. I’ll be able to do it, I just need to know where to input this mathematical formula, or if there is any thing else I need to change on the script.

  35. I can’t seem to get subclass equips to work correctly. Also, how do I let characters inherit traits from subclasses?

  36. I’m having a problem with the levels that display for the class. They will exceed the maximum level that is set for the actor. How do I fix this? Anybody????!?

  37. Yo hi, I’m Jose and i saw all you design work on here. Please contact me at skype by jose.martinez315 on their. I want to ask you favor & if it works i like to pay you for you time. I love how the Class system looks and i would love to get it made for Ace without to have other maker for it.

  38. is it possible to have a class say fire mage and when they cast fire spells and only fire spells their fire spells do more. so for example regular mages cast fire bolt it does 100 hp fire mage casts fire bolt it does 150hp without making 2 different spells. thank you in advance

  39. I know i’m not the first doing this question, but is it possible to have subclasses gain exp like primary ones? (sorry for my awful english)

  40. Bug report: If you change classes in battle, you keep all the skills from the previous classes that were available, and you can use them, despite no longer being the class. Anyone have a workaround?

    • It took me about an hour, but I figured it out. Basically, I just set a loop to forget every skill, right before the class learns the skills in method learn_class_skills.

      • Think you can help me out with that? I don’t really see what to do other than put a seal on EVERY single skill that the class can’t use… and I have over 200 skills planned for the game lol. Oh, and yea, same issue, whenever you change classes, you just retain the same skills from the previous class, allowing someone to change classes to a cleric, learn heal, then turn into a Warrior (class that doesn’t have a heal) and use the heal anyway :/ Any help would be great.

  41. Is it just me or subclasses is not gaining experience??
    If I’m doing something wrong would be great if I could get some informations about how to make it gain exp.

    Here is my plan:
    I want to do it like in Digimon 3 on psx. That when you level one class you get one subclass, and then after leveling that sublass you get another subclass that has requirment “class: 1 level 5” ; “class 7 level 15” ; “class 19 level 29” (while 7 and 19 are subclasses that you need).

    Thanks in advance.

  42. Oh well… Too bad :(
    But i found some disturbing thing.
    When you have high level class and low level class and you start changing them like mad, your character will die.
    I hope that’s only me ^^

    • here. i fixed this.
      add this above main and below materials

      class Game_Actor

      alias_method :disturbed_inside_actor_hp_levelup, :level_up

      def level_up




      it recovers all health and mp upon levelup.

  43. Umm, I’m using the class system script along with the adjust limits script below it in the script list, and when I go and equip a subclass to an actor they don’t gain the stat bonuses, but when the AL is above the Class system script the subclass
    gives the stat bonuses, but I get a script error.

    • I’m having the same issues as Phantomfire. When the adjust limits script is below the Class system script it doesn’t add the subclass stats in, but when it’s above, and I try to switch classes, I get a script error.

  44. Firstly, as always, these scripts are awesome!

    Secondly, would someone be able to help me with an adjustment? I have limited scripting skills, but here’s the idea. I would like for the script to recognize the notetags in equipment (weapons, armors, accessories, etc.) noteboxes in addition to the notetags in the actor notebox. The idea is for the character to get subclasses from special items containing the “knowledge” of the subclass, but only so long as they have the item equipped.

    I tried simply adding ($data_weapons, etc.) to the DataManager section so that it appeared like other Yanfly scripts that recognize notetags from both actor and equipments, but I get “NoMethodError” undefined method ‘load_notetags_cs’ for RPG::Weapon. I’m guessing it will give similar errors and I have a vague idea why it is happening, but I do not have the knowledge necessary to fix it.

  45. This is my first time using code for a game… I notice some of the master scripts are written down and some are in the .rb files. I downloaded this one and DOS pops up for a split second and then disapears. I have no idea how to open this file so I can get the code and paste it in. Any help would be appreciated.

    • Jeff,
      When you go to open a .rb file, just right-click it and select “open with”, then just choose your favorite text editor (Notepad, etc.) Personally, I downloaded Programmer’s Notepad when I started trying to learn Ruby, and it has certainly been helpful in its automatic coloring of the code, similar to what you see in the RPG Maker Script Edirot itself. It makes it all easier to see, and Yanfly’s code notations really stand out for quick scroll-through config. Good luck!

  46. Hello! I come with a warning. I am new to scripting. :)

    Obviously, I am using Yanfly’s amazing class system script which I love dearly.
    On that note, I’ve done some looking around and I still don’t really have a solid answer/solution to what I’m looking for which is simply this; I want my sub classes on my game to level side by side with my primary classes, but at a lower percentage.
    Example: If I had a Paladin/Warrior, I would like the paladin class to receive 100% of exp earned in battle and the (Sub)Warrior class to receive 50%.
    I’m sure this has been answered and I’ve tried some posted script to no success.
    I thank anyone who can help me with this greatly!

  47. Im not sure that its just me but no matter what alternate scripting i do or resources i use i always get a few random blank classes… there are rather anoying and i cant seem to get rid of them… also it would be nice if the subclass menu didnt contain primary classes and vice versa. :3 please help me on the first one!

  48. Can some body help me out?… when i try to do a script call to enable a Class, i get a Game_interpreter line: 1411 “Name error” occurred

    Uninitiallized constant Game_interpreter ::Sagen

    ….What exactly happend…?

  49. Wow! always came with great script, you’re script god!
    anyway , is it possible to get a new class by combining primary and subclass? (or maybe next feature? ^^ )
    (ex : prim : warrior ; sub : mage = Spellblader and so on)
    i think it’s just cool like that , make people create unique combination xD

    • I went through them and tried to move all the classes with numbers 1,11,21 and so on. I also cleaned all the stats and parameters from the empty class fields. However I still get the same problem. Please help me if you can

    • Ok, I’ve looked through all of the comments in this thread, and I haven’t seen the answer. @Erics, can you post a link or tell me which thread the answer is in? I’m having this problem now too, and just like ikares I’ve completely deleted the classes from 001, 011, and 021 but now they show up as a blank selectable class within the class menu ingame.

      • In the script itself is a line that says “DEFAULT_UNLOCKED_CLASSES” or something similar, classes, 1, 11, and 21 are set to that. Delete them out of it. :)

      • Thank you Erics, been looking for a way to ‘hide’ those certain classes but if it’s just a simple change in the scripter then, it’s a quick fix. Thanks again for the info, been searching for this for awhile :)

  50. Hello there,
    I was just wondering how to script call whether or not a particular
    subclass was equipped as a means to set a conditional branch for events
    that’d only occur if the subclass in question were equipped. For example,
    a warrior class who is also a knight subclass would gain access to knight-related
    quests, but a warrior class with is some other subclass would not be able to access
    those quests.

  51. first made attr accessor for the subclass_id. put this below yanfly class script
    class Game_Actor < Game_Battler
    attr_accessor :subclass_id

    to check the party leader subclass_id add the conditional branch. use script as checking method.
    $game_party.leader.subclass_id == ???
    change ??? to the id of the knight class.

    but this only check if the party leader subclass is knight. not checking if party leader class is the knight. so if you have knight / warrior… you cannot take the quest.

    if you want to check the class also, or check all battle members / party members you should write yourself on a method inside $game_party that return true or false. just put whatever condition you want there. then put the
    instead. hope this help

  52. I have an issue with the subclass traits not being added in.
    I can equip all the skills, and unlock them just fine but no matter how
    high the levels are, no bonuses are applied. Anyone have any ideas?

      • Does anyone have ANY idea how we might be able to fix this?
        It kind of defeats the purpose of a subclass for me if the traits don’t count. ;>_>

  53. Do you have a similar script for VX? I do not have VXAce, and I would really love this for VX. If you do not have it, do you know of anyone/anywhere I may find something similar? Your scripts are the best..

  54. Is there a way to make it so that the primary class cannot be changed? So that the player can only change the subclass? I want the players to each have a set classes that are unique to them, but give the player the choice of subclasses to enhance their characters (and skills).

  55. Can anyone tell me how I can do a script call to open the class menu scene? I can’t seem to figure it out. I don’t want the player to go through his normal menu. I want him to have to speak to someone and it opens the class select menu.

  56. Hey I found a bug:
    When I started up my game my MAIN Hero is a clas called Teenager but in the class menu it has Soldier unlocked and When I used the command to remove it it is still there PLEASE HELP ME ;_:

  57. Okay, so I was wanting my subclass to have negative effects too, but it seems that doesn’t carry over. For example, I have a subclass of “Fire.” With this, I want the actor to take more damage from water if they have it equipped, but since only subclass skills carry over.. I can’t get the Element Rate to work for subclasses. Anyone have a fix?

      • Whoops, this was meant as a reply to the earlier question about stand-alone class creation, and also was meant to be a PM.

  58. Advising a simple feature. The subclass would have the option to either share or divide the exp as desired, and even percentages.

  59. Cool!!
    i have a question, can i use script call for this?
    so it’s not gonna show on menu..
    because i wanted to make a master for each class to learn as primary and subclass for my main actor..
    ex: you want to be a knight, then go to master knight to change as knight.. but first it will have an option to choose :
    1. as primary class
    2. as subclass
    can i use script call to change primary and subclass?

  60. hi Yanfly i kip gadding this error, Script ‘Game_Interpreter’ line 1409: NameError occurred.

    undefined local variable or method ‘ x ‘ for #

    can you please help me out on this script. =^-^=

  61. Hey Yanfly, I am kind of dumbfounded because I don’t really understand scripts as well as I should I basically I want to make a window that shows the individual summons for the player to have based on class,level,switches. At the beginning of the game I am making the character chooses a “guardian” I mostly did this a a terms of game balance but that plays a factor when choosing a class.Also only SOME of the classes can summon not all. Is there a possible way I can bend this script to be work this way?

  62. So I wanted to implement a system where every class caps at level 20 and there are different tiers of classes. It’s simple enough to implement, I just make the higher tier stats start off with values equivalent or similar to the stats of the lower tier class at max, and give the actor a level cap. However, the problem I run into is that the script doesn’t have a level cap function for the levels of the classes. So while my system works perfectly fine since I gave the actor a level cap, the classes will continue to level (the stats are still fine since my actor level maxes at 20 so even if he continue playing as a rogue beyond level 20 rogue, he’ll still have a level 20 rogue’s stats) so that the level of the class shows up as numbers greater than 20 even though my character is already capped at level 20.

    Is there a way to fix this? Basically what I need:
    1. To have my character’s level reflect the level of the class that he is switched to.
    2. To be able to cap the level on the class itself.

    • I’m having a similar issue myself, but with the default level cap of 99. On every other window the cap works as it should except the classes level, where it shows the characters exceeding level 99.

      The class script, level requirement script, and the engine script (not necessarily in that order) are the only scripts I even have on here.

  63. I also want a sort of Journal in my menus so that I can put quest information there. But my previous post is higher priority right now for me. Also how do I implement class changes without using this script? Do I have to make common events? I’m having lots of trouble doing things like making moves that require a charge up turn and things of that nature as well…

  64. [IMG][/IMG]






    • I’ve been looking for a way to use different graphics for different classes – nice to see that add-on. Also, after running a 30min test run including several battles, levelups, classchanges, and maxlevel I haven’t encountered any errors.
      I only couldn’t get the max level nosetag to work… I set it to 10 for the basic class yet I could level beyond that point. I figure that results from another setting though. Maybe because my actor still ranges from 1-99?

  65. I was wondering if I have some quick advice on how to link the script to switches within the game? Specifically how to not show the class tab in the menu until I turn on a switch?
    Thanks, and amazing scripting!

  66. you have yanfly menu script for that. it can show any menu when selected switch turn on. can also show it but greyed if another switch is on. etc.

  67. I am unable to get SUBCLASS_STAT_RATE working, I put in 0.25 as my value but I neither gain or lose stats, any idea what I am doing wrong?

  68. Super nice script!
    I was wondering, is there a way to call this script from an event. I’d like to have an item or an event make the class menu available and hide it from the main menu.


  69. I dont know what im doing wrong but when I switch classes my skills are not changing, example being when i change my Fire Mage to a Healer she does not get the healing skills but retains the FM spells. How do i Fix this?

  70. Pingback: My Introduction to RPG Maker VX ACE | RPG Maker VX ACE Information

      • Closest I’ve gotten so far is putting

        I’m assuming if I were to put $game_actors[x].unlock_class(1) on a consumable item, it’d set x to the actor the item is used on, right?

    • Well, since I can’t actually get my formula box to work… I figured out a way to do it through common events.

      1) Create a common event with the following script call:

      a = $game_party.target_actor;

      (b is the class you want to unlock; it needs to be a number)

      2) Make your potion. Set the occasion to , since this scriptlet won’t work from a battle. Call that common event from the Effects section (Common Event is on the last page, all the way at the bottom).

      3) Repeat steps 1 and 2 for each class you’ll want to unlock via a consumable. Note that you’ll have to make a seperate common event for each potion.

      Alternatively (and not sure if this would work or not), if you have a script that runs some kind of eval (that’s an actual script call) for an item each time it’s used, you could just stick that scriptlet inside the notetags; that way you won’t have to set up the potentially huge amount of common events that could spawn from this method.

      • Thank you! I was readin the comments before i wanted to ask. I was wondering if this was possible. Thank you so much!”

  71. For those of you who are trying to figure out how to change subclasses through events, use this script call.


    And, in case you dont know. :P

    actor_id = Id of the actor you want to change class in database.
    class_id = Id of class in database.

    • How do I get the actor _id to change? I’m trying to do something like ‘thismightberyan’, and everytime I try it I get syntax errors. I only seem to be able to use constants, not variables.

      How do I define a variable to use in this?

      • $game_variables[x] will return the information that a variable in the variable database contains. I think I phrased that correctly… was that understandable?

      • In a script call from the event editor, you could use something like this if you want to use a variable to assign actor/class ID’s:
        z = $game_variables[900]
        y = $game_variables[899]
        $game_actors[z].change_subclass[y] unless $data_actors[z].nil? || $data_classes[y].nil?

        900 & 899 are the variable numbers. The unless prevents it from going ‘wft is this, class ‘27428’ doesn’t exist!?’ You could use semi-colons at the end of the lines and put them all in one line if you can get them to fit.

        You could also use:

        unless $data_actors[z].nil? ||

        since I don’t think that one long line is going to fit in the script editor the event editor calls.

        All good?

      • If you’re talking about the bit of code I put, the text got squished when I put it in here. Also I, uh, kind of put brackets instead of parenthesis for change_subclass. *wry grin* Sorry ’bout that. This is what it was supposed to be (remember to set the variables first, if you’re wanting to change the actors depending on a variable. Otherwise just use numbers instead of the $game_variables z and y):

        z = $game_variables[900]
        y = $game_variables[899]
        $game_actors[z].change_subclass(y) unless
        $data_actors[z].nil? ||

  72. Hi there.

    1. Great script period

    2. How can an actor be equipped with a subclass by default/from the start of the game?

      • It’s not an option in the default Class System script, unless I missed something. However, you can create an event and call $game_actors[x].change_subclass(y) to change the actors’ subclass as soon as they’re introduced, so it appears to be default.

  73. Hi there, i am still pretty new to all of this, but i love your scripts already ^^

    I just have one problem with this one:
    How can i change the Initial classes of my actors, or rather remove the default ones?
    I understand that the notetags are to add classes, but overall, 5classes pop up for my main character and 3 of which dont even have a name, but stats and one which should not be available to him yet.

    Thx ^^’

  74. having a prob with

    this part it keaps saying error i have the core script and have even tryed making everyting false no effect.

    # ▼ Yanfly Engine Ace – Class System v1.10
    # — Last Updated: 2012.01.29
    # — Level: Normal, Hard
    # — Requires: n/a

    $imported = {} if $imported.nil?

  75. Could someone assist me? I want to make it so a subclass can change the “shield” armor slot to a dual wield. I’m basically creating a class(archer) that gets dual wield when upgraded(archer/commando) anyone know if I can make that happen?

  76. There’s something wrong, the level will not show up by the class name, and won’t unlock the subclass after reaching the level. What’s going wrong?

  77. Hey! Great script!
    I don’t get those script things yet and have two questions:
    1. the notes for the Class description are just single-lined. how do I avail a second one?
    2. i just need the primary class module. so i want to jump directly to the “primary-class-selection-window” when i chosse “class” in main-menu.

    sorry for my english! ;)

  78. Anyway to separate the class levels from the player level?

    Setting the maintain levels to “True” just makes it the player level. I want to have both class progression via the JP manager, and character levels.

    • Unfortunately, the player’s level is the level of the class he currently has equipped. There’s no simple way to separate the two. It’s possible you could make a new global variable and have it increase/decrease each time your actor levels up/down, but you would have to figure out how to make things work with the player’s level instead of the class levels.

      • *not a global variable, sorry… that’s what they’re called in LSL. I meant the one with the @ symbol before it. An instance variable, I guess.

  79. Hey, How do I make it so I can use $game_actors[x].unlock_class(#) on a consumable and have it so I can “select” which actor to use it on by having the items set to Scope:One Ally Occasion:Only From Menu

    No Sub-Class>Goto Menu>Use “Skill Book”>Select Ally to learn that book>Actor learns/gains that class

    without specifying an actor

    • Create a common-event item. Just unlock the class by using the common event connected to the consumable item. Most of it is pretty eventable.

  80. Hey Yanfly, is there a way to subclass an actor using a script call? I don’t want the player to be able to swap between subclasses whenever they want because my game treats them as a specialization / traits type of deal. Thanks for any help

  81. I also posted about this in the steal item section, but since it also has to do with this script, figured I’d post here as well.
    I was wondering if it was possible to have a skills success rate be affected by the main job / sub job. For instance: I want Thief to have a 100% chance to steal, while being /Thief would like a 75% chance to steal.If anyone knows how to implement this, it would be greatly appreciated.

  82. Can you give some classes specifics for equipement and skills?
    Example subclass only for bows, armor, clothes, accesories, skills. . .
    Can i create secondary, tertiary, fourthy classes?
    just this :3

  83. been trying to turn off “class” on the menu but for some reason the switch wont work, what do i need to name the switch?

  84. Is there a way to have diffrent max. Levels for each class?
    For example: I want Level 50 as amx Level for Knight and Level 40 as max. Level for a Paladin.

  85. Okay so I want to script call this so I can change my parties class only at my save point. I know that I can use “” to call it but it only lets me change the class of the first party member. If someone can help me figure this out I would be most appreciated!

    • Oh wait never mind I figured out that I can use the “Q” and “W” button to change between party members, I guess I can explain that with a tutorial!

  86. ok, never mind, i dont need diffrent max. levels anymore ,
    but i think, i noticed a bug or something like that.
    when you change the max. level of an actor and the actor reachs this max level
    (for example lv. 50) then the class ist self gets still exp and lvs up but not the actor.
    that Looks realy wierd because it shows lv. 50 next to the actor but lv. 87 next to the class in the classmenu.
    dont know if its realy a bug or if im just to stupid to do it right.

    would like to know how i can do this without that bug or whatever it is.

    So i hope someone of you can answeare me.
    thx :)

  87. Is there a way to use this script but not have the subclasses? Where they just have 1 class but can change between them outside of battle like this does? Sort of like how Final Fantasy 5’s job system worked.

    • zVO, I believe within the script itself there is a section similar to —


      or something like that, which deals with whether or not that category appears in the Menu of the SubClass window. If you delete the :SubClass: section and only leave the :Primary: and I think the :Cancel: or back or what-not, you will have only Primary Classes to work with in the system and no subclasses to worry about.

  88. Hello, Yanfly!! As always, your scripts are amazing and the primary foundation for every RPG Maker project I do. I was wondering, however, if there was some way you could produce an update or if I am missing how to inherit only specific stats from a Subclass.

    I am using your system to produce a Patron Deity system in one of my projects, and said deity provides bonuses to certain stats. For example, one of my deities increases their follower’s Attack. I would love to have a tag or option to inherit only the Attack ‘stat’ of the my deities ‘class’; and it would be even more amazing if I could set decreases to certain stats when certain deities are ‘equipped’.

    Thank you!!!

  89. Is there any way to make it so the secondry class depends on the primary, for instance a mage could secondary as a sage or a druid, but a warrior can only secondary as a beserker or a knight?
    I have scrolled through and read every comment and don’t remember something resembling this, please get back to me if you know any way to do this!
    Also, I tested it and the stats aren’t adding on? A level 1 warrior has no stat changes when I try to combine it with any other level 1 class, I don’t know if this is to do with the level or wether it is something else, either way please get back to me on either or my questions :)

    • Ok I have tried combining a lever three soldier and a level three monk and it isn’t making any stat changes, I have the subclass stat rate at 0.2, but have tried other rates and it still doesn’t work… If you know anythin I’m missing or any way to make it work please let me know :)

  90. Hey Yanfly. I’ve got a pain of a question, but while using this script in a freebie game, I couldn’t help but wonder if it were possible to say, allow a vendor to sell you “specific classes”. Say you have a guy who has got level 50 in 3 warrior esc classes and a healer class. He goes to an npc or vendor and can purchase the “Paladin” class. Would there be a way to get this to work?

    • There is a way to do this, download the class unlock level extra then set paladin as it’s class unlock level as the 4 you want and there levels, then have it that when you talk to the vendor it also checks your level by checking the variables, then make a “show choice” with one being buy the class and the other being don’t buy, then when the class is show some text and include the script “$game_actors[x].unlock_class(y)” with x being the corresponding actor, and y being the class, e.g if paladin was the 5th class then $game_actors[1].unlock_class(5), would make the first actor unlock the paladin class… Hope this helps dude!

      • Thank you, jjbj. I have that unlock added in, but the trick is: I have a derped mind and I can’t recall how to check a level of a class. Would there be something within hte script to display this?

    • Hey Nero I could help you much easier if you have Skype? I’m jjbj2009 on Skype so if you have it then add me and I will try and help you! It’s just much easier to type and reply on skype :)

  91. HI Yanfly, just getting into RPGMaker but ama coder by trade. I haven’t had a chance to dig in deep but is it possible with your Class scripts to have the Actor have an overall Level and each class to have it’s individual level for determing what skills/traits the character gets. The character could then have say one Class/subclass active thats gaining exp and could switch active class when out of combat.
    Character lvl 7
    Fighter lvl 3
    Mage lvl 2
    *Thief lvl 2 –> this is active class getting exp. etc…

  92. Pingback: Script: Battle command list | LunarisBlog

  93. I have a question. Is there a way to Change the character sprit when changing class.
    For example the actor wears an Amor when he’s a Knight and normal cloths when he’s a thief.
    Hope someone can answear. Thx :)

  94. The latest update breaks the “class unlock” system. a bit. If I grab this script and overwrite my old one, the actors have a buncha classes unlocked which shouldn’t be.

    I can revert back just fine… so, must be something with the new script.

  95. Hey Yanfly is there anyway to set it up so when you change your class your characters portrait changes to match (and you know a way to disable this feature for certain characters)

    Also is there a way to have the “Subclass” menu only show up for certain characters as opposed to everyone.

  96. thanks, jjbj2009
    sorry for answearing so late, but i didn’t look up this site for a ‘long’ time.
    I’m glad, that such a script exists, but… I don’t get how it works ^^’
    Can someone help me, pls?

  97. I was wondering, is it possible for a subclass to give specific Parameter bonus instead of a bit of everything?

    For example, I’d like to have a Knight class with a Magician class as subclass. But instead of giving a bit of every stat, I just want it to give 75% MAT and 20% MP as a bonus to the Knight class.

  98. Commenting again because I really need help with that.

    I really want to have the subclass give specific stats with SUBCLASS_STAT_RATE. Instead of giving the same percentage of every stats to the Primary Class, I want it to give specific stats from the Subclass, like 75% of the Mage’s MAT for example.

    If it’s not possible, is it possible to create common events that make a subclass give specific stat bonuses when it’s equiped as a Subclass?

  99. I’m making a Special Skill system for my game. For example;

    Main Class: Knight with the Skill Slash
    Subclass: Magician with the Skill Fire Ball
    Result: The actor now has Slash and Fire Ball, new Special skill available, Fire Slash

    I’m already using a script by Tsukihime, where you can set requirements to learn skills or forget them. It works very well, the only issue I have is that I don’t know what to write in the formula to check for the subclass ID.

    For example, I have;
    25 /> <forget condition: a.mat
    to check for the actor’s MAT stat and I have this one;

    to look for specific skills that the character has.

    I just don’t know what to put in for it to check for the Subclass ID. If anyone could answer this for me that would be very appreciated! ; v;

  100. I was curious if this could be used to work with a branching class system kinda like Maplestory, where you are one class, and when you hit a certain lvl it asks you to choose between 2 or 3 other classes and then you become it and have to level it for another. Which would finally end with like 2 or 3 classes as a final result which the character stays as, and the final result depends on how you went through the rest of the tree of classes itself.

    • This could either be done with common events checking when you level, then when you get to the certain level it gives you a text option asking what class you want to become…

      Or! Use the add on for this script (class specifics) then have it so you when you get to a certain level you unlock the next class, hope this helps?

      • Well I did look at the addon, I wanted to class to not switch on the fly is the thing. I want it so when you hit a certain level you choose a new class to become and you stay with it until the next tree of classes is available.

    • Ok you’d have to use common events that check the level of a character then when it gets to the certain level, offer it a text option (event show text, show choice) And get them to pick what class to be

    • Yeah just set it for each class as a common event, check the class, check the level, then when it’s at the level give it the choices :) Hope this helps, if you need any more help you are welcome to add jjbj2009 on skype and I will try and help you better (quicker replies)

  101. Hello .
    I have a problem with is that script works well ..
    Is that the increase is every time I change class with Yanfly Engine Ace .
    So I would like to increase its fair when I made ​​a new level only .

    Here is the code
    # Module Class_params No. touchie this line ok ?
    # ================================================= ==============================
    # * Gumps Class Based Bonus Level Script
    # Version : 1.00
    # Author: Matt_Sully ( Gump )
    # * This script WAS created as the result of a request script .
    # * Special Thanks to ” shrimpburgre ” for this great & easy idea!
    # * This script is only gauranteed to be consistent with RPG Maker VX Ace .
    # ————————————————- ————
    # > This easy to use script Will add your level bonuses to all actors
    # When They level up , and gain the bonuses They are based on Their class .
    # > To configure classes, simply modify the included sample data .
    # > For sample data , I setup bonuses for all 10 classes in default VX ACE .
    # > Copy / paste sample data class and configures it for new classes , thats
    # The Quickest way to setup data . To a new line and paste .
    # > Always paste new data was new line , do not enter data beyond Any
    # Boundaries ( specified by ‘do not edit beyond this line ‘ comments )
    #> Class_id must always be set to the class id Being configured
    #> Class_id ‘s are found on the “Classes” tab in your database (the numbers to
    # The left of Class names )
    #> Added an optional setting to break the max. limit value for parameters .
    # ————————————————- ————
    # * LEGAL CRAP
    #> You May freely use this script in Any free gold trading game .
    #> You May modify this script as you see fit, and release Those changes
    # To others as you see fit .
    # > If you use this script , you must Provide proper credit to the Author.
    # ————————————————- ————
    # * Default Modified Classes:
    # Game_Actor
    #> Aliased Methods: 1
    #> Overwritten Methods: 0
    #> New Methods: 2
    # ————————————————- ————
    # * + Suggestions bug reports
    # > If you have any ideas That You Would like to see put into an official
    # Version of this script , PM me your suggestion or post it in one of my threads
    # At rpgmakerweb gold
    # > If you have any bugs to report That need fixing please contact me with
    # Many have details (Including how you Caused the bug etc. ) as possible. Also include
    # A copy of your class bonus params script (this script), so I double- check May
    # That your settings are not broken .
    # ================================================= ==============================
    # ————————————————- ————
    # * System Settings
    # ————————————————- ————
    # * Print Results to Console
    # > True or false setting
    # > If true, prints the parameters Gained bonus On Each level up
    # To your games console
    #> Default : false
    # ————————————————- ————
    Print_Results_To_Console = false
    # ————————————————- ————
    # * Print Extra Info to Debug Console
    # > True or false setting
    # > If true, Will Be extra info printed to the console for debugging . Some
    # Checking aussi done to make sour bonus values ​​are ‘ valid ‘ and ‘ usable ‘ .
    #> Default : false
    Print_Extra_Debug_To_Console = false
    # ————————————————- ————
    # * Parameters Limit Breaker, Breaker Limit Values
    # > Break the ‘999 ‘max parameter value for actors with this setting .
    # > If the Limit Breaker is true , Then the max parameter values ​​are set to
    # The Limit Breaker Value settings .
    # > If the Limit Breaker is false , Then the max parameter value is normal .
    #> Parameters = stats . Default max. 999,999 is for HP , MP is 9,999 . default
    # Max. for other stats : such as strength and defense is 999.
    #> Default : false, default values ​​= vx ace gains
    Parameters_Limit_Breaker = false
    Parameters_Limit_Breaker_Value_HP = 999999
    Parameters_Limit_Breaker_Value_MP = 9999
    Parameters_Limit_Breaker_Value_STATS = 999
    # ————————————————- ————
    # * Default bonuses
    # ( If the actors class is not configured for bonuses or the actors
    # Class is not found etc. Then the default bonuses are used
    # Default Bonus : +3 Luck
    # ————————————————- ————
    MaxHP = 0
    MaxMP = 0
    attack = 0
    defense = 0
    magatk = 0
    magdef = 0
    agility = 0
    luck = 3

    Class = ( [ MaxHP , MaxMP , attack , defense, magatk , magdef , agility , luck ] )

    # ————————————————- ————
    # * Class Bonuses
    # > The Easiest way to setup new data is to copy / paste already defined
    # Class data . Copy Soldier data for example ( copy from the ” Sample Class :
    # Soldier ” how down to and including” Classes [ class_id ] = values ​​” code
    # Line , Then paste was new line and edit accordingly for the new class .
    #> And of course you can modify or remove Any of the included sample classes.
    #> You must get the ‘ class_id correct the for each class . if one is not
    # Ok, It May overwrite the bonuses for Reviews another class .
    #> All parameter values ​​must be added the for each class if odd Their bonus is 0
    # As shown in the sample definitions .
    # > You NEVER modify the shoulds “Classes [ class_id ] = values” code line , you
    # Shoulds only be copying and pasting it . Do not modify the array line above it
    # Either .
    # ————————————————- ————

    # Class : Soldier
    # 3 +1 Attack and Defense per level up
    class_id = 1
    MaxHP = 20
    MaxMP = 5
    attack = 8
    defense = 9
    magatk = 1
    magdef = 1
    Agility = 3
    luck = 4
    array = [ MaxHP , MaxMP , attack , defense, magatk , magdef , agility , luck ]
    Classes [ class_id ] = array

    # Class : Monk
    # MaxHP +1 , +1 Attack and +2 Agility per level up
    class_id = 2
    MaxHP = 28
    MaxMP = 3
    attack = 11
    defense = 5
    magatk = 2
    magdef = 2
    Agility = 7
    luck = 1
    array = [ MaxHP , MaxMP , attack , defense, magatk , magdef , agility , luck ]
    Classes [ class_id ] = array

    # Class : Paladin
    # +3 Defense , +1 Magic Defense
    class_id = 3
    MaxHP = 0
    MaxMP = 0
    attack = 0
    defense = 3
    magatk = 0
    magdef = 1
    agility = 0
    luck = 0
    array = [ MaxHP , MaxMP , attack , defense, magatk , magdef , agility , luck ]
    Classes [ class_id ] = array

    # Class : Spellblade
    # MaxMP +1 , +1 Attack , +1 Agility , +2 Magic Attack
    class_id = 4
    MaxHP = 0
    MaxMP = 1
    attack = 1
    defense = 0
    magatk = 2
    magdef = 0
    agility = 1
    luck = 0
    array = [ MaxHP , MaxMP , attack , defense, magatk , magdef , agility , luck ]
    Classes [ class_id ] = array

    # Class : Samurai
    # 4 Attack , +1 Agility
    class_id = 5
    MaxHP = 0
    MaxMP = 0
    attack = 4
    defense = 0
    magatk = 0
    magdef = 0
    agility = 1
    luck = 0
    array = [ MaxHP , MaxMP , attack , defense, magatk , magdef , agility , luck ]
    Classes [ class_id ] = array

    # Class : Archer
    # 5 Agility
    class_id = 6
    MaxHP = 0
    MaxMP = 0
    attack = 0
    defense = 0
    magatk = 0
    magdef = 0
    Agility = 5
    luck = 0
    array = [ MaxHP , MaxMP , attack , defense, magatk , magdef , agility , luck ]
    Classes [ class_id ] = array

    # Class : Thief
    # +3 Agility , +3 Luck
    class_id = 7
    MaxHP = 0
    MaxMP = 0
    attack = 0
    defense = 0
    magatk = 0
    magdef = 0
    Agility = 3
    luck = 3
    array = [ MaxHP , MaxMP , attack , defense, magatk , magdef , agility , luck ]
    Classes [ class_id ] = array

    # Class : Priestess
    # 2 MaxMP , +2 Magic Attack, Magic Defense +2
    class_id = 8
    MaxHP = 0
    MaxMP = 2
    attack = 0
    defense = 0
    magatk = 2
    magdef = 2
    agility = 0
    luck = 0
    array = [ MaxHP , MaxMP , attack , defense, magatk , magdef , agility , luck ]
    Classes [ class_id ] = array

    # Class : Witch
    # 3 MaxMP , +3 Magic Attack
    class_id = 9
    MaxHP = 0
    MaxMP = 3
    attack = 0
    defense = 0
    magatk = 3
    magdef = 0
    agility = 0
    luck = 0
    array = [ MaxHP , MaxMP , attack , defense, magatk , magdef , agility , luck ]
    Classes [ class_id ] = array

    # Class : Sage
    # MaxMP +1 , +3 Magic Defense , +1 Agility
    class_id = 10
    MaxHP = 0
    MaxMP = 1
    attack = 0
    defense = 0
    magatk = 0
    magdef = 3
    agility = 1
    luck = 0
    array = [ MaxHP , MaxMP , attack , defense, magatk , magdef , agility , luck ]
    Classes [ class_id ] = array



    # ————————————————- ——
    # * Changes Game_Actor
    # ————————————————- ——
    class Game_Actor 0
    add_param (index by )
    index + = 1
    print_results ( cl ) if Class_params Print_Results_To_Console :: == true
    # * New Method
    def print_results ( classid )
    return if classid == nil | | classid == 0
    bonusvals = Class_params :: Classes [ classid ]
    included = Class_params :: Classes.include ? ( classid )
    included = false if included ! = true
    hp = bonusvals [0 ] = mp bonusvals [1]
    bonusvals attack = [ 2] = bonusvals defense [3]
    magatk bonusvals = [ 4] = magdef bonusvals [5]
    agility bonusvals = [ 6] = bonusvals luck [7]
    p “Actor : ‘ # { } ” , “Class ID: ‘ # { } self.class_id ” , ” Level up Bonus Values ​​for Class ”
    p “Is this class Properly configured for bonuses (true / false) : ‘# { included } ”
    p ” MaxHP + hp } { # “, ” MaxMP + # { mp } “, ” Attack Attack + # { } “, ” Defense + # { defense } “, ” Magic Attack + # { } magatk “, ” Magic Defense + } # { magdef “,” Agility agility } { + # “,” Luck + # { luck } ”
    return unless Class_params Print_Extra_Debug_To_Console :: == true ; p ” ” p ” ”
    p ” Printing Extra debug info (class params bonus on level up script) ” p ” ”
    p ” [ RAW] Bonus values ​​for undefined classes: # { Class_params :: Classes [” undefined “]} ” p ” ”
    p ” Defined Class IDs: # { :: Class_params Classes.keys } ” p ” ”
    p ” Total Amount of Defined Classes: # { :: Class_params Classes.size } ” p ” ”
    p ” Full ‘ Classes ‘ Hash : # { } Class_params :: Classes ”
    p ” Checking for invalid Definitions by size …”
    p ” Valid definition size: 8″
    index = 0
    keychain = Class_params :: Classes.keys
    for i in 0 … keychain.size
    key = keychain [index]
    data = Class_params Classes :: [key]
    size = data.size
    p ” Class ID ‘ # { key} ‘ definition Validation Check: PASS ! ” if size == 8
    if size ! = 8
    p ” Class ID ‘ # { key} ‘ definition Validation Check: FAIL ! ”
    p ” Class ID ‘ # { key} ‘ size : # { size} ”
    p ” Class ID # {key } data ( params bonus) : # { data} ”
    end; subind = 0, p ” Checking Class ID ‘# {key }’ are Integer values? ”
    for i in 0 … data.size
    chk = data [ subind ]
    crc = chk.is_a ? integer
    p ” Param Bonus # { +1} subind Check: PASS ! ” if crc == true
    p ” Param Bonus # { +1} subind Check: FAIL ! ” if crc == false
    p ” # { Param Bonus subind 1 } Value : # { chk } ” if crc == false
    subind + 1 =
    index + = 1


    # ————————————————- ——
    # * Changes Game_BattlerBase
    # ————————————————- ——
    class Game_BattlerBase
    # Aliased Method
    Aliases: param_max_override : param_max
    def param_max ( param_id )
    if Class_params Parameters_Limit_Breaker :: == true
    return Class_params :: Parameters_Limit_Breaker_Value_HP if param_id == 0 # MHP
    return if param_id Parameters_Limit_Breaker_Value_MP Class_params :: == # 1 MMP
    return Class_params :: Parameters_Limit_Breaker_Value_STATS # Other Stats
    param_max_override ( param_id )

    [/ code]

    Otherwise what script I can use the same kind as the ..
    But compatible with Yanfly Engine Ace class system ..

    Please help my to stats No up, again.

  102. hi i have a problem, qhen install the Class system, all my charas Can change to all classes, and i want they only have 2 or 3 classes unlocked, and remove the others, i do the script call but it doesnt work,… its a great script and i want to implement in to my game Thx for all the help

  103. 1. Uhm… So I’m not sure if I’m missing something, but is there a script command to set Subclasses without manually doing so? I would like all my characters to begin with both classes and subclasses equipped, but I can’t figure out how to do so.

    2. Also, is it possible to have the subclasses unequipable, just like primary classes?

    Thanks for your time!

  104. Hi, I’m having an issue with this Script, I’m using v1.10 and for some reason if a character is equipped with a weapon, and then changes class to any class that cannot use that weapon, the weapon gets duplicated. I’d really appreciate your help with this, as it’s a bit game breaking D:

  105. Is there a way to auto equip or auto assign subclasses to actors. Example: Let’s say that you are using the Primary Class section as a kind of race ID and you have classes that only 1 race can use. So when you start the game you are going to be picking your race and then you have to pick a class that falls under that race. And so when you get more party members they are also going to have their primary class as a race ID and the Race Class that fall into the primary class section has the racial traits. So, I need to be able to have an event where you recruit someone into your party and their subclass is assigned to them by the event either you are able to choose the subclass for that new party member by for example a show choice command or the new party member gets a subclass auto assigned like monk. Well a subclass that is assigned to the primary class that is being used as a race ID.

    Sorry if that wasn’t all that clear enough. Here are two examples about what I am trying to say. Thank you

    Example: Event Auto Subclass Assign.

    Example: 1
    @>Show Choices: Class Soldier, Class Monk, Done
    : When [Class Soldier]
    @>Assigns subclass Soldier to actor [2](Using comment or advanced script)
    : When [Class Monk]
    @>Assigns subclass Soldier to actor [2](Using comment or advanced script)
    : When [Done]
    : Branch End

    Example: 2
    Just using some event comment or advanced script function to Assigns subclass Soldier or some class to actor [2] or some actor.

  106. Please let me know if you’re looking for a article author for your blog.
    You have some really great posts and I believe I would be a good asset.
    If you ever want to take some of the load off, I’d really like to write some articles for your blog in exchange
    for a link back to mine. Please send me an email if interested.

  107. How do you get rid of subclasses? And how do you get rid of a class? Let’s say you have default class healer but then you switch to warrior and you want to get rid of healer?

  108. Hi Yan! Really great Scripts you have here I must say I kinda love some of em i little to much =P

    but anywho ive got a question im sure alot of people have already asked you about this script.

    Is it possible to set it for first class as “Race”
    and second class(subclass) as the actual class of warrior/healer/archer etc?

    Im starting a game where i want the player to be able to choose their Race at the start and based on their race theyll have a different Story.
    Some characters wont be able to use magic at all not even people in their party that they may join with so for example a dwarf Race story
    where as a mage based story will have only magic attacks and their “attack” action blacked out.

    I can do the second one already but the first one is the one i havent figured out yet.
    idk if im missing something on the instructions or im just having a blank moment xD

    but itd be really cool if this were possible.
    Having the option to change your class but not your race.

    Ether way works if race is #1 or #2

    Thanks for hearing me out n.n
    Your the best =D
    Ive already got a copy of the game with your name on it =P

  109. I was wondering if there was anyway to have all the sub classes all enabled? Also when your character levels up can you could make it so you can level up only one sub class? I was wondering because i want to add sub classes like charisma, lockpick, etc. Please get back to me as soon as possible. Thank You.

  110. So I’m messing around on it, and I’m having an issue where for some reason, I cannot get my new actors I make stop trying to have soldier (as I’m using a empty project to practice) auto-unlocked. I set the unlocked classes, but soldier is there always for them. Something I did wrong?

  111. Derp. Nevermind. I did not use my search correctly in the game AND in this forum here. Please forgive me. Found it now.

  112. Great script, this added a lot to my game. I hate to be picky, but I found one (well two) small typo’s in the script:
    on line 184 and 185 with switches it says that these two switches show and enable subclasses, respectively. However the variable name has “Primary” and the two next lines have the same description.
    I would be glad if you could fix this to avoid confusion.
    Thanks a lot and I must say I admire the way you can make such good scripts quickly!

  113. How would I go by downloading this? I click on the download button, but it downloads a .rb file. Is that what I need? or what do I do with that?

    • Yes, the .rb file is all you need. Open the file in some text editor (eg. notepad) and copy the script. Open up “scripts” in RMVXA and paste the script under “Materials” but above “Main”.
      Hope that helps!

  114. Can anyone help me fast i am using the Yanfly class system script but there is a bug where i can pick the primary classes when they are not unlocked at all for the classes ^^ it nr 1, 11 and class nr 21 who keeps apearing -.- PLZ HELP!!!

    • curdle, you just have to go inside the script and at line 100 there is DEFAULT_UNLOCKS = [ 11,21, 31]
      you just have to delete the numbers and your characters wont have class 11, 21 and 31 except if you make a script call :)

      • Thanks for the reply. but i made a commen event for each class and Hero ingame insted so the wont lose the “hp” anyway took some time with 24 classes but it works perfectly as i have Books that drops randomly in dungeons that makes the Char learn a skill to chance class :D

  115. hope someone can help me here, I’m getting an error message on this line
    unless $imported [“YEA-CoreEngine”]
    i keep getting a nomethoderror, undefined method ‘[]’ nil:Nilclass

    and occasionally ill get a different error for the final line after the end of the script saying unexpected end, expecting keyword_end

    anyone got any suggestions?

  116. Hi. Understandably, it has been a long time since this was put up, and I’m not expecting a hugely quick response. I’m new to scripting, but love a lot of what I see here. This system, especially, has helped me out a lot. My question, however, is this:

    I’m using both this script and the Battle Command List script, which is great. And while somebody above did ask a question regarding the basic, default options presented in the Battle Command List script, I have a more specific question.

    I use custom command lists for every class (using the script in the class’s note section), and when a character gains a subclass, their personal battle command list does not update to reflect new skills and skill types (which are outlined in the subclass’s note section using the script). Is there an easy way to do this, or is it going to take some heavy script work? I can work around it, but I’d prefer not to, if possible.

  117. Hey this is a great script. I am not using subclasses in my game at all, just a basic class system with primary classes. What I would like to do is remove the subclass parameters or have the parameter window compare current class with the highlighted class. could someone point me to what I need to modify for it to do this? or if it is even possible? Thanks!

  118. hey im having trouble with the system and the add-ons for some reason when i set a subclass to unlock at lv 2 it is unlocked right away. and the second character and on all have access to the first class and subclass even though they shouldn’t

    • Look for “DEFAULT_UNLOCKS = ” in the script, this will list a number of classes that will be unlocked from the start. This is may be the cause of your troubles.

  119. I have no idea how to code, does anyone know how to make a combined name show for specific combinations of classes like in Yanfly’s subclass system in Yanfly ReDux engine?

  120. Hey, this script is great, excactly what i was looking for my game, but is there a way to have a character with a main class locked? so that he can only choose an extra subclass?

  121. Hey there; is there anyway to open the class changing screen with a script call? I don’t want the players changing classes whenever they want, instead they need to speak to a trainer in towns. I looked in the script but I didn’t find any code that could be used in a script call. Thanks in advance =)

  122. For some reason when using this, none of the subclass stats are carried over. I am using:
    But nothing is being carried over and the weirdest thing is happening. When I scroll through a subclass in game and hover over Thief, it will take AGI from 47 down to 45, but if I change it back to another subclass it is stuck at 45.
    Anyone have any ideas?
    Thanks! Love this script!

  123. When I add new classes in the menu it always automatically add in the class selection menu (Current class are 10 and I added 11th one and it just appeared in the primary/subclass selection menu out of nowhere). How can I remove it?

  124. Is there any way to set a class so that it can only be levelled to a certain level, say i get my warrior class to level 20 and i want it to stop so that players must choose a path such as paladin or knight for example?

    • If you have the start-up classes set to a single actor, and not allow any other actors those subclasses, then only that actor can use that sub-class.

  125. Hello, awesome script Yanfly. When I try to remove the option of changing classes, using the $game_actors[x].remove_class(y) script, it works with all class values (between 1-13) except for 1 and 11. Does anyone have any idea why this is and how I can fix this? (it isn’t that class 1 and 11 are selected already, preventing their removal).

  126. I’m a total noob at scripting and I’m having a lot of trouble disabling subclasses. They mess with my class balance, so I want to get rid of them, but nothing I’ve tried works.

  127. Can anyone tell me if it’s possible to unlock classes by obtaining specific skill sets and the like? For example;
    I’d like my character to unlock the “Elementalist” class after obtaining a spell of each element, but I don’t know how to do it.

  128. Please Help! I Keep Getting Error Messages :'(
    Script Yanfly Class Systems line628:NoMethodError occured
    undefined method exp_for_level’ nil:NilClass

  129. Out of curiosity, is it possible to increase the shown maximum level of a class? It kinda looks strange to have a character whose overall level is over level 500 but the class only shows level that they are 99 soldier, in spite of the fact that the soldier class is still getting stronger. Is it possible to make the class read a higher number, like with the adjust limits script?

  130. Can someone please help me with this!!!
    Script Yanfly Class Systems line628:NoMethodError occured
    undefined method exp_for_level’ nil:NilClass

    • You would have to make it so that when they learn the spell, or if you have them learn them at a certain level, a variable is added, and when you get to ‘4’, you have got all the four spells needed.. Have a script check that variable for that character and when the character has the variable at 4, they unlock that class

  131. Ok so can someone help me. I have the multiple classes for each character.
    Also I have Maintain_Levels set to true.
    Say the character is a level 50 Paladin and switches to a Gladiator. Being that maintain_level is on, he will still be Level 50 as a gladiator. The problem is that he doesn’t gain the abilities of the 50 levels of gladiator. The paladin and the gladiator have 2 different sets of skills. Is there anyway to fix this?

  132. For some reason, I’m only able to scroll down to about the 17th subclass in the list instead of seeing all available subclasses. This is the case for every one of my primaries regardless of if I have restrictions on what can and cannot pick the subclass. Any ideas on why this would happen or how to fix it?

  133. hello Yanfly im new to RPG maker VX ace im tring to use your system here but it dont seem to be letting me use it could you give me a walk though better so i my under stand where i have gone wrong

  134. Quick question, I’m loving the the class system you’ve made here, but let’s say I have 100 different unique classes how can I get a messaged to pop up when a class is unlocked that for ex. needs Lvl.3 Fighter & Lvl.2 Mage = new combination class.

    Currently from what I’ve noticed I can set it up to show a class unlocked for a linear class progression but I’m not sure how to alert a player when they’ve unlocked a new class through the varying class combinations that are possible in my game.

  135. So…I have this script, as well as Specifics and Class Unlock Level.

    I’ve done everything right and added things where they were supposed to go.

    Only thing is……

    In your photo uptop it looks like you’re in a shop or some kind of weird menu that resembles a shop.

    Is there a specific way to make a way to buy the classes?

    Oh and for some reason it doesn’t add classes in (Unless you;re supposed to make the classes yourself. In which case….I should be fine)

    Sorry this is so long.

    High Regards,

    Inmento Riku

  136. I was wanting to ask if there is a way to alter the script to allow the sub class to only be HALF of the Primary class level? And is there also a way to disable sub class until a specific level or have the ability to use the sub class at a specific level?

    I’m trying to go on the long road of recreating Final Fantasy XI on RPG Maker VX Ace, and the primary objective of this script is exactly what I needed to Primary/Sub class options!

    But in XI, you would unlock Sub class ability in game at a specific level and if you equipped a job as a sub, it’d only be half of your primary.

  137. i have a problem. I’m trying to use the script to set up specific classes for different characters, but there is a class that i don’t want on a certain character that i want on another, but i had to delete that class so that it wouldn’t appear for the wrong characters. if you need to know the class i don’t want it is preist(copy and rename of preistess)
    thanks in advance for any and all possible help or advice!

  138. I’m having a little problem with this script.
    So I create like, a basic class for a character no skills or nothing, and I want them to change classes later, but, the character still gets the Soldier class, and i try to restrict the class, In notes, in the script call, etc. But nothing seems to work,
    So I do need a little help.

  139. Pingback: RMVXA Scripting Proficiency Levels | doublexrpgmaker

  140. Hello Yanfly!
    I really love the script! The only problem I’m having right now is the remove class.
    I don’t know if I’m doing wrong. $game_actors[x].remove_class(y) I tried this but the game didn’t remove the class. My question is if this script calls remove primary class or sub class. I want certain character to have certain class and can’t change into other class than their own. e.g Actor 1 is a swordman and can only change to berserker.
    Thank you.

  141. hi yanfly, i need your help,
    at the class change window i want to draw extra parameters under
    the normal parameters, like EVA and MEVA
    i have this code:
    8.times {|i| draw_item(0, line_height * i, [0,1,2,3,5,7,4,6][i]) }
    and i want to draw it under these parameters
    thx (:

  142. I’m having a problem with the character faces and models being the wrong sprite when I change to different classes. Like the first class is always actor 1-1.

  143. There is a minor bug with this script. It was hard for to me find because I’m a total newb to Ruby & RPG Maker.

    Line 617 “@exp[max_level] = 2547133”

    This will make the 99th class be level 99. This is not intended behavior! This line should be:

    Line 617 “@exp_max_level = 2547133”

    & Line 631 should also change “@exp[max_level]” to “@exp_max_level”

    Basically you had to make a new variable but instead you were overwriting one.

  144. How do you make it so when someone selects a class, it makes that class unselectable to other players? Example: Lets say someone picks Cleric, well I want it so when it is selected that no one can select Cleric until it is unselected by the party member who equipped it.

  145. I noticed that if a class has “Special” unlocked already, for example, and the subclass also has “Special” unlocked with different skills, they do not get added despite the fact that the proper level was reached. Is this a glitch?

  146. Howdy. Great script, Yanfly, but 2 questions:
    Is there any way to only learn a skill when you are in the class than learns it?
    Is there anyway to lose all JP when you change classes?

  147. This is an awesome script, so thanks for that. I would like to ask if it’s simple to edit the script so that when you select the “Subclass” menu, that instead of listing all the classes, it could instead display Skill Types?

    I just want to make it so when you click Subclass, you can see the Skill Types instead of the classes in the menu. Everything else should remain the same. Thanks!

  148. Pingback: Blazblue Cs How To Unlock Unlimited Character | Information

  149. okay…so I’m making my first game, and ruby isn’t really something i’m familiar with but i was trying to have certain characters unlock certain subclasses with an event (like they read a skill book) and it unlocked with a script call. but when i started a new game it was already unlocked. I’m probably doing something wrong but can someone help me out?

  150. Can I ask for a modification of the script if possible? I would like to use this script to select the player’s class at the start of the game, but ONLY there. So 1)I’d like it not to be accessible through the menu. 2)There is no need for subclass options. 3)I’d like it to display a list of all the Features of the class (but not the skills).

    If you or someone else could make a version with these changes I’d be grateful (and properly credit of course).

  151. How dou you proceed if you want each class to have a different sprite ?
    To give an exemple, the Final fantasy’s class system, where you could change from black mage to knight and so the caracter have another apearance ?

  152. I can’t use the skills of subclass, they are not even added to the list. I copied the script, I put it and made sure that the add subclass skill was put to true. Nothing. It just adds the status. Any help regarding it?

    • I had the same problem, don’t know if you are still having it but you need to set the skills you learn to be either the same level you get the class at or later.

      Hope this helps.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s