-
Notifications
You must be signed in to change notification settings - Fork 4
Storylets
Storylets are a procedural narrative authoring pattern that allows the final plot of the game to unfold at runtime, as the player's choices influence what content is selected next. Emily Short wrote a helpful blog post that explains storylets and their use in games.
Storylets are not supported by default in Ink. Anansi highjack's Ink's knot story structure to make storylets possiible. It also provides writers with a collection of external functions that enable them to dynamically jump the player to another piece of content without using Ink's internal divert system.
Currently, Anansi has three types of storylets: basic, locations, and actions. There is also the special start
storylet that tells Anansi where your game's story should begin. Each storylet type is explained below.
Note
Still working on the storylet types and how they should function. They are functional in Anansi's sample scene, but they need polishing.
These storylets can be dynamically diverted to within your story. They contain queries and other metadata to facilitate this process. Basic storylets are specified in Ink by prepending storylet_
to the knot ID. For example,
=== storylet_good_ending ===
Congratulations, you reached the good ending of the story.
Location storylets are associated one-to-one with the locations specified within the Unity editor. Location storylets allow players to choose to navigate to a location. When they do navigate, Anansi diverts the storylet and runs any content just like any other storylet. If nothing happens, we return control back to the game.
Location storylets have location_
prepended to their knot IDs.
Actions are things that players can do at a location. They represent things that might change the state of the game (such as advancing time). When a player navigates to a location and is not currently within a dialogue, we present action choices to them as possible things they can do. Actions might be things like "take a nap", "study", "talk to <character_name>".
Action storylets have action_
prepended to their knot IDs.