Well regardless of Reudh's answer, I have to go to bed soon so here we go.
Step 1:
Make a backup of the game in case shit hits the fan.
Step 2:
Open the Vocab file.
Put in ClassNext = "Until Next Class Change"
, preferably under #Status Screen because that's where it's gonna be used.
Put in ClassChange = "%s has become much stronger and become a %s!"
under Battle Ending Messages. Edit it if you want.
Step 3:
Open Game_Actor.
Under * Public Instance Variables put in @@class_list = [ #Everybody's classes and the level where they get them
[], #First actor's classes
[[nil, "herp"], [5, "derp"]], #Second actor's classes
[[nil, "herp"], [5, "derp"]], #etc.
[[nil, "herp"], [5, "derp"]],
[],[],[],[],[],[],[],
]
Explanation: This is a three-dimensional array (or arrays inside arrays inside an array, or Arrayception). The outermost array is @@class_list itself, and its entries correspond to the different actors, which is why there's 11 of them (although we might need 12 if there's going to be a FeMC).
The next layer of arrays can either be an array of class names with the corresponding level (in our case, actors 2 through 4 all start with the base class "herp" and promote to "derp" on level 5), or empty, in which case the character permanently has their standard class name. The first class doesn't get a level value because it wouldn't be needed anyway, but in case you really insist you can put a 1 or 0 there instead.
Find the #setup method.
Put in @class_counter = 0 #Variable which stores an actor's current class
@class = @@class_list[actor_id-1] #Shortcut because fuck writing that all over the place
Self explanatory, although naming hte variable @class might've been bad form. Fuck it, Ruby's a bro and lets me do it anyways.
Somwhere among the other methods (I chose right beneath #class), put in def class_exists?
return @class.empty? ? false : true
end
def class_name #Return's current class name, or their class' name if the array is empty.
return class_exists? ? @class[@class_counter][1] : self.class.name
end
def next_class_up
if class_exists? and @class_counter < @class.size-1
return @class[@class_counter+1][0]-@level
end
return "Never"
end
First method tells us if an actor has special classes. In our case, actor 1 would return false while 2 to 4 would return true.
Second method gives us the name of the actor's current class. "herp" or "derp" in our case.
Third method returns the amount of level ups it takes until the next class change, if at all.
Find the method #level_up and replace it with the following:
def level_up
@level += 1
for learning in self.class.learnings
learn_skill(learning.skill_id) if learning.level == @level
end
unless @class_counter >= @class.size-1 #Has actor reached the highest class?
if @level >= @class[@class_counter+1][0] #Does actor qualify for the next class?
@class_counter += 1 #Class change!
text = sprintf(Vocab::ClassChange, self.name, self.class_name)
$game_message.texts.push(text)
return
end
end
end
So yeah, if an actor reaches the prerequisite level, class up and tells us about it in a message box.
Step 4:
Open Window_Base.
Find the #draw_actor_class method and replace it with this:
def draw_actor_class(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 108, WLH, actor.class_name)
end
This makes the menus use our custom classes instead of the standard ones. Huzzah!
Step 5:
Open YEM Status Menu Overhaul
find the Window_Status_General class and add this line to its #refresh method:
draw_class_info(contents.width/2, WLH*4)
This is what writes the Class change info into the status screen.
Beneath that, the #draw_equipment method, change its variables to contents.width/2, WLH*6
This prevents those two lines from overlapping.
Find the #draw_exp_info method and put the following beneath it:
def draw_class_info(x, y)
s1 = @actor.next_class_up
self.contents.font.color = system_color
self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ClassNext)
self.contents.font.color = normal_color
self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 2)
end
Step 6:
This is where it gets interesting, because victory quotes.
Open YEM Victory Aftermath
Find the #create_level_up_windows method. Go up a bit just above the actor.gain_exp(@exp, false) bit.
Put a last_class = actor.class_name
there.
Inside #create_level_up_windows, look for the ternary operator which chooses between "SKILL" and "LEVEL". Put value = "CLASS_UP" if last_class != actor.class_name
beneath it.
Now, in the common scripts, you can just add a conditional that lets people talk when they change classes! HUZZAH!