Game Box Creation - Control File Semantics

From BOARD18 Project WIKI
Jump to navigation Jump to search
Game Box Creation edit

You may also want to look at the design document for more information about game boxes.

Before starting work on the JSON file, you should create the image files for your game box.

Text Values

The start of the JSON file contains a number of text values. There are also some text values at the start of some top level objects in the file. These values are discussed here.

Box Descriptor Values

The start of the JSON file contains three values that together should uniquely identify this game box.

  1. "bname": the name of the game. EG: "1870" or "1826".
  2. "version": I use my initials combined with a sequential number. EG: "REP01"
  3. "author": your name. EG: "Rich Price"

Image Location Value

Each image has an "imgLoc" value that specifies the relative location of the image file. For the provided directory structure this will always have this form "images/nnnn/file.png" where nnnn is the game name and file.png is the name of the image file.

Tray Values

Each tray object has two text values.

  1. "type": the tray type will be one of three values : "tile" for a tile tray, "btok" for a game board token tray or "mtok" for a stock market token tray. The format of each of these three tray types is different from the other two.
  2. "tName": the name of the tray which will appear in the tray menu. EG: "Yellow Tiles".

Measured Numeric Values

You will have to determine a number of measurements for each image file. These will make up most of the numeric values in the JSON file. These two sub-sections discuss this process for each image file type.

Game Board Image File

  • Measure the distance in pixels from the left edge of the image to the start of the first [left most] hex on the map. This is the "xStart" value.
  • Measure the distance in pixels from start of the left most hex on the map to the start of the second left most hex on the map.
    These two hexes will not be on the same row. On a properly scaled image file this will always be 50 pixels. This is the "xStep" value.
  • Measure the distance in pixels from the top edge of the image to the start of the first [top most] hex on the map. This is the "yStart" value.
  • Measure the distance in pixels from start of the top most hex on the map to the start of the second top most hex on the map.
    On a properly scaled image file this will always be 87 pixels. This is the "yStep" value.

Stock Market Image File

  • Measure the distance in pixels from the left edge of the image to the start of the first [left most] price box in the market. This is the "xStart" value.
  • Measure the distance in pixels from start of the left most price box in the market to the start of the second left most price box in the market. This is the "xStep" value.
  • Measure the distance in pixels from the top edge of the image to the start of the first [top most] price box in the market. This is the "yStart" value.
  • Measure the distance in pixels from start of the top most price box in the market to the start of the second top most price box in the market. This is the "yStep" value.

Tile and Token Sheet Image Files

  • Measure the distance in pixels from the left edge of the image to the start of the first [left most] tile or token on the sheet. This is the "xStart" value.
  • Measure the width in pixels of a tile or token on the sheet. On a properly scaled image file this will always be 100 pixels. This is the "xSize" value.
  • Measure the distance in pixels from start of the left most tile or token on the sheet to the start of the second left most tile or token on the sheet.
    On a single column token sheet this value is not used and could be zero. This is the "xStep" value.
  • Measure the distance in pixels from the top edge of the image to the start of the first [top most] tile or token on the map. This is the "yStart" value.
  • Measure the hight in pixels of a tile or token on the sheet. On a properly scaled image file this will always be 116 pixels. This is the "ySize" value.
  • Measure the distance in pixels from start of the top most tile or token on the map to the start of the second top most tile or token on the map. This is the "yStep" value.

If a tile sheet has been generated by the BD18-new-tile-sheet.py and BD18-add-tile-to-sheet.py scripts within GIMP then these values will be:

    "xStart":20, 
    "xSize":100, 
    "xStep":120, 
    "yStart":20, 
    "ySize":116, 
    "yStep":130,  

If a token sheet has been generated by the BD18-new-token-sheet.py and BD18-add-token-to-sheet.py scripts within GIMP then these values will be:

    "xStart":10, 
    "xSize":30, 
    "xStep":40, 
    "yStart":10, 
    "ySize":30, 
    "yStep":40, 

Other Tray Objects

Each of the three tray objects contains a different tile or token object. These objects are arrays that contain one object per tile or token on the sheet.
These array element objects contain simple objects and are defined here.

Array Element Objects in "tile" Trays

  • "dups": the number of available tiles of this type. The Blackwater Station Tile Manifests have these counts.
  • "rots": the number of rotation images for this tile. Just count the tile images in the column.

Array Element Objects in "btok" Trays

  • "dups": the number of available tokens of this type.
  • "flip": true if this is a 2 sided token.

Array Element Objects in "mtok" Trays

  • "flip": true if this is a 2 sided token.