I wanted to ask how I would go about letting the player know what percentage of the game's passages they've visited? As a way of letting them know how much of the game's content they haven't seen (passages viewed) either at the end of the game or with a running total (progress percentage) on the side bar (preferabbly).
Basically a progress bar that lets the player know how many passages he hasn't yet visited to encourage a second play through or continued exploration.
Comments
EDIT: A complication, regardless of story format, would be if you allow any passages to be visited more than once. That would make things a bit dicier.
The dicey part would be as you mentioned, how do I make the counter tick up only once per unique passage visited..
Also I'm using default sugarcube 1.3 but I can make the switch to sugarcube 2.0 if necessary.
CODE: (Twine 2: goes in Story JavaScript; Twine 1: goes in script-tagged passage) NOTES:
The module creates a global object named Completion and a story variable named $_completion, since the completion data must be a part of the history. While you will use global, you should never need to think about the story variable.
You may manually exclude passages from the completion tally by tagging them with skip. It automatically excludes most special passages so you don't have to worry about that.
You may add new passages to your project and the module should pick them up without issue.
WARNING: Removing passages, even by rename, will invalidate existing completion data—i.e. the completion state of existing saves will be invalidated.
USAGE:
The total and count values could be used to do something fancier—e.g. a graphical progress bar—if you wished.