Home - Forums - Documentation - Gallery - Bugs
(First version of CEL XML syntax guide)
Current revision (08:51, 3 May 2007) (edit) (undo)
(Added library tag)
 
(12 intermediate revisions not shown.)
Line 1: Line 1:
-
This tutorial is work in progress to describe the different XML elements that can be used for CEL and CELStart. When adding new tags please keep in alphabetical order.
+
This tutorial is work in progress to describe the different XML elements that can be used for CEL and CELStart. When adding new tags please keep in alphabetical order. The start of an XML schema for CS XML can be found in the CS repository in scripts/xml: http://crystal.svn.sourceforge.net/viewvc/crystal/CS/trunk/scripts/xml/cs_world.xsd?view=markup
-
== <addon> </addon ==
+
== <addon> </addon> ==
-
Invokes a plugin
+
Invokes a plugin.
== <addon plugin="cel.addons.celentity"> ==
== <addon plugin="cel.addons.celentity"> ==
-
Used to create a CEL entity
+
Used to create a CEL entity.
'''Example'''
'''Example'''
Line 28: Line 28:
<texture name="menu_start">
<texture name="menu_start">
<file>/menu/menu_start.png</file>
<file>/menu/menu_start.png</file>
-
<keepimage />
+
<keepimage/>
</texture>
</texture>
</pre>
</pre>
- 
== <keepimage/> ==
== <keepimage/> ==
-
Directive to keep the source image after texture is loaded, for example when using the texture as a billboard.
+
Directive to keep the source image after the texture is loaded, for example when using the texture as a billboard. CEL needs the image to calculate where clicking works, and where not, i.e. to make a clickmap (CS normally discards the images after loading). It is only useful if the image needs to be clickable.
 +
 
'''Example'''
'''Example'''
<pre>
<pre>
<texture name="menu_start">
<texture name="menu_start">
<file>/menu/menu_start.png</file>
<file>/menu/menu_start.png</file>
-
<keepimage />
+
<keepimage/>
</texture>
</texture>
</pre>
</pre>
-
== <materials> </materials> ==
+
== <library> </library> ==
-
Block that describes a number of materials.
+
Put at the start and end of a library file which can then be included into another file
 +
 
 +
'''Example'''
 +
 
 +
File called library:
 +
<pre>
 +
<library>
 +
...
 +
</library>
 +
</pre>
 +
 
 +
To include in a another file:
 +
<pre>
 +
<library path="/models/test" file="library" />
 +
</pre>
== <material> </material> ==
== <material> </material> ==
Line 54: Line 68:
<texture>menu_start</texture>
<texture>menu_start</texture>
</material>
</material>
 +
</pre>
 +
 +
== <materials> </materials> ==
 +
Block that describes a number of materials.
 +
 +
== <sector> </sector> ==
 +
Describes a sector.
== <texture> </texture> ==
== <texture> </texture> ==
-
Describes a texture
+
Describes a texture.
'''Example'''
'''Example'''
Line 62: Line 83:
<texture name="menu_start">
<texture name="menu_start">
<file>/menu/menu_start.png</file>
<file>/menu/menu_start.png</file>
-
<keepimage />
+
<keepimage/>
</texture>
</texture>
</pre>
</pre>
== <textures> </textures> ==
== <textures> </textures> ==
-
Encapsulates a block of textures
+
Encapsulates a block of textures.
== <world> </world> ==
== <world> </world> ==
-
Used to encapsulate a world file
+
Used to encapsulate a world file.

Current revision

This tutorial is work in progress to describe the different XML elements that can be used for CEL and CELStart. When adding new tags please keep in alphabetical order. The start of an XML schema for CS XML can be found in the CS repository in scripts/xml: http://crystal.svn.sourceforge.net/viewvc/crystal/CS/trunk/scripts/xml/cs_world.xsd?view=markup

Contents

<addon> </addon>

Invokes a plugin.

<addon plugin="cel.addons.celentity">

Used to create a CEL entity.

Example

 <addon plugin="cel.addons.celentity" entityname="menu_start_entity" >
   <behaviour name="menu_behave" />
   <propclass name="pcbillboard">
     <property name="name" string="menu_start" />
     <property name="materialname" string="menu_start" />
     <property name="movable" bool="false" />
     <property name="clickable" bool="true" />
     <property name="restack" bool="false" />
     <property name="width" long="61440" />
     <property name="height" long="34800" />
     <property name="x" long="19000" />
     <property name="y" long="26600" />
   </propclass>
 </addon>

<file> </file>

Describes a file, for example the image file used in a texture.

    <texture name="menu_start">
      <file>/menu/menu_start.png</file>
      <keepimage/>
    </texture>

<keepimage/>

Directive to keep the source image after the texture is loaded, for example when using the texture as a billboard. CEL needs the image to calculate where clicking works, and where not, i.e. to make a clickmap (CS normally discards the images after loading). It is only useful if the image needs to be clickable.

Example

    <texture name="menu_start">
      <file>/menu/menu_start.png</file>
      <keepimage/>
    </texture>

<library> </library>

Put at the start and end of a library file which can then be included into another file

Example

File called library:

<library>
...
</library>

To include in a another file:

<library path="/models/test" file="library" />

<material> </material>

Describes a material.

Example

  <material name="menu_start">
    <texture>menu_start</texture>
  </material>

<materials> </materials>

Block that describes a number of materials.

<sector> </sector>

Describes a sector.

<texture> </texture>

Describes a texture.

Example

    <texture name="menu_start">
      <file>/menu/menu_start.png</file>
      <keepimage/>
    </texture>

<textures> </textures>

Encapsulates a block of textures.

<world> </world>

Used to encapsulate a world file.

| Article | Discussion | View source | History |