How to use [obsolete]


Note : this tutorial was meant for the first release of the engine and is now completely obsolete.

=====================

In this tutorial, we will see how to write a story using Herobook simple version.

First create a directory then download data_example.zip, unzip it a place its content (the data directory) insde of your project directory.

Then  download Main.jar, or Main.exe if you are on windows.

Open the two files in data : vocab.json and pages.json.

vocab.json contains some vocabulary used inside the game and is stored here so you can translate any keyword of your game. It works using pairs of values where name describes the name Herobook will use to look for a sentense and text is the corresponding text.

In the text "Input_error" there is {min} and {max}. Those expressions must be kept in you translation so they can be replaced ingame by numeric values.

The file pages.json contains all the story stored in json objects like this :
{
    "name" : "The name of tha page",
    "text" : "The text of the page",
    "next" : [
      {
        "action" : "First action",
        "page" : "name of page to go with first action"
      },
      {
        "action" : "second action",
        "page" : "name of page to go with second action"
      }
    ]
  }

A page object consist a three attributes : its name, its text and a list of objects to represent the choices.

Choices are aso objects with two attributes : the action text and the name of the page to go where doing this action.

When writing your story there his one major thing you must remember : every objects (pages or choices) must be separated by a coma, but the last object of a list musn't. It you get confused with this you may what to learn a bit about josn format.


To test you game you only have to run Main.exe ou use java -ja- Main.jar in your shell, if you aren't on windows.

To share your game you juste have to share the project folder. You can rename the exe/jar if you whant to.

Files

Main.jar 56 kB
Mar 28, 2019
Main.exe 517 kB
Mar 28, 2019
data_example.zip 756 bytes
Mar 28, 2019

Get Herobook simple version

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.