Buildings/build example.data

Back to modding

Buildings/build_example.data
The Buildings directory contains files defining the buildings that are chosen (randomly) for a game layout. At least 16 files should be included for scenarios that are at the maximum 4x4 map. The name of the building file (e.g. "build_example.data") does not matter but should be unique.

(This example is not a fully formed building.data file)

Example build_example.data
{ "sizeM": 2,"sizeN": 2, "plots": [{ "purchased": false, "tiles": [ { {"p": null,"c": 0,"m": 2,"n": 28}, {"p": null,"c": 0,"m": 3,"n": 28}, }], "connectedPlotNumbers": [1], "isStartingPlot": false }, { "purchased": false, "tiles": [ { {"p": null,"c": 0,"m": -1,"n": 10}, {"p": null,"c": 0,"m": 0,"n": 10}, }], "connectedPlotNumbers": [2], "isStartingPlot": true }, null,null,null,null,null], "blocks": [ {"pos": {"m": 0,"n": 0	}, "connections": [ {"m": 7,"n": -2}, null, {"m": -1,"n": 5}, {"m": 0,"n": -7}] }, {"pos": {"m": 0,"n": 1}, "connections": [ {"m": 7,"n": 16}, {"m": 0,"n": 28}, {"m": -5,"n": 5}, null] }], "sockets": [ {"m": 3,"n": 29}, {"m": 0,"n": 11}] },

build_example Keys

 * sizeM - the size of the building in M direction
 * sizeN - the size of the building in N direction
 * plots - array containing the plot information
 * purchased - placeholder for purchased plots during game. TRUE/FALSE
 * tiles - array of the individual tiles within the plot
 * p - placeholder for the tile flooring type during the game (randomly assigned when generated)
 * c - placeholder - incremental counter of building number (assigned when generated)??
 * m - m coordinate of tile
 * n - n coordinate of tile
 * connectedPlotNumbers - array of numbers for each plot connected to this plot
 * isStartingPlot - TRUE if plot is starting plot for building (used when building is first building in game)
 * blocks
 * connections - (for each set of plots,MxN) array of 4 possible connections for adjacent buildings
 * sockets - sockets/ports for building. incremented (or decremented) by 1 from edge M or N of building.