Terrain Structure

by Dale M.A. Johnson

 

created 9/16/06

 

This is an overview of the intended structure for terrain types.

 

The Structure and Its Members

The data for terrain is stored in CTerrain and accessed using the object handle terrain[#].member. There can be up to 25 terrain types. Each terrain has the following information stored for it.

 

General

 

string tName
The name of this terrain.
int iSlot
Which slot this terrain occupies in the image file.
int iSmooth
What type of auto-smoothing to use for this terrain. 0 = no smoothing.

 

Movement

 

int iCost[#]
The movement cost for each type of unit. If the amount is -1, the terrain is inpassible for this unit type.
int iDef
The defensive bonus this terrain gives.
int iRes
The resistance bonus this terrain gives.
int iAvo
The avoid bonus this terrain gives.
int iHeal
The amount of HP this terrain heals per turn.
int iRestore
The amount of MP this terrain restores per turn.