05:33 ST
The If-Check

The if-check is a very powerful action that can add randomness and replayability to the adventure. It tells the adventure to check whether or not something is true and then run one or more actions based on the result. This ‘something’ could be the result of a dice roll, or whether the adventurer has reached a certain number of a specified variable, or whether they have a certain item on them.

Conditions

The first field in the if-check is called the “Condition”. This is what the adventure looks at to determine whether the if-check is successful or not. You need to use a very specific format so that the if-check knows what to look for:

{roll:1d20} This tells the adventure to roll the specified dice.
{var:var_name} This tells the adventure to check for the specified variable.
{has_item: 1} This tells the adventure to check whether the adventurer has the specified item

When running if checks, you will need to use comparators to determine whether the specified statement is true.

== If the specified variable/dice roll is equal to the successful value.
!= If the specified variable/dice roll is not equal to the successful value.
> If the specified variable/dice roll is greater than the successful value.
< If the specified variable/dice roll is less than the successful value.
>= If the specified variable/dice roll is greater than or equal to the successful value.
<= If the specified variable/dice roll is less than or equal to the successful value.

When complete, your Condition field will look like:

{roll:1d20} > 10 The adventure will roll the dice and succeed if the result is 11 or higher.
{var:var_name} = 1 The adventure will look for the variable var_name, and succeed if there is only 1.
{has_item: 1} Items do not need a comparator, as the adventurer will either have it, or they won’t.

It is also possible to specify multiple conditions with ‘and’ or ‘or statements.

{var:sun} = 1 && {var:heat} = 1 The check will only succeed if both of the specified statements are true.
{has_item:1} || {has_item: 2} The check will succeed if either statement is true. It will also succeed if both statements are true.
Success and Failure

The success and failure fields refer to what the adventure has to do once it has the result of the condition. Success tells the adventure what to do if the specified condition is true, whereas Failure tells the adventure what do do if the condition is false. Success and Failure do not necessarily refer to good and bad outcomes, as the exact nature of the check would depend on your adventure. They simply relate to the condition that the adventure is checking.

Using If-Checks

If-checks can be used with dice rolls to add randomness into the adventure. The outcome is only specified by the dice roll and the modifiers applied to it, meaning that the result cannot be directly influenced by the adventurer. While the if-check can only specify two outcomes, it is possible to add another if-check into the Success and Failure fields if you want to add more outcomes.

 

Remember!
You can use addition (+) and subtraction (-) to modify your dice rolls in case you want to skew the result towards a certain outcome.
Kerric


The if-check is also a good way of making an adventure diverge. You can use it in conjunction with the “make post” action, which generates a separate forum post, identical to what you would put in the Post Text field, to have two separate forum posts describing the result of the check.