area

Description

Area events are the core of the game, the UI for which is the "map screen".
The game starts on the area event called START (all caps), so all campaigns must include an area event called START.

Specific Attributes

mdata

mdata ("map data") is an Array containing any number of Arrays, each of which contain EventIds.
The map is drawn upside-down to how it is displayed. This means that the first element in the Array is the first map icon that can be clicked on.
Multiple EventIds in the same Array ("on the same line") will be displayed horizontally, providing the player with a choice of which to click on.
You can include "none" instead of an EventId. If you do, the same amount of space is taken up when drawing the map icon, but the icon itself will be invisible.

Example


    "area": {

        "START": {  The game starts here!
            "image": "sogen.webp",
            "audio": "bgm1",
            "mdata": [
                ["text: exampleTextEvent"],
                ["text:left",    "text:middle",    "text:right"],   3 events in a row, on a single line. Player can only choose 1 of these.
                ["text: exampleTextEvent"],
                ["area: secondArea"]                                Connection to the next area
            ]
        },

        "secondArea": {
            "micon": "area2.webp",
            "image": "map2.webp",
            "audio": "bgm2",
            "mdata": [
                ["text:left", "text:middle", "text:right"]  
            ]
        }

    }
    



layers

You can add a layer effect to an area event.
A layer is an image from your /background/ folder that will be applied over the map screen.
The data for the layer is specified in settings.json.


      events.json
      "area": {
          "START": {
              "image": "sogen.webp",
              "layer": "smoke",Reference to the leyer from settings.json
              "mdata": [
                  [...your events go here...]                              
              ]
          }
      }
      settings.json
      "layers": {
        "smoke": {
            "image": "smoke.webp",name of the layer image in the /background/ folder.
            "direction": "right", Direction that the layer will move (up, right, down, left).
            "speed": 0.7          Speed that the layer will move at.
        }
      }