Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 74fbd0eb33bb08f719b79951bc4e329e > files > 86

xconq-7.5.0-1.20050612.5mdv2009.1.i586.rpm

<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.39
     from ./xcdesign.texi on 12 June 2005 -->

<TITLE>Designing Games with Xconq - Types in General</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="xcdesign_1.html">first</A>, <A HREF="xcdesign_38.html">previous</A>, <A HREF="xcdesign_40.html">next</A>, <A HREF="xcdesign_61.html">last</A> section, <A HREF="xcdesign_toc.html">table of contents</A>.
<HR>


<H2><A NAME="SEC182" HREF="xcdesign_toc.html#SEC182">Types in General</A></H2>

<P>
Types are the foundation of <I>Xconq</I> game designs.  Nearly all the
rules and game parameters are associated with the unit, material,
terrain, and advance types.  There is no sort of type hierarchy;
instead, most forms allow sets of types to be used in the place of
single types.

</P>
<P>
Each type has an index associated with it, starting from 0.  This index
never appears directly, and cannot be set.  This does mean that types
have an order, so the order in which types are defined is sometimes
significant.  These cases will be noted.  The order is always the order
in which the types appear in the file.

</P>

<UL>
<LI><A HREF="xcdesign_39.html#SEC183">Type Names</A>
<LI><A HREF="xcdesign_39.html#SEC184">Type Images</A>
<LI><A HREF="xcdesign_39.html#SEC185">Documentation</A>
</UL>



<H3><A NAME="SEC183" HREF="xcdesign_toc.html#SEC183">Type Names</A></H3>

<P>
The names of types need not be distinct from each other, but you run the
risk of player confusion if they share names.

</P>
<P>
<U>TypeProperty:</U> <B><CODE>name</CODE></B> <I>string</I><P>
<A NAME="IDX361"></A>
This property is the specific name of the type.  This name will be
displayed to players; the exact format is up to the interface, but will
typically depend on the name's length and the space available in the
display.  If no type names have been defined, the internal type name
(see below) will be used.  Defaults to <CODE>""</CODE>.

</P>
<P>
<U>TypeProperty:</U> <B><CODE>long-name</CODE></B> <I>string</I><P>
<A NAME="IDX362"></A>
This property is a fully spelled-out name for the type.  Defaults to
<CODE>""</CODE>.  (At present, this property is only defined for unit types.)

</P>
<P>
<U>TypeProperty:</U> <B><CODE>short-name</CODE></B> <I>string</I><P>
<A NAME="IDX363"></A>
This property is an abbreviated name of for the type.  Defaults to
<CODE>""</CODE>.  (At present, this property is only defined for unit types.)

</P>
<P>
<U>TypeProperty:</U> <B><CODE>generic-name</CODE></B> <I>string</I><P>
<A NAME="IDX364"></A>
This property is like <CODE>name</CODE>, but identifies the type less
specifically, and several types may have the same generic name.  If no
generic names are defined, then the regular type names will be used.
This is useful when making abbreviated lists, so that related types get
counted together.  Defaults to <CODE>""</CODE>.  (At present, this property is
only defined for unit types.)

</P>
<P>
As an example of the distinction between type names and generic type
name, the names of a automobile type might be <CODE>"1965 Mustang"</CODE>,
<CODE>"Mustang"</CODE>, and <CODE>"M"</CODE>, while the generic name is
<CODE>"auto"</CODE>.  Then the interface could choose to display a parking lot
as containing either <CODE>"4 auto"</CODE> or <CODE>"2 Mustang 1 Edsel 1
Jeep"</CODE>.

</P>
<P>
Note that names specified as properties are strings only, and are not
defined as evaluable symbols.

</P>



<H3><A NAME="SEC184" HREF="xcdesign_toc.html#SEC184">Type Images</A></H3>

<P>
The interpretation of these properties is entirely up to each interface;
see the appropriate interface documentation for details.

</P>
<P>
<U>TypeProperty:</U> <B><CODE>image-name</CODE></B> <I>str</I><P>
<A NAME="IDX365"></A>
This property is the name of the type's image.  If undefined or unusable
for some reason, the interface will display the type in some default
manner, such as a solid-color square or a string.

</P>
<P>
For example, in X11, the name might be the name of a file in the usual
bitmap format, as produced by the <VAR>bitmap</VAR> program.  The actual file
name is produced by appending <CODE>".b"</CODE>.  (The situation in X is
actually more complicated than this.)  See the interface documentation
for details on how the interface uses the image.

</P>
<P>
<U>TypeProperty:</U> <B><CODE>char</CODE></B> <I>str</I><P>
<A NAME="IDX366"></A>
This property supplies a single character for this type (all characters
after the first one in <VAR>str</VAR> are ignored).  Defaults to <CODE>""</CODE>.
(This property is not defined for advance types.)

</P>
<P>
<U>UnitTypeProperty:</U> <B><CODE>generic-char</CODE></B> <I>str</I><P>
<A NAME="IDX367"></A>
This property supplies a single generic character for this type (all
characters after the first one in <VAR>str</VAR> are ignored).  If defined,
displays will use the generic character in preference to the <CODE>char</CODE>
for the unit type, in contexts where the exact type is not important
(such as in lists of occupant types).  Defaults to <CODE>""</CODE>.  (This
property is only defined for unit types.)

</P>



<H3><A NAME="SEC185" HREF="xcdesign_toc.html#SEC185">Documentation</A></H3>

<P>
<U>TypeProperty:</U> <B><CODE>help</CODE></B> <I>string</I><P>
<A NAME="IDX368"></A>
This property is a brief (preferably one-line) description of the type.
Defaults to <CODE>""</CODE>.

</P>
<P>
<U>TypeProperty:</U> <B><CODE>notes</CODE></B> <I>strings...</I><P>
<A NAME="IDX369"></A>
This property is detailed documentation about the type.  The formatting
of the strings is up to the interface, but in general each string is a
separate line, the string <CODE>""</CODE> indicates a line break, and two
<CODE>""</CODE> in a row indicates a paragraph break.  Defaults to <CODE>()</CODE>.

</P>

<HR>
Go to the <A HREF="xcdesign_1.html">first</A>, <A HREF="xcdesign_38.html">previous</A>, <A HREF="xcdesign_40.html">next</A>, <A HREF="xcdesign_61.html">last</A> section, <A HREF="xcdesign_toc.html">table of contents</A>.
</BODY>
</HTML>