Changes between Version 7 and Version 8 of Random_Map_Generator_Internals


Ignore:
Timestamp:
Sep 29, 2011, 9:01:21 PM (13 years ago)
Author:
historic_bruno
Comment:

Updates entity format

Legend:

Unmodified
Added
Removed
Modified
  • Random_Map_Generator_Internals

    v7 v8  
    2222  "seaLevel": 20.0,
    2323  "textureNames": [ "medit_grass_field_a", ... ]
    24   "tileData": { "index" : [0, 1, 0, 0, 2, ... ], "priority" : [0, 1, 0, 0, 2, ... ] }
    25   "entities": [ { "id" : 100, "name" : "units/hele_support_female_citizen", "x" : 102.4, "z" : 64.8, "angle" : 0.86}, ... ]
     24  "tileData": { "index": [0, 1, 0, 0, 2, ... ], "priority": [0, 1, 0, 0, 2, ... ] }
     25  "entities": [ { "id": 100, "templateName": "units/hele_support_female_citizen", "position": {"x": 102.4, "y": 0, "z": 64.8}, "rotation": {"x": 0, "y": 0.86, "z": 0} }, ... ]
    2626}
    2727}}}
     
    3131 * `textureNames`: Array of strings. This is the terrain textures used. They must be in the order in which they were defined (as they are referenced by tile data).
    3232 * `tileData`: Object. Contains two flat arrays specifying terrain tile data for the map - see below.
    33  * `entities`: Array of entity objects. Entities specify something like a tree, unit, or building in the game - see below.
     33 * `entities`: Array of entity objects. Entities specify something like a tree, soldier, or building in the game - see below.
    3434
    3535=== Tile Data ===
     
    4747{{{
    4848  "id": 1034,
    49   "name": "units/hele_support_female_citizen",
    50   "x": 102.4,
    51   "z": 64.8,
    52   "angle": 0.86
     49  "templateName": "units/hele_support_female_citizen",
     50  "position": {"x": 102.4, "y": 0, "z": 64.8},
     51  "rotation": {"x": 0, "y": 0.86, "z": 0}
    5352}}}
    5453 * `id`: Integer. Unique ID of this entity, used by the engine to identify each instance.
    55  * `name`: String. Template name of the entity, usually specifies faction and unit/building type for players, or special gaia templates.
    56  * `x`, `z`: Float. Position of the entity on the map (in XZ map coordinates; 4.0 map units = 1.0 tile unit).
    57  * `angle`: Float. Rotation of the entity about y-axis (vertical), in radians.
     54 * `templateName`: String. Template name of the entity, usually specifies faction and unit/building type for players, or special gaia templates.
     55 * `position`: 3D vector object. Position of the entity, in map coordinates (4.0 map units = 1.0 tile unit). ''Note: the y position (height) is not currently supported.''
     56 * `rotation`: 3D vector object. Rotation of the entity, in radians. ''Note: only rotation about y-axis (vertical) is currently supported.''
    5857
    5958CMapReader is responsible for parsing this data and creating the map, in a process very similar to that for scenarios.