Map Editor:  Archetype Files

Editing .arch files is one of the most rewarding tasks of being a wizard. Being able to see players fight your monsters, wield your weapons, and wear your armor is great. However, it is also sometimes difficult, and one .arch file with an error keeps the whole map from loading in the game.

The first thing to know about editing .arch files is a little about XML. Here's an example archetype:

<arch class="wyvern.kernel.monsters.MonsterImpl">
  <appearance layer="500" cat="monsters/dragon" bmp="Blue_Dragon"/>
  <boolean name="animated"/>
  <boolean name="hostile"/>
  <int name="move-speed" value="500"/>
  <int name="attack-speed" value="300"/>
  <size value="2x3"/>
  <string name="short" value="Blue Dragon"/>
  <string name="desc" value="A nasty dragon."/>
  <int name="hp" value="300"/>
  <int name="xp-award" value="1500"/>
  <bean name="body-parts" class="wyvern.kernel.combat.shapes.Draconian"/>
  <int name="ac" value="10"/>
  <int name="resist-elec" value="100"/>
  <int name="resist-fear" value="100"/>
  <int name="int" value="15"/>
  <int name="align" value="-500"/>
  <int name="str" value="22"/>
  <int name="level" value="19"/>
  <int name="uses-spells" value="30"/>
  <boolean name="flying"/>
  <bean name="SpellList" class="wyvern.kernel.player.SpellListImpl">
  <weight value="3500 lb"/>

You don't need to know XML to figure out that this is a dragon, and a pretty tough one at that. The format of the file might look a bit strange (it's an XML language created just for Wyvern), but the basic concept is the same.

There are several different types of variables in XML. Those most commonly used in Wyvern are int, string, and boolean. Int variables store a number. This type of variable is useful for skills, level, strength, and resistances. String variables store text, which is useful for anything that doesn't fit into another variable type. It is the default in the all properties editor in the map editor. Boolean variables can only store a two values, true or false. They are useful for defining if a monster flies, if the monster's image is animated, or determining alignment. If an object has a boolean with no value, then the boolean is considered true. If an object has a value of false, then it is considered false, and not to have the property.

Other types of variables include beans and images. You don't need to worry about beans for the most part. Usually, it is easiest to copy and paste the bean rather than write one of your own. Images are another matter altogether.

You can use your own art in an arch file. To do so, simply change the path variable in the image property to point to your art, which is placed in wiz/yourname/yourfolder. So, if your .arch file is modified from a goblin, change this

<image layer="500" path="monsters/goblin/gobin">
to this
<image layer="500" path="wiz/yourname/yourfolder/yourpic">

Where yourname is the name of your wizard character, yourfolder is the folder or directory (under .../wyvern/wiz) that the image is stored in, and yourpic is the name of the pic. You don't have to put the extention .gif on the image path. To learn more about images in wyvern, visit the Wyvern Artwork Guidelines.

Detailed Instructions

You can find more information about properties and archetypes in the Wizarding Basics: Creating Archetypes guide.