In this tutorial we’ll start with the set up the status system for our game.
We’ll create a very simple status system with HP, MP, experience, attack, defende and magical attack/defence stats. We’ll also use elements (via attack modifiers, we’ll set them up later with our elemental attacks) and a few status effects (e.g. poison). For a more detailed and complex status system, check out the status system setup tutorial series, which is also used as the base for other tutorial series.
We’ll start in this tutorial with setting up the status values.
Status values are the basis of a status system and handle things like health, defence and other numerical values. There are 3 types of status values available:
- Normal
Regular stats, e.g. max health, attack or defence. - Consumable
Stats that are consumed, e.g. health, MP or stamina.
They use a Normal status value as their maximum value. - Experience
Can be used to increase the level or as spendable points.
Don’t confuse the status value type with status types – the status types are custom types you can set up. They’re an optional feature to group status values together, e.g. for UI displays. We’ll not use them in this tutorial series. Learn more about status values and see a detailed explanation about the status value types in this documentation.
Open the Makinom editor and navigate to Status > Status Values. You’ll see that there are already a bunch of them set up in a new project – we’ll use all of them and add two more.
Most of the status values are already set up the way we need them, but I’ll go over their most important settings anyway. We’ll also set up flying texts for the HP status value to get notified of the changes.
0: Max HP #
This status value manages the maximum health a combatant can have.
Content Information #
- Name
Set to: Max HP
Status Value Settings #
- Type
Set to Normal.
Value Range #
The Value Range defines the upper and lower limit the status value can reach. The default setup should have it limited from 0 to 9999, which is fine for our setup.
If you want to change the value range, click on the Edit Value Range button.
- Minimum Value
Set to 0. - Maximum Value
Set to 9999 (or the maximum value you want.
The maximum possible value is 2147483647 (maximum integer value).
Click on Ok to accept the changes.
Start Value Settings #
When the status value isn’t set by a status development or a combatant directly, this’ll be the default value it’ll have.
- Start Value
Set to 1.
This’ll make sure a combatant doesn’t start dead and has at least 1 HP.
1: HP #
This is the actual health of a combatant. When it reaches 0, the combatant dies.
Content Information #
- Name
Set to: HP
Status Value Settings #
- Type
Set to Consumable.
Start Value Settings #
The health starts with 100% of the max HP.
- Start Value
Set to 100. - Set In
Select Percent.
Consumable Settings #
- Max Status Value
Select Max HP. - Forward Positive Changes
Enable this setting.
If the max HP increases, so will the HP. - Death On
Select On Minimum.
The combatant dies when it reaches 0 (minimum value). - Animate Damage
Enable this setting.
Negative changes (i.e. damage) will cause the damage animation to be played.
We don’t use damage animations in this tutorial series, but we’ll still learn about them.
UI Settings #
We’ll animate changes to the health.
Count To Value #
These settings are used to count to a new value instead of setting it immediately. This usually only affects the displayed value, not the actual value (but can be used like that as well).
- Count To Value
Enable this setting. - Interpolation
Select Quadratic > Quadratic In + Out. - Time
Set to 0.5. - Smooth Value Bars
Enable this setting.
Flying Text Settings #
Click on Add Flying Text.
- Player/Ally/Enemy
Enable these settings.
The flying texts will be displayed by player, ally and enemy combatants.
You can use these settings to set up different flying texts e.g. for player and enemy.
Refresh #
This is used to display positive changes, i.e. healing.
- Show Flying Text
Enable this setting. - Text (Content)
Set to: <color=#00FF00FF><value></color>
This’ll display the value in a green color.
If you want to use a different color, you can add color text codes via the text code buttons above the text field (More > Text > Color). - UI Prefab
You don’t need to set up the flying text prefab here.
Not having a prefab defined here will fall back to the default flying text prefab we already set up (UI > UI Settings). - Schematic Asset
Select the FlyingTextMover schematic.
We’ll also let the combatant’s game object flash green using the Flash Settings.
- Use Flash
Enable this setting. - Flash Children
Enable this setting.
Child objects of the combatant will also flash – e.g. our player’s sprite is on a child object. - Time
Set to 0.5. - Interpolation
Select Linear. - Fade Alpha/Red/Green/Blue
Enable these settings. - Start Color
Set to white with full alpha (A=1 or A=255, depending on the color picker). - End Color
Set to a green color with full alpha.
Damage #
This is used to display negative changes, i.e. damage.
- Ignore 0 Damage
Enable this setting.
A damage of 0 will not display a flying text. - Show Flying Text
Enable this setting. - Text (Content)
Set to: <value>
This’ll display the value the flying text prefab’s text color (i.e. white). - Schematic Asset
Select the FlyingTextMover schematic.
We’ll also let the combatant’s game object flash red using the Flash Settings.
- Use Flash
Enable this setting. - Flash Children
Enable this setting. - Time
Set to 0.5. - Interpolation
Select Linear. - Fade Alpha/Red/Green/Blue
Enable these settings. - Start Color
Set to white with full alpha (A=1 or A=255, depending on the color picker). - End Color
Set to a red color with full alpha.
2: Max MP #
This status value manages the maximum MP a combatant can have.
Content Information #
- Name
Set to: Max MP
Status Value Settings #
- Type
Set to Normal.
Value Range #
The default setup should have it limited from 0 to 999, which is fine for our setup.
Click on the Edit Value Range button to change them.
- Minimum Value
Set to 0. - Maximum Value
Set to 999.
Click on Ok to accept the changes.
Start Value Settings #
- Start Value
Set to 1.
3: MP #
This is the actual MP of a combatant.
Content Information #
- Name
Set to: MP
Status Value Settings #
- Type
Set to Consumable.
Start Value Settings #
- Start Value
Set to 100. - Set In
Select Percent.
Consumable Settings #
- Max Status Value
Select Max MP. - Death On
Select None.
MP doesn’t kill the combatant. - Animate Damage
Disable this setting.
Negative changes don’t play a damage animation.
UI Settings #
We’ll only count to new values, but don’t use flying texts.
Count To Value #
- Count To Value
Enable this setting. - Interpolation
Select Quadratic > Quadratic In + Out. - Time
Set to 0.5. - Smooth Value Bars
Enable this setting.
4: Experience #
This status value manages the experience of a combatant and levels up when reaching the current level’s maximum.
Content Information #
- Name
Set to: EXP
Status Value Settings #
- Type
Set to Experience.
Value Range #
This should default to using the maximum integer value.
Click on the Edit Value Range button.
- Minimum Value
Set to 0. - Maximum Value
Set to 2147483647.
Click on Ok to accept the changes.
Start Value Settings #
- Start Value
Set to 0.
Experience Settings #
- Experience Type
Select Level.
This’ll level up the combatant. - From Minimum
Enable this setting.
The experience will restart from 0 each level.
5: ATK #
This status value represents the combatant’s attack power and is used for physical damage calculations.
Content Information #
- Name
Set to: ATK
Status Value Settings #
- Type
Set to Normal.
Value Range #
This should default to 1-255.
Click on the Edit Value Range button to change them.
- Minimum Value
Set to 1. - Maximum Value
Set to 255.
Click on Ok to accept the changes.
Start Value Settings #
- Start Value
Set to 1.
6: DEF #
This status value represents the combatant’s defence and is used for physical damage calculations.
Content Information #
- Name
Set to: DEF
Status Value Settings #
- Type
Set to Normal.
Value Range #
This should default to 1-255.
Click on the Edit Value Range button to change them.
- Minimum Value
Set to 1. - Maximum Value
Set to 255.
Click on Ok to accept the changes.
Start Value Settings #
- Start Value
Set to 1.
7: MATK #
This status value represents the combatant’s magic power and is used for magical damage calculations.
This is the first new status value we add – and it works the same as the previous one.
Copy the DEF status value and change the following settings.
Content Information #
- Name
Set to: MATK
8: MDEF #
This status value represents the combatant’s magic defence and is used for magical damage calculations.
Copy the MATK status value and change the following settings.
Content Information #
- Name
Set to: MDEF
Save Changes #
And that’s it for the status value setup.
Save the changes using the Save Settings button at the bottom of the editor.
Next, we’ll set up status effects.