Spellcaster Studios

Make it happen…

RPG system – Part I

Spent most of the weekend working on the RPG system of “Grey”.

The mechanics of “Grey” require a stable (C)RPG foundation, with all the usual systems, like primary attributes, derived attributes, talent trees, equipment and buffs/debuffs, and building that is a challenge.

Of course, I could have used one of the dozens of open/free RPG systems available and adjusted them for my own needs, but to be honest, this seems like something fun and making “Grey” is supposed to be fun, so that’s the route we’ve chosen to take, although it is a challenging one.

We’re aware that balancing a RPG is no small feat, and we decided to tackle that issue from the beginning, creating tools that will allow us to do so.

image

This is RPGTester, the application we’ve made to use as a sandbox for RPG-system related tests. It’s just a console window that incorporates a full Lua parser (since the RPG logic is all built using Lua scripting), that uses the game files themselves as a basis for testing and reporting. It even allows me to rebuild the data files that build the creatures and classes built from the database with just one command.

So, I have creature definitions (for example “Skeleton”). This “Skeleton” has a class associated with it (in this case, “WarriorDPS”, which means that it is a melee offensive character). This class will be used for at least two things: to select the AI to use on this character and (more important for our current discussion) to choose how the basic attributes of the character evolve with its level.

There are currently 5 basic attributes on “Grey”:

  • Constitution (CON): This describes how built the entity is, and affects directly the health pool size.
  • Strength (STR): This describes how strong the entity is, and affect how much damage the entity deals in melee combat, and how much damage he can absorb in melee defense.
  • Dexterity (DEX): This describes how agile the entity is. It affects how good the entity is at dodging physical attacks, and how precise he is with ranged physical weapons. It also affects how fast the entity moves and how fast his action resource fills up
  • Intellect (INT): This describes how smart the entity is, and affects how large the mana pool size is. It also generally affects the power of any spells cast.
  • Willpower (WIL): This describes how powerful is the will of the entity. This mainly affects regeneration rates (for health, mana and others), the power of the some spells and more importantly the life-shaping component of the game

These will probably change over time, as we test out the game and tune the mechanics, but this will serve as a basic guideline for now.

Now these will evolve over time, and I had to find a formula for this. I decided on a linear equation, since I want these attributes to scale smoothly over time, since they serve as a basis for most of the others (like critical strike chance, etc).

To account for the different class/roles, I had to add some weighting that’s stored with the class. The reason for this is that it doesn’t make much sense to have a “Life Shaper” character having as much CON as a Warrior. This will make entities like healers to be squishy, while warriors will be very hard to kill but don’t deal that much damage.

I had also to guarantee that the classes were normalized. That means that for a specific level, characters of a specific class don’t have more attributes than characters from another class. To guarantee that, I created a test on RPGTester that checks for the normalization (in the screenshot above you can see a “test_attribute_normalization()” call being made to test it.

After that, I had to test the values of the attributes themselves, to see if they were being prioritized right depending on role. For that, I created a report (which is just a tab-separated value table) that lists the values of the attributes over the levels. Then I imported that data onto Microsoft Excel and plotted graphs that allowed me to look at the data:

image

In this case, 4 reports leads to 4 graphs, and you can see that for example Life Shapers will have more willpower, while mages have more intellect; and both of them have less constitution than warriors.

Since Excel has a sweet dynamic dynamic link system, so every time I want to see the impact of changing the computations of the the attributes, I just need to run the report tool and press a button in Excel to see the graphs changing. For example, in the next screenshot, I just changed the calculation of CON to be with the square of the level (kind of explodes, I know):

image

And because I can’t resist playing around, going with squared on everything:

image

I’ve only listed 20 levels, but episode 1 won’t even probably have that (we’re aiming for 10 levels, at this moment).

On top of this class-based evolution, each character itself can have modifiers for the attributes, so we don’t have to make a new class for a specific creature that should have more health or spell power.

Next step on the RPG system will be to add the health pool calculations and displaying that in-game; should take me the next couple of days, since we’re all so excited with the development of the RPG system… It gives us the feeling we’re actually working on the game, instead of the technology, which is great for motivation (and the lack of motivation is the number one enemy of any group of people trying to develop a game in their free time)!

Comment