Skip to content
ChiefOfGxBxL edited this page Jun 2, 2018 · 6 revisions

Translator

Translator.Info

Usage

var result = new Translator.Info.jsonToWar(infoData);
// Now you can write result.buffer to a war3map.w3i file

Specification

infoData: {
    saves: <Int = 0>,
    editorVersion: <Int = 0>,
    map: {
        name: <String>,
        author: <String>,
        description: <String>,
        recommendedPlayers: <String>,
        playableArea: {
            width: <Int>,
            height: <Int>
        },
        flags: { // this entire object is optional; just set whatever flags you want to "true"
            hideMinimapInPreview: <Boolean>,
            modifyAllyPriorities: <Boolean>,
            isMeleeMap: <Boolean>,
            maskedPartiallyVisible: <Boolean>,
            fixedPlayerSetting: <Boolean>,
            useCustomForces: <Boolean>,
            useCustomTechtree: <Boolean>,
            useCustomAbilities: <Boolean>,
            useCustomUpgrades: <Boolean>,
            waterWavesOnCliffShores: <Boolean>,
            waterWavesOnRollingShores: <Boolean>
        },
        mainTileType: <Char>
    },
    loadingScreen: {
        background: <Int>,
        path: <String>,
        text: <String>,
        title: <String>,
        subtitle: <String>
    },
    prologue: {
        path: <String>,
        text: <String>,
        title: <String>,
        subtitle: <String>
    },
    fog: {
        type: <Int>,
        startHeight: <Float>,
        endHeight: <Float>,
        density: <Float>,
        color: [<Int>, <Int>, <Int>]
    },
    globalWeather: <Char[4] = 'none'>,
    customSoundEnvironment: <String = ''>,
    customLightEnv: <Char = 'L'>,
    water: [<Int>, <Int>, <Int>],
    camera: {
        bounds: [<Float>, <Float>, <Float>, <Float>, <Float>, <Float>, <Float>, <Float>],
        complements: [<Int>, <Int>, <Int>, <Int>]
    },
    players: [<Player>],
    forces: [<Force>]
}

Where <Player> is defined by:

{
    type: <Int>,
    race: <Int>,
    playerNum: <Int>,
    name: <String>,
    startingPos: { x: <Float>, y: <Float> }
}

Where <Force> is defined by:

{
    name: <String>,
    players: <::Unsupported::>,
    flags: {
        allied: <Boolean>,
        alliedVictory: <Boolean>,
        shareVision: <Boolean>,
        shareUnitControl: <Boolean>,
        shareAdvUnitControl: <Boolean>
    }
}

Unsupported fields

  • Player ally low priority and ally high priority flags are unsupported.
  • Force players array is unsupported (temporarily), and thus players cannot be specified in a force.
  • Upgrades table
  • Tech availability
  • Unit table (random)
  • Item table (random)

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