User Tools

Site Tools


definitions

Wolfpack Definitions

Introduction

Wolfpack Definitions are how information about objects are stored. It differs from scripts (ie: Python) in that definitions does not perform any action per se. Objects, such as items, npcs and others, are defined using the XML language. You can learn more about XML in the W3C XML Tutorial.

See also: List of definition tags

NPCs

Monsters, humans non-humans and animals that are not controlled by a player are called Non Player Characters (NPCs). These NPCs have special properties which have to be defined using the following definition standards.

Each NPC definition is concentrated in one definition section which starts with an opening npc id=… - tag and ends with a closing /npc - tag. The tags between the npc - tags define the properties of the NPC.

<npc id='name_of_the_npc_section'>
  <property1>...</property1>
  <property2 />
</npc>

backpack

open-close-tag, behaves like an item definition section.

<backpack>
  ...item definition tags like color...
  <contains>
     ...see item section for more info...
  </contains>
</backpack>

attack

single-tags, set the attack properties of the npc. is a synonym for min and maxdamage. has attributes min and max

<attack min='value' max='value' />

direction

open-close-tag, sets the direction of the npc. Possible values: N, NE, E, SE, S, SW, W, NW. Default: N.

equipped

open-close-tag, contains standard item containment tags. items must have layers to be equipped or they will be deleted after creation.

<equipped>
 ...like standard item containment...
</equipped>

gold

open-close-tag, sets the amount of gold the npc carries.

inherit

open-close- or single-tag. If single-tag, then it must contain attribute id. The expression of id or between the o/c-tags defines an npc section which definitions will be applied on the npc. This tag offers the opportunity for creating base and deriving child definitions.

<inherit id='npc_section' />
<inherit>value_expr</inherit>

npcwander

single-tag, must contain attribute type. type can be: rectangle, rect or 3 for wandering in a box, circle or 2 for wandering in a circle, free or 1 for wandering freely, or none or 0.

The rectangle-type must contain the attributes x1, x2, y1, y2 to define the box in offsets.

The circle-type must contain the attribute radius.

<npcwander type='rectangle / rect / 3' x1='value' x2='value' y1='value' y2='value' />
<npcwander type='circle / 2' radius='value' />
<npcwander type='freely / 1' />
<npcwander type='none / 0' />

shopkeeper

open-close-tag, makes the npc a shopkeeper, holds restockable-, buyable- and sellable-tags. These tags contain items for the shopkeeper's stockpile.

<shopkeeper>
  <restockable>
    ...like standard item containment...
  </restockable>
  <buyable>
    ...like standard item containment...
  </buyable>
  <sellable>
    ...like standard item containment...
  </sellable>
</shopkeeper>

skill

open-close-tags, must contain attribute type which holds the 1-determined number of the skill or the skillname itself.

<skill id="cartography><random min="200" max="400" /></skill>

stat

open-close-tag, must contain attribute type with value str, dex or int. Sets str, dex or int to the enclosed value.

tag

open-close-tag, contains the open-close-tags key and value. the tag can have an attribute type which can define if it is wether a string or a value. Corresponds to the new tag system which shall replace the more variables.

<tag type='value or string'> while the type attr. is optional
  <key>value_expr</key>
  <value>value_expr</value>
</tag>

for further possible tags see Character Properties

definitions.txt · Last modified: 2014/05/23 17:08 by thooge