From fc28abd1343b109538689c98ef35b8e4a6063957 Mon Sep 17 00:00:00 2001 From: Russell Date: Tue, 6 Jan 2015 20:29:32 +0000 Subject: [PATCH] More twine updates --- ttitt/krowbar.twee | 18 +++++++++--------- ttitt/macros.twee | 32 ++++++++++++++++++++++++++++++++ ttitt/twineGuidelines.txt | 8 +++++++- 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/ttitt/krowbar.twee b/ttitt/krowbar.twee index 67c475a..7fa1e87 100644 --- a/ttitt/krowbar.twee +++ b/ttitt/krowbar.twee @@ -10,7 +10,7 @@ Despite its omnious aura, you feel a strange impulse that compels you to [[enter [[The Portal|krowbar-ExaminePortal]] you stepped through is in a forest of [[tropical trees|krowbar-ExamineTrees]]. The heat and humidity hit you in contrast to the cool, dry environment of the Hub. As you listen, you hear the sounds of gunfire and muffled explosions in the distance. -There is [[a dirt path leading downward|krowbar-FollowPath1]]. +There is [[a beaten dirt path leading downward|krowbar-FollowPath1]]. <>[[Enter the portal|Start]]<> [[Player Profile|PlayerProfile]] @@ -27,11 +27,9 @@ How curious! [[Return|previous()]] :: krowbar-FollowPath1 [inv] -You are on a dirt path on a hill. -[[The path up|krowbar-start]] leads to the Portal. +You are on a dirt path on a hill that [[leads to the Portal|krowbar-start]]. The path [[continues downward|krowbar-FollowPath2]]. -<>You see a button on the ground -[[Press Button|krowbar-PressButton]]<> +<>You see [[a button|krowbar-PressButton]] on the ground<> :: krowbar-PressButton After you press the button, you hear a 'click' and feel a thrum in the air. @@ -50,14 +48,16 @@ This cottage appears to be made from the native trees. :: krowbar-EnterCottage [inv] There is a thick layer of dust on everything within the cottage. Very little light is able to make its way inward. -<>The [[wooded window blinds|krowbar-CottageOpenWindows]] are closed. -<>The windows are now letting in enough light to let you see [[some cubbards|krowbar-CottageSearchCubbards]]. -<> +<>The [[window frames|krowbar-CottageOpenWindows]] have been boarded up. +<> If you had the right tool, you could probably remove them. +<>[[Open windows with crowbar|krowbar-CottageOpenWindows]]<> +<>The windows are now letting in enough light to let you see [[some cubbards|krowbar-CottageSearchCubbards]].<> [[Leave cottage|krowbar-FollowPath2]] :: krowbar-CottageOpenWindows -After a few moments of effort, you manage to yank open the old blinds. +After a few minutes of effort, you manage to use the crowbar to remove the boards from the windows. [[Return|previous()]] +<> :: krowbar-CottageSearchCubbards <> diff --git a/ttitt/macros.twee b/ttitt/macros.twee index de8a4b6..f5966da 100644 --- a/ttitt/macros.twee +++ b/ttitt/macros.twee @@ -206,3 +206,35 @@ try { } catch(e) { throwError(place,"GetInit Setup Error: " + e.message); } + +:: GetStarts [script] +try { + version.extensions['GetStarts'] = { + major:0, minor:1, revision:0 + }; + macros['Starts'] = + { + handler: function(place, macroName, params, parser) + { + var msg = ""; + for(var p in tale.passages) { + /%if(~tale.passages[p].tags.indexOf("init")) {%/ + if(p.slice(-6) == "-start") { + if(tale.passages[p+"Description"]) { + console.log("Found " + p + "Description"); + msg += "<>"; + } + else { + console.log("Found " + p); + msg += "[[" + p + "]]" + } + msg += "\n\n"; + } + } + new Wikifier(place, msg); + }, + init: function() { }, + }; +} catch(e) { + throwError(place,"GetInit Setup Error: " + e.message); +} diff --git a/ttitt/twineGuidelines.txt b/ttitt/twineGuidelines.txt index 17904e2..c77cf34 100644 --- a/ttitt/twineGuidelines.txt +++ b/ttitt/twineGuidelines.txt @@ -20,7 +20,6 @@ Written by ~krowbar, managed by ~jumblesale * or items. :: NAME-start - the start page for your story :: NAME-startDescription - an optional description for your story start - (~jumblesale todo) :: NAME-init - initialize any values for your story :: ITEM-itemDescription [item] - provide a description for your item @@ -72,6 +71,13 @@ USERNAME.twee - contains all your core story passages macros.twee - contains any macros and *-init passages you write items.twee - contains *-itemDescription passages - optionally contains item getting passages +* Prepend ALL your passage names with "USER-" + eg "krowbar-FollowPath" +* Prepend ALL your events with "USER-" + eg $events["krowbar-PortalRestored"] +* Remember that items and events can be checked before they are set! +* You don't need to initialize everything beforehand +eg You can check "<>" before you set "<>" ## Story-telling Guidelines ## * All stories should have a path that leads back to the Hub