Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

scure

jmarti-theinit144ISC1.7.0

Script Creation Utilities for Conversational Adventures (as Ric Escape)

scure, adventures, adventure, conversational, text adventure, conversational adventure, ric escape

readme

SCURE - Script Creation Utilities for Ric Escape (Conversational adventures).

SCURE is a javascript engine for creating conversational or adventure games.

It sets its focus on the workflow of the game. No graphics or input handling, just maintains the state on the game based on the actions that the user does.

It's perfect for games based on text only or voice only input, like Google Assistant games or console text games.

Usage

Check https://github.com/jmarti-theinit/ric-escape to see an example.

  • Create a data.js
  • Handle input and use scure* commands.

Instalation

npm install --save scure

Instructions and commands

  • require('scure').buildScureFor (data) : builds scure object that is used to parse data JSON.
  • require('scure').dsl : functions to build the data JSON.
  • require('scure').commands : scure* functions to execute over the data JSON and the user input.
  • require('scure').lib : helper functions (as stateIsUnlocked) to be used on your app.

changelog

SCURE - Script Creation Utilities for Ric Escape (Conversational adventures).

1.7.0

Added

  • Make possible to look room names.

1.6.0

Added

  • Make possible jump rooms

1.5.1

Fixed

  • Do not fail when synonyms for an item are missing

1.5.0

Added

  • saves data[lastItem] when used or looked

1.4.3

Added

  • timeover can have conditional descriptions

1.4.2

Added

  • improved number recognition

1.4.1

Added

  • esa, esta, ese; as stopwords

1.4.0

Added

  • When answering questions (and wrong answer), maintains context so you can answer again directly

1.3.0

Added

  • When handling answer through plugin, sends user answer to plugin

1.2.0

Added

  • Handle plugins in answer actions
  • Allow variable answers (must be inside data)

1.1.0

Fixed

  • Walk from a room to another room that has same name

1.0.10

Added

  • Ability to specify synonyms for commands. Like "look - robot" is the same as "use - robot"

1.0.9

Added

  • "Sala" as synonym for "room" when looking general

1.0.8

Fixed

  • Show "walk-nowhere" sentence when you can go nowhere.

1.0.7

Added

  • aPickingCondition, to allow setting conditions for picking objects.
  • handle pluginExtensions in item descriptions (when looking)

Fixed

  • Getting items also in inventory

1.0.6

Fixed

  • Do not show destinations when looking at room and no possible destinations

Added

  • Say pickingResponse when item not pickable

1.0.5

Added

  • Respond something else if lock destination has a sentence when locked
  • require('lib').stateLock

Removed

  • scure-commons.isUnlocked

1.0.4

First general available public release