obj Struct Reference

#include <object.h>

Collaboration diagram for obj:

Collaboration graph
[legend]

Data Fields

struct plcontr
struct objnext
struct objprev
struct objactive_next
struct objactive_prev
struct objbelow
struct objabove
struct objinv
struct objcontainer
struct objenv
struct objmore
struct objhead
struct mapdefmap
tag_t count
struct struct_dialog_informationdialog_information
const char * name
const char * name_pl
const char * anim_suffix
const char * title
const char * race
const char * slaying
const char * skill
const char * msg
const char * lore
sint16 x
sint16 y
sint16 ox
sint16 oy
float speed
float speed_left
New_Faceface
uint32 nrof
sint8 direction
sint8 facing
uint8 type
uint8 subtype
uint16 client_type
sint16 resist [NROFATTACKS]
uint32 attacktype
uint32 path_attuned
uint32 path_repelled
uint32 path_denied
const char * materialname
uint16 material
sint8 magic
uint8 state
sint32 value
sint16 level
sint32 last_eat
sint32 last_heal
sint32 last_sp
sint16 last_grace
sint16 invisible
uint8 pick_up
sint8 item_power
sint8 gen_sp_armour
sint8 glow_radius
sint32 weight
sint32 weight_limit
sint32 carrying
living stats
sint64 perm_exp
struct objcurrent_weapon
uint32 weapontype
sint8 body_info [NUM_BODY_LOCATIONS]
sint8 body_used [NUM_BODY_LOCATIONS]
struct objowner
tag_t ownercount
struct objenemy
struct objattacked_by
tag_t attacked_by_count
uint16 run_away
struct treasureliststructrandomitems
struct objchosen_skill
uint32 hide
sint32 move_status
uint16 attack_movement
uint8 will_apply
sint8 sound_chance
struct objspellitem
double expmul
sint16 casting_time
sint16 duration
uint8 duration_modifier
sint8 range
uint8 range_modifier
uint8 dam_modifier
struct objspell
char * spellarg
struct archtarch
struct archtother_arch
uint32 flags [4]
uint16 animation_id
uint8 anim_speed
uint8 last_anim
uint16 temp_animation_id
uint8 temp_anim_speed
uint8 temp_last_anim
sint32 elevation
uint8 smoothlevel
uint8 map_layer
MoveType move_type
MoveType move_block
MoveType move_allow
MoveType move_on
MoveType move_off
MoveType move_slow
float move_slow_penalty
const char * custom_name
key_valuekey_values
uint8 no_save
sint16discrete_damage
tag_tspell_tags

Detailed Description

Main Crossfire structure, one ingame object.

Note that the ordering of this structure is sort of relevent - copy_object copies everything over beyond 'name' using memcpy. Thus, values that need to be copied need to be located beyond that point.

However, if you're keeping a pointer of some sort, you probably don't just want it copied, so you'll need to add to common/object.c, e.g. copy-object

I've tried to clean up this structure a bit (in terms of formatting) by making it more consistent. I've also tried to locate some of the fields more logically together (put the item related ones together, the monster related ones, etc. This structure is best viewed with about a 100 width screen. MSW 2002-07-05

See the documentation page for more details.

Definition at line 132 of file object.h.


Field Documentation

struct obj* above [read]

Pointer to the object stacked above this one

Definition at line 146 of file object.h.

struct obj* active_next [read]

Next object in the 'active' list This is used in process_events so that the entire object list does not need to be gone through.

Definition at line 137 of file object.h.

struct obj* active_prev [read]

Previous object in the 'active list This is used in process_events so that the entire object list does not need to be gone through.

Definition at line 141 of file object.h.

Ticks between animation-frames

Definition at line 268 of file object.h.

const char* anim_suffix

Used to determine combined animations

Definition at line 169 of file object.h.

An index into the animation array

Definition at line 267 of file object.h.

struct archt* arch [read]

Pointer to archetype

Definition at line 263 of file object.h.

What kind of attack movement

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) (no description)

Definition at line 242 of file object.h.

struct obj* attacked_by [read]

This object start to attack us! only player & monster

Definition at line 233 of file object.h.

The tag of attacker, so we can be sure

Definition at line 234 of file object.h.

Bitmask of attacks this object does

Use

Type(s) Description
Disease The disease will attack the host with the given <attacktype>. Godpower attacktype is commonly used for "unresistable" diseases.
Hazard Floor This attribute specifies the attacktypes that this floor uses to damage it's victims. Attacktypes are: physical, fire, cold.. etc. If you want a real tough hazard floor, add more than just one attacktype.
Monster & NPC, Monster (Grimreaper) This number is a bitmask, specifying the monster's attacktypes for melee damage. Attacktypes are: physical, magical, fire, cold.. etc. Strong monsters often have more than just physical attacktype.

When a monster with multiple attacktypes hits an opponent, it will do as much damage as the "best" of it's attacktypes does. So, the more attacktypes, the more dangerous. Attacktypes "magic" and "chaos" are somehow exceptions.

Mover If forced movement is enabled, the mover "freezes" anyone it moves (so they are forced to move along a chain). For players there is no way to escape this forced movement, except being pushed by a second player.
Potion There are two types of special effects for potions: 'life restoration' - restore the player's stats lost by death or draining (this has nothing in common with the restoration spell!) 'improvement' - increase the player's maximum health/mana/grace by a very small amount.
Projectile This number is a bitmask, specifying the projectile's attacktypes. Attacktypes are: physical, magical, fire, cold.. etc. This works identical to melee weapons. Note that shooting weapons cannot have attacktypes.
Rune If there isn't any spell (and <summon monster> is unset), this attribute defines what attacktype to use for direct damage when the rune detonates.
Trap This attribute defines what attacktype to use for direct damage when the trap detonates.
Weapon This number is a bitmask, specifying the weapon's attacktypes. Attacktypes are: physical, magical, fire, cold.. etc. Most artifact weapons have no more than one or two attacktypes. Keep in mind that all weapons can be blessed by the player's deity, thus adding an additional attacktype.

When a player hits a monster with a weapon that has more than one attacktype, then he will do as much damage as the "best" of his attacktypes does. So, the more attacktypes you've got, the better your chance to take advantage of a monster's vulnerabilities. (Btw: Same rule applies for monster vs. player.). Attacktypes "magic" and "chaos" are somehow exceptions.

Definition at line 193 of file object.h.

struct obj* below [read]

Pointer to the object stacked below this one

Definition at line 145 of file object.h.

sint8 body_info[NUM_BODY_LOCATIONS]

Body info as loaded from the file

Definition at line 223 of file object.h.

sint8 body_used[NUM_BODY_LOCATIONS]

Calculated value based on items equipped

Definition at line 224 of file object.h.

How much weight this object contains

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) If a monster has something in the inventory, this value can be set to reflect the slowdown due to the carried weight.

Definition at line 218 of file object.h.

Time left before spell goes off

Use

Type(s) Description
Spell (no description)

Definition at line 253 of file object.h.

struct obj* chosen_skill [read]

The skill chosen to use

Definition at line 237 of file object.h.

Public type information. see doc/Developers/objects

Definition at line 191 of file object.h.

container [read]

Current container being used. I think this is only used by the player right now.

Use

Type(s) Description
Container The container can hold a maximum total weight of the given value in gram. Note that this weight limit is calculated *after* the weight reduction (<reduce weight>) has been applied.
Transport How much this transport can carry.

Definition at line 149 of file object.h.

struct pl* contr [read]

Pointer to the player which control this object

Definition at line 134 of file object.h.

Unique object number for this object

Definition at line 157 of file object.h.

struct obj* current_weapon [read]

Pointer to the weapon currently used

Definition at line 221 of file object.h.

const char* custom_name

Custom name assigned by player

Definition at line 285 of file object.h.

How going up in level effects damage

Definition at line 258 of file object.h.

Parsed dialog information for this object. Valid if FLAG_DIALOG_PARSED is set (but can be NULL).

Definition at line 158 of file object.h.

Means the object is moving that way.

Definition at line 185 of file object.h.

damage values, based on each attacktype.

Definition at line 291 of file object.h.

How long the spell lasts

Use

Type(s) Description
Spell (no description)

Definition at line 254 of file object.h.

how level modifies duration

Definition at line 255 of file object.h.

Elevation of this terrain - used in weather code

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Monster & NPC, Monster (Grimreaper), Mood Floor, Mover, Pedestal, Pit, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Rune, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trap, Trapdoor, Treasure, Trigger Marker, Wall, Wand & Staff, Weak Wall, Weapon The elevation (height above sea level) of this tile. It is used for weather calculations and should be in the range -32000..32000. The elevation of a tile must be set in the bottom-most game object; elevation values for non-bottom-most game objects are ignored by the Crossfire server.

Definition at line 273 of file object.h.

struct obj* enemy [read]

Monster/player to follow even if not closest

Definition at line 232 of file object.h.

struct obj* env [read]

Pointer to the object which is the environment. This is typically the container that the object is in.

Definition at line 151 of file object.h.

needed experience = (calc_exp*expmul) - means some races/classes can need less/more exp to gain levels

Use

Type(s) Description
Skill This is the ratio of experience the players total should increase by when this skill is used. If this is zero, then experience only goes to to the skill. Values higher than 1 are allowed. Note that experience rewarded to the players total is in addition to that given to the skill. Eg, if player should get 500 exp for using a skill, and expmul is 1, the player will get 500 added to that skill as well as 500 to their total.

Definition at line 246 of file object.h.

Object is oriented/facing that way.

Definition at line 186 of file object.h.

Various flags

Definition at line 266 of file object.h.

Sp regen penalty this object has (was last_heal)

Definition at line 214 of file object.h.

struct obj* head [read]

Points to the main object of a large body

Definition at line 154 of file object.h.

The object is hidden, not invisible

Definition at line 238 of file object.h.

struct obj* inv [read]

Pointer to the first object in the inventory

Definition at line 148 of file object.h.

How much longer the object will be invis

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Monster & NPC, Monster (Grimreaper), Mood Floor, Mover, Pedestal, Pit, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Rune, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trap, Trapdoor, Treasure, Trigger Marker, Wall, Wand & Staff, Weak Wall, Weapon Generally makes the object invisible. Depending on the object-type, some can be made visible by the show_invisible spell. If in doubt, test it. Putting an invisible object under the floor always prevents it from being shown.

Definition at line 211 of file object.h.

Power rating of the object

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield, Shooting Weapon, Weapon The <item power> value measures how "powerful" an artifact is. Players will only be able to wear equipment with a certain total amount of <item power>, depending on their own level. This is the only way to prevent low level players to wear "undeserved" equipment (like gifts from other players or cheated items).

It is very important to adjust the <item power> value carefully for every artifact you create! If zero/unset, the CF server will calculate a provisional value at runtime, but this is never going to be an accurate measurement of <item power>.

Definition at line 213 of file object.h.

Fields not explictly known by the loader.

Definition at line 286 of file object.h.

Last sequence used to draw face

Definition at line 269 of file object.h.

How long since we last ate

Use

Type(s) Description
Disease Every time the disease "moves", the player's food is reduced by the value of <food depletion>. For negative values, a -based amount is taken.

Definition at line 207 of file object.h.

As last_sp, except for grace

Use

Type(s) Description
Disease The <attenuation> value reduces the diseases' <infectiousness> every time it infects someone new. This limits how many generations a disease can propagate.

Definition at line 210 of file object.h.

Last healed. Depends on constitution

Use

Type(s) Description
Breastplate Armor This poses a penalty to spell regeneration speed, for wearing the armor. The bigger the spellpoint penalty, the worse.
Inventory Checker <remove match> means remove object if found. Setting this is usually not recommended because inventory checkers are in general invisible. So, unlike for altars/ locked doors, the player won't expect to lose an object when walking over that square. And he doesn't even get a message either.

So, *if* you enable <remove match>, make sure to inform the player what's going on!

Definition at line 208 of file object.h.

As last_heal, but for spell points

Use

Type(s) Description
Altar Trigger If this attribute is enabled, the altar_trigger won't push the connected value by altar reset. Only ONCE by dropping the sacrifice. This is typically used when the altar is connected to a creator, e.g. for selling tickets.

If this attribute is disabled (default), the altar_trigger will push the connected value TWICE per sacrifice: First by dropping sacrifice, second by reset. This mode is typically used for altars being connected to gates, resulting in the gate being opened and closed again.

Breastplate Armor Slowdown penalty reduces the player's walking speed when wearing the armor. Bigger values are worse - zero is best.
Disease If set, the disease imposes a <slowdown penalty> while being infected. The player's speed is reduced by <slowdown penalty> % of normal value.
Inventory Checker Enabled means having that object is a match. Disabled means not having that object is a match.
Mood Floor <mood> is used to determine what will happen to the monster when affected by the mood floor:

<mood> 'furious': Makes all monsters aggressive

<mood> 'angry': As above but pets are unaffected

<mood> 'calm': Makes all monsters unaggressive

<mood> 'sleep': Puts all monsters to sleep

<mood> 'charm': Turns monster into a pet of person who triggers the square. This setting is not enabled for continuous operation, you need to insert a <connection> value!

Weapon The weapon speed determines how often the wielder can swing the weapon during a certain period of time. The lower the faster, <weapon speed> 1 is best (that is lightning- fast). A typical average value is 8. Speed and damage should be kept in reasonable relation.

Definition at line 209 of file object.h.

Level of creature or object

Use

Type(s) Description
Book If this value is set to be greater than zero, the player needs a certain literacy level to succeed reading the book. The book can be read if: mental_level greater <literacy level> - 5. Adding level to a book can be a nice idea, personally I like it when a player needs more than his fighting skills to solve a quest. However, keep the book level at least below 15 because it is quite hard to gain high mental levels.
Creator The created object will be of that level. If zero/unset, the standard level of the archetype is used.
Disease The <plaque level> is proportional to the disease's deadliness. This mainly reflects in the <damage>. It has no effect on most other symptoms. Nevertheless, it is a very important value for all damage-inflicting diseases.
Duplicator The number of items in the target pile will be multiplied by the <multiply factor>. If it is set to zero, all target objects will be destroyed.
Flesh The <flesh level> is not visible to the players and it affects only dragon players. Normally this value reflects the level of the monster from which the flesh item originates. Dragon players always search for flesh of highest level possible, because it bears the best chance to gain high resistances.
Hazard Floor I guess this value is supposed to work similar to monster levels. But in fact, it does not seem to have an effect. Set any non-zero value to be on the safe side.
Holy Altar To re-consecrate an altar, the player's wisdom level must be as high or higher than this value. In that way, some altars can not be re-consecrated, while other altars, like those in dungeons, could be.

Altars located in temples should have at least <reconsecrate level> 120. Some characters might need those altars, they would be very unhappy to see them re-consecrated to another cult.

Horn The casting level of the <spell> determines it's power. For attack spells, level should not be set too high.
Magic Wall The wall will cast it's spells at level <spell level>. "level 1" walls cast spells at minimal strength. "level 100" walls cast deadly spells. Arch default is level 1 - you should always set this value to meet the overall difficulty of your map.
Monster & NPC, Monster (Grimreaper) A monster's <level> is the most important attribute. <level> affects the power of a monster in various ways.
Mover If <move players> is enabled, both players and monsters will be moved. In the arches' default it is disabled - thus ONLY monsters get moved. Remember that "monsters" includes NPCs!

This feature provides you with the possibility to make NPCs literally "come to life". Example: The player is talking with an NPC, speaking a certain keyword. This triggers a magic_ear and activates creators, creating (per default: monster-only) movers under the NPC's feet. The NPC starts "walking" on a predefined route! Note that it's useful to set this NPC immune to everything, preventing the player to push the NPC off his trace.

Potion If the potion contains a spell, the spell is cast at this level. For other potions it should be set at least to 1.
Rod The casting level of the <spell> determines it's power. For attack spells, level should be set to something reasonable.
Rune This value sets the level the rune will cast the spell it contains at, if applicable. A level 99 rune casts a very, very mean spell of whatever. (<rune level> 0 runes won't detonate at all!)

Level Also effects how easily a rune may be found and disarmed, and how much experience the player gets for doing so. Beware: High level runes can be quite a cheap source of experience! So either make them tough, or keep the level low.

Scroll The spell of the scroll will be casted at this level. This value should always be set, at least to 1.
Skill, Spell (no description)
Trap Level effects how easily a trap may be found and disarmed, and how much experience the player gets for doing so. Beware: High level traps can be quite a cheap source of experience! So either make them tough, or keep the level low.
Wand & Staff The <casting level> of the wand determines it's power. An average level for wands in shops is about 10.
Weak Wall The <level> of a weak wall works similar to monster levels. Due to the fact that weak walls cannot attack, the level is much less important though.

Definition at line 202 of file object.h.

const char* lore

Obscure information about this object, to get put into books and the like.

Definition at line 176 of file object.h.

Any magical bonuses to this item

Use

Type(s) Description
Boots <magic bonus> works just like ac, except that it can be improved by "scrolls of Enchant Armour" or reduced by acid. It is less useful than direct armor-class bonus on the boots.

Important: <magic bonus> on boots has no effect if there is no <armor class> set. It only works in combination with <armor class>.

Bracers <magic bonus> works just like ac, except that it can be improved by "scrolls of Enchant Armour" or reduced by acid. It is less useful than direct armor-class bonus on the bracers.
Breastplate Armor <magic bonus> works just like ac, except that it can be improved by "scrolls of Enchant Armour" or reduced by acid. It is less useful than direct armor-class bonus on the armor.
Cloak <magic bonus> works just like ac, except that it can be improved by "scrolls of Enchant Armour" or reduced by acid. It is less useful than direct armor-class bonus on the cloak.

Important: <magic bonus> on cloaks has no effect if there is no <armor class> set. It only works in combination with <armor class>.

Disease <infection range> sets the range at which infection may occur. If positive, the <infection range> is level dependant - If negative, it is not: E.g. "&lt;infection range&gt; -6" means creatures can be infected in six square range, and <plaque level> doesn't modify that.
Girdle <magic bonus> works just like ac, except that it can be improved by "scrolls of Enchant Armour" or reduced by acid. It is less useful than direct armor-class bonus on the helmet.

Important: <magic bonus> on girdles has no effect if there is no <armor class> set. Girdles shouldn't have <armor class>, thus <magic bonus> is pointless here.

Gloves If the gloves provide <armor class>, <magic bonus> will increase it. If the gloves have <weapon class> instead, then <magic bonus> will increase that.
Helmet <magic bonus> works just like ac, except that it can be improved by "scrolls of Enchant Armour" or reduced by acid. It is less useful than direct armor-class bonus on the helmet.

Important: <magic bonus> on helmets has no effect if there is no <armor class> set. It only works in combination with <armor class>. Crowns for instance typically provide no <amour class>.

Projectile Magic bonus increases chance to hit and damage a little bit.
Shield <magic bonus> works just like ac, except that it can be improved by "scrolls of Enchant Armour" or reduced by acid. It is less useful than direct armor-class bonus on the shield.
Shooting Weapon <Magic bonus> improves the quality of the shooting weapon. I'm not sure what exactly is increased - maybe weapon class? However, <magic bonus> seems to have a little bit of positive influence on your chance to hit.
Weapon For a weapon, magic bonus works just like weapon class, except that magic bonus can be improved by the gods or reduced by acid. Hence, it is less useful than direct weapon class value on a weapon.

Definition at line 199 of file object.h.

struct mapdef* map [read]

Pointer to the map in which this object is present

Definition at line 155 of file object.h.

What level to draw this on the map

Definition at line 275 of file object.h.

What materials this object consist of

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Mood Floor, Mover, Pedestal, Pit, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trapdoor, Trigger Marker, Wall, Wand & Staff, Weak Wall, Weapon This bitmask-value informs the player of which material(s) the object consists. Material does also affect how likely the object can be destroyed by hazardous spell-effects.
Special Key For Special Keys, material should always be unset or set to Adamantite. This prevents the key from getting burned or otherwise destroyed.

Definition at line 198 of file object.h.

const char* materialname

Specific material name

Definition at line 197 of file object.h.

struct obj* more [read]

Pointer to the rest of a large body of objects

Definition at line 153 of file object.h.

What movement types explicitly allowed

Use

Type(s) Description
Transport The move type the transport grants, regardless of other objects on this tile.

Definition at line 279 of file object.h.

What movement types this blocks

Use

Type(s) Description
Altar, Altar Trigger, Battleground, Exit, Floor, Floor (Encounter), Hazard Floor, Holy Altar, Magic Wall, Wall If set, the object cannot be passed by players nor monsters.
Door If any movement type is blocked, a player must defeat the door to enter.
Gate For open gates, <blocking passage> should be unset. For closed gates it must be set to "all".
Inventory Checker If set, only players meeting the match criteria can pass through that space. If unset (default), the inventory checker acts like a trigger/button.
Timed Gate For open gates, <blocking movement> should be unset. For closed gates it must be set to "all".

Definition at line 278 of file object.h.

Move types affected moving off this space

Definition at line 281 of file object.h.

Move types affected moving on to this space

Use

Type(s) Description
Director The movement types this director affects.
Exit If set, the player will auto-apply the exit with these movement types. This must be set for the invisible exits for example. If unset, the player has to step onto the exit and press 'a' to get transferred.
Mover Move creatures using these movement types..
Pit Make creatures using these movement types fall into the pit. Movement types other than walking is not the behavior expected from a pit, and it should only be used for map-mechanisms (e.g. for transporting flying monsters). An interesting side-effect: If this flag is enabled, spell effects like fire/snow also make their way through the pit.
Shop Mat If set, the player can enter/leave the shop by using these movement types.
Sign & Magic Mouth If set, the player gets the message when using these movement types on top of the object. "invisible 1" should be set in this case. This is the typical configuration for a "magic_mouth": The player walks through a dungeon and suddenly he gets a message. Use this to create some roleplay atmosphere, and to inform the player about possible dangers or secrets.
Spinner The movement types this spinner affects.

Definition at line 280 of file object.h.

Movement types this slows down

Use

Type(s) Description
Floor, Floor (Encounter), Hazard Floor, Swamp The movement types that are affected by <slow penalty>.

Definition at line 282 of file object.h.

How much this slows down the object

Use

Type(s) Description
Floor, Floor (Encounter), Hazard Floor If <slow movement> is set to a value greater zero, all creatures moving over this spot will be slower than normal.

<slow movement> 1 - rough terrain <slow movement> 2 - very rough terrain ... <slow movement> 7 - spider web (sticky as hell)

Swamp If <slow movement> is set to a value greater zero, all creatures moving over this spot will be slower than normal.

<slow movement> 1 - rough terrain <slow movement> 2 - very rough terrain ... <slow movement> 5 - default for deep swamp

Definition at line 283 of file object.h.

What stage in attack mode

Definition at line 241 of file object.h.

Type of movement this object uses

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield As soon as the player applies a piece of equipment, the player will start using the granted movement types.
Monster & NPC, Monster (Grimreaper) Determines which movement types this monster can use. Flying monsters won't get slowed down in rough terrain and they won't be affected by movers.
Mover Determines which movement types this mover affects. This should always include "walk".
Skill Determines which movement types this skill grants.
Transport The move type the transport uses.

Definition at line 277 of file object.h.

msg

If this is a book/sign/magic mouth/etc

Use

Type(s) Description
Altar, Altar Trigger This text will be displayed to the player in the exact moment when the altar is activated.
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This text describes the item's "story". Every decent artifact should have such a description.
Book This is the text that appears "written" in the book.
Button, Button Trigger This text may describe the item. You can use this message to explain the button's purpose to the player.
Clock This text may describe the item
Container This text may contain a description of the container.
Converter This text may contain a description of the converter.
Disease This text is displayed to the player every time the symptoms strike.
Exit If set, this message will be displayed to the player when he applies the exit. This is quite useful to throw in some "role-play feeling": "As you enter the dark cave you hear the sound of rustling dragonscales...". Well, my English is poor, but you get the point. =)
Flesh This text may describe the item.
Floor, Floor (Encounter), Jewel This text may describe the object.
Handle, Handle Trigger This text may describe the item. You can use this message to explain the handle's purpose to the player.
Horn This text may contain a description of the horn.
Item Transformer This text may contain a description of the item transformer.
Locked Door When a player is trying to open the door without carrying the appropriate key, this text is displayed to the player. This is a good opportunity to place hints about the special key needed to unlock the door.
Magic Ear This text field contains the keyword-matching-syntax. The text should have the following format: "@match &lt;keyword1&gt;|&lt;keyword2&gt;|... ". Any number of keywords from one to infinite is allowed. Make sure they are separated by a '|'.

Examples: "@match yes", "@match gold|treasure". The connected value will be triggered when the player speaks any of the given keywords within a two-square radius. IMPORTANT: Upper/lower case does not make a difference!

Marker, Trigger Marker In the moment when the player gets marked, this text is displayed to him. You should really set a message in any marker you create, because it's the only way for the player to notice what's going on.
Monster & NPC, Monster (Grimreaper) (no description)
Projectile This text may describe the projectile. This could be nice for very special ones.
Rod This text may contain a description of the rod.
Rune When the rune detonates, this text is displayed to the victim. For especially powerful runes, create an appropriate thrilling description. ;)
Shooting Weapon, Weapon This text describes the weapons' "story". Every decent artifact weapon should have such a description.
Sign & Magic Mouth This text will be displayed to the player.
Special Key This will add a description to the object. The player can read this text by clicking on the item in his inventory. Use this message to describe what the key/passport is good for. A player might have 50 different keys on his key-ring. Don't expect players to recall their purpose just by their names.
Spellbook This text may contain a nice description of the spellbook's cover or something.
Trap When the trap detonates, this text is displayed to the victim. For especially powerful or complex traps, create an appropriate and thrilling description. ;)
Wand & Staff This text may contain a description of the wand.

Definition at line 175 of file object.h.

The name of the object, obviously...

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Duplicator, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Money, Monster & NPC, Monster (Grimreaper), Mood Floor, Mover, Pedestal, Pit, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Rune, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trap, Trapdoor, Treasure, Wall, Wand & Staff, Weak Wall, Weapon This is the name of the object, displayed to the player.
Event If set, this field contains options passed to the script.
Marker, Trigger Marker When the player steps onto the marker, all existing forces in the players inventory with a <key string> matching <delete mark> will be removed. If you don't want to remove any marks, leave this text field empty.

Note that the string <delete mark> is set as the name of this marker. So don't be confused, and remember changing the name will take effect on the marker's functionality.

Definition at line 167 of file object.h.

struct obj* next [read]

Pointer to the next object in the free/used list

Definition at line 135 of file object.h.

This field indicates that the object should never be saved even for map swapout. Not handled by the loading or saving code.

Definition at line 288 of file object.h.

How many of the objects

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Creator, Detector, Director, Disease, Door, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Mood Floor, Mover, Pedestal, Pit, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Rune, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trap, Trapdoor, Trigger Marker, Wand & Staff, Weak Wall, Weapon This value determines the number of objects in one stack (for example: 100 gold coins => "number = 100"). You should set this at least to one, for any pickable object - otherwise it won't be mergeable into a stack.

Definition at line 184 of file object.h.

other_arch [read]

Pointer used for various things - mostly used for what this objects turns into or what this object creates

Use

Type(s) Description
Container This is used for a certain kind of... "animation" when opening the container. Stick to the default arches here and you won't get into trouble.
Converter <receive arch> is the name of the archetype to convert into. This field is ignored if the converter has items in inventory. In this case one of the inventory items is duplicated. The duplicated item is randomly chosen from all items present.
Creator This string defines the object that will be created. You can choose any of the existing arches. This field is ignored if the creator has items in inventory. In this case one of the inventory items is duplicated. The duplicated item is randomly chosen from all items present.
Disease If set, the specified arch is created and dropped every time the symptoms strike.

This can be various things: farts, body pieces, eggs ... Even monsters can be created that way. You could also make a disease where some exotic stuff like money/gems is created.

Door This string defines the object that will be created when the door was defeated.
Duplicator Only objects of matching archetype, lying on top of the duplicator will be duplicated, multiplied or removed. All other objects will be ignored.
Holy Altar The altar belongs to the god of the given name. Possible options for <god name> are: Devourers, Lythander, Mostrai, Gaea, Ruggilli, Gnarg, Gorokh, Valriel and Sorig.

If you want to have an unconsecrated altar, set <god name> 0 and eventually <reconsecrate level> 0.

Monster & NPC, Monster (Grimreaper) This only takes effect if <multiply> is enabled. The monster will create a <breed monster> every once in a while. <breed monster> can be set to any valid arch-name of a monster.
Rune This string defines the spell in the rune, if any. <spell arch> is optional, but if present, overrides the <spell> setting. You can choose any of the existing arches.
Spell (no description)

Definition at line 264 of file object.h.

struct obj* owner [read]

Pointer to the object which controls this one. Owner should not be referred to directly - get_owner should be used instead.

Definition at line 228 of file object.h.

What count the owner had (in case owner has been freed)

Definition at line 231 of file object.h.

Definition at line 180 of file object.h.

For debugging: Where it was last inserted

Definition at line 180 of file object.h.

Paths the object is attuned to

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield Click on the <attuned paths> button to select spellpaths. The player will get attuned to the specified spellpaths while wearing this item.
Monster & NPC, Monster (Grimreaper) Click on the <attuned paths> button to select spellpaths. The creature will get attuned to the specified spellpaths.
Weapon Click on the <attuned paths> button to select spellpaths. The player will get attuned to the specified spellpaths while wearing this weapon.

Definition at line 194 of file object.h.

Paths the object is denied access to

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield Click on the <denied paths> button to select spellpaths. The specified spellpaths will be denied to the player while wearing this item.
Monster & NPC, Monster (Grimreaper) Click on the <denied paths> button to select spellpaths. The creature won't be able to cast spells of the specified paths.
Weapon Click on the <denied paths> button to select spellpaths. The specified spellpaths will be denied to the player while wearing this weapon.

Definition at line 196 of file object.h.

Paths the object is repelled from

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield Click on the <repelled paths> button to select spellpaths. The player will get repelled to the specified spellpaths while wearing this item.
Monster & NPC, Monster (Grimreaper) Click on the <repelled paths> button to select spellpaths. The creature will get repelled to the specified spellpaths.
Weapon Click on the <repelled paths> button to select spellpaths. The player will get repelled to the specified spellpaths while wearing this weapon.

Definition at line 195 of file object.h.

Permanent exp

Use

Type(s) Description
Skill <Permanent experience> is the experience the player gained permanently. Even if a player dies multiple times or gets drained, his <experience> will not fall below <permanent experience>.

Definition at line 220 of file object.h.

See crossfire.doc

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Click on the <pick up> button and select which types of objects the creature should try to pick up.

Note also that if <can use armor>, <can use weapon>, <can use ring>... etc are set, then the creature will pick up the matching items even if this is not set here.

Definition at line 212 of file object.h.

struct obj* prev [read]

Pointer to the previous object in the free/used list

Definition at line 136 of file object.h.

Human, goblin, dragon, etc

Use

Type(s) Description
Container If set, the container will hold only certain types of objects. Possible choices for <container class> are: "gold and jewels", "arrows" and "keys".

Unfortunately it is not easy to create new container classes, because items need a matching counterpiece-attribute to the <container class> before they can be put inside a container. This attribute ("race") is set only for the existing container classes.

Disease The disease will only infect creatures of the specified <race>. "&lt;race&gt; *" means every creature can be infected.
Inventory Checker This string specifies the object we are looking for: We have a match if the player does/don't carry an object of archetype <match arch name>.
Monster & NPC, Monster (Grimreaper) Every monster should have a race set to categorize it. The monster's <race> can have different effects: Slaying weapons inflict triple damage against enemy races and holy word kills only enemy races of the god.
Projectile Only shooting weapons with matching <ammunition class> can fire these projectiles. For arrows set "arrows", for crossbow bolts set "crossbow bolts" (big surprise).

In certain cases, the ammunition class is displayed in the game. Hence, when you create a new ammunition class, choose an intuitive name like "missiles", "spirit bolts" - whatever.

You can also make special containers holding these projectiles by setting the <container class> to match your <ammunition class>.

Rune If this is set to the arch name of any monster, together with <spell name> "summon evil monster", the rune will summon a bunch of those on detonation. (dam and attacktype will still be ignored in this case). Runes are even capable of summoning multi-square monsters, given enough space. You'd better test it though.
Shooting Weapon Only projectiles with matching <ammunition class> can be fired with this weapon. For normal bows set "arrows", for normal crossbows set "crossbow bolts".

In certain cases, the ammunition class is displayed in the game. Hence, when you create a new ammunition class, choose an intuitive name like "missiles", "spirit bolts" - whatever.

Weak Wall For weak walls, <race> should always be set to "wall", unless you create something fancy like a building which is in fact meant to be a huge animal. Note that shovels slay walls, so they do triple damage against weak walls.

Definition at line 171 of file object.h.

randomitems [read]

Items to be generated

Use

Type(s) Description
Class Changer This entry determines which initial items the character receives.
Door This entry determines what kind of traps will appear in the door.
Monster & NPC, Monster (Grimreaper) When the monster is killed, items from the treasurelist will drop to the ground. This is a common way to reward players for killing (masses of) monsters.

Note that you can always put items into the monster's inventory. Those will drop-at-kill just like the stuff from the <treasurelist>.

Shop Floor This entry determines what kind of treasure will appear, when <generate goods> is enabled. Look into /crossfire/share/crossfire/treasures for details about existing treasurelists.
Spellbook There are two ways to put spells into a spellbook: 1. Put a spell object in the books inventory. In this case, treasurelist must be set to <none>. 2. Choose a treasurelist which contains spells. In that way, a spell will be chosen randomly from the list.
Treasure This entry determines what kind of treasure will appear. Look into /crossfire/share/crossfire/treasures for details about existing treasurelists.

Definition at line 236 of file object.h.

Range of the spell

Definition at line 256 of file object.h.

How going up in level effects range

Definition at line 257 of file object.h.

Resistance adjustments for attacks

acid resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds acid resistance to the item. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to acid will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds acid resistance to the weapon. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.

blind resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds blinding resistance to the item. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Weapon This adds blinding resistance to the weapon. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.

chaos resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds chaos resistance to the item. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact. Note that chaos is not a stand-alone attacktype. Chaos "contains" a combination of other attacktypes.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Weapon This adds chaos resistance to the weapon. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact. Note that chaos is not a stand-alone attacktype. Chaos "contains" a combination of other attacktypes.

cold resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds fire resistance to the item. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to cold will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds fire resistance to the weapon. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.

confusion resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds confusion resistance to the item. The number is a percent-value in the range 0-100. Confusion resistance is not very effective unless the value comes close to 100 (= perfect immunity).
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to confusion will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds confusion resistance to the weapon. The number is a percent-value in the range 0-100. Confusion resistance is not very effective unless the value comes close to 100 (= perfect immunity).

death resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds death-attack resistance to the item. The number is a percent-value in the range 0-100. Death-attack resistance is little effective unless the value is 100 (= perfect immunity). Generally, resistance to death-attack is not supposed to be available to players!
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Weapon This adds death-attack resistance to the weapon. The number is a percent-value in the range 0-100. Death-attack resistance is little effective unless the value is 100 (= perfect immunity). Generally, resistance to death-attack is not supposed to be available to players!

deplete resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds depletion resistance to the item. The number is a percent-value in the range 0-100. Depletion resistance is little effective unless the value is 100 (= perfect immunity).
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to depletion will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds depletion resistance to the weapon. The number is a percent-value in the range 0-100. Depletion resistance is little effective unless the value is 100 (= perfect immunity).

drain resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds draining resistance to the item. The number is a percent-value in the range 0-100. Draining resistance is little effective unless the value is 100 (= perfect immunity).
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to draining will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds draining resistance to the weapon. The number is a percent-value in the range 0-100. Draining resistance is little effective unless the value is 100 (= perfect immunity).

electricity resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds electricity resistance to the item. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to electricity will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds electricity resistance to the weapon. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.

fear resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds fear resistance to the item. The number is a percent-value in the range 0-100. Resistance to fear is pretty useless.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Weapon This adds fear resistance to the weapon. The number is a percent-value in the range 0-100. Resistance to fear is pretty useless.

fire resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds fire resistance to the item. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to fire will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds fire resistance to the weapon. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.

ghosthit resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds ghosthit resistance to the item. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Weapon This adds ghosthit resistance to the weapon. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.

godpower resistance

Type(s) Description
Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)

holyword resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds holy power resistance to the item. The number is a percent-value in the range 0-100. Holy power is the attacktype that holyword-type spells use to hurt undead creatures. This kind of resistance is only reasonable for undead players (wraith or devourer cult). Generally, resistance to holy word should not be available for players.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Weapon This adds holy power resistance to the weapon. The number is a percent-value in the range 0-100. Holy power is the attacktype that holyword-type spells use to hurt undead creatures. This kind of resistance is only reasonable for undead players (wraith or devourer cult). Generally, resistance to holy word should not be available for players.

magic resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds magic resistance to the item. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to magic will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds magic resistance to the weapon. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.

paralyze resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds paralyze resistance to the item. The number is a percent-value in the range 0-100. Paralyze resistance is little effective unless the value is 100 (= perfect immunity).
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to paralyze will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds paralyze resistance to the weapon. The number is a percent-value in the range 0-100. Paralyze resistance is little effective unless the value is 100 (= perfect immunity).

physical resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds physical resistance to the item (= armor value). The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to physical will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds physical resistance to the weapon (= armor value). The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.

poison resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds poison resistance to the item. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to poison will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds poison resistance to the weapon. The number is a percent-value in the range 0-100. Treat this with CARE. Look at other maps and what they require to do for getting this-and-that artifact.

slow resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds fear resistance to the item. The number is a percent-value in the range 0-100. Resistance to fear is pretty useless.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Weapon This adds fear resistance to the weapon. The number is a percent-value in the range 0-100. Resistance to fear is pretty useless.

turn_undead resistance

Type(s) Description
Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)

weaponmagic resistance

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds weaponmagic resistance to the item. The number is a percent-value in the range 0-100. Weaponmagic resistance generally should not exist on equipment at all. Spells/Monsters doing weaponmagic damage (e.g. comet spell) are not meant to be easily resisted.
Flesh Resistances on flesh items make them more durable against spellcraft of the appropriate kind. It also allows dragon players to eventually gain resistance by eating it. Usually resistance should only be set for flesh items in a monster's inventory.
Inorganic, Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Potion The player's resistance to weaponmagic will rise by this value in percent (range -100 till +100). The effect is only temporary, and it does NOT add on the values from the player's equipment. Cursed potions will make negative resistance.. very nasty in combat!
Weapon This adds weaponmagic resistance to the weapon. The number is a percent-value in the range 0-100. Weaponmagic resistance generally should not exist on equipment at all. Spells/Monsters doing weaponmagic damage (e.g. comet spell) are not meant to be easily resisted.

Definition at line 192 of file object.h.

Monster runs away if it's hp goes below this percentage.

Definition at line 235 of file object.h.

Name of the skill this object uses/grants

Use

Type(s) Description
Skill The <skill name> is used for matchings. When a usable object has an identical <skill name>, players (or monsters) will need this skill to apply/use the object.
Skill Scroll The <skill name> matches the skill object that can be learned from this scroll.
Spell The <skill name> matches the skill which is needed to cast this spell. This should be one out of "sorcery", "pyromancy", "evocation", "summoning" or "praying". If you want to fiddle with these, please take care not to upset the concept and balance of the various skills.
Weapon Matching <skill name> of the skill that is required to use this weapon.

Definition at line 174 of file object.h.

Which race to do double damage to. If this is an exit, this is the filename

Use

Type(s) Description
Altar, Altar Trigger This string specifies the item that must be put on the altar to activate it. It can either be the name of an archetype, or directly the name of an object. Yet, titles are not recognized by altars. Remember to put a note somewhere, telling the player what he is expected to drop on the altar. (Often this is put in the altar's name: E.g. "drop 100 platinums")
Container If <key string> is set, only players with a special key of matching <key string> are able to open the container.
Converter <cost arch> is the name of the archetype the player has to put on the converter, as payment.
Creator The created object will bear the name and title specified in <name of creation>. If nothing is set, the standard name and title of the archetype is used.
Detector <match name> specifies the name of the object we are looking for. Actually it does also check for the <key string> in key-objects, but for this case inventory checkers are often more powerful to use.
Event Specifies the script file name that should be executed. Relative file names are relative to the path name of the map file this even is in. Absolute file names are looked up in the maps base directory.
Exit The exit path defines the map that the player is transferred to. You can enter an absolute path, beginning with '/' (for example "/peterm/FireTemple/fire1"). It can also be a relative path, not beginning with '/' (On the map "/peterm/FireTemple/Fire2" for example I could use the relative path "Fire1"). Use relative paths whenever possible! Note that upper/lower case must always be set correctly. However, please use lower case only. It is well possible to have an exit pointing to the same map that the exit is on. If slaying is not set in an exit, the player will see a message like "the exit is closed".
Inventory Checker This string specifies the object we are looking for: We have a match if the player does/don't carry a key object or a mark with identical <key string>. Note that key objects usually appear as "passports" in this context. A typical example is the city gate mechanism of Scorn.
Item Transformer Contains the verb that is used to construct a message to the player applying the item transformer.
Locked Door The <key string> in the door must be identical with the <key string> in the special key, then the door is unlocked. It is VERY important to set the <key string> to something that is unique among the CF map set.

DON'T EVER USE the default string "set_individual_value".

Marker, Trigger Marker The <key string> can be detected by inventory checkers/detectors. If the player already has a force with that <key string>, there won't be inserted a second one.
Pedestal the <match race> defines the object we're looking for. If <match race> matches the monster's or the player's race, we have a match. Yes, pedestals can detect a player's race! E.g. you could create a place where only fireborns can enter, by setting "slaying unnatural".

If it is set to "player", any player stepping on the pedestal is a match. Very useful if you want to open a gate for players but not for monsters.

Projectile Slaying means the weapon does triple (3x) damage to monsters of the specified race. If <slaying race> matches an arch name, only monsters of that archetype receive triple damage. Triple damage is very effective.
Rune Name of the spell in the rune, if any. <spell name> is optional, but if present, overrides the <spell> setting.
Special Key This string must be identical with the <key string> in the locked door, then it can be unlocked. It can also be used to trigger inventory checkers.
Teleporter The exit path specifies the map that the player is transferred to. <exit path> can be an absolute path, beginning with '/' (for example "/peterm/FireTemple/fire1"). It can also be a relative path, not beginning with '/' (On the map "/peterm/FireTemple/Fire2" for example I could use the relative path "Fire1"). Use relative paths whenever possible! Note that upper/lower case must always be set correctly. However, please use lower case only.

If the <exit path> is set, ONLY players can get teleported. If the <exit path> is unset (empty), anything can get teleported: Players, monsters and items. In this case, the destined map is automatically the same map the teleporter is on.

Weapon Slaying means the weapon does triple (3x) damage to monsters of the specified race. If <slaying race> matches an arch name (e.g. "big_dragon"), only monsters of that archetype are hit with triple damage.

No god blessings are possible for weapons with a race set in this entry (That's because god blessings add triple damage against their own enemy races). Triple damage is very effective.

Definition at line 172 of file object.h.

how to smooth this square around

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Monster & NPC, Monster (Grimreaper), Mood Floor, Mover, Pedestal, Pit, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Rune, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trap, Trapdoor, Treasure, Trigger Marker, Wall, Wand & Staff, Weak Wall, Weapon If <smooth level> is set to a value greater zero, the object will be drawn partially over adjacent squares having a lower <smooth level> value. The value must be between 0 and 255 (inclusive); 0 means "never overlap adjacent squares".

Definition at line 274 of file object.h.

Probability, 0 to 100, of the object emitting a sound.

Definition at line 244 of file object.h.

The overall speed of this object

Use

Type(s) Description
Detector This value defines the time between two detector-checks. If you want the detector to behave almost like pedestals/buttons, set speed rather high, like <detection speed> 1.0.
Disease The <speed> of the disease determines how fast the disease will "move", thus how fast the symptoms strike the host.
Magic Wall The <casting speed> defines the spellcasting speed of the wall. You can fine-tune how long the duration between two casts shall be. If you want to create a wall that can be activated (cast per trigger) via connected lever/button/etc, you must set "speed 0".
Marker The <marking speed> defines how quickly it will mark something standing on the marker. Set this value rather high to make sure the player really gets his mark. I think <marking speed> 1.0 should do fine.
Monster & NPC, Monster (Grimreaper) The <speed> determines how fast a monster will both move and fight. High <speed> makes a monster considerably stronger.
Mover The movement speed value determines how fast a chain of these movers will push a player along (default is -0.2).
Swamp The higher the <drowning speed>, the faster will players and items sink into the swamp. Swamp with very high <drowning speed> can be a nasty and unexpected death-trap. Players should get a warning before such areas.
Teleporter If the <activation speed> is nonzero, the teleporter will automatically be activated in regular time-intervals. Hence, the player can just step on it and gets teleported sooner or later. The duration between two activates depends on the given value. Default in the teleporter arch is <activation speed> 0.1.

VERY IMPORTANT: If you want to have your teleporter activated via button/handle/magic_ear/etc, you must set <activation speed> to zero!

Transport How fast the transport moves.

Definition at line 181 of file object.h.

float speed_left

How much speed is left to spend this round

Definition at line 182 of file object.h.

struct obj* spell [read]

Spell that was being cast

Definition at line 259 of file object.h.

Definition at line 292 of file object.h.

char* spellarg

Definition at line 260 of file object.h.

struct obj* spellitem [read]

Spell ability monster is choosing to use

Definition at line 245 of file object.h.

How the object was last drawn (animation)

Definition at line 200 of file object.h.

Str, Con, Dex, etc

Definition at line 219 of file object.h.

Subtype of object

Use

Type(s) Description
Event The event type determines the trigger condition.
Skill The <skill type> defines the base functionality of the skill. Skill types are hard-coded in the Crossfire server. It isn't hard to create new skill types, but it requires a bit of server-coding.
Spell The <spell type> defines the basic type of spell. Some of these types are of a more generic nature than others.

Definition at line 190 of file object.h.

Ticks between temporary animation-frames

Definition at line 271 of file object.h.

An index into the temporary animation array

Definition at line 270 of file object.h.

Last sequence used to draw temporary animation face

Definition at line 272 of file object.h.

Of foo, etc

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Creator, Detector, Director, Disease, Door, Duplicator, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Monster & NPC, Monster (Grimreaper), Mood Floor, Mover, Pedestal, Pit, Poison Food, Potion, Power Crystal, Projectile, Ring, Savebed, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trapdoor, Trigger Marker, Wand & Staff, Weak Wall, Weapon This is the object's title. Once an object is identified the title is attached to the name. Typical titles are "of Mostrai", "of xray vision" etc.
Event The plugin name specifies the plugin that should execute the script file. Almost all map makers use the plugin 'Python'.

Definition at line 170 of file object.h.

PLAYER, BULLET, etc. See define.h

Definition at line 189 of file object.h.

How much money it is worth (or contains)

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Creator, Detector, Director, Disease, Door, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Mood Floor, Mover, Pedestal, Pit, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trapdoor, Trigger Marker, Wand & Staff, Weak Wall, Weapon Adds a certain value to the object: It will be worth that many times the default value from it's archetype (E.g. "value = 3" means three times worth the default value). Value for buying/selling will be further modified by various factors. Hence, testing values in-game is usually inevitable.
Monster (Grimreaper) The object vanishes after this number of draining attacks.

Definition at line 201 of file object.h.

Type of weapon

Use

Type(s) Description
Weapon The <weapon type> characterizes the weapon's type of physical attack. It could best be considered a "sub-classification" of the physical attacktype. For now, this is only used for attack messages!

You should always set this correctly when creating new weapons for your maps.

Definition at line 222 of file object.h.

Attributes of the object

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Monster & NPC, Monster (Grimreaper), Mood Floor, Mover, Pedestal, Pit, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trigger Marker, Wall, Wand & Staff, Weak Wall, Weapon This value defines the object's weight in grams (1000g is 1kg). Objects with zero weight are not pickable for players. Still, set the "non-pickable"-flag for explicitly non-pickable objects (hey, this is opensource.. you never know ;) ).
Button, Button Trigger The button is pressed (triggered), as soon as <press weigh> gram are placed on top of it.
Trapdoor This value defines how much weight the trapdoor can hold. Once items or creatures are gathered on the trapdoor, with a total weight surpassing this value, then the trapdoor will open and things start falling through.

Definition at line 216 of file object.h.

Weight-limit of object

Definition at line 217 of file object.h.

See crossfire.doc and What monsters apply

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) This entry defines which kinds of environment actions the creature is able to perform.

Definition at line 243 of file object.h.

Definition at line 179 of file object.h.

Position in the map for this object

Definition at line 179 of file object.h.


The documentation for this struct was generated from the following files:

Generated on Thu Mar 25 23:28:24 2010 for Crossfire Server, Branch 1.12 by  doxygen 1.5.8