<HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.39 from ./xcdesign.texi on 12 June 2005 --> <TITLE>Designing Games with Xconq - Terrain Types</TITLE> </HEAD> <BODY> Go to the <A HREF="xcdesign_1.html">first</A>, <A HREF="xcdesign_40.html">previous</A>, <A HREF="xcdesign_42.html">next</A>, <A HREF="xcdesign_61.html">last</A> section, <A HREF="xcdesign_toc.html">table of contents</A>. <HR> <H2><A NAME="SEC198" HREF="xcdesign_toc.html#SEC198">Terrain Types</A></H2> <P> Terrain types are associated with the cells, borders, connections, and coatings in a world. </P> <P> <U>Form:</U> <B><CODE>terrain-type</CODE></B> <I>name properties...</I><P> <A NAME="IDX438"></A> This form defines a new type of terrain, named by <VAR>name</VAR>. Details are similar to those for unit types. </P> <P> <U>GlobalVariable:</U> <B><CODE>t*</CODE></B><P> <A NAME="IDX439"></A> This variable evaluates to a list of all terrain types, listed in the order that they were defined. </P> <P> <U>GlobalVariable:</U> <B><CODE>non-terrain</CODE></B><P> <A NAME="IDX440"></A> This variable has a value that is guaranteed not to be a terrain type. </P> <UL> <LI><A HREF="xcdesign_41.html#SEC199">Terrain Subtypes</A> <LI><A HREF="xcdesign_41.html#SEC200">Terrain Compatibility</A> <LI><A HREF="xcdesign_41.html#SEC201">Other Terrain Properties</A> </UL> <H3><A NAME="SEC199" HREF="xcdesign_toc.html#SEC199">Terrain Subtypes</A></H3> <P> Terrain can appear in four different roles: as the interior of a cell, as a border between cells, as a connection between cells, or as a coating overlaying the normal terrain. The terrain subtype says which role a type can play. </P> <P> <U>TerrainTypeProperty:</U> <B><CODE>subtype</CODE></B> <I>subtype</I><P> <A NAME="IDX441"></A> This property is the role that the terrain type can appear in. Defaults to <CODE>cell</CODE>. </P> <P> <U>GlobalConstant:</U> <B><CODE>cell</CODE></B><P> <A NAME="IDX442"></A> This constant indicates that terrain can fill a cell. All units in the open and with an altitude of 0 are assumed to be surrounded by the cell terrain. </P> <P> <U>GlobalConstant:</U> <B><CODE>border</CODE></B><P> <A NAME="IDX443"></A> This constant indicates that the terrain can be a border between two cells. </P> <P> <U>GlobalConstant:</U> <B><CODE>connection</CODE></B><P> <A NAME="IDX444"></A> This constant indicates that the terrain can be a connection between two cells. </P> <P> <U>GlobalConstant:</U> <B><CODE>coating</CODE></B><P> <A NAME="IDX445"></A> This constant indicates that the terrain can be a coating. A <STRONG>coating</STRONG> is a temporary terrain modification. The classic example is snow, which effectively changes some kinds of terrain, but not completely and usually not permanently. Cells can have varying heaviness of each type of coating. </P> <P> <U>TableTT:</U> <B><CODE>coating-depth-min</CODE></B> <I>t1 t2 -> n</I><P> <A NAME="IDX446"></A> In order for a coating <VAR>t1</VAR> to "stick", this table says much must be added all at once to terrain <VAR>t2</VAR>. A coating depth that drops below this will disappear immediately. </P> <P> <U>TableTT:</U> <B><CODE>coating-depth-max</CODE></B> <I>t1 t2 -> n</I><P> <A NAME="IDX447"></A> This table is the upper limit on coating depth. </P> <P> Terrain types may have additional subtype attributes that are used only during synthesis, to select appropriate subtypes for special purposes. </P> <P> <U>TerrainTypeProperty:</U> <B><CODE>subtype-x</CODE></B> <I>n</I><P> <A NAME="IDX448"></A> This property is extra subtype information, used in synthesis. Defaults to <CODE>no-x</CODE>. </P> <P> <U>Symbol:</U> <B><CODE>no-x</CODE></B><P> <A NAME="IDX449"></A> </P> <P> <U>GlobalConstant:</U> <B><CODE>river-x</CODE></B><P> <A NAME="IDX450"></A> This constant indicates that synthesis methods should treat this type as a river. The terrain type may be either a border or a connection. </P> <P> <U>GlobalConstant:</U> <B><CODE>valley-x</CODE></B><P> <A NAME="IDX451"></A> This constant indicates that synthesis methods should treat this type as a valley. </P> <P> <U>GlobalConstant:</U> <B><CODE>road-x</CODE></B><P> <A NAME="IDX452"></A> This constant indicates that synthesis methods should treat this type as a road. </P> <P> <U>TerrainTypeProperty:</U> <B><CODE>liquid</CODE></B> <I>t/f</I><P> <A NAME="IDX453"></A> This property is true if the terrain type represents a liquid, which means that adjacent cells of liquid must have the same elevation. Defaults to <CODE>false</CODE>. </P> <H3><A NAME="SEC200" HREF="xcdesign_toc.html#SEC200">Terrain Compatibility</A></H3> <P> Terrain types are not always mutually compatible. Incompatible types may not be juxtaposed, either at game setup time or by unit action during a game. </P> <P> <U>TableTT:</U> <B><CODE>adjacent-terrain-effect</CODE></B> <I>t1 t2 -> t3</I><P> <A NAME="IDX454"></A> This table specifies what will happen to a cell of type <VAR>t1</VAR> adjacent to a cell of type <VAR>t2</VAR>. If <VAR>t3</VAR> is <CODE>non-terrain</CODE>, nothing will happen, otherwise it will become a cell of type <VAR>t3</VAR>. Defaults to <CODE>non-terrain</CODE>. </P> <P> <U>TableTT:</U> <B><CODE>adjacent-terrain-effect-chance</CODE></B> <I>t1 t2 -> n%</I><P> <A NAME="IDX455"></A> If a terrain change is specified in the <CODE>adjacent-terrain-effect</CODE> table, then the corresponding entry in this table determines the probability <VAR>n</VAR> of the terrain change effect succeeding. Defaults to <CODE>100%</CODE>. </P> <P> <U>TableTT:</U> <B><CODE>adjacent-terrain-effect-passes</CODE></B> <I>t1 t2 -> n</I><P> <A NAME="IDX456"></A> If a terrain change is specified in the <CODE>adjacent-terrain-effect</CODE> table, then the corresponding entry in this table determines how many times this effect will be iterated by the terrain change code. Defaults to <CODE>-1</CODE>, which means that iterations will continue until no more changes occur or until the number of iterations is equal to the height of the map. </P> <P> <U>TableTT:</U> <B><CODE>adjacent-terrain-border</CODE></B> <I>t1 t2 -> t3</I><P> <A NAME="IDX457"></A> If a cell terrain of type <VAR>t1</VAR> is adjacent to a cell terrain of type <VAR>t2</VAR>, then place a border of type <VAR>t3</VAR> between the cells. Defaults to <CODE>non-terrain</CODE>, which means that no border will be placed.<BR> NOTE: Existing borders are deleted before the new border is placed. </P> <P> <U>TableTT:</U> <B><CODE>adjacent-terrain-border-chance</CODE></B> <I>t1 t2 -> n%</I><P> <A NAME="IDX458"></A> If a border between <VAR>t1</VAR> and <VAR>t2</VAR> is specified in the <CODE>adjacent-terrain-border</CODE> table, then the corresponding entry in this table determines the probability of the new border actually being placed. Defaults to <CODE>100%</CODE>. </P> <P> <U>TableTT:</U> <B><CODE>adjacent-terrain-connection</CODE></B> <I>t1 t2 -> t3</I><P> <A NAME="IDX459"></A> Similar to <CODE>adjacent-terrain-border</CODE>, but applied to connection terrain. Defaults to <CODE>non-terrain</CODE> (no connection will be placed), and if a connection is placed, any existing connections will be removed. </P> <P> <U>TableTT:</U> <B><CODE>adjacent-terrain-connection-chance</CODE></B> <I>t1 t2 -> n%</I><P> <A NAME="IDX460"></A> Similar to <CODE>adjacent-terrain-border-chance</CODE>, this specifies the chance of a connection specified by <CODE>adjacent-terrain-connection</CODE> actually being placed. Defaults to <CODE>100%</CODE>. </P> <P> Note that there is not a passes-limiting table for setting border terrain. This is because the border terrain algorithm executes in one pass, since border types are not dependent on neighboring border types. Similarly, there is no passes-limiting table for connection terrain. </P> <H3><A NAME="SEC201" HREF="xcdesign_toc.html#SEC201">Other Terrain Properties</A></H3> <P> <U>TerrainTypeProperty:</U> <B><CODE>elevation-min</CODE></B> <I>elev</I><P> <A NAME="IDX461"></A> <U>TerrainTypeProperty:</U> <B><CODE>elevation-max</CODE></B> <I>elev</I><P> <A NAME="IDX462"></A> These properties define the minimum and maximum possible values for the elevation in a cell of given terrain type. Both default to <CODE>0</CODE>. </P> <P> <U>TerrainTypeProperty:</U> <B><CODE>temperature-min</CODE></B> <I>n</I><P> <A NAME="IDX463"></A> <U>TerrainTypeProperty:</U> <B><CODE>temperature-max</CODE></B> <I>n</I><P> <A NAME="IDX464"></A> These properties define the minimum and maximum possible values for the temperature in a cell of given terrain type. Both default to <CODE>0</CODE>. </P> <P> <U>TerrainTypeProperty:</U> <B><CODE>wind-force-min</CODE></B> <I>n</I><P> <A NAME="IDX465"></A> <U>TerrainTypeProperty:</U> <B><CODE>wind-force-max</CODE></B> <I>n</I><P> <A NAME="IDX466"></A> These properties define limits on wind force. Both default to <CODE>0</CODE>. </P> <P> <U>TerrainTypeProperty:</U> <B><CODE>clouds-min</CODE></B> <I>n</I><P> <A NAME="IDX467"></A> <U>TerrainTypeProperty:</U> <B><CODE>clouds-max</CODE></B> <I>n</I><P> <A NAME="IDX468"></A> These properties define limits on cloud density. Both default to <CODE>0</CODE>. </P> <HR> Go to the <A HREF="xcdesign_1.html">first</A>, <A HREF="xcdesign_40.html">previous</A>, <A HREF="xcdesign_42.html">next</A>, <A HREF="xcdesign_61.html">last</A> section, <A HREF="xcdesign_toc.html">table of contents</A>. </BODY> </HTML>