I found the following quote from the creator on the Github page:
A small part of the stat system is already available in the game, actually, but it's not 100% polished, thus why it's hidden.
If you want to enable it, put this in the Javascript script of your story (Click on the name of your story on the bottom-left, then "Edit story Javascript"):
window.config = {
"enableStats": true,
"stats": [
{
name: "Strength"
},
{
name: "Dexterity"
},
{
name: "Intelligence"
}
]
};
You can of course change the list of available stats by adding or removing elements in the list.
You have access to those methods to interact with the stats (keep in mind that a stat cannot be lower than 0
):
character.addStat("Strength", 4); // Add 4 to the `Strength` stat
character.removeStat("Intelligence", 10); // Removes 10 to the `Intelligence` stat (not lower than 0)
character.setStat("Intelligence", 10); // Set the `Intelligence` stat to 10
character.getStat("Strength"); // Returns the amount of points in the `Strength` stat
character.hasStat("Dexterity", 8); // Returns `true` if the character has at least 8 in the `Dexterity` stat, `false` otherwise
For example:
The merchant must have sold a lot of goods today, as his purse looked full
<% if (character.hasStat("Dexterity", 6)) { %>
[[Steal the purse of the merchant|Steal]]
<% } else { %>
It'd be too hard to steal without being seen.
<% } %>