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:

  1. Multiple terrain objects can be stored in the same XML file (separated by their <terrain> tags).
  2. Multiple terrain XML files can be read from the same folder.
  3. Terrains can inherit attributes from other terrains by specifying a "parent" (see the section on inheritance in the XML Header Overview).
Skin


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.

Dirt
- dirt1 - bare
- dirt2 - cracked
- dirt3 – mud

Grass
- grass1 - plain
- grass2 - lush
- grass3 - long
- grass4 - weeds
- grass5 – short/long mix
- grass6 – bunched dry
- grass7 – yellow
- grass8 – dark tufts
- grass9 – mixed greens, weeds

Sand
- sand1 - plain
- sand2 - rippled
- sand3 – rough, rocky

Forrest
- forest1 – leafy
- forest2 – needles
- forest3 – fronds
- forest4 – scrub
- forest5 – logged

Road
- road1 – Persian
- road2 – Roman
- road3 – Hellenic
- road4 – Celtic
- road5 – Carthaginian
- road6 – Iberian
- road7 – gravel - gray
- road8 – gravel - brown

Water Sub-Terrain 
- coral1 - brown
- coral2 - turquoise
- coral3 - red
- rock1 - light
- rock2 - medium
- rock3 - dark
- pebble1 - small
- pebble2 - large

Beach
- sand1
- sand2
- sand3

Cliff
- cliff1 - brown
- cliff2 – brown, vegetation
- cliff3 – brown, cracks
- cliff4 - gray
- cliff5 – gray, vegetation
- cliff6 – gray, cracks

Special
- furrows1 – dirt
- furrows2 – dirt, small plants
- furrows3 – dirt, large plants
- black
- lava
- structure – under structures

MMap


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.

Group


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). 

Properties'


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.

Passable'


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:

QUOTEThese are the general rules for terrain movement:




* Normal (undefined)
Units – movement of any entity except ships.
Structures – construction of any structure except Docks.





Doodad


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:

Example:

CODE
<terrain tag="GrassRoughB" parent="GrassRoughA"
       skin="textures/terrain/water/GrassRoughB.dds"
       mmap="100, 200, 250"                         
       type="grass, roughgrass"
       properties="buildable"
       <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, 
           walker.SetAnimation("onfire",3);
           Destroy(walker, "FireDeath");  
Set the unit walking on it on fire, just for the hell of it. 
       ]]></event> 
></terrain> 

Last modified 15 years ago Last modified on Jul 10, 2009, 10:27:13 PM
Note: See TracWiki for help on using the wiki.