Crossfire Server, Trunk
object Struct Reference

#include <object.h>

+ Collaboration diagram for object:

Data Fields

objectabove
 
objectactive_next
 
objectactive_prev
 
uint8_t anim_speed
 
sstring anim_suffix
 
const Animationsanimation
 
struct archetypearch
 
sstring artifact
 
uint16_t attack_movement
 
objectattacked_by
 
tag_t attacked_by_count
 
uint32_t attacktype
 
objectbelow
 
int8_t body_info [NUM_BODY_LOCATIONS]
 
int8_t body_used [NUM_BODY_LOCATIONS]
 
int32_t carrying
 
int16_t casting_time
 
objectchosen_skill
 
uint16_t client_type
 
objectcontainer
 
struct playercontr
 
tag_t count
 
objectcurrent_weapon
 
uint8_t dam_modifier
 
struct_dialog_informationdialog_information
 
int8_t direction
 
int16_t duration
 
uint8_t duration_modifier
 
int elevation
 
objectenemy
 
objectenv
 
uint64_t event_bitmask
 
double expmul
 
const Faceface
 
int8_t facing
 
ob_flags flags
 
int8_t gen_sp_armour
 
int8_t glow_radius
 
objecthead
 
uint8_t hide
 
objectinv
 
int16_t invisible
 
int8_t item_power
 
key_valuekey_values
 
uint8_t last_anim
 
int32_t last_eat
 
int16_t last_grace
 
int32_t last_heal
 
int32_t last_sp
 
int16_t level
 
int light_cached
 
uint32_t light_cached_time
 
sstring lore
 
int8_t magic
 
struct mapstructmap
 
uint8_t map_layer
 
uint16_t material
 
sstring materialname
 
objectmore
 
MoveType move_allow
 
MoveType move_block
 
MoveType move_off
 
MoveType move_on
 
MoveType move_slow
 
float move_slow_penalty
 
int32_t move_status
 
MoveType move_type
 
sstring msg
 
sstring name
 
sstring name_pl
 
objectnext
 
uint32_t nrof
 
struct archetypeother_arch
 
objectowner
 
tag_t ownercount
 
int16_t ox
 
int16_t oy
 
uint32_t path_attuned
 
uint32_t path_denied
 
uint32_t path_repelled
 
uint8_t pick_up
 
objectprev
 
sstring race
 
struct treasurelistrandomitems
 
int8_t range
 
uint8_t range_modifier
 
int16_t resist [NROFATTACKS]
 
uint8_t run_away
 
sstring skill
 
sstring slaying
 
uint8_t smoothlevel
 
uint8_t sound_chance
 
float speed
 
float speed_left
 
objectspell
 
tag_tspell_tags
 
char * spellarg
 
objectspellitem
 
uint8_t state
 
living stats
 
uint8_t subtype
 
uint8_t temp_anim_speed
 
const Animationstemp_animation
 
sstring title
 
int64_t total_exp
 
uint8_t type
 
int32_t value
 
float weapon_speed
 
float weapon_speed_left
 
uint32_t weapontype
 
int32_t weight
 
int32_t weight_limit
 
uint8_t will_apply
 
int16_t x
 
int16_t y
 

Detailed Description

Main Crossfire structure, one ingame object.

Note that the ordering of this structure is sort of relevent - object_copy() 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 282 of file object.h.

Field Documentation

◆ above

object* object::above

Pointer to the object stacked above this one

Definition at line 296 of file object.h.

Referenced by deep_swamp_type_process(), do_mood_floor(), eventListener(), object_remove(), reverse_ob_inv(), shop_inventory_type_apply(), START_TEST(), and trapdoor_type_move_on().

◆ active_next

object* object::active_next

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 287 of file object.h.

Referenced by process_events().

◆ active_prev

object* object::active_prev

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 291 of file object.h.

Referenced by process_events().

◆ anim_speed

uint8_t object::anim_speed

Ticks between animation-frames

Definition at line 429 of file object.h.

Referenced by add_abilities(), add_object_to_socklist(), animate_weapon(), and place_fountain_with_specials().

◆ anim_suffix

object::anim_suffix

Used to determine combined animations

Use

Type(s) Description
Builder, Building material, Weapon If set, will apply a compound animation to the player or monster when attacking with this weapon.
Class Changer If set, the animation of the player being changed will be set to the animation with name <race_animation_suffix>, if it exists.
Skill If set, will apply a compound animation to the player or monster using this skill.
Spell If set, will apply a compound animation to the player or monster casting this spell.

Definition at line 324 of file object.h.

Referenced by apply_changes_to_player(), cast_spell(), do_skill(), fire_bow(), get_ob_diff(), and object_copy_no_speed().

◆ animation

◆ arch

◆ artifact

◆ attack_movement

object::attack_movement

What kind of attack movement

Use

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

Specifies how the NPC or Monster moves: default - Move toward a player. DISTATT - Move toward a player if far, but maintain some space, attack from a distance - good for missile users only. RUNATT - Run but attack if player catches up to object. HITRUN - Run to then hit player then run away cyclicly. WAITATT - Wait for player to approach then hit, move if hit. RUSH - Rush toward player blindly, similiar to dumb monster. ALLRUN - Always run, never attack good for sim. of weak player. DISTHIT - Attack from a distance if hit as recommended by Frank. WAIT2 - Monster does not try to move towards player if far. Maintains comfortable distance.

The second setting specifies the behavior when there is no enemy: default - Stand still. PETMOVE - The monster follows the player until it is called off and will try to attack whatever the player is attacking. CIRCLE1 - The monster will move in a circle until it is attacked, or until it finds an enemy. This is good for non-aggressive monsters and NPC. CIRCLE2 - Same as CIRCLE1 but a larger circle is used. PACEH - The monster will pace back and forth until attacked. This is HORIZONTAL movement. PACEH2 - The monster will pace as above but the length of the pace area is longer and the monster stops before changing directions. This is HORIZONTAL movement. RANDO - The monster will go in a random direction until it is stopped by an obstacle, then it chooses another direction. RANDO2 - Constantly move in a different random direction. PACEV - The monster will pace back and forth until attacked. This is VERTICAL movement. PACEV2 - The monster will pace as above but the length of the pace area is longer and the monster stops before</td> </tr>

Definition at line 401 of file object.h.

Referenced by get_ob_diff(), monster_compute_path(), mood_change(), pets_get_enemy(), pets_summon_object(), and polymorph_living().

◆ attacked_by

object* object::attacked_by

This object start to attack us! only player & monster

Definition at line 392 of file object.h.

Referenced by monster_move(), and pets_get_enemy().

◆ attacked_by_count

tag_t object::attacked_by_count

The tag of attacker, so we can be sure

Definition at line 393 of file object.h.

Referenced by monster_move(), and pets_get_enemy().

◆ attacktype

object::attacktype

Bitmask of attacks this object does

Use

Type(s) Description
Disease The disease will attack the host with the given <attack type>. Godpower attack type is commonly used for "unresistable" diseases.
Hazard Floor This attribute specifies the attack types that this floor uses to damage it's victims. Attack types are: physical, fire, cold, etc. If you want a real tough hazard floor, add more than just one attack type.
Monster & NPC, Monster (Grimreaper)

This number is a bitmask, specifying the monster's attack types for melee damage. Attack types are: physical, magical, fire, cold, etc. Strong monsters often have more than just physical attack type.

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

Mover If forced movement is enabled, the mover "freezes" anyone it moves (so they can't step off the mover before it activates). 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 attack types. Attack types are: physical, magical, fire, cold, etc. This works identical to melee weapons. Note that shooting weapons cannot have attack types.
Rune If there isn't any spell (and <summon monster> is unset), this attribute defines what attack type to use for direct damage when the rune detonates.
Trap This attribute defines what attack type to use for direct damage when the trap detonates.
Weapon

This number is a bitmask, specifying the weapon's attack types. Attack types are: physical, magical, fire, cold, etc. Most artifact weapons have no more than one or two attack types. Keep in mind that all weapons can be blessed by the player's deity, thus adding an additional attack type.

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

Definition at line 352 of file object.h.

Referenced by add_abilities(), cast_bless(), cast_change_ability(), cast_cone(), cast_destruction(), cast_heal(), cast_light(), cast_smite_spell(), counterspell(), create_aura(), create_bomb(), do_symptoms(), dragon_ability_gain(), dump_gods(), eat_special_food(), enter_exit(), examine_monster(), fire_arch_from_position(), fire_bolt(), fire_bow(), fix_flesh_item(), get_ob_diff(), god_enchants_weapon(), lightable_type_apply(), magic_wall(), main(), mood_change(), move_aura(), move_symptom(), pets_summon_golem(), player_mover_type_move_on(), potion_type_apply(), spell_effect_type_move_on(), tailor_god_spell(), and trap_adjust().

◆ below

object* object::below

Pointer to the object stacked below this one

Definition at line 295 of file object.h.

Referenced by esrv_draw_look(), knowledge_alchemy_attempt(), object_insert_in_map(), reverse_ob_inv(), runapplyobject(), runpickup(), and START_TEST().

◆ body_info

int8_t object::body_info[NUM_BODY_LOCATIONS]

Body info as loaded from the file

Definition at line 382 of file object.h.

Referenced by apply_can_apply_object(), get_ob_diff(), and monster_can_pick().

◆ body_used

int8_t object::body_used[NUM_BODY_LOCATIONS]

Calculated value based on items equipped

Definition at line 383 of file object.h.

◆ carrying

object::carrying

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 377 of file object.h.

Referenced by converter_type_apply(), get_ob_diff(), monster_check_pickup(), sack_can_hold(), START_TEST(), transport_can_hold(), and trapdoor_type_move_on().

◆ casting_time

object::casting_time

Time left before spell goes off

Use

Type(s) Description
Spell If the server uses spell casting times, this is the base number of ticks required for casting this spell.

Definition at line 414 of file object.h.

Referenced by append_spell(), and cast_spell().

◆ chosen_skill

object* object::chosen_skill

The skill chosen to use

Definition at line 396 of file object.h.

Referenced by kill_object(), and monster_use_skill().

◆ client_type

uint16_t object::client_type

Public type information. see doc/Developers/objects

Definition at line 350 of file object.h.

Referenced by add_object_to_socklist(), and get_ob_diff().

◆ container

object::container

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 299 of file object.h.

Referenced by runapply(), and START_TEST().

◆ contr

◆ count

◆ current_weapon

object* object::current_weapon

Pointer to the weapon currently used

Definition at line 380 of file object.h.

Referenced by kill_object(), and lightable_type_apply().

◆ dam_modifier

uint8_t object::dam_modifier

How going up in level affects damage

Definition at line 419 of file object.h.

Referenced by get_ob_diff(), potion_type_apply(), reportSummon(), and SP_level_dam_adjust().

◆ dialog_information

struct_dialog_information* object::dialog_information

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

Definition at line 308 of file object.h.

◆ direction

object::direction

Means the object is moving that way.

Use

Type(s) Description
Magic Wall The magic wall will always cast its spells in the specified <direction>. A magic wall with direction set to <none> will always fire in a random direction.
Rune If set, the rune will cast its containing spell (if any) in this <direction>. If a direction is set, the rune will not hit the space it is located on.

Definition at line 344 of file object.h.

Referenced by do_throw(), fire_bow(), forklightning(), get_ob_diff(), monster_use_scroll(), spring_trap(), turn_one_transport(), turn_transport(), and write_rune().

◆ duration

object::duration

◆ duration_modifier

uint8_t object::duration_modifier

how level modifies duration

Definition at line 416 of file object.h.

Referenced by get_ob_diff(), reportSummon(), and SP_level_duration_adjust().

◆ elevation

int object::elevation

Definition at line 450 of file object.h.

Referenced by get_ob_diff().

◆ enemy

object* object::enemy

Monster/player to follow even if not closest

Definition at line 391 of file object.h.

Referenced by monster_check_enemy(), move_player_attack(), pets_move(), and scare_creature().

◆ env

◆ event_bitmask

uint64_t object::event_bitmask

Bitmask of events this object has a handler for, see events.h

Definition at line 447 of file object.h.

Referenced by object_copy_no_speed().

◆ expmul

object::expmul

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 407 of file object.h.

Referenced by add_player_exp(), get_ob_diff(), and START_TEST().

◆ face

object::face

Face with colors

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Drink, 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, Player, Player Changer, 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 image-name defines what image is displayed for this object in-game.

Definition at line 341 of file object.h.

Referenced by add_abilities(), add_face_layer(), add_object_to_socklist(), adjust_sign_msg(), animate_weapon(), append_spell(), apply_changes_to_player(), ArchetypeComboBox::ArchetypeComboBox(), artifact_get_face(), ArchetypeWrapper::displayIcon(), RecipeWrapper::displayIcon(), TreasureWrapper::displayIcon(), do_each_skill(), dragon_ability_gain(), dragon_focus_type_apply(), drain_wand_charge(), ObjectWrapper::face(), get_ob_diff(), isValidArchFlesh(), knowledge_god_face(), knowledge_monster_face(), ArchetypeLoader::load(), lock_and_hide_doors(), main(), monster_move(), place_fountain_with_specials(), set_object_face_other(), transport_type_apply(), trap_show(), ArtifactWrapper::uses(), ArchetypeWrapper::uses(), and write_rune().

◆ facing

int8_t object::facing

Object is oriented/facing that way.

Definition at line 345 of file object.h.

Referenced by apply_anim_suffix(), monster_use_scroll(), potion_type_apply(), scroll_type_apply(), turn_one_transport(), and turn_transport().

◆ flags

ob_flags object::flags

Various flags

Definition at line 427 of file object.h.

Referenced by apply_builder_window(), cast_detection(), compare_flags(), and fix_walls().

◆ gen_sp_armour

int8_t object::gen_sp_armour

Sp regen penalty this object has (was last_heal)

Definition at line 373 of file object.h.

Referenced by add_abilities(), and get_ob_diff().

◆ glow_radius

◆ head

object* object::head

Points to the main object of a large body

Definition at line 304 of file object.h.

Referenced by add_monster(), apply_container(), ArchetypeLoader::load(), monster_check_apply_all(), and update_button().

◆ hide

uint8_t object::hide

The object is hidden, not invisible

Definition at line 397 of file object.h.

Referenced by monster_can_detect_enemy(), and monster_can_see_enemy().

◆ inv

◆ invisible

◆ item_power

object::item_power

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 372 of file object.h.

Referenced by add_abilities(), get_ob_diff(), god_enchants_weapon(), improve_armour(), improve_weapon(), and improve_weapon_magic().

◆ key_values

key_value* object::key_values

Fields not explictly known by the loader.

Definition at line 444 of file object.h.

Referenced by add_abilities(), compare_ob_value_lists_one(), and object_copy_no_speed().

◆ last_anim

uint8_t object::last_anim

Last sequence used to draw face

Definition at line 430 of file object.h.

Referenced by animate_weapon(), apply_anim_suffix(), and cast_detection().

◆ last_eat

object::last_eat

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 366 of file object.h.

Referenced by apply_sign(), become_follower(), cast_cause_disease(), do_symptoms(), dragon_eat_flesh(), dragon_level_gain(), dump_gods(), get_ob_diff(), improve_weapon(), improve_weapon_stat(), and lighter_type_apply().

◆ last_grace

object::last_grace

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 369 of file object.h.

Referenced by become_follower(), cast_curse(), cast_heal(), dump_gods(), get_ob_diff(), and infect_object().

◆ last_heal

object::last_heal

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 367 of file object.h.

Referenced by become_follower(), cast_raise_dead_spell(), check_inv(), dump_gods(), get_ob_diff(), and grant_immunity().

◆ last_sp

object::last_sp

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 368 of file object.h.

Referenced by add_abilities(), become_follower(), cast_cause_disease(), cast_heal(), check_inv(), do_symptoms(), do_throw(), dump_gods(), and get_ob_diff().

◆ level

object::level

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 from pushing the NPC off the route.

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 (no description)
Spell The level, without taking into account spellpath attenuation, required to cast this spell.
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.
Treasure The maximum level of the generated item. Higher levels are better, but the specific behavior of <level> depends on the type of the item being generated. If zero/unset, the map difficulty will instead be used. (Example for comparison: Shop floors generate treasure of <quality level> 5 per default).
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 361 of file object.h.

Referenced by add_abilities(), add_book_to_list(), add_monster(), add_player_exp(), append_spell(), attempt_do_alchemy(), attempt_hide(), attempt_pick_lock(), attempt_steal(), become_follower(), book_type_apply(), calc_alch_danger(), calc_skill_exp(), cast_cause_disease(), cast_cone(), cast_consecrate(), cast_smite_spell(), cast_spell(), cast_wonder(), caster_level(), change_book(), common_trap_type_move_on(), compute_price_variation_with_bargaining(), cone_drop(), counterspell(), create_aura(), cure_disease(), detect_curse_on_item(), detect_magic_on_item(), do_harvest(), do_hidden_move(), do_skill_ident(), do_spellpath_msg(), do_symptoms(), do_throw(), dragon_eat_flesh(), dragon_level_gain(), dump_gods(), examine_monster(), find_skill_by_name(), fire_bow(), fix_flesh_item(), fix_generated_item(), fix_object(), fix_player(), get_ob_diff(), give_skill_by_name(), god_intervention(), grant_immunity(), hide(), hit_with_one_attacktype(), identify_object_with_skill(), improve_weapon(), improve_weapon_magic(), infect_object(), jump(), kill_object(), meditate(), min_casting_level(), monster_can_detect_enemy(), monsterFight(), monsterTable(), mood_change(), move_creator(), pets_summon_object(), place_chest(), player_mover_type_move_on(), potion_type_apply(), pray_at_altar(), price_approx(), push_ob(), recharge(), recipe_chance(), reflwall(), reportSummon(), rod_adjust(), scroll_type_apply(), singing(), SP_level_spellpoint_cost(), spell_failure(), spellbook_type_apply(), START_TEST(), stringbuffer_append_spelldesc(), tailor_readable_ob(), trap_adjust(), trap_disarm(), trap_see(), treasure_type_apply(), try_leave_cult(), use_oratory(), write_rune(), and write_scroll().

◆ light_cached

int object::light_cached

Definition at line 454 of file object.h.

◆ light_cached_time

uint32_t object::light_cached_time

Computing whether or not an item is in the light is very expensive, so cache it.

Definition at line 453 of file object.h.

◆ lore

sstring object::lore

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

Definition at line 332 of file object.h.

Referenced by get_ob_diff(), main(), mon_desc(), and object_copy_no_speed().

◆ magic

object::magic

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 358 of file object.h.

Referenced by alchemy_failure_effect(), animate_weapon(), attempt_do_alchemy(), calc_alch_danger(), cast_cause_disease(), cast_create_missile(), check_infection(), do_throw(), fire_bow(), generate_artifact(), get_ob_diff(), improve_armour(), improve_weapon(), improve_weapon_magic(), and recipe_chance().

◆ map

struct mapstruct* object::map

Pointer to the map in which this object is present

Definition at line 305 of file object.h.

Referenced by add_object_to_socklist(), adj_attackroll(), apply_container(), armour_improver_type_apply(), cast_cause_disease(), cast_heal(), cast_smite_spell(), check_infection(), command_reset(), convert_item(), converter_type_apply(), converter_type_move_on(), do_follow(), do_goto(), do_item_conversion(), do_mood_floor(), do_throw(), enter_exit(), enter_fixed_template_map(), enter_random_map(), enter_random_template_map(), enter_unique_map(), find_by_name(), gate_type_process(), generate_monster(), generate_monster_arch(), generate_monster_inv(), get_button_links(), get_button_value(), get_rangevector(), get_rangevector_from_mapcoord(), hit_with_arrow(), identify_object_with_skill(), infect_object(), is_legal_2ways_exit(), monster_can_detect_enemy(), monster_can_see_enemy(), monster_compute_path(), monster_move(), monster_use_bow(), monsterFight(), move_aura(), move_creator(), move_ob(), move_player_attack(), move_teleporter(), object_find_multi_free_spot_around(), object_find_multi_free_spot_within_radius(), object_free(), object_insert_in_map(), on_same_map(), path_to_player(), pets_follow_owner(), pets_get_enemy(), pets_move(), play_sound_map(), play_sound_player_only(), potion_type_apply(), push_ob(), put_object_in_sack(), put_treasure(), remove_adjacent_doors(), retrofit_joined_wall(), runghosted(), runmessage(), runtrigger(), shop_inventory_type_apply(), START_TEST(), teleport(), test_stand_in_light(), transport_type_apply(), trap_disarm(), treasure_type_apply(), turn_one_transport(), and weapon_improver_type_apply().

◆ map_layer

uint8_t object::map_layer

What level to draw this on the map

Definition at line 434 of file object.h.

Referenced by cast_detection(), and get_ob_diff().

◆ material

object::material

What materials this object consist of

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Drink, 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, Player, Player Changer, 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 357 of file object.h.

Referenced by add_abilities(), do_throw(), get_ob_diff(), and place_fountain_with_specials().

◆ materialname

sstring object::materialname

Specific material name

Definition at line 356 of file object.h.

Referenced by add_abilities(), get_ob_diff(), object_copy_no_speed(), place_fountain_with_specials(), and transmute_materialname().

◆ more

◆ move_allow

object::move_allow

What movement types explicitly allowed

Use

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

Definition at line 438 of file object.h.

Referenced by cast_detection(), get_ob_diff(), and make_map_walls().

◆ move_block

object::move_block

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 437 of file object.h.

Referenced by cast_detection(), do_symptoms(), gate_type_process(), get_ob_diff(), grant_immunity(), infect_object(), magic_wall(), make_map_walls(), place_exits(), and retrofit_joined_wall().

◆ move_off

MoveType object::move_off

Move types affected moving off this space

Definition at line 440 of file object.h.

Referenced by apply_container(), get_ob_diff(), and put_object_in_sack().

◆ move_on

object::move_on

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 When a monster steps onto the mover, it must use one of these movement types for it to be "frozen" for a period of time. By default, this is <walk,fly_low>. You should set this to be the same as the movement type, otherwise monsters might get "frozen", but not actually moved. Be careful if you set it to <all>, since thrown or fired objects (like arrows) can also be frozen (but can't be moved). This is probably a bug.
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 439 of file object.h.

Referenced by do_throw(), fire_bow(), get_ob_diff(), and trapdoor_type_move_on().

◆ move_slow

object::move_slow

Movement types this slows down

Use

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

Definition at line 441 of file object.h.

Referenced by do_exit_map(), and get_ob_diff().

◆ move_slow_penalty

object::move_slow_penalty

How much this slows down the object

Use

Type(s) Description
Floor, Floor (Encounter)

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)
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 442 of file object.h.

Referenced by deep_swamp_type_move_on(), and get_ob_diff().

◆ move_status

int32_t object::move_status

What stage in attack mode

Definition at line 400 of file object.h.

Referenced by get_ob_diff().

◆ move_type

object::move_type

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 When a monster steps onto the mover, it must use one of these movement types for it to be moved. By default, this is "walk", so flying monsters (and players!) won't be affected. It's probably best to change this to <walk,fly_low> if you want things to not bypass it just by flying.
Skill Determines which movement types this skill grants.
Transport The move type the transport uses.

Definition at line 436 of file object.h.

Referenced by add_abilities(), adj_attackroll(), animate_weapon(), cast_change_ability(), cast_cone(), cast_detection(), change_abil(), check_trigger(), deep_swamp_type_process(), do_throw(), eat_special_food(), fire_bow(), get_ob_diff(), monster_compute_path(), ob_blocked(), trapdoor_type_move_on(), update_button(), and update_transport_block().

◆ msg

object::msg

If this is a book/sign/magic mouth/etc. Modify with object_set_msg() to preserve invariants.

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 dragon scales...". 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)

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 monster or NPC will respond when the player speaks any of the given keywords within a two-square radius. IMPORTANT: Upper/lower case does not make a difference!

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 330 of file object.h.

Referenced by add_abilities(), add_book_to_list(), add_exit_to_item(), adjust_sign_msg(), append_spell(), apply_sign(), artifact_describe(), artifact_msg(), change_book(), describe_god(), do_each_skill(), do_symptoms(), dump_gods(), enter_exit(), enter_random_map(), enter_random_template_map(), esrv_add_spells(), examine_fluff(), exit_type_apply(), exit_type_move_on(), find_or_create_connection_for_map(), find_title(), free_arch(), free_artifact(), get_ob_diff(), is_suitable_exit(), move_symptom(), object_copy_no_speed(), player_attack_door(), shop_mat_type_move_on(), spellbook_type_apply(), and spring_trap().

◆ name

object::name

The name of the object, obviously...

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Drink, 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, Player, Player Changer, 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 319 of file object.h.

Referenced by add_abilities(), add_book_to_list(), add_god_to_list(), add_monster(), add_object_to_socklist(), add_one_item(), adjust_sign_msg(), alchemy_failure_effect(), altar_type_move_on(), animate_one(), animate_weapon(), append_spell(), apply_container(), ArchetypeComboBox::ArchetypeComboBox(), artifact_describe(), attack_hth(), attack_message(), attempt_do_alchemy(), attempt_recipe(), become_follower(), cast_bless(), cast_cause_disease(), cast_change_ability(), cast_consecrate(), cast_create_town_portal(), cast_curse(), cast_detection(), cast_dust(), cast_raise_dead_spell(), cast_smite_spell(), cast_spell(), cast_wonder(), change_book(), check_heal_and_mana(), check_hp(), check_spell_expiry(), choose_cult_monster(), command_cast_spell(), command_follow(), command_forget_spell(), command_stack_list(), command_unarmed_skill(), command_use(), common_pre_ob_move_on(), ArtifactPanel::computeMadeViaAlchemy(), cost_approx_str(), cost_string_from_value(), create_aura(), deep_swamp_type_move_on(), deep_swamp_type_process(), describe_god(), determine_god(), ArtifactWrapper::displayName(), TreasureWrapper::displayName(), do_execute_event(), do_goto(), do_harvest(), do_item_conversion(), do_learn_spell(), do_skill_attack(), do_spellpath_msg(), do_symptoms(), do_throw(), dragon_eat_flesh(), dump_gods(), eat_common(), enter_exit(), enter_fixed_template_map(), enter_unique_map(), esrv_add_spells(), find_symptom(), fire_arch_from_position(), fire_bow(), fix_flesh_item(), follower_remove_given_items(), food_type_apply(), free_arch(), free_artifact(), generate_artifact(), generate_monster(), generate_monster_arch(), generate_monster_inv(), get_ob_diff(), god_enchants_weapon(), god_examines_item(), god_examines_priest(), god_gives_present(), god_info_msg(), god_intervention(), grant_immunity(), infect_object(), is_defined_recipe(), is_legal_2ways_exit(), keyplace(), kill_object(), knowledge_add_probe_monster(), knowledge_give(), knowledge_monster_detail(), knowledge_monster_summary(), lamp_type_apply(), learn_skill(), lightable_type_apply(), lighter_type_apply(), ArtifactLoader::load(), magic_wall(), main(), make_formula_book(), matches_sacrifice(), mon_desc(), monster_cast_spell(), monster_move(), monster_use_range(), monster_use_skill(), monsterFight(), monsterTable(), move_creator(), move_symptom(), msgfile_msg(), new_text_name(), object_copy_no_speed(), object_set_enemy(), object_split(), CREMainWindow::onReportSummon(), pay_from_container(), perceive_self(), pets_summon_golem(), pets_summon_object(), pick_up(), place_fountain_with_specials(), play_sound_player_only(), polymorph_item(), potion_type_apply(), pray_at_altar(), push_ob(), real_money_value(), recipe_find_ingredient_cost(), remove_special_prayers(), scroll_type_apply(), skill_ident(), sort_archetypes(), spellbook_type_apply(), START_TEST(), tailor_god_spell(), teleport(), town_portal_destroy_existing(), town_portal_find_force(), transport_type_apply(), trap_disarm(), trap_see(), trigger_connected(), unique_book(), update_buttons(), verify_player(), write_rune(), and write_scroll().

◆ name_pl

◆ next

object* object::next

Pointer to the next object in the free/used list

Definition at line 285 of file object.h.

Referenced by expand_objects(), free_artifact(), and init_objects().

◆ nrof

object::nrof

Number of objects. Consider accessing with NROF() macro.

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Creator, Detector, Director, Disease, Door, Drink, 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, Player, Player Changer, 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 342 of file object.h.

Referenced by add_abilities(), add_object_to_socklist(), add_one_item(), add_value(), animate_weapon(), apply_container(), cast_create_food(), cast_create_missile(), check_altar_sacrifice(), command_create(), command_use(), fire_bow(), get_ob_diff(), improve_armour(), knowledge_alchemy_attempt(), lamp_type_apply(), lighter_type_apply(), object_split(), pay_from_container(), polymorph_item(), put_object_in_sack(), real_money_value(), remove_value(), START_TEST(), write_note(), and write_scroll().

◆ other_arch

object::other_arch

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 For spells creating or launching things, the archetype to use.

Definition at line 425 of file object.h.

Referenced by add_abilities(), animate_weapon(), cast_bless(), cast_cause_disease(), cast_change_ability(), cast_cone(), cast_curse(), cast_destruction(), cast_detection(), cast_heal(), cast_light(), cast_polymorph(), cast_smite_spell(), command_create(), create_aura(), create_bomb(), do_item_conversion(), do_symptoms(), dump_abilities(), dump_gods(), eat_special_food(), fire_arch_from_position(), fire_bolt(), fire_swarm(), generate_monster_arch(), get_ob_diff(), magic_wall(), mood_change(), move_aura(), move_creator(), move_symptom(), CREMainWindow::onReportSummon(), pets_summon_golem(), pets_summon_object(), potion_type_apply(), pray_at_altar(), set_object_face_other(), spell_client_use(), spell_effect(), spring_trap(), START_TEST(), town_portal_find_force(), trap_adjust(), ArchetypeWrapper::uses(), write_mark(), and write_rune().

◆ owner

object* object::owner

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

Definition at line 387 of file object.h.

Referenced by START_TEST().

◆ ownercount

tag_t object::ownercount

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

Definition at line 390 of file object.h.

Referenced by START_TEST().

◆ ox

int16_t object::ox

Definition at line 336 of file object.h.

Referenced by object_insert_in_map().

◆ oy

int16_t object::oy

For debugging: Where it was last inserted

Definition at line 336 of file object.h.

Referenced by object_insert_in_map().

◆ path_attuned

object::path_attuned

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.
Spell Spellpath for this spell. A player needs to not be denied this path to cast the spell.
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 353 of file object.h.

Referenced by add_abilities(), append_spell(), become_follower(), cast_bless(), cast_spell(), caster_level(), describe_god(), do_spellpath_msg(), dragon_ability_gain(), dump_gods(), eat_special_food(), get_ob_diff(), min_casting_level(), stringbuffer_append_spelldesc(), write_rune(), and write_scroll().

◆ path_denied

object::path_denied

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 355 of file object.h.

Referenced by add_abilities(), become_follower(), cast_curse(), cast_spell(), describe_god(), dump_gods(), eat_special_food(), get_ob_diff(), min_casting_level(), and write_rune().

◆ path_repelled

object::path_repelled

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 354 of file object.h.

Referenced by add_abilities(), become_follower(), cast_curse(), cast_spell(), caster_level(), describe_god(), dump_gods(), eat_special_food(), get_ob_diff(), and min_casting_level().

◆ pick_up

object::pick_up

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 371 of file object.h.

Referenced by get_ob_diff(), and monster_can_pick().

◆ prev

object* object::prev

Pointer to the previous object in the free/used list

Definition at line 286 of file object.h.

Referenced by expand_objects(), init_objects(), object_free(), and object_new().

◆ race

object::race

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 counter piece 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 attack type 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 326 of file object.h.

Referenced by add_abilities(), animate_weapon(), cast_bless(), cast_change_ability(), cast_create_town_portal(), cast_curse(), cast_detection(), cast_invisible(), cast_smite_spell(), check_inv_recursive(), check_trigger(), choose_cult_monster(), describe_god(), dump_gods(), find_better_arrow(), find_key(), fire_bow(), free_arch(), get_ob_diff(), is_legal_2ways_exit(), is_susceptible_to_disease(), magic_wall(), main(), makes_invisible_to(), mood_change(), object_copy_no_speed(), CREMainWindow::onReportSummon(), pets_summon_golem(), pets_summon_object(), pick_up(), play_sound_player_only(), resurrect_player(), sack_can_hold(), tailor_god_spell(), town_portal_destroy_existing(), and update_button().

◆ randomitems

object::randomitems

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.
Wand & Staff This entry determines which spell the wand contains. The treasurelist must evaluate to exactly one spell object. Setting both <treasurelist> and <spell> is not allowed; this creates broken wands.

Definition at line 395 of file object.h.

Referenced by apply_changes_to_player(), become_follower(), cast_raise_dead_spell(), cast_wonder(), command_create(), determine_holy_arch(), generate_monster_inv(), get_ob_diff(), god_intervention(), pets_summon_object(), place_chest(), polymorph_living(), put_a_monster(), remove_special_prayers(), spell_client_use(), START_TEST(), and ArchetypeWrapper::uses().

◆ range

◆ range_modifier

uint8_t object::range_modifier

How going up in level affects range

Definition at line 418 of file object.h.

Referenced by get_ob_diff(), reportSummon(), and SP_level_range_adjust().

◆ resist

object::resist

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 attack type. Chaos "contains" a combination of other attack types.
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 attack type. Chaos "contains" a combination of other attack types.

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 attack type 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 attack type 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
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield This adds turn undead resistance to the weapon. The number is a percent-value in the range 0-100. This is mostly useful for undead monsters or 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.
Magic Wall, Monster & NPC, Monster (Grimreaper), Weak Wall (no description)
Weapon

This adds turn undead resistance to the weapon. The number is a percent-value in the range 0-100. This is mostly useful for undead monsters.

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 351 of file object.h.

Referenced by add_abilities(), become_follower(), cast_bless(), cast_change_ability(), change_abil(), create_aura(), describe_god(), dragon_eat_flesh(), dragon_level_gain(), eat_special_food(), find_better_arrow(), fix_flesh_item(), get_ob_diff(), main(), monster_check_good_armour(), mood_change(), pets_summon_golem(), potion_type_apply(), set_dragon_name(), setup(), and transmute_materialname().

◆ run_away

uint8_t object::run_away

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

Definition at line 394 of file object.h.

Referenced by get_ob_diff().

◆ skill

object::skill

Name of the skill this object uses/grants

Use

Type(s) Description
Skill The <skill name> is used for matching. 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 329 of file object.h.

Referenced by adjust_skill_tool(), append_spell(), book_type_apply(), cast_destruction(), cast_dust(), cast_heal(), cast_spell(), caster_level(), change_skill(), command_cast_spell(), cone_drop(), do_each_skill(), do_harvest(), do_hidden_move(), do_skill(), do_symptoms(), do_throw(), examine_autoidentify(), fire_bow(), get_ob_diff(), god_examines_priest(), hit_with_arrow(), infect_object(), kill_object(), learn_skill(), mood_change(), object_copy_no_speed(), scroll_type_apply(), set_spell_skill(), skillscroll_type_apply(), spellbook_type_apply(), spellsTable(), stringbuffer_append_spelldesc(), try_leave_cult(), use_oratory(), use_skill(), write_on_item(), and write_rune().

◆ slaying

object::slaying

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 platinum coins")
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 specified in <name of creation>, and not use any title. If nothing is set, the standard name and title of the archetype are 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.

Player Changer The destination path defines the map that the player is transferred to. This must be an absolute path, beginning with '/' (for example "/start/Nexus").
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 327 of file object.h.

Referenced by add_abilities(), add_exit_to_item(), apply_container(), apply_map_builder(), become_follower(), cast_bless(), cast_create_missile(), cast_create_town_portal(), cast_detection(), check_inv_recursive(), check_sacrifice(), describe_god(), do_exit_map(), do_harvest(), dump_gods(), find_key(), fire_arch_from_position(), fire_bolt(), fire_bow(), fix_generated_item(), free_arch(), get_ob_diff(), god_enchants_weapon(), hit_with_one_attacktype(), improve_weapon(), is_suitable_exit(), keyplace(), lock_and_hide_doors(), matches_sacrifice(), mood_change(), move_creator(), object_copy_no_speed(), pets_summon_golem(), place_chest(), place_exits(), place_special_exit(), sack_can_hold(), tailor_god_spell(), town_portal_destroy_existing(), and update_button().

◆ smoothlevel

object::smoothlevel

how to smooth this square around

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Drink, 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, Player, Player Changer, 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 433 of file object.h.

Referenced by get_ob_diff().

◆ sound_chance

uint8_t object::sound_chance

Probability, 1 to 100, of the object emitting a sound. If the chance is greater than 200, assume we wanted negative and override no chance of sound.

Definition at line 403 of file object.h.

Referenced by get_ob_diff(), and play_sound_map().

◆ speed

object::speed

Frequency of object 'moves' relative to server tick rate

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 spell-casting 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). Note that a negative value gets converted to positive when the item is loaded, and randomizes the initial speed value. A value of 1 will move the item once every tick, and 0.1 will move the item every 10 ticks, although it might be shorter if the mover is partway through its speed cycle. So, the default of 0.2 will move you in about half a second most of the time, assuming your tickrate is 8 ticks per second.
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 337 of file object.h.

Referenced by add_object_to_socklist(), cast_detection(), cast_word_of_recall(), common_projectile_move_on(), create_aura(), do_symptoms(), do_throw(), drain_wand_charge(), dump_gods(), enter_exit(), CRECombatSimulator::fight(), fire_bow(), get_ob_diff(), is_better_lighter(), monsterFight(), monsterTable(), object_copy_no_speed(), place_fountain_with_specials(), player_mover_type_move_on(), recharge(), reportSummon(), setup(), spell_effect_type_move_on(), START_TEST(), and trigger_connected().

◆ speed_left

◆ spell

object* object::spell

Spell that was being cast

Definition at line 420 of file object.h.

◆ spell_tags

tag_t* object::spell_tags

Tags used for spell effect merging.

Definition at line 446 of file object.h.

Referenced by object_copy_no_speed().

◆ spellarg

char* object::spellarg

Optional argument when casting obj::spell.

Definition at line 421 of file object.h.

Referenced by fire_bow().

◆ spellitem

object* object::spellitem

Spell ability monster is choosing to use

Definition at line 406 of file object.h.

Referenced by monster_cast_spell().

◆ state

uint8_t object::state

How the object was last drawn (animation)

Definition at line 359 of file object.h.

Referenced by animate_weapon(), apply_anim_suffix(), get_ob_diff(), and move_aura().

◆ stats

living object::stats

Str, Con, Dex, etc

Definition at line 378 of file object.h.

Referenced by add_abilities(), add_player_exp(), animate_weapon(), append_spell(), apply_changes_to_player(), apply_sign(), become_follower(), calc_alch_danger(), calc_skill_exp(), calculate_difficulty(), cast_bless(), cast_cause_disease(), cast_change_ability(), cast_change_map_lightlevel(), cast_cone(), cast_create_food(), cast_create_missile(), cast_curse(), cast_destruction(), cast_detection(), cast_heal(), cast_identify(), cast_light(), cast_polymorph(), cast_smite_spell(), cast_spell(), cast_transfer(), check_heal_and_mana(), check_hp(), check_inv_recursive(), check_race_and_class(), command_addexp(), converter_type_apply(), counterspell(), create_aura(), create_bomb(), cure_disease(), deep_swamp_type_move_on(), deep_swamp_type_process(), did_make_save_item(), director_type_move_on(), do_spellpath_msg(), do_symptoms(), do_throw(), do_turn(), dragon_eat_flesh(), dragon_focus_type_apply(), dragon_level_gain(), drain_rod_charge(), drain_wand_charge(), dump_gods(), eat_common(), eat_special_food(), enter_exit(), esrv_update_stats(), examine_monster(), CRECombatSimulator::fight(), fire_arch_from_position(), fire_bolt(), fire_bow(), fix_flesh_item(), fix_generated_item(), food_each(), food_type_apply(), forklightning(), gate_type_process(), get_ob_diff(), give_skill_by_name(), god_enchants_weapon(), god_examines_priest(), hit_with_one_attacktype(), hole_type_move_on(), improve_weapon(), infect_object(), is_better_lighter(), is_legal_2ways_exit(), kill_player_not_permadeath(), lamp_type_apply(), lightable_type_apply(), lighter_type_apply(), magic_wall(), main(), make_throw_ob(), monster_cast_spell(), monster_check_pickup(), monster_compute_path(), monster_move(), monsterFight(), monsterTable(), mood_change(), move_creator(), move_disease(), move_player_attack(), move_symptom(), pets_summon_golem(), pets_summon_object(), place_chest(), place_exits(), place_monsters(), player_mover_type_move_on(), poison_type_apply(), potion_type_apply(), power_crystal_type_apply(), push_ob(), recharge(), regenerate_rod(), remove_depletion(), reportSummon(), resurrect_player(), rod_adjust(), roll_ob(), sack_can_hold(), save_object_in_sb(), set_dragon_name(), setup(), sign_type_move_on(), SP_level_spellpoint_cost(), spell_effect_type_move_on(), spellbook_type_apply(), spinner_type_move_on(), spring_trap(), START_TEST(), stringbuffer_append_spelldesc(), trap_adjust(), trap_disarm(), trap_see(), trigger_connected(), try_leave_cult(), write_rune(), and write_scroll().

◆ subtype

object::subtype

Subtype of object

Use

Type(s) Description
Builder Whether this builder will add items, or remove items.
Building material What kind of building material this is.
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 349 of file object.h.

Referenced by apply_map_builder(), cast_destruction(), cast_smite_spell(), cast_spell(), cast_wonder(), cast_word_of_recall(), command_unarmed_skill(), do_skill(), do_throw(), enter_exit(), find_best_player_hth_skill(), fire_arch_from_position(), get_ob_diff(), get_readable_message_type(), is_better_lighter(), lightable_type_apply(), monster_should_cast_spell(), monsterFight(), CREMainWindow::onReportSummon(), skill_ident(), spell_client_use(), and spell_effect_type_move_on().

◆ temp_anim_speed

uint8_t object::temp_anim_speed

Ticks between temporary animation-frames

Definition at line 432 of file object.h.

Referenced by apply_anim_suffix().

◆ temp_animation

const Animations* object::temp_animation

A temporary animation.

Definition at line 431 of file object.h.

Referenced by apply_anim_suffix(), and trap_show().

◆ title

object::title

Of foo, etc

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Creator, Detector, Director, Disease, Door, Drink, Duplicator, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Inorganic, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Monster & NPC, Monster (Grimreaper), Mood Floor, Mover, Pedestal, Pit, Player, Player Changer, 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'.
Inventory Checker This string specifies the object we are looking for: We have a match if the player's title is/isn't <match title>.

Definition at line 325 of file object.h.

Referenced by add_book_to_list(), become_follower(), cast_smite_spell(), change_book(), check_inv_recursive(), describe_god(), dragon_focus_type_apply(), dump_gods(), food_type_apply(), free_arch(), free_artifact(), get_ob_diff(), god_enchants_weapon(), god_examines_item(), improve_armour(), infect_object(), make_formula_book(), move_creator(), object_copy_no_speed(), recipe_find_ingredient_cost(), START_TEST(), tailor_god_spell(), and unique_book().

◆ total_exp

int64_t object::total_exp

All exp ever earned (used to calc perm_exp)

Definition at line 379 of file object.h.

Referenced by add_player_exp(), and get_ob_diff().

◆ type

uint8_t object::type

PLAYER, BULLET, etc. See define.h

Definition at line 348 of file object.h.

Referenced by add_death(), add_god_to_list(), addArchetypes(), altar_type_move_on(), animate_one(), animate_weapon(), apply_builder_floor(), apply_builder_item(), apply_builder_wall(), apply_builder_window(), apply_changes_to_player(), apply_container(), apply_map_builder(), armour_improver_type_apply(), artifact_describe(), artifact_get_face(), attack_message(), attempt_do_alchemy(), attempt_pick_lock(), blame(), book_type_apply(), build_class_list_reply(), build_race_list_reply(), calc_skill_exp(), can_build_over(), cast_cause_disease(), cast_cone(), cast_create_missile(), cast_detection(), cast_dust(), cast_heal(), cast_smite_spell(), cast_spell(), cast_wonder(), cast_word_of_recall(), caster_level(), change_book(), check_trigger(), clock_type_apply(), command_cast_spell(), command_create(), command_empty(), command_insert_into(), common_pre_ob_move_on(), ArtifactPanel::computeMadeViaAlchemy(), converter_type_apply(), counterspell(), Crossfire_Object_wrap(), deep_swamp_type_process(), ArtifactWrapper::displayName(), do_each_skill(), do_exit_map(), do_mood_floor(), do_skill(), do_spellpath_msg(), do_throw(), dragon_eat_flesh(), dragon_focus_type_apply(), drain_wand_charge(), eat_common(), esrv_add_spells(), eventListener(), find_key(), find_traps(), fire_arch_from_position(), fix_generated_item(), fix_walls(), food_type_apply(), friendly_fire(), get_ob_diff(), get_player_archetype(), identify_altar_type_move_on(), infect_object(), is_better_lighter(), is_enemy(), is_suitable_exit(), kill_object(), knowledge_monster_validate(), legacy_ob_apply(), lightable_type_apply(), lighter_type_apply(), ArtifactLoader::load(), magic_wall(), make_throw_ob(), matches_sacrifice(), mimic_type_apply(), monster_can_detect_enemy(), monster_can_see_enemy(), monster_cast_spell(), monster_find_enemy(), mood_change(), move_aura(), move_player_attack(), new_text_name(), object_copy_owner(), CREMainWindow::onReportSummon(), pay_from_container(), pets_follow_owner(), pets_get_enemy(), pets_move(), pets_should_arena_attack(), pick_up(), place_chest(), play_sound_player_only(), player_attack_door(), poison_living(), poison_type_apply(), polymorph_item(), potion_type_apply(), power_crystal_type_apply(), push_ob(), put_object_in_sack(), real_money_value(), recharge(), remove_special_prayers(), remove_trap(), retrofit_joined_wall(), runapply(), runghosted(), savebed_type_apply(), scroll_type_apply(), send_class_info(), send_race_info(), shop_inventory_type_apply(), skillscroll_type_apply(), spell_find_dir(), spellbook_type_apply(), spellsTable(), spring_trap(), START_TEST(), steal(), tailor_god_spell(), tailor_readable_ob(), teleport(), transport_type_apply(), trap_disarm(), treasure_type_apply(), turn_one_transport(), turn_transport(), update_button(), update_buttons(), AssetWithArtifacts< archetype >::updateArtifacts(), ArtifactPanel::updateItem(), ArchetypeWrapper::uses(), weapon_improver_type_apply(), write_rune(), and write_scroll().

◆ value

object::value

How much money it is worth (or contains)

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Creator, Detector, Director, Disease, Door, Drink, 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, Player, Player Changer, 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 360 of file object.h.

Referenced by add_abilities(), add_value(), altar_type_move_on(), artifact_describe(), cast_create_food(), cast_create_missile(), check_altar_sacrifice(), cost_approx_str(), cost_string_from_value(), do_symptoms(), dump_alchemy_costs(), find_next_coin(), get_ob_diff(), infect_object(), move_disease(), pay_from_container(), polymorph_item(), potion_type_apply(), remove_value(), rod_adjust(), sell_item(), START_TEST(), trapdoor_type_move_on(), trigger_connected(), and write_scroll().

◆ weapon_speed

float object::weapon_speed

The overall speed of this object

Definition at line 339 of file object.h.

Referenced by get_ob_diff(), and monsterFight().

◆ weapon_speed_left

float object::weapon_speed_left

How much speed is left to spend this round

Definition at line 340 of file object.h.

Referenced by get_ob_diff(), and monsterFight().

◆ weapontype

object::weapontype

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 attack type. 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 381 of file object.h.

Referenced by get_ob_diff(), and town_portal_find_force().

◆ weight

object::weight

Attributes of the object

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Drink, 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, Player, Player Changer, 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 open source... 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 375 of file object.h.

Referenced by add_abilities(), cast_detection(), converter_type_apply(), do_item_conversion(), do_throw(), fix_flesh_item(), get_ob_diff(), improve_armour(), improve_weapon(), monster_check_pickup(), new_text_name(), sell_item(), START_TEST(), transmute_item_to_flower(), and trapdoor_type_move_on().

◆ weight_limit

int32_t object::weight_limit

Weight-limit of object

Definition at line 376 of file object.h.

Referenced by get_ob_diff(), sack_can_hold(), START_TEST(), and transport_can_hold().

◆ will_apply

object::will_apply

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 402 of file object.h.

Referenced by get_ob_diff(), monster_apply_below(), and monster_check_apply().

◆ x

int16_t object::x

Definition at line 335 of file object.h.

Referenced by add_object_to_socklist(), add_one_item(), alchemy_failure_effect(), apply_container(), armour_improver_type_apply(), can_build_over(), cast_heal(), cast_smite_spell(), check_hp(), check_infection(), convert_item(), converter_type_apply(), converter_type_move_on(), do_follow(), do_item_conversion(), do_mood_floor(), do_throw(), enter_fixed_template_map(), enter_random_map(), enter_random_template_map(), enter_unique_map(), gate_type_process(), get_exit_seed(), get_ob_diff(), get_rangevector(), get_rangevector_from_mapcoord(), hit_with_arrow(), identify_object_with_skill(), is_legal_2ways_exit(), ArchetypeLoader::load(), lock_and_hide_doors(), monster_compute_path(), monster_move(), monster_use_bow(), move_aura(), move_ball_spell(), move_creator(), move_ob(), move_player_attack(), move_swarm_spell(), object_create_arch(), object_find_multi_free_spot_around(), object_find_multi_free_spot_within_radius(), object_free(), object_get_multi_size(), object_insert_in_map(), object_on_exit(), path_to_player(), pets_follow_owner(), pets_get_enemy(), pets_move(), place_chest(), place_exits(), place_treasure(), play_sound_map(), play_sound_player_only(), potion_type_apply(), push_ob(), put_a_monster(), put_object_in_sack(), put_treasure(), remove_adjacent_doors(), runghosted(), runmoveto(), save_object_in_sb(), START_TEST(), teleport(), test_stand_in_light(), transport_type_apply(), treasure_type_apply(), try_fit(), turn_one_transport(), update_buttons(), and weapon_improver_type_apply().

◆ y

int16_t object::y

Position in the map for this object

Definition at line 335 of file object.h.

Referenced by add_object_to_socklist(), add_one_item(), alchemy_failure_effect(), apply_container(), armour_improver_type_apply(), can_build_over(), cast_heal(), cast_smite_spell(), check_hp(), check_infection(), convert_item(), converter_type_apply(), converter_type_move_on(), do_follow(), do_item_conversion(), do_mood_floor(), do_throw(), enter_fixed_template_map(), enter_random_map(), enter_random_template_map(), enter_unique_map(), gate_type_process(), get_exit_seed(), get_ob_diff(), get_rangevector(), get_rangevector_from_mapcoord(), hit_with_arrow(), identify_object_with_skill(), is_legal_2ways_exit(), ArchetypeLoader::load(), lock_and_hide_doors(), monster_compute_path(), monster_move(), monster_use_bow(), move_aura(), move_ball_spell(), move_creator(), move_ob(), move_player_attack(), move_swarm_spell(), object_create_arch(), object_find_multi_free_spot_around(), object_find_multi_free_spot_within_radius(), object_free(), object_get_multi_size(), object_insert_in_map(), object_on_exit(), path_to_player(), pets_follow_owner(), pets_get_enemy(), pets_move(), place_chest(), place_exits(), place_treasure(), play_sound_map(), play_sound_player_only(), potion_type_apply(), push_ob(), put_a_monster(), put_object_in_sack(), put_treasure(), remove_adjacent_doors(), runghosted(), runmoveto(), save_object_in_sb(), START_TEST(), teleport(), test_stand_in_light(), transport_type_apply(), treasure_type_apply(), try_fit(), turn_one_transport(), update_buttons(), and weapon_improver_type_apply().


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