Setting up SBLS for Unity
Setting up SBLS – Skill Based Leveling System is easy, and after following these steps you’ll be up and running in no time.
There are two main aspects to SBLS; The configuration file, and the scripts. The first thing you need to do is setup the configuration file.
The Configuration File
- Click on the SBLS menu, then click Create New SBSL Configuration.This will create a new configuration file in the Resources/SBLS/Config folder. You can rename it if you like.
- Click on the configuration file you just created. You can now edit it in the inspector window.
The Inspector Window
The inspector window of SBLS is broken into two main areas; Initial Settings and Skills.
Initial Settings
- Default Configuration – Tick this if you want this to be the default configuration file for SBLS scripts. Only one configuration file can be default. You can specify a different configuration file when you add the SBLS scripts.
- Calculate Next Level XP – Tick this if you want to have SBLS automatically calculate the required XP to get to the next level.
- Number to multiply by – This is the number that SBLS will use to calculate the next level XP. For example, if the last level XP was 5 and you entered 2 here, then the XP to reach the next level would be 10. This is only shown if you have ticked Calculate Next Level XP
- Limit Levels to – This specifies the maximum level that can be reached.
- Show Levels – This is only shown if Calculate Next Level XP is unticked. This is a dropdown that allows you to specify the required XP to reach each level. It will display an integer input for each level up to the number specified in Limit Levels to.
Note: It’s best to keep Level 1 at 0.
>
- Show Levels – This is only shown if Calculate Next Level XP is unticked. This is a dropdown that allows you to specify the required XP to reach each level. It will display an integer input for each level up to the number specified in Limit Levels to.
Skills
The Skills area is where you can specify the skills you want your character to have. These are not a requirement of SBLS, as it can be used to handle traditional RPG style leveling (i.e. kill something/do a quest – get XP), but it gives an extra layer of depth to your gameplay.
Depending on how you are setting up your game, the skills area will look different.
Using Number to multiply by
If you have Number to multiply by ticked, then your skills section will look like this:
- Number of skills – This is the number of skills that you’re character will have. Be careful when changing this, as lowering the number will remove some previously added skills
- Skill Name – The name of the skill. You’ll be referencing the skill by this name in your code, so make sure all your skills are uniquely named.
- Time Based Skill – Does this skill get better the longer it’s used? If yes, tick it!
- XP to add – Enter in the number of XP to add when this is being used. This is only shown if Time Based Skill is ticked.
- Every – Enter in how often you want the XP to be added when the skill is in use, then select the timeframe from the select box underneath. The options you have are seconds, minutes, hours.
- XP Level Multiplier – This is the number used to calculate the required XP to get to the next level of the skill. Leave this at 0 if you want to use the same multiplier as normal levels
Specifying Levels XP
If you have Number to multiply by unticked, then your skills section will look like this:
- Number of skills – This is the number of skills that you’re character will have. Be careful when changing this, as lowering the number will remove some previously added skills
- Skill Name – The name of the skill. You’ll be referencing the skill by this name in your code, so make sure all your skills are uniquely named.
- Time Based Skill – Does this skill get better the longer it’s used? If yes, tick it!
- XP to add – Enter in the number of XP to add when this is being used. This is only shown if Time Based Skill is ticked.
- Every – Enter in how often you want the XP to be added when the skill is in use, then select the timeframe from the select box underneath. The options you have are seconds, minutes, hours.
- Show Levels – This is a dropdown that allows you to specify the required XP to reach each level. It will display an integer input for each level up to the number specified in Limit Levels to.
Note: It’s best to keep Level 1 at 0.
Once you’ve got all your settings entered, it’s time to move to the next part – Setting up the code.