Skip to content

Terrain

ChiefOfGxBxL edited this page Jun 2, 2018 · 4 revisions

Translator

Translator.Terrain

Usage

var result = new Translator.Terrain.jsonToWar(terrainData);
// Now you can write result.buffer to a war3map.w3e file

Specification

terrainData: {
    tileset: <String>, // Tileset - lookup
    customtileset: <Boolean>,
    tilepalette: [<String>, ...], // Array of strings; each is the string id of a tile - lookup
    clifftilepalette: [<String>, ...], // Array of strings; each is the string id of a cliff tile - lookup
    map: {
        width: <Int>,
        height: <Int>
    },
    tiles: [ // Array of tile rows
        [ // Row of tiles
            // Tile: [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],
            ...
        ],
        ...
    ]
}

Unsupported fields

  1. map.offset = {x: 0, y: 0}

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