Class Changing

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
This script addresses the issue where the actor changes classes, but the old class skills are still learned and the new class skills are not automatically learned.

Some convenience methods for class changing is also provided as script calls

Download

Get it at Hime Works!

Installation

Place this script below Materials and above Main

Usage

Plug and play.

You can use the script call to change classes

change_class(actor_id, class_id)change_class(actor_id, class_id, keep_exp)change_class(actor_id, class_id, keep_exp, keep_skills)Where`actor_id` is the ID of the actor you wish to change classes

`class_id` is the ID of the class to change to

`keep_exp` is true or false, whether you want to transfer the current exp

`keep_skills` is true or false, whether you want to keep the learned skills

For example

change_class(4, 10, true, false)Will change actor 4's class to class 10 while preserving the actor's exp, but any learned skills (from the old class) are not preserved.By default, exp is not preserved and learned skills are preserved.
 
Last edited by a moderator:

NoahJMina

RPG survivalist
Veteran
Joined
Aug 2, 2013
Messages
151
Reaction score
14
First Language
English
Primarily Uses
wow i was just thinking about this issue yesterday with my game 

thanks for adding this lol
 

NoahJMina

RPG survivalist
Veteran
Joined
Aug 2, 2013
Messages
151
Reaction score
14
First Language
English
Primarily Uses
By default, exp is not preserved and learned skills are preserved. 

                     

                                                               edit?^^^
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Learned skills are preserved by default.
 

flipwon

Veteran
Veteran
Joined
May 11, 2013
Messages
59
Reaction score
0
First Language
English
Primarily Uses
I set skills in my game a little differently. You don't learn them through class but via a trainer, based on class (via variables.. class = 1 = skill learnables)

Is there a way to tag skills to set them to removable/permanent?

If skills were tagged in the skill tab

<Class 1>

and if you switched from class 1 it was removed

and 

<Class Nill>

no matter what class you switched to it was kept, it would make this script much more versatile.. (not to mention amazing in my case ;)
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
This script is for the default class system if you are using an alternative way of learning skills it would be better to get a custom-made script.
 

flipwon

Veteran
Veteran
Joined
May 11, 2013
Messages
59
Reaction score
0
First Language
English
Primarily Uses
Do you take commissions then? Send me a PM :p
 

jackelking

Warper
Member
Joined
Jan 1, 2014
Messages
1
Reaction score
0
First Language
English
Primarily Uses
Newbie here.

So I threw this into my code and tested it and I can change my characters' classes back and forth while keeping their levels and skills, but their spells are getting lost in the process. Is this scrip supposed to track their spells as well or will I have to find/write more code?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
You can keep any learned skills by passing in true for the keep_skills argument

Code:
change_class(actor_id, class_id, keep_exp, keep_skills)change_class(1, 4, true, true)
 

vindaca

CEO of Tales of the Valiant
Veteran
Joined
Dec 11, 2012
Messages
534
Reaction score
75
First Language
English
Primarily Uses
Very useful, (I'm not sure how this one snuck by me for so long...  ) :distrust: . This would would perfectly with my promotion scripts. One request though. Can you make options at the top to change the defaults of the "keep_exp" and "keep_skills". That way it can just be thrown in above one of mine without any extra add-ons.
 
Last edited by a moderator:

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
Is there a way to have the character become level 1 on the new class?
 

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
will this affect stats?  let's say you class change at level 10.  Are your stats any better if you would wait until level 15?  Or does it simply start you at level 1 with the same stats regardless?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
It is based on class parameter curves, so whatever the stats are for level 1, that's what it is.


There's things like this, which picks stats based on the highest level class, but there really is no "carry over" stats on class change for the default system for the most part.
 

Spiker4200

Warper
Member
Joined
May 28, 2015
Messages
1
Reaction score
0
First Language
English
Primarily Uses
I was using this script in today, and I placed it into the (insert here). I went to play test the game and then this message was shown to me: Script '(insert here)' line 26: NameError occurred.

                                                                                                                                                                                                                       undefined local variable or method 'actor_id' for main:object             
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
I was using this script in today, and I placed it into the (insert here).                                                                                                                                            undefined local variable or method 'actor_id' for main:object
You should have pressed the [insert] key on that slot to get a new, empty script slot and then copied the entire script (all 114 lines) into the new slot..
I'm guessing that you either left something from the explanation of the insert slot there, or copied only part of the script into that slot - both would result in errors...
 
Last edited by a moderator:

kory_toombs

Villager
Member
Joined
Oct 18, 2013
Messages
20
Reaction score
18
First Language
English
Primarily Uses
Game_Interpreter line 1411
undefined method "features"
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top