Terrain can be defined as the ground plane. It is the basic tile based foundation that establishes the game world. This document defines those attributes.
The placement of what texture goes where is defined by random map script or a map editor. They will be able to control troop movement, structure placement, ambush points, strategic harbours, and impassable mountain ranges with these tools.
There are going to be lots of different terrains, and many of them will share similar attributes. To reduce the hassle of creating XML for each terrain tile, terrain XML should have the following support:
- Multiple terrain objects can be stored in the same XML file (separated by their <terrain> tags).
- Multiple terrain XML files can be read from the same folder.
- Terrains can inherit attributes from other terrains by specifying a "parent" (see the section on inheritance in the XML Header Overview).
BRIEF DESCRIPTION ::Specifies the name and path of the terrain's texture. Note that the icon for the terrain is automatically generated as a thumbnail of this image.
Animated textures can be specified here. This feature could be used for all sorts of effects: waterfalls, water effects, UI effects, fire, conveyor belts, skyboxes.
- dirt1 - bare
- dirt2 - cracked
- dirt3 – mud
- grass1 - plain
- grass2 - lush
- grass3 - long
- grass4 - weeds
- grass5 – short/long mix
- grass6 – bunched dry
- grass7 – yellow
- grass8 – dark tufts
- grass9 – mixed greens, weeds
- sand1 - plain
- sand2 - rippled
- sand3 – rough, rocky
- forest1 – leafy
- forest2 – needles
- forest3 – fronds
- forest4 – scrub
- forest5 – logged
- road1 – Persian
- road2 – Roman
- road3 – Hellenic
- road4 – Celtic
- road5 – Carthaginian
- road6 – Iberian
- road7 – gravel - gray
- road8 – gravel - brown
- coral1 - brown
- coral2 - turquoise
- coral3 - red
- rock1 - light
- rock2 - medium
- rock3 - dark
- pebble1 - small
- pebble2 - large
- cliff1 - brown
- cliff2 – brown, vegetation
- cliff3 – brown, cracks
- cliff4 - gray
- cliff5 – gray, vegetation
- cliff6 – gray, cracks
- furrows1 – dirt
- furrows2 – dirt, small plants
- furrows3 – dirt, large plants
- structure – under structures
BRIEF DESCRIPTION ::The RGB colour used to represent this terrain on the Mini Map.
Note: If no value is specified, then the terrain colour is determined by finding the primary colour used in the skin, as in the current highly cool ScEd.
BRIEF DESCRIPTION ::The types/classes/groups to which this terrain belongs.
Used when painting by random group, and to specify under what categories it appears in the Editor. For example, if the user is painting group "Arid Grass", it'll randomly pick terrains with this type to paint. Actors like trees should use the same principle (eg an Oak Tree group for all oak trees).
BRIEF DESCRIPTION ::List of special properties for the terrain.
For example, "buildable" means that structures can be built on the terrain, assuming that it is flat enough.
BRIEF DESCRIPTION ::Defines that a certain type of unit can move over this terrain, and the effects the terrain applies when the unit is moving over it.
A terrain can have multiple Passable attributes to define different behaviours for different unit types walking over it.
(Note that special actors that combine multiple terrain objects (such as water and cliffs) simply use the passable attributes for those terrains. For example, the only thing stopping units from walking up the wall of a cliff is that the wall terrain is impassable to units. Equally, the appropriate surface and shore terrains determine what units and ships can walk on the different areas of a water object.)
A Passable attribute consists of:
- Type: The category of unit(s) that can pass over this terrain (determined by the entity's Id.Type).
- Speed: A percentage modifier to the unit's movement rate when moving over this terrain. 100% uses the unit's default movement rate. Higher numbers increase the unit's speed. Lower numbers decrease the unit's speed.
- Effect:: A list of special effects that occur when the unit is walking over this terrain. Effects include:
- Dust: eg sand, dry dirt. Clouds of dust particles appear around the entity as it moves over the terrain.
- Tracks: eg mud, wet dirt. Entities leave tracks on the terrain as they move. This is dependent upon the entity type. For example, foot units leave footprints, cavalry leave hoofprints, while wheeled units cut grooves into the ground.
- Splash: eg shallows, mud.
- Wakes: eg deep water. Ripples and wave deformations of the water mesh.
QUOTEThese are the general rules for terrain movement:
* Normal (undefined)
Units – movement of any entity except ships.
Structures – construction of any structure except Docks.
Units – movement of any entity with feet (UnitNonMechanical).
Structures - only the construction of water structures that may be
built in the shallows (StructWallW, StructTowerW, Dock).
A special note about the shallow type. The first image shows some nuances of the shallow water. See that though the water is visually ‘shallow’ in a certain region of that picture… it isn’t ‘shallow type’ because it doesn’t have the correct shallow texture type (designated by the difference in the skin appearance). In other words, 2 things must be in order before a
terrain is considered shallow. It must not be too deep (elevation difference of the Z axis), and it must be the shallow terrain type.
Units – movement only by ships (UnitShips).
Structures – no structures may be built.
Units – only units with the Boolean attribute of walking in forests may walk in Forest type.
Structures – no structures may be built.
A special note about the forest type. When a tree is placed on the terrain, the tile that the tree is placed on has the terrain’s secondary texture skin changed to a forest type. When a cluster of trees are placed in adjacent tiles it changes the terrain enough to make a ‘closed’ forest terrain which means that all eight tiles around it also have a tree on them. When that is the case, the terrain is now of the forest type and there are special permissions applied to it.
Units – no unit may traverse.
Structures – no structure may be built.
BRIEF DESCRIPTION ::Doodads/goobers/decals that get randomly sprinkled over this terrain. Similar to props, except they aren't bonded to specific sockets.
Useful for beautifying terrain and breaking up patterns in the texture (cacti, plants, lilies, reeds).
Like the Passable attributes, a terrain can have multiple doodads.
A Doodad attribute consists of:
- Name: The name of the prop or decal actor that can be placed.
- Max: Determines the maximum quantity of this doodad that could placed on the terrain (a random number of doodads is chosen when terrain is placed; this is the cap on that number, 0-max). Higher numbers have a higher likelihood of getting more doodads.
<terrain tag="GrassRoughB" parent="GrassRoughA"
mmap="100, 200, 250"
<passable type="siege" speed="80" effect="grooves, dust"/>
<passable type="wheeled" speed="75" effect="grooves, dust"/>
<passable type="mounted" speed="90" effect="tracks, dust"/>
<passable type="foot" speed="102" effect="footprints, dust"/>
<doodad name="Shrub1" max="2">
<doodad name="Stone2" max="3">
<doodad name="Stone3" max="3">
<doodad name="Flower1" max="2">
<event on="WalkOver" ![CDATA[ When something walks on the terrain,
Destroy(walker, "FireDeath"); Set the unit walking on it on fire, just for the hell of it.