From abce4f944dd140b5353f4db32bf5ab6d787e3561 Mon Sep 17 00:00:00 2001 From: David Masad Date: Sat, 30 Jan 2021 14:52:06 -0500 Subject: [PATCH] Minor changes --- Readme.md | 2 ++ docs/Tutorial.md | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index 3a4920f..708c598 100644 --- a/Readme.md +++ b/Readme.md @@ -20,6 +20,7 @@ StoryManager.storylets["Go somewhere"] = { let storylets = []; for (let loc of State.variables.locations) { if (loc == State.variables.currentLocation) continue; + // Below is the instantiated potential storylet object: let storylet = { passage: "Orbit", // Name of the passage the storylet links to description: "Jump to " + loc, // Storylet link text @@ -75,6 +76,7 @@ I have a few Twine hobby projects in various stage of completion, and I found my - [X] Generating potential storylets based on state - [X] Filtering to N storylets based on priority + - [ ] Don't assume priority is an integer - [X] Allowing some storylets to interrupt and take priority - [ ] Track storylet history (e.g. to prevent repetition) - [ ] Storylets bound to specific data diff --git a/docs/Tutorial.md b/docs/Tutorial.md index 9c66cc7..27d6c2d 100644 --- a/docs/Tutorial.md +++ b/docs/Tutorial.md @@ -2,8 +2,6 @@ *Very rough tutorial intended to introduce the StoryManager core functionality as I develop it*. -One thing that dynamic storylets are good for is when you want a to write one basic structure for an interaction that will play out differently when bound to different variables. - ## Basic Example As a simple example, let's make a tiny game about attending a party. The player can only engage in one activity: talking to other guests. There will be different guests at the party, and each may want to talk about a different topic. @@ -182,7 +180,8 @@ However, maybe we want to give the player a choice here: engage the buttonholer ``` :: Being approached -$currentStorylet.character.name is coming toward you to talk. You can [[talk to them | Conversation]], or risk snubbing them by [[trying to get away | Start]]. +$currentStorylet.character.name is coming toward you to talk.
+You can [[talk to them | Conversation]], or risk snubbing them by [[trying to get away | Start]]. ``` We have to be sure to change the `passage` in the `"Buttonholed"` storylet to this new passage as well. @@ -393,4 +392,9 @@ StoryManager.storylets["Seeing the duchess"] = { }; ``` -And that's it! +And that's it! You can compile the final game (such as it is) with + +``` +> tweego storymanager.js storymanager-widgets.tw examples\duchess_party.js examples\duchess_party.tw -o examples\duchess_party.html +``` +You can view the full code in the [examples folder](https://github.com/dmasad/StoryletManager/tree/main/examples) or [try playing it](). \ No newline at end of file