Changes between Initial Version and Version 1 of XML:_Terrain


Ignore:
Timestamp:
Jun 16, 2009, 1:10:42 AM (15 years ago)
Author:
Erik Johansson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • XML:_Terrain

    v1 v1  
     1XML: Terrain
     2
     3Terrain can be defined as the ground plane. It is the basic tile based foundation that establishes the game world. This document defines those attributes.
     4
     5The 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.
     6
     7There 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:
     8Multiple terrain objects can be stored in the same XML file (separated by their <terrain> tags).
     9Multiple terrain XML files can be read from the same folder.
     10Terrains can inherit attributes from other terrains by specifying a "parent" (see the section on inheritance in the XML Header Overview).
     11Skin
     12
     13BRIEF 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.
     14
     15Animated textures can be specified here. This feature could be used for all sorts of effects: waterfalls, water effects, UI effects, fire, conveyor belts, skyboxes.
     16
     17Dirt
     18- dirt1 - bare
     19- dirt2 - cracked
     20- dirt3 – mud
     21
     22Grass
     23- grass1 - plain
     24- grass2 - lush
     25- grass3 - long
     26- grass4 - weeds
     27- grass5 – short/long mix
     28- grass6 – bunched dry
     29- grass7 – yellow
     30- grass8 – dark tufts
     31- grass9 – mixed greens, weeds
     32
     33Sand
     34- sand1 - plain
     35- sand2 - rippled
     36- sand3 – rough, rocky
     37
     38Forrest
     39- forest1 – leafy
     40- forest2 – needles
     41- forest3 – fronds
     42- forest4 – scrub
     43- forest5 – logged
     44
     45Road
     46- road1 – Persian
     47- road2 – Roman
     48- road3 – Hellenic
     49- road4 – Celtic
     50- road5 – Carthaginian
     51- road6 – Iberian
     52- road7 – gravel - gray
     53- road8 – gravel - brown
     54
     55Water Sub-Terrain
     56- coral1 - brown
     57- coral2 - turquoise
     58- coral3 - red
     59- rock1 - light
     60- rock2 - medium
     61- rock3 - dark
     62- pebble1 - small
     63- pebble2 - large
     64
     65Beach
     66- sand1
     67- sand2
     68- sand3
     69
     70Cliff
     71- cliff1 - brown
     72- cliff2 – brown, vegetation
     73- cliff3 – brown, cracks
     74- cliff4 - gray
     75- cliff5 – gray, vegetation
     76- cliff6 – gray, cracks
     77
     78Special
     79- furrows1 – dirt
     80- furrows2 – dirt, small plants
     81- furrows3 – dirt, large plants
     82- black
     83- lava
     84- structure – under structures
     85
     86MMap
     87
     88BRIEF DESCRIPTION ::The RGB colour used to represent this terrain on the Mini Map.
     89
     90Note: 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.
     91
     92Group
     93
     94BRIEF DESCRIPTION ::The types/classes/groups to which this terrain belongs.
     95
     96Used 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).
     97
     98Properties
     99
     100BRIEF DESCRIPTION ::List of special properties for the terrain.
     101
     102For example, "buildable" means that structures can be built on the terrain, assuming that it is flat enough.
     103
     104Passable
     105
     106BRIEF 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.
     107
     108A terrain can have multiple Passable attributes to define different behaviours for different unit types walking over it.
     109
     110
     111
     112(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.)
     113
     114A Passable attribute consists of:
     115Type: The category of unit(s) that can pass over this terrain (determined by the entity's Id.Type).
     116Speed: 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.
     117Effect:: A list of special effects that occur when the unit is walking over this terrain. Effects include:
     118Dust: eg sand, dry dirt. Clouds of dust particles appear around the entity as it moves over the terrain.
     119Tracks: 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.
     120Splash: eg shallows, mud.
     121Wakes: eg deep water. Ripples and wave deformations of the water mesh.
     122QUOTE
     123These are the general rules for terrain movement:
     124
     125
     126
     127
     128Normal (undefined)
     129Units – movement of any entity except ships.
     130Structures – construction of any structure except Docks.
     131
     132
     133
     134
     135Shallows
     136Units – movement of any entity with feet (UnitNonMechanical).
     137Structures - only the construction of water structures that may be
     138built in the shallows (StructWallW, StructTowerW, Dock).
     139
     140A 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
     141terrain is considered shallow. It must not be too deep (elevation difference of the Z axis), and it must be the shallow terrain type.
     142
     143
     144
     145
     146Water
     147Units – movement only by ships (UnitShips).
     148Structures – no structures may be built.
     149
     150
     151
     152
     153Forest
     154Units – only units with the Boolean attribute of walking in forests may walk in Forest type.
     155Structures – no structures may be built.
     156
     157A 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.
     158
     159
     160
     161
     162
     163
     164Cliff
     165Units – no unit may traverse.
     166Structures – no structure may be built.
     167
     168
     169
     170
     171
     172
     173Doodad
     174
     175BRIEF DESCRIPTION ::Doodads/goobers/decals that get randomly sprinkled over this terrain. Similar to props, except they aren't bonded to specific sockets.
     176
     177Useful for beautifying terrain and breaking up patterns in the texture (cacti, plants, lilies, reeds).
     178
     179Like the Passable attributes, a terrain can have multiple doodads.
     180
     181A Doodad attribute consists of:
     182Name: The name of the prop or decal actor that can be placed.
     183Max: 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.
     184Example:
     185
     186CODE
     187
     188<terrain tag="GrassRoughB" parent="GrassRoughA"
     189       skin="textures/terrain/water/GrassRoughB.dds"
     190       mmap="100, 200, 250"                         
     191       type="grass, roughgrass"
     192       properties="buildable"
     193       <passable type="siege" speed="80" effect="grooves, dust"/>
     194       <passable type="wheeled" speed="75" effect="grooves, dust"/>
     195       <passable type="mounted" speed="90" effect="tracks, dust"/>
     196       <passable type="foot" speed="102" effect="footprints, dust"/>
     197       <doodad name="Shrub1" max="2">
     198       <doodad name="Stone2" max="3">
     199       <doodad name="Stone3" max="3">
     200       <doodad name="Flower1" max="2">
     201       <event on="WalkOver" ![CDATA[    // When something walks on the terrain,
     202           walker.SetAnimation("onfire",3);
     203           Destroy(walker, "FireDeath");  // Set the unit walking on it on fire, just for the hell of it.
     204       ]]></event>
     205></terrain>