Campaign Creation Documentation

Use this page to navigate the Campaign Creation Documentation. It's not expected that you read all of this to create a campaign - Instead, use this as a reference during campaign creation, whenever you need to use a specific event.






These pages are being restructured and may not be complete!

You can find the older version of this page here.

fork

Deprecation Warning

This event hasn't been deprecated, but has largely been replaced by the 'split' attribute of all events.
It is strongly suggested that you use splits instead of Fork Events.




Description

Fork events use variables to decide which event is played next.
The value of the variable determines the outcome. A 'DEFAULT' branch can also be set.




Specific Attributes

LinkNameData TypeDescriptionNotes
LINKlist[ { Object } ]Each entry is a conditional branch like {var=value: event:ID}



list

Each Object in the list is a key-value pair.

The key must follow this pattern: VARIABLE OPERATOR VALUE, without spaces, where:
VARIABLE is the name of a variable
Operator is one of the operators in the following table
Value is the value to be tested against the value of that variable.
For example: cats==3

The value is an event:ID, which will replace the current event chain, if that branch was selected.

All values in a fork event are checked.
The last branch in the list to be true is the one which is executed
(this is different from splits, where the first value is the one which is executed).

If the key is 'DEFAULT', that branch will be selected if and only if no other branches were selected.

OperatorDescriptionNoteNumeric?
=equalsNo
==equalsidentical to =No
>=Greater than or Equal ToYes
<=Less than or Equal ToYes
>Greater thanYes
<Less thanYes



Example

"fork": {
    "showCharacter": {
        "list": [
            {"character=Green"  : "text:Green"  },
            {"character=Red"    : "text:Red"    },
            {"character=Yellow" : "text:Yellow" },
            {"DEFAULT"          : "text:default"}
        ]
    }
}



Additional Information

You can replace the entire fork object with the list array.
This will not not work if inside a Module.

"fork": {
    "showCharacter": [
            {"character=Green"  : "text:Green"  },
            {"character=Red"    : "text:Red"    },
            {"character=Yellow" : "text:Yellow" },
            {"DEFAULT"          : "text:default"}
    ]
}