Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Class System

Ok, so i want to make a Class System in my game, but i'm not sure how to go about doing it. I've tried looking at a lot of scripts that are already out, but none up them really applied to what i'm looking for. The system that i want is pretty basic. It's kinda like Golden Sun in a way. As you progress through the game, your character levels up and when they reach a cartain level, there class changes. Within those classes, there are so many different skills that can be unlocked. I want it to be customizible though, for many options. So, basically, you can mix and match random classes that you have mastered, to unlock new ones. (Ex: Fighter + Cleric = Paladin) And before anyone recommends it, i've already tried the Dragon Quest script and it interfers with some of my scripts and doesn't work. There's no way i can do this through scripting, because i have little to no knowledge on how to script. Although, i do know that it can be done through common events with conditional branches and variables, i just don't know where to start, because it's so much.

So, to sum it all up. What i would like to know from people is, What would be the easiest way to go about doing this?, and if you know, how would I do it?
 
Okay, so you basically want a situation where you have to master class X and class Y to unlock class Z? Or do you mean you set yourself with a primary and secondary class a la FFXI, and this combination results in a third class being printed out? Either way, I'd think you'd be able to do this via scripts that have already been written, because you'd need the classes to gain EXP independently of the actor, meaning you'd either need to use an assload of actor slots to represent each character's class, or you'd need to use an AP system. Either one would be pretty difficult to do without using a script at all.

There's only one way I can really think of to do this without scripting, but it'd be pretty tough and time-consuming, and would probably work like the system in DQ3. I'm using a version of this in my project, except favoring a Seiken Densetsu 3 style of class change.

Anyway, what you want to do is create as many actors for each character as there are classes they can use. Each time you change class, the character has to unequip all items, and must be a certain level. You can vary the way that he changes (such as always starting at Lv 1 in that class or keeping the level, or keeping all, part, or none of the stats gained through being in the previous class). You conceivably could make it so you don't have to unequip, but then you'd have to create a separate version of each class for each actor using his/her own unique equipment, then read the equipment into variables before the class change, and change the new class's equipment to what was on beforehand. This method will make the class change about as simple as changing actors.

Now, the problems with this are that you'll start off an empty slate. You could partially alleviate this by having characters retain skills and part of their stats, making this about as close to DQ3 as possible. To retain stats, you'll have to read all six stats into variables beforehand (or however many you're using if you have a script to change the stats), divide each of those variables in half, then change the new class's initial stats to that. This might require a slight script change so that the player gains stats instead of having them set equal to the value given in the default stat system's matrix... I dunno, I forget exactly how stat gains work, but I'm pretty sure they set Stat X equal to Y rather than adding Y to stat X. I can't imagine it'd alter more than a few lines of code, though. To retain skills, you'll have to first read the current class's level, then teach EVERY skill the player has learned up until then to EVERY INSTANCE of that character. So, for example, if you have your Lv 24 White Mage change class and White Mages can learn 10 spells, and there's 16 total classes, you'll have to create 15 conditional branches, each checking if the White Mage instance of the character is at or above a level where he learns a spell, then teach that spell to the other 15 classes if so.

I only hope that I'm wrong about class changes not retaining skills, because this can be hella easier if they do. In such a case, you'd only need to create one of each actor, and just reset his level to 1 while retaining whatever percentage of stats he's gained to achieve the DQ3 style of class change.

Now, to gain access to advanced classes, it's not quite so difficult. In the event that allows you to change classes, have it read the actors' levels into a variable designated to certain classes. Only offer the secret classes if two of the variables have reached a certain level. For example, for your Paladin class, it'd only be offered if you reach Lv X as a Fighter and Lv Y as a Cleric. This'll be easier to pull off if class changes are done in a mastery style like Lufia: Ruins of Lore, where you speak to a different NPC for each class you want to switch to. If you don't want the player to know that the Paladin class is available, you can have some event prevent you from seeing the Paladin NPC unless at least one of your characters meets the requirements.

I'm sure I've made this a lot harder than it probably is, and someone could likely explain it better than me. But I tried.
 
:lol: Thanks a lot Onyx. That is extremely confusing though. But if this is the only way to do it, i'll probably just fall back to an already made script. It would appear that scripting is the easiest way to go about it, so that i don't have to use about 1,000,000 variables and such.  :crazy:

Would you happen to have any links you can provide me with to this kinda class system, or something similar to it anyways?
 
Onyx Tanuki":2ql4wkbs said:
I only hope that I'm wrong about class changes not retaining skills, because this can be hella easier if they do. In such a case, you'd only need to create one of each actor, and just reset his level to 1 while retaining whatever percentage of stats he's gained to achieve the DQ3 style of class change.
When you change class using the normal event feature, the actor retains all skills and stats they've learnt so far. So, yep, no need for multiple actors unless you always want a clean slate.

Somebody did make a giant script that perfectly replicates the DQ class changing, including advanced and elite classes et al. But I can't remember who, sorry. Must've been 6+ months ago as well. Dig around the Script forums and you might find it.
 
Thanks eharper256 for the info.

Yeah, i've already tried the Dragon Quest script and it never works for me. (sigh*)
But, i'll give it another shot i guess. If i can't figure it out though, and i get the same script error, would anyone be interested in fixing it for me, seeing as how i have no idea what it is?  :tongue:   
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top