Initial setup

The points

The Skill, Stamina and Luck points, to be used, must be set by you, within the story. You can either let the user roll some dice to get the points (remaining faithfull to the figthing fantasy style games), or set an absolute value for each. This chapter shows you how to do both.

Roll dice to set the points

To let the user roll the dice to set the points, you can start by adding a new node, and within that node, a paragraph, to let the player have some context. Afterwards, you'll use the DICEBOOST block, to give the user the chance to role the dice.

The image below shows the location of the button to add that block, and title and paragraph already created.

By clicking the button, a new block will be added to the list. When opened, three fields may be filled. Below, a representative image and the correspondent legend.

  1. The function to be called with the value that resulted from the rolling;

  2. The number of dice to throw;

  3. A value to be added to the result, if necessary.

In this case, we want the setSkill function (more on functions below), one single die to be rolled, and 6 to be added to the result (those were the rules of the original game).

To finalize, just hit save, or save & close, and you're done! You now have a chapter with the setting of the initial skill points.

Don't forget that, to continue the story, you'll also have to add a choice block to this node.

You'll just have to repeat this process two more times, one for each of the others (Stamina and Luck).

Set an absolute value for the points

You can also set absolute values for the initial Skill, Stamina and Luck points. In this example, we'll set all the points within the same node.

As the previous example, you'll need to create a new node, add a title and paragraph to it, but now you'll select the button to add a Boost block. Image below.

After clicking, a new block will appear in the list with a button to add Boosts.

For this example we'll add 3 boosts, with the functions setSkill, setStamina and setLuck, and set them with 10, 10, 20, respectively.

  1. The function to be called;

  2. The value to be sent to the function.

The equipment

Adding to inventory

For your book, you may want to give the player a few items to begin with, or maybe have them choose some from a list.

To start with, any items you want to present to the player must already be in the inventory. You can access it through the hamburguer menu, on the top right, that will open the side panel.

From there you can access, in the first tab, the inventory, and add items. You can add as many as you want, and throughout the creation of the game. When you start typing in the input box in the top, a plus sign will appear that, when triggered, will add the new item to the inventory.

In the following example, several items are already in the inventory and a "Wooden shield" is being added.

Giving the player a fixed set of items

You may want, much like the classic games, to give the user, initially, a "Sword" and some "Leather armour". To do this, besides having them already in the inventory, you can use the Boost block (see above) with an addToInventory function, specifying the item. Let's create a new node, write a paragraph for the introduction a present the player with those items.

When selecting the addToInventory function, the next input will automatically be transformed in an item list, that will list all items in your inventory, from where you can choose.

You can add as many as you want and these will automatically be added to the players inventory when arriving to this chapter.

Giving the player a set of items to choose from

You can also, from a pool of items, have the player choose a pre determined amount. This is the case, for instance, when the player has to choose one of 3 potions, in the beginning of the classic adventures. In this case, you will use the Loot block.

The Loot block is a bit more complex, in that it allows for more scenarios. Below you'll find an image, and correspondent legend, for overall properties of this block, presented to you the moment you open the block.

  1. How many can keep - represents the maximum number of items the player can choose;

  2. How many to drop - represents the minimum number of items the player must drop from its inventory in order to pick up any items;

  3. How much gold must have - represents the minimum amount of gold coins the player must have to be able to pick up any items.

For our scenario, choosing 1 of 3 potions, the first input will be 1, and the others will be left with 0. The player can pick 1 potion and doesn't need to drop any items or have any gold to pick it up.

Next you'll add the items, through the add item button, right below these input fields. Click once for the first item and you'll be presented with another field, with the name of the item to pick. When selecting that input field, a dropdown list will show you your inventory items, from where you can select the desired one. Let's pick "Potion of Stamina".

Remember you must already have the item in your inventory when creating any action for it.

You can now add any number of actions to the item. This means that, when used/dropped by the player, a set of actions will be run. By clicking the plus sign, we'll add an action.

  1. Target - the function through which the action will be triggered;

  2. The amount - the amount the function will carry;

  3. Times it can be used - how many times an item can be used before being removed from the inventory.

For our particular case, the potion serves the objective of, at any given moment during the game, the player can drink it and his initial score for that potion will be reseted. So, we'll choose the function resetStamina, that doesn't carry any amount, because it will set the stamina to the initial amount, and can be used only once throughout the game.

You can now add the rest of the potions and their correspondent actions, save or save & close, and you'll have a chapter where the player can choose a potion.

Like this: