Skip to content
ChiefOfGxBxL edited this page Apr 22, 2017 · 9 revisions

Specification

Overview

Map specification (how to represent a map using JSON)

World entities

Units (unit or item)
Doodads
Terrain
Regions

Object definitions

• Unit
• Item
• Destructable
• Doodad
• Ability
• Buff
• Upgrade

Other

Strings


Map JSON Format

// Define our map using JSON
var wc3Map = {
  units: Array<Unit>,
  doodads: Array<Doodad>,
  terrain: Object,
  strings: Object
};

Terrain

{
    tileset: 'wxyz',
    customtileset: true,
    tilepalette: ['abcd', 'efgh', 'ijkl'],
    clifftilepalette: ['mnop', 'qrst'],
    map: {
        width: 64,
        height: 64,
        offset: { // Unsupported - leave blank or set to 0,0
            x: 0,
            y: 0
        }
    },
    tiles: [
        [
            // [height, water, flags, tile, texture, cliff tile, layer]
            [0, 0, 0, 0, 0, 0, 0],
            [1, 0, 0, 0, 0, 0, 0],
            [2, 0, 0, 0, 0, 0, 0],
            [3, 0, 0, 0, 0, 0, 0],
            [4, 0, 0, 0, 0, 0, 0]
        ]
    ]
}

Strings

{
    0: "Joueur 0",
    1: "Joueur 1",
    ...
}

Translators

World entities

Place entities like units, doodads, etc. on the map

Units (unit or item)
Doodads
Terrain
Regions
Cameras
Sounds

Object definitions

Edit objects in the object editor

Units
Items
Destructables
Doodads
Abilities
Buffs
Upgrades

Other

Miscellaneous files like imports and strings

Imports
Strings
Info

Clone this wiki locally