0 votes
by (330 points)
More specifically how to create and use the stat system. But any tips on getting into the format would be nice.

2 Answers

0 votes
by (159k points)

Are you asking about the Adventures Twine 2 compatible story format by Longwelwind?

If so then I personally didn't know it existed.

by (330 points)
Yeah. That one exactly. I really love how it looks and feels but I'm not sure how to navigate the syntax at times.
by (63.1k points)

My understanding is its based on Snowman, which is (essentially) just JavaScript, so it uses JavaScript syntax, along with markdown for formatting. It's documentation is here. I haven't used adventures yet, so I don't know how helpful I'll be, but can you give us an example of what you've tried and tell us how it went wrong? 

0 votes
by (140 points)

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.
<% } %>
...