File: Terrain_Format.md

package info (click to toggle)
vcmi 1.6.5%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 32,060 kB
  • sloc: cpp: 238,971; python: 265; sh: 224; xml: 157; ansic: 78; objc: 61; makefile: 49
file content (78 lines) | stat: -rw-r--r-- 2,596 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Terrain Format

## Format

```json
"newTerrain" :
{
	// Two-letters unique identifier for this terrain. Used in map format
	"shortIdentifier" : "mt",
	
	// Human-readable name of the terrain
	"text" : "My Road",
	
	// Type(s) of this terrain.
	// WATER - this terrain is water-like terrains that requires boat for movement
	// ROCK - this terrain is unpassable "rock" terrain that is used for inaccessible parts of underground layer
	// SUB - this terrain can be placed in underground map layer by RMG
	// SURFACE - this terrain can be placed in surface map layer by RMG
	"type" : [ "WATER", "SUB", "ROCK", "SURFACE" ],
	
	// Name of file with road graphics
	"tiles" : "myRoad.def",
	
	// How many movement points needed to move hero on this terrain
	"moveCost" : 150,
	
	// The name of rock type terrain which will be used as borders in the underground
	// By default, H3 terrain "rock" will be used
	"rockTerrain" : "rock",
	
	// River type which should be used for that terrain
	"river" : "",
	
	// If defined, terrain will be animated using palette color cycling effect
	// Game will cycle "length" colors starting from "start" (zero-based index) on each animation update every 180ms
	// Color numbering uses palette color indexes, as seen in image editor
	// Note that some tools for working with .def files may reorder palette. 
	// To avoid this, it is possible to use json with indexed png images instead of def files
	"paletteAnimation" : [
		{ "start" : 10, "length" : 5 },
		...
	],
	
	// List of battleFields that can be used on this terrain
	"battleFields" : [ ]
	
	// Color of terrain on minimap without unpassable objects. RGB triplet, 0-255 range
	"minimapUnblocked" : [ 150, 100, 50 ],
	
	// Color of terrain on minimap with unpassable objects. RGB triplet, 0-255 range
	"minimapBlocked" : [ 150, 100, 50 ],
	
	// List of music files to play on this terrain on adventure map. At least one file is required
	"music" : [ "" ],
	
	"sounds" : {
		// List of ambient sounds for this terrain
		"ambient" : [ "" ]
	},
	
	// Hero movement sound for this terrain, version for moving on tiles with road
	"horseSound" : "",
	
	// Hero movement sound for this terrain, version for moving on tiles without road
	"horseSoundPenalty" : "",
	
	// List or terrain names, which is prohibited to make transition from/to
	"prohibitTransitions" : [ "" ],
	
	// If sand/dirt transition required from/to other terrains
	"transitionRequired" : false,
	
	// Represents layout of tile orientations in terrain tiles file
	// Can be normal, dirt, water, rock, or hota
	"terrainViewPatterns" : "",
	
}
```