In Smile Game Builder, you can store and reference various character stats via Advanced Variables.
Under Character Information, you can store:
- Experience: A character’s Level and Experience.
- HP and MP: Current and maximum HP and MP.
- Stats:Attack, Defense, Accuracy, Evasion and Agility.
Each stat is stored in a separate variable per character. If you intend on using all of them with a full party, you’d need to reserve 44 variables. And then with each additional recruitable character, you need 11 further variables.
Using Stat Variables
There are many possible applications for Character Information. I’ve already visited several in my Smile Game Builder Tutorials series, but here are a few more.
Creating Stat Based SkillsWhat if you wanted to create stat-based skills, such as Lockpicking or Dodging?
You’d first need to store each stat in a variable (as in Fig. 11) and then create separate skills based on those stats.
I also covered this in Tutorial #29, which deals with using skills with chests.
So, for the first one, Lockpicking, it can be based on Accuracy.
To What? would be the Lockpicking skill itself, How? would be set to the variable assigned to Accuracy, and Do What? would simply be Assign.
The next step for this example would be to create another Variable Box where Lockpicking is divided by the Fixed Value 2 (or whatever number you want for the division). The end result is that Lockpicking is equal to half of the character’s Accuracy.
Using the defaults at Level 1, Sion’s Accuracy is 95. Halved, the Lockpicking skill would be 47 because fractions are rounded down.
DodgeFor the Dodge skill, in this example I’ve based it on Agility and Evasion.
Assign the Dodge variable to Agility (in the same way as with the Lockpicking skill) and add another Variable Box to add Evasion to that.
Evasion is primarily based on armor. Light armor would probably decrease Evasion because it’s easier for weapons to penetrate through. Heavy armor would increase Evasion, as it offers much more protection than light armor.
Thus, Evasion can be a negative number. Cloth armor, for example, since it offers very little protection, might have -3 Evasion. And when this is added to the Dodge skill, it is, of course, subtracted from the total.
You can change the Evasion rates in Stat Modifications for each piece of armor (in the Items tab).
Checking Stats for Success or Failure
Once you’ve set up the variables and skills, the next course of action would be a chance of success or failure.
Smile Game Builder doesn’t have a direct method of comparing one variable with another because the Variable Box Check uses fixed numbers only. This means that we have to use a kind of workaround.Starting with Lockpicking, decide on the percentage of success beforehand. In this case, there will be a 50% chance to successfully pick the lock.
So, Variable Box Check is then used to determine if the Lockpicking skill is greater than the percentage. The Yes branch would, of course, contain the routine for opening the chest successfully. And the No branch would be for its failure.
The events containing this information need to be running automatically synchronized and put on each map you want to reference them.
You can create other stat-based skills in a similar fashion. For instance, Strength could be based on half the character’s Current HP. Or Intelligence could be based somewhat on Maximum MP.
At the moment, you can only store the character stats defined in the Game Data. It’s not possible (yet) to similarly store monster stats, so these would need to be defined separately for each monster on the maps for an ABS or similar system. They would either be fixed values or random numbers and then scaled by multiplying them with character level.
For the next tutorial, I’ll look at variables for Camera Settings and how they can be used for various purposes.