top of page
RPG Window.PNG

My initial goal with this project was to create an RPG system that made use of exponential scaling as the player put more and more points into a single stat. Normally with stat-based scaling in video games, one would see the scaling of stats rise largely at a sort of mid-point before the worth of upgrading that one stat declines massively to the point of making it no longer worth upgrading whatsoever.

​

So, for the fun of it I made this system give little growth at the beginning, only for it to jump-start massively the moment the player invests into it a bit more. Of course the system easily allows for one to edit the scaling of each stat. So if one would prefer the more conventional stat scaling over my exponential scaling, It should be quite accessible for editing.

How does it work?

Main Stats

In my RPG system, every character has an array of scriptable objects I have labelled as Main Stats. These Main Stats hold onto three values: The current level of the Main Stat, the minimum possible level, and the maximum possible level. The level of a

Main Stat effects the growth of all of the scriptable objects attached to said Main Stat by another array. These scriptable objects have been titled "Sub Stats"

​

Sub Stats

Sub Stats also have four values each, but some of them are unnecessary depending on what kind of stat they are. There are regular stats which work as a simple number value, as well as percentage stats. Every Sub Stat also holds a refence to an enum in the character script used to separate important values in dictionaries.

​

Value Stats

A regular number stat uses a value called "Growth Rate", which independently decides how quickly or slowly the stat grows in comparison to other stats. This way Sub Stats don't always share the same rate of growth and can be balanced independently.

​

Percentage Stats

Unlike value stats, percentage stats do not use the growth rate value to determine their rate of growth. Once you set the bool "IsPercentage" to be true, you must also give a value to the "Maximum" value. This will determine the maximum percentage that stat will reach. This will determine the growth rate of the percentage stat, as it will make the character reach that value when they reach the max level of the Main Stat that is attached to that Sub Stat.

​

Storing the Values

All Sub Stats increase in value when the Main Stat they are attached to does. After the Main Stat increases, it calls a function to apply the changes to the Sub Stats attached to it. However, as you may have realised earlier, Sub Stats scriptable objects don't actually have a value to be updated by the Main Stat. Instead, the Main Stat references the growth rate or maximum percentage of the Sub Stat and creates a value using the "statIncreaseRate" and "statLevel" values, and then saves it to the Character.

​

Sub Stat Dictionary

In the character script, there is an enum called "subStats" that is used to differentiate all the Sub Stats. Using the enum value attached to each Sub Stat, the Main Stat can store the values it creates when applying increases in level within a dictionary in the character script. There are three dictionaries in the character script with one value for every Sub Stat. In these dictionaries we save the Sub Stats names, values, and if it is a percentage stat. These dictionaries allow us to read the values of the Sub Stats with greater ease.

©2021 by Dylan White. Proudly created with Wix.com

bottom of page