Script Call for Class..?

Jellysaur

A Penny a Dozen.
Member
Joined
Oct 15, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
Using VX Ace.

I was looking for something to keep an actor's EXP even after changing classes, and I found Tsukihime's script call:

$game_actors[3].change_class(2, true)
Trouble is, I'm not sure where to put it. I get that you put script calls in events, but do I put this script call in an event, on the map? : / I've searched the web, but no luck on this kind of script call. 

Speedy replies much appreciated!
 
Last edited by a moderator:

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
439
First Language
English
Primarily Uses
RMMV
You should put the script call in whatever event you're using to change the actor's class. So, if you're using a common event, put it there, or if you're using an NPC that the player talks to, put it in that NPC's event, etc.
 
Last edited by a moderator:

Jellysaur

A Penny a Dozen.
Member
Joined
Oct 15, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
That means I'd have to set up an event in order to change classes.. But I have a class menu where one is supposed to be able to change classes at will. I can set up an event/NPC as a workaround, but I was wondering if there's another option that utilises the class menu.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,949
Reaction score
13,585
First Language
English
Primarily Uses
RMMV
If you have a class menu that is a script, then it should already have a call to $game_actors[id].change_class(new_class_id) in some form or other.  You just need to change that to add the true argument.

Give us a link to your class menu script, or if it's something you've created yourself, add the script to your post (remember to put code and spoiler tags).

I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

Jellysaur

A Penny a Dozen.
Member
Joined
Oct 15, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
@Shaz: Sorry about the wrong forum thing. I'll do better next time.

It's Yanfly's Class System: https://dl.dropboxusercontent.com/u/17078211/Scripts/YEA/Class_System.rb

There is this [Line 99]:

MAINTAIN_LEVELS = false
It maintains the level for all classes when set to 'true', but the class unlock system I use (from Yanfly also) does not use this feature. Set to true, the unlocked class does not appear.

There is also this from the same script [Line 579]:

def change_class(class_id, keep_exp = false)
Set to true with line 99 false, the unlocked class appears but the EXP is separate.

Changing both the above quotes to 'true' does not seem to have an effect.

Prtsc Class System.jpg
 

Jellysaur

A Penny a Dozen.
Member
Joined
Oct 15, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses

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

Latest Threads

Latest Profile Posts

I just like this website:
lol
I streamed Moonfall on 9/25/20
and have started a page to showcase my vids/stream :kaoluv:

Please subscribe and follow, it's free, it's quick and one sub means so much to me, it would really make my day~ :wub

And now to face my worst enemy... adding color :kaocry:
Power has been restored FINALLY to our home in Lake Charles. Hurricane Laura tried to wreck our lives and disrupt my work on the commercial project i have going with Cloud 9 but the key word is TRIED!!! Slowly moving from the shelter to home over the next week or so. I WILL NOT QUIT!
I am happy because the RPG Maker MZ character comes with extra bust and full body art, but I am disappointed because the quality of the character's PIxel art has decreased.
Only My Opinion that Pixel art MV is better.

Forum statistics

Threads
103,230
Messages
998,195
Members
134,718
Latest member
Weaver
Top