More twine updates

This commit is contained in:
Russell 2015-01-06 20:29:32 +00:00
parent c4d80f0038
commit fc28abd134
3 changed files with 48 additions and 10 deletions

View File

@ -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]].
<<if $events["krowbar-PortalRestored"]>>[[Enter the portal|Start]]<<endif>>
[[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]].
<<if not visited("krowbar-PressButton")>>You see a button on the ground
[[Press Button|krowbar-PressButton]]<<endif>>
<<if not visited("krowbar-PressButton")>>You see [[a button|krowbar-PressButton]] on the ground<<endif>>
:: 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.
<<if not visited("krowbar-CottageOpenWindows")>>The [[wooded window blinds|krowbar-CottageOpenWindows]] are closed.
<<else>>The windows are now letting in enough light to let you see [[some cubbards|krowbar-CottageSearchCubbards]].
<<endif>>
<<if not $events["krowbar-cottageOpenWindows"]>>The [[window frames|krowbar-CottageOpenWindows]] have been boarded up.
<<if not $items["crowbar"]>> If you had the right tool, you could probably remove them.
<<else>>[[Open windows with crowbar|krowbar-CottageOpenWindows]]<<endif>>
<<else>>The windows are now letting in enough light to let you see [[some cubbards|krowbar-CottageSearchCubbards]].<<endif>>
[[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()]]
<<set $events["krowbar-cottageOpenWindows"] to true>>
:: krowbar-CottageSearchCubbards
<<if visited("krowbar-CottageSearchCubbards") lte 1>>

View File

@ -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 += "<<display \"" + p + "Description\">>";
}
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);
}

View File

@ -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 "<<If $events["krowbar-PortalRestored"] is true>>" before you set "<<set $events["krowbar-PortalRestored"] to true>>"
## Story-telling Guidelines ##
* All stories should have a path that leads back to the Hub