Internals for a basic interactive fiction engine
>>T>triggername
fires trigger
>>M>outside
special trigger, fires move to 'outside'
either a string returned to the reader, or trigger (starts with *)
[[imug01:taken:false==and a mug]]
>+>1
: increases by 1
>+>2
: increase by 2
>->2
: decrease by 2
>*>2
: double
typeof resultstring !== 'string'
then it's an object
for 'exits' must have direction { 'onPass': 'outside', 'onFail': 'Door is closed', 'req': { 'rtavern:doorOpen': true } }
eg puzzlebox { 'onPass': '>>T>openpuzzlebox', 'onFail': 'cannot open puzzlebox yet', 'req': { 'puzzle:openedSectionOne': true, 'puzzle:openedSectionTwo': false, } }
{ 'onPass': 'outside', 'onFail': 'Door is closed', 'req': { 'ibox:val:>=': 5 } }
smaller "<", bigger ">", smallerOrEq "<=", biggerOrEq ">=",
description parseable text search TODO's
- containers
- trigger multistate edit
- obvious required item in inventory; key->lock,
- NPC
- travel to specific room (across rooms?)
- movement through specific exit fires trigger only first time
- Item max three word description?