How to Set Parameters Based on Class not Actor

I am trying to implement a class choice system in my game. While I can get the player to be able to choose a class, I want to have it so that their parameters change along with the class. Basically, if my main character is a Cleric I probably don't want them to have the health of a tanky Fighter. I can't figure out how to do this. There is a Change Parameters event command, but I can't use that as I would need to input EVERY value for EVERY level for EVERY class and have it be called whenever a character levels up or something like that (I'd like to avoid such a brute-force approach). Does anyone else have a solution of theirs they would like to share? 😀

I have an idea though. I was thinking of setting up an actor that represents the class, and in the Game_Actor script I modify it so that, for instance, line 188 (to get maxHP) goes from this:
  1. return $data_actors[@actor_id].parameters[0, @level]
Expand to see the code.


to something more like this (I'm not familiar with RGSS1, so if syntax is wrong I'm not too worried):
  1. case @class_id
  2.    when 1 #fighter
  3.       return $data_actors[2].parameters[0, @level]
  4.    .
  5.    .
  6.    .
  7.    when 9 #Cleric
  8.       return $data_actors[10].parameters[0, @level]
  9. end
Expand to see the code.


I think a solution like this for each of the scaling stats (HP, SP, etc) would work. I guess my only real question about this potential solution is will this actually get the correct class number? Is this the proper syntax if I want to get the class id for the current actor?
This is a feature you get with VX and VXA.

The way I'd replicate it is take advantage of the Element Efficiency or State Efficiency parameters. I'd add elements such as "150% Intelligence" or "50% Defence" and stuff like that and read them off in script (You could probably come up with a naming system that could be read back in RGSS1 so you won't have to tweak the script each time you tweak a class's stat changes).

Treat them as buffs rather than changes to base stats.
Okay, that sounds like a safe solution. Plus then I get to save on actors.

Although, VXA is on sale right now...
Yes, I think that'll work. But there are other challenges you might have to address.
Current HP/MP percentages, you know when someone's at 50% health and you increase their MaxHP you'll want them to stay at 50%

Changing equipment. You'll want to use the inventory add - remove methods so you aren't duplicating or deleting items.

Skills. You can either learn - forget skills every time you change classes. Or have it so all skills "learned" but hidden depending on their level and class. Like if you have a class specific skill that's obtained with an item and not based on character level - you might lose that skill when changing classes if you're not careful. But hiding skills based on conditions can be equally messy business.

And of course there all the Menu and status windows updates. Assuming you want the player to see the stat changes.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=78643