Design Docs - Thinking About Characters - Part 1
November 11, 2019
Hello! Welcome back, welcome back. I see that you've decided to stick around for more of design document rambling. 😊
In the next few chapters, I'm going to be discussing on topics relating to character and party management for a JRPG. We've already done a little bit of character and party system design through the inventory system that was created, but now it is time to try and build on top of that to make a component that allows for a traditional JRPG to be built on top of.
Continuing with my intention in keeping things bite-sized and not presenting you an overload of information, the goal of this chapter is to begin defining what our JRPG character system and party system will be capable of.
This will allow us to be cozy and comfortable in eventually giving us the confidence to build out a more complex character and party management system for a potential JRPG.
Eventually we will want to start refactoring away all the character and party
management code away from the existing
jrpg-inventory-system project, and make its own independent
What Have I Been Up To?
I think I'm going to be super explicit about this exciting news that has happened to me in my personal life. Well, it has been a while, but my wife has refrained from telling her social circle about it, and out of respect for her, I haven't done so either.
I figure though, that no one really reads these posts as of now, and that this section is usually dedicated to my personal thoughts. Technically then, I am sort of allowed to spill some secrets, right? 😄 Just kidding, she's already announced it to her friends and family, so I can too!
I'm going to be a dad.
There's the guy, or gal at 12 weeks.
How exciting, right?! We're just about 16 weeks pregnant now -- so about 4 months, I guess? I'm not sure how this gestational age stuff really works. I keep track of the days and for some reason I always end up a few days behind. The whole gestational age confuses me. It feels much longer than 4 months, but the obstetrician says 16 weeks, so I will trust the professional. 😄
The fetus is doing well, and development is good. The experience has been great so far, although it is my wife doing most of the work, of course. But! She claims that it has been a experience on her end too, so I am not making this stuff up.
Anyway, we don't know the sex of the baby yet, and that should be something we will find out sometime in mid-December. Pretty cool, because now we'll have another character joining our party. 😎
Am I really ready for this? I'm not sure. I'm going to try and figure out this dad stuff later. I have time. Besides, from what I've heard, no one ever really figures this stuff out until things happen, anyway. The best I can do is be patient and just learn.
So, what's going on at work? Well...
Work has been super intense and interesting. Everyday before during my stretching sessions at the gym before my workout, I naturally think about some the things I am working on at work. People say this is bad, and that we shouldn't think about work all the time.
I disagree. I tend to be emotionally happier when I think about work. It helps keeps me on top of things on that end, and as a result, things get done. I believe it has to do with my tendency to have anxiety over things I don't have control over. If I'm more in control of my life, which includes my professional life, I will be less anxious.
Of course, when things get done, there's less stress which exists internally to potentially obstruct me from getting the things that truly matter done (for example, family, friends, personal goals and happiness, etc.).
Anyway, I love what I do during my day job, so it's why I just end up "thinking about work". If you're in the same boat, then 👊
As far as Pokemon Red goes. Freaking Abra. 😦 After I had just beaten Misty, and a string of trainers at Nugget bridge. I had decided to put some effort to catch an Abra, but it was just so hard!
My wife decided to be nice and actually ended up buying one for me at the Game Corner at Celedon City as she's currently playing Pokemon Yellow. We also ended up training it to Kadabra, and eventually evolved into an Alakazam during the trade.
Here's my party as it stands:
Yep, I am playing on a real Gameboy Advance! Anyway, I think I need to buy like 20 Poke Balls and use some sleep attack to catch an Abra. Maybe when I have enough cash to spare, I'll go back and try to catch one. For now, it is onwards for the sake of progress!
My Pokemon party isn't looking too shabby now. I'll just need to level a little bit more to survive Diglett's cave and try to catch that Level 29-31 Dugtrio lurking about.
That's all I have to say about that.... 😦
Designing a JRPG Character System
In spirit in trying to stay on topic, let's zip back into the JRPG design world and finally start thinking about characters.
I enjoyed it because it touched on a few points in the topic of collectivism. More specifically, in that the player of a JRPG doesn't doesn't really control a single character, but rather a group of characters in a party which function as a single unit.
When reading the article, I have come to conclusion that a character in a JRPG is an actor within a simulation. The JRPG character possesses specific features that must be used to drive the simulation forward. Of course, in the case of JRPGs, the simulation is the JRPG itself.
I have made up some rules for myself in what makes a MVC, no not that MVC, but a "minimum viable character" in a JRPG. Here are some of my thoughts:
What does a JRPG character have?
- A name!
- Status effects
- Spells, skills, etc.
- Character class (job)
Each character in the party has their own personality (name), competency (statistics and experience), physical and mental condition (status effects), talents (spells, and skills), and possibly profession (character class).
All of these attributes combined creates an entity that models an adventurer within an "adventure simulation". For example, statistics allow for simulation of combat against other entity in the simulation with another set of statistics. (Are my stats better than yours? If it is, then I win!)
A character needs a name. Our character in a game must be able toallow the player to:
Set a Name
When the character is initially introduced, the game always gives an opportunity for the player to name the character.
Final Fantasy 6 was super famous for having such a large cast of characters. In the game, the player is allowed to name every playable character.
Err... sometimes, players can take naming a bit too far...
Get a Name
Since a player is allowed set a name, naturally the character should be allowed to tell other characters, the game, and the player their name.
Statistics are most important in that they are used to simulate combat in a battle system. It answers a couple of questions in that we know:
- How strong is the character?
- What is the character good at? Physical attacks, or magic attacks?
- How much damage can the character deal during battle?
- How much damage can the charater receive during battle before being taken out?
Statistics can also drive the story. Think about this!The one thing about statistics is that we can also use a specific statistic to drive story. A good example here would be something like meeting a particular NPC based on the highest Luck statistic of a character in a party. This gives a lot of potential to create really flexible stories in a JRPG.
We can also be even more clever and have "base stats", which are pre-calculated depending on the level, and "derived stats" which are calculated from another statistic, or a composition of statistics.
There are numerous possibilities here.
Status effects give the character a physical and mental state of mind. Physical status effects like Poisoned can help indicate that the character is taking damage indirectly due to being ill. Or, mental status effects such as Berserk can cause a character to enrage and not follow any of the battle strategies that the party as whole has decided upon to successfully defeat an enemy.
The character not only is limited to a single status effect, but can hold multiple status effect -- thus, potentially altering their physical and mental state of mind at once.
Status effects also don't have to be negative. A character can also feel good too right? Status effects like Haste, Protect, etc all allow the character to become faster, and more resilient in battle. So positive status effects also exist.
A character should also then be able to hold status effects of either negative, or positive effects, and affect their statistics accordingly.
Spells and Skills
Characters can be made "unique" by giving each one of them the ability to perform several other attacks other than the melee attack. If your character is a white mage, then you'ld want the character to be able to cast spells that are more defensive such as Reflect, or Cure. If you have a character that is meant to be a black mage, then some spells which they possess may be Fire, or Bio.
Each character should have a set of spells which they can use, and a character system should allow for each character to have their own set of spells and skills unique to them.
Spells can also vary at different levels. In the Final Fantasy series, it is very common to have base spells such as Fire, which do minimal fire damage early on in the game, and have the character advance into learning spells with more potential to do damage such as Fira, and Firaga.
Skills are similar to spells, but we can think of them as even more unique to the character. In a JRPG, you'll usually have one other character being able to perform the same type of spells as another, albeit either more, or less effective. With skills, they are usually associated to either the character themselves, or the particular job class they belong to.
The character gains experience after every battle. This allows for the character to obtain competency in battle and level up. Different characters can level up at different thresholds of experience. In a JRPG, this can be achieved programmatically, or statically by the use of a look-up table.
The character should possess a minimum threshold to reach a new level by meeting the target experience value.
For example, getting to Level 2 for a character should take about 1000 total XP, while getting to Level 3 will require the character to have 2300 total XP.
Total experience to achieve the next level usually doesn't grow linearly. In fact, in most JRPG games, experience requirements to reach the target level grows exponentially. For Gen1 Pokemon games, the general approach to calculate experience needed to reach the next level was:
XpNeededForNextLevel = Math.Round((4 * CurrentLevel ^ 3) / 5)
You can see that this grows expoentially.
Finally, a character posseses the ability to belong in a certain character class which can steer them in a direction of being attuned for all of what has been discussed above. For example, if a character is a Warrior, then the expectation is that the character can grow their strength, and defense at a much faster rate than a Thief. On the flip side, a Thief will likely have a higher speed, and evasion ability.
Character classes allow for a template to be applied onto the character to make growth much easier to manage.
The Minimum Viable Character
So, I've just presented my opinions on what makes a minimum viable character in a JRPG. Now, it's time to actually see if we can model one through code.
In the next chapter, we'll first take our
jrpg-inventory-system and refactor out all of our existing
character code into a new library. From there, we'll modify some of the
code to model a character with properties of: name (personality), and
statistics and experience (competency).
We'll also write some unit tests to simulate different characters and try to see how leveling affects growth rates of the statistics of these characters.