FANDOM


Modules Edit

simple_exit Edit

Description Edit

Simplest module, lets you just define a static list of exits from a location.

moduledata Edit

Example:

{
    "exits" : [ // list of exits
        { "name" : "Go to the main square", // name that will be visible to the player
          "destination" : "0" // location to go to
        }
     ]
}

switch_text Edit

Description Edit

Shows the player a question and a text input box, and then changes depending on the answer.

moduledata Edit

Example:

{
    "cases" : [ // list of possible answers  
        { // default description, shown before the player gave any answer
          "regex" : "default", // "default" name is reserved, and shouldn't be a dictionary of translations
          "description" : { "en" : "Gimme some letters!" },
          "exits" : [ ... ] // as in simple_exit
        },
        { // description that will replace the default description if this answer was given
          "regex" : { "en" : "[a-zhA-Z]+" }, // regular expression of the answer, see python3 re module
          "description" : { "en" : "Oh my, I _LOVE_ letters!" },
          "exits" : [ ... ]
        },
        {
          "regex" : ".*", // catch-all, to have non-default description for wrong answer
          "description" : { "en" : "I only like letters, I need letters!" },
          "exits" : [] // if exits is empty, the input box will be shown again
        }
     ]
}

Regexes are matched in the order they show on the "cases" list.

switch_radio Edit

Description Edit

Shows the player a question with prepared answers, and then changes depending on the answer.

moduledata Edit

Example:

{
    "cases" : [ // list of possible answers  
        { // default description, shown before the player has chosen one of the answers
          "name" : "default", // "default" name is reserved, and shouldn't be a dictionary of translations
          "description" : { "en" : "What's the magic word?" },
          "exits" : [ ... ] // as in simple_exit
        },
        { // description that will replace the default description if this answer was given
          "name" : { "en" : "Abracadabra" }, // One of the answers
          "description" : { "en" : "That's my boy!" },
          "exits" : [ ... ]
        },
        {
          "name" : { "en" : "Excuse me?" },
          "description" : { "en" : "Oh, come on!" },
          "exits" : [] // if exits is empty, the list of potential answers will be shown again
        }
     ]
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.