Stendhal/Creature Organization/Examples: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>AntumDeluge
imported>AntumDeluge
Line 84: Line 84:
=== Example animals.xml ===
=== Example animals.xml ===


<wiki code>
<code lang="xml">
<?xml version="1.0" encoding="ISO-8859-1"?>
&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
<creatures xmlns="stendhal" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
&lt;creatures xmlns="stendhal" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="stendhal ../creatures.xsd "&gt;
xsi:schemaLocation="stendhal ../creatures.xsd ">
<!-- START: aquatic -->
&lt;!-- START: aquatic --&gt;
<creature name="crab">
&lt;creature name="crab"&gt;
<type class="animal" subclass="crab" tileid="animal.png:8"/>
&lt;type class="animal" subclass="crab" tileid="animal.png:8"/&gt;
<description>You see a little crab that comes from the beach, be careful of its pincers.</description>
&lt;description&gt;You see a little crab that comes from the beach, be careful of its pincers.&lt;/description&gt;
<attributes>
&lt;attributes&gt;
<atk value="8"/>
&lt;atk value="8"/&gt;
<def value="4"/>
&lt;def value="4"/&gt;
<hp value="10"/>
&lt;hp value="10"/&gt;
<speed value="0.5"/>
&lt;speed value="0.5"/&gt;
<size value="1,1"/>
&lt;size value="1,1"/&gt;
</attributes>
&lt;/attributes&gt;
<level value="0"/>
&lt;level value="0"/&gt;
<experience value="5"/>
&lt;experience value="5"/&gt;
<respawn value="900"/>
&lt;respawn value="900"/&gt;
<corpse name="small_animal"/>
&lt;corpse name="small_animal"/&gt;
<drops>
&lt;drops&gt;
<item value="meat" quantity="[1,1]" probability="60.0"/>
&lt;item value="meat" quantity="[1,1]" probability="60.0"/&gt;
</drops>
&lt;/drops&gt;
<equips>
&lt;equips&gt;
</equips>
&lt;/equips&gt;
<ai>
&lt;ai&gt;
<says>
&lt;says&gt;
<noise state="idle follow fight" value="click-clack-click"/>
&lt;noise state="idle follow fight" value="click-clack-click"/&gt;
<sound value="click-clack-1" />
&lt;sound value="click-clack-1" /&gt;
</says>
&lt;/says&gt;
<profile name="animal"/>
&lt;profile name="animal"/&gt;
<profile name="offensive"/>
&lt;profile name="offensive"/&gt;
<profile name="patrolling"/>
&lt;profile name="patrolling"/&gt;
</ai>
&lt;/ai&gt;
</creature>
&lt;/creature&gt;
<!-- END: aquatic -->
&lt;!-- END: aquatic --&gt;
</creatures>
&lt;/creatures&gt;
</wiki>
</code>


== Option 2: Create more creature categories ==
== Option 2: Create more creature categories ==