vbox

In a vbox (Variable Box) event, the user is presented with a text input box. Whatever they enter will be saved to a variable.

Specific Attributes

Restrictions

The maximum number of characters that can be entered is 30.

Only alphanumeric characters (and spaces) are allowed, unless using data sets.

Examples

Secret Password Example:

Enter Username example:


{
    "area": {
        "START": {
            "mdata": [["vbox : enter_username"]]
        }
    },

    "vbox": {
        "enter_username": {
            "title": "Enter your Kaibacorp Username:",
            "sets" : "username",
            "chain": "text : after_username_entered"
        }
    },

    "text": {
        "after_username_entered": {
            "parts": [{"text": "Welcome, <<username>>."}]
        }
    }
}
    

Input Types

You can add an "inputType" attribute to the event to enforce certain inputs.

Name
Description
cardname Only card names of cards in the Campaign will be accepted.
collection Only card names of cards in the user's combined main, side, extra, and pool will be accepted.
maindeck Only card names of cards in the user's main deck will be accepted.
extradeck Only card names of cards in the user's extra deck will be accepted.
sidedeck Only card names of cards in the user's side deck will be accepted.
number Only Integers will be accepted.
list A pre-defined list of inputs, using Variable Arrays (see below). This also requires an additional "data" attribute, which stores the name of the Variable Array.

List inputType example


      //events.json
      "vbox": {
        "enter_username": {
            "title": "What is the best animal?",
            "sets" : "x",
            "inputType": "list",
            "data"     : "<[animalsList]>"
          }
      },

      //settings.json
      "variableArrays": {
        "animalsList": ["Cats", "Dogs", "Frogs"]
      }