DSB/Archetypes

From DmWiki
Revision as of 18:13, 10 December 2012 by Gambit37 (talk | contribs) (Created page with "== Overview == An Archetype is a general category of item, such as "Axe", "Iron Keyhole", "Screamer" or "Wooden Door". The base code defines hundreds of different archetypes ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Overview

An Archetype is a general category of item, such as "Axe", "Iron Keyhole", "Screamer" or "Wooden Door".

The base code defines hundreds of different archetypes that fall into broad categories. Every archetype has a number of properties that define its type, graphics, sounds and behaviour. There are many different properties available, and different types of archetypes will use different properties.

Here's a very basic example of a simple archetype, an apple, as defined in DSBs base code:

obj.apple = {
	name="APPLE",
	type="THING",
	shortdesc="CONSUMABLE",
	class="FOOD",
	mass=4,
	icon=gfx.icons[168],
	dungeon=gfx.apple,
	foodval=500,
	fit_pouch = true,		
	on_consume=eatdrink
}

Types