Dual Class

You may have heard of Dual Weapons or Dual Strike, but is there a way to Dual Class? 

I don't mean the Subclass but rather a Dual Class.

Say we have Natalie who is a Monk.

You gave her the following skills:

  • Lv 1 - Power Blow
  • Lv 2 - Enigmatic Punch
  • Lv 3 - Great Punch
  • Lv 4 - Thunder Punch
  • Lv 6 - Dragon Evolution
These are her skills as a Monk (on the database).

Then you decided to Dual Class her with...say an Alchemist.

An alchemist on the database has the following skills:

  • Lv 1 - Weapon Bless
  • Lv 2 - Armor Bless
  • Lv 3 - Conduct Thunder
Now, we can set up Natalie to be Level 10 for example. Since she's naturally a Monk and Dual Classed with Alchemist, she should have both the skill of a Monk and an Alchemist due that between Level 1 - 3 of an Alchemist brings the three skills on the database.

You might ask why I am asking this. It is because if I ever do a level up or change class, all past skills on levels won't be added automatically not unless you reapply them.

Also, if Dual Classing is available, is it also possible if we say we undo that classing and remove that certain dual class? If Natalie ever dual classed as an Alchemist and undoes it, all past skills of an Alchemist should vanish. If she ever reapplies as a Paladin, then Natalie should have both her original skills and post Paladin Skills based on Natalie's level.

PS - Due to the conversation, I have to add:

Growth per dual class..changes the status growth via the class they dual classed with.
If you use a different skill type for all Alchemist skills, and make it unusable by the monk class, you can make the monk learn the alchemist skills too... it won't show on your actor since it's not usable by the monk but when you switch to alchemist they will suddenly show up... also that way, when you revert to non-alchemist, the skills will not be usable again...


The alchemist on the other hand should have access to the Monk skill types... else you won't be able to use those skills when ur an alchemist
The reason for this is if you make all the classes access the same category of skills, they would be all use-able for all classes, however, the issue remains, if both has access to those skills and change classes, post class skills are not added to the changed class actor...thus rendering the fact that its a Dual Class...
What I said was make them use different Skill types, not the same... 0.0


All classes will learn all skills... you will basically utilize skill types to make it look like they don't learn some of the skills of other classes...


of course doing this, each base class will have it's own dual class possibilities since you need to link all skills...


Like if both monk and warrior can become Alchemist, you need to have an alchemist for monk, and another alchemist for warriors... Then each dual class will have access to the skill type of the main class... Like the Alchemist-Monk dual class will have access to both Monk and Alchemist skill types, the Alche-Warrior on the other hand have access to both Warrior and Alchemist skill types...


Now if you can't do that... why not really just use Yanfly's Class system to add a sub-class... you can define the subclasses there to determine what they do anyways...
Yes, that's true, but that I was searching for as a function is that it makes the actor has two classes, two set of skills even if they were categorized.

If Natalie is a Monk and all her skills are categorized under Martial Arts skills, consider that as its group of skills. She dual classes with an Alchemist who has a skill category of Alchemy, then, Natalie should be a Monk - Alchemist, who can execute both Alchemy and Martial Arts. At the same time, if ever Natalie reverts to only a single class, it would remove all the Alchemy Skills from the Menu, Status and Battle.

I would also like to point out that what if a player changes Natalie's class into something like Paladin instead of an Alchemist with a skill category? 

If I may call this in my own terms, I'd say a Global connection for all skill categories for all characters, so they can dual class to any class they want to...revert to the original...and vise versa.
That is exactly what my suggestion will do...


Basically the monk class will learn all abilities of monk + all dual classes possible to Natalie... same will all of those dual classes...


Each skill will belong to it's own skill type


now Monk Class will only have access to Monk Skill Type


Each dual class will have access to the Skill Type of that Class + The Monk class...


So when you switch to that dual class, you can now use both the monk skills and that dual class' skills... when you remove the dual class, you're back to only being able to use Monk skills
That works, yes, but what if I wanted to do a random dual class? It would take so much time creating all classes and their dual class in the database. Also, if I go beyond not only on the skills but how each class affects status growth, it won't work well without scripting it.
Well, your only question on the OP was ABOUT THE SKILLS...


It will use whatever stat that current "dual class" has... if you want to be able to alter that, then WHY NOT USE YANFLY's SUBCLASS SCRIPT? or edit it a bit if it doesn't fit exactly... that will be easier...
Because I want to learn making my own or so, learn how it works. Yes, I can use someone's script, but I want to learn how to make one for my self too. You can say I am a bit of a dreamer for that, but I want to learn.
Then you can start by reading his script, LEARN how he did it... or if you don't want... you could just read the default scripts that handle these things and experiment... if someone goes wrong, ask here...
The script is by far complex for me to comprehend right now. If someone has an idea, one can throw in how to. I am not necessarily asking for the script itself, just a way how to do it.
I think you can start be trying to "re-learn" every ability of the new class that should have been learned (when you switch classes)...


Then for successive level-ups, you can probably go thru the list of skills of both classes to check if you need to learn a new skill...
Everytime you remove a class, simply delete all of those skills.


$data_classes holds the class data,


`learnings` gives you all the class learnings


You just need to go through each learning for all of the old classes and remove them from the actor's list to make sure there are no class skills, and then go through the new classes and add them.
Everytime you remove a class, simply delete all of those skills.

$data_classes holds the class data,

`learnings` gives you all the class learnings

You just need to go through each learning for all of the old classes and remove them from the actor's list to make sure there are no class skills, and then go through the new classes and add them.
Thanks. Right now I made it manually for each skill. Or is there a way to group all the functions (removing all skills) into one, so I can just call them up like a method itself?
I don't understand your question. Examples?
I just basically looked it up via game interpreter and game actor, so forgive me if I'm wrong.

I did it this way:

def remove_skills $game_actors[6].forget_skill(6) $game_actors[6].forget_skill(7) $game_actors[6].forget_skill(8) endor is data actors much appropriate?

What I wanted to implement was that, if there's a way to group all classes and let them forget all skills instead, then relearn the ones in a new class they are going to learn.

Also, how can a class change via script?

I keep doing it this way...

Code:
$game_actors[1].change_class(2, true)
http://himeworks.wordpress.com/2013/08/06/utils-class-changing/


Should give you something to work with.
Thank you. Will check this out 🙂
Thanks. Right now I made it manually for each skill. Or is there a way to group all the functions (removing all skills) into one, so I can just call them up like a method itself?
Exactly how Tsuki said, actually.  Have a method that goes through each learning skill and removes or adds them, depending on whether you're adding the class or removing the class.  What is meant by having a method go through each learning is using recursion.  There are multiple ways to loop a command in Ruby and each has its own advantages and disadvantages, so you use whatever loop is best suited to the situation, usually dependent on what information you HAVE and what information you WANT.

If I were you, I would identify the class I want as a subclass, call up the skill learning list from $data_classes, then use a skill.each loop to add each one to the actor.  If you wanted to change classes later, I'd repeat the process backwards then add the learning list of the new class.  Assuming you use a conditional (like true/false) to determine whether the method removes or adds skills, you can theoretically do this entire process for every single class combination using only one standard method.  Simply call the method with a reference to the class id and whether it should add or remove... recursion and conditionals will do the rest.

If you can't handle this because of your coding level, I recommend learning from some easier scripts first or try reading the help manual within RPG Maker.  It has ALL the information you need to learn how to code in Ruby, you just need to be capable of understanding it.  Heck I've never coded in Ruby before last month and now I'm redefining the core mechanics with ease, all thanks to the help manual.
I do believe you could just loop thru all skills included on the list of a particular class rather than making a remove line for each one

something like this

class Game_Actor def remove(id) $data_classes[id].learnings.each do |skill| forget_skill(skill) end endendid => class id of the class to be removed...to use it, do something like:

Script: $game_actors[6].remove(1)that will remove all skills of class 1 from actor 6...$game_actors is what you will use to modify the actors used by your game...

Original thread: https://forums.rpgmakerweb.com/threads/dual-class.23219/