--- deliantra/server/pod/objects.pod 2006/12/18 12:11:08 1.3 +++ deliantra/server/pod/objects.pod 2006/12/18 16:53:04 1.4 @@ -76,7 +76,7 @@ For non-player objects this field is not changed by server ticks. -=item speed +=item speed If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed on the active object list and will be processed each tick (see also speed_left!). @@ -98,15 +98,23 @@ =item no_drop (0|1) -Sets the flag FLAG_NO_DROP. See the Flags section below. +Sets the flag FLAG_NO_DROP. +See Flags section below. =item applied (0|1) -Sets the flag FLAG_APPLIED. See the Flags section below. +Sets the flag FLAG_APPLIED. +See Flags section below. =item is_used_up (0|1) -Sets the flag FLAG_IS_USED_UP. See Flags section below. +Sets the flag FLAG_IS_USED_UP. +See Flags section below. + +=item auto_apply (0|1) + +Sets the flag FLAG_AUTO_APPLY. +See Flags section below. =item editable (more than deprecated) @@ -148,38 +156,181 @@ If FLAG_APPLIED is not set the object is destroyed. +=item FLAG_IS_A_TEMPLATE (internal use) + +This flag is set on the inventory of generators like CREATORs and CONVERTERs, +or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. + +=item FLAG_AUTO_APPLY + +This flag has currently only meaning for the TREASURE type, see below. + =back =head2 Description of type specific attributes The beginning of the headers of the following subsection are the server internal names for the objects types, see include/define.h. -The numeric values are maybe not 100% accurate, as the code is a changing -target, please consult include/define.h in doubt :-) -=head3 FORCE - type 114 - Forces +=head3 TRANSPORT - type 2 - Player transports -Forces are a very 'thin' type. They don't have much behaviour other than -disappearing after a time and/or affecting the player if they are in his inventory. +This type is implemented by the transport extension and has currently no special +attributes that affect it. -Forces only take effect on the player if they have set FLAG_APPLIED. +=head3 ROD - type 3 - Rods that fire spells -Whether the duration field is processed or not a tick is controlled via the -speed and speed_left field. Look above at the generic description of these -fields. +Rods contain spells and can be fired by a player. =over 4 -=item duration +=item level -While this field is greater than 0 the force/object is not destroyed. -It is decreased each tick by 1. +This attribute is used for calculating the spell level that can be fired +with this rod, it's also the maximum level of the spell that can be fired. +The level of the spell that is being fired depends mostly on +the 'use magic item' skill level of the player and 1/10 of the level of the +rod is added as bonus. -If it reaches 0 the force/object is destroyed. +=item hp -This field can have this meaning for B object if that object has -FLAG_IS_USED_UP and FLAG_APPLIED set. See the description of FLAG_IS_USED_UP -what happens then. +The amount of spellpoints this rod has left. + +=item maxhp + +The maximum amount of spellpoints this rod has. + +=item skill + +This field determines which skill you need to apply this object. + +=back + +=head3 TREASURE - type 4 - Treasures + +This type of objects are for random treasure generation in maps. +If this object is applied by a player it will replace itself with it's +inventory. If it is automatically applied +generate a treasure and replace itself with the generated treasure. + +Chests are also of this type, their treasures are generated by +the auto apply code on map instantiation. + +=over 4 + +=item hp + +The number of treasures to generate. + +=item exp + +If FLAG_AUTO_APPLY is not set the exp field has no further meaning +and the difficulty for the treasurecode only depends on the maps difficulty, +otherwise the exp field has the following meaning: + +If this field is not 0 it is passed as the difficulty +to the treasure generation code to determine how good, how much +worth a treasure is or what bonuses it is given by the treasure code. + +If this field is not set or 0 the difficulty of the map is passed to the treasure +generation code. + +=item randomitems + +The treasurelist to use to generate the treasure which is put in the +treasure objects inventory. + +=back + +=head3 POTION - type 5 - Potions for drinking and other nastynesses + +These objects contain a spell and will emit it on apply, which most +of the time has the meaning of 'drinking'. + +If no resistancy field, stat field or attacktype is set and no spell +is put in the potion by the sp field or the randomitems the +potion will become an artifact and the artifact code decides which kind +of potion will be generated. + +If the potion has FLAG_CURSED or FLAG_DAMNED set the usage of this potion +will yield an explosion and hurt the player. + +=over 4 + +=item Str, Dex, Con, Int, Wis, Cha, Pow + +These stat fields determine how many stat points the player gets +when he applies this potion. + +If FLAG_CURSED or FLAG_DAMNED is set the player will loose that many stat points. + +=item sp + +If this field is set and the randomitems field is not set +the field is interpreted as spell number, please look the right +number up in common/loader.C. + +If this field is set the randomitems field will be unset by the +map loading code. + +=item attacktype + +This field has some special meaning in potions, currently the +bits for AT_DEPLETE and AT_GODPOWER control whethere this is a +restoration potion or improvement potion. +See include/attackinc.h for the bits of these types. + +If AT_DEPLETE is set the player will be restored and the ARCH_DEPLETION +will be removed from him. If the potion has FLAG_CURSED or FLAG_DAMNED +set the player will be drained a random stat by inserting an ARCH_DEPLETION +into him. + +If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat. +When the potion has FLAG_CURSED or FLAG_DAMNED set he will loose one in one of these stats. + +=item resist_ + +If this stat is set and no spell is in the potion the potion +will create a force that give the player this specific resistancy. +The forces type will be changed to POTION_EFFECT (see POTION_EFFECT type below) +and the potion will last 10 times longer than the default force archetype +FORCE_NAME (at the moment of this writing spell/force.arc). + +=item randomitems + +The inventory/spell of the potion will be created by calling the treasure code +with the treasurelist specified here. (I guess it's highly undefined what +happens if there is not a spell in the potions inventory). + +=item on_use_yield + +When this object is applied this object will be created. +This field is also used by FOOD and POISON. + +=item subtypes + +see include/spells.h for possible potion subtypes, there are currently 4: + +=over 4 + +=item POT_SPELL + +Unused, default behaiour of a potion. + +=item POT_DUST + +This potion can be thrown to cast the spell that it has in it's inventory, +the behaviour is not defined if there is not a spell in the inventory and the +server will log an error. + +=item POT_FIGURINE + +Unused, default behaiour of a potion. + +=item POT_BALM + +Unused, default behaiour of a potion. + +=back =back @@ -314,11 +465,53 @@ =item wc -the amount of wc points the player's ac is decreased +the amount of wc points the player's wc is decreased =back =head4 Player inherits following flags from weapons: - FLAG_LIFESAVE, FLAG_REFL_SPELL, FLAG_REFL_MISSILE, FLAG_STEALTH, - FLAG_XRAYS, FLAG_BLIND, FLAG_SEE_IN_DARK, FLAG_UNDEAD + FLAG_LIFESAVE + FLAG_REFL_SPELL + FLAG_REFL_MISSILE + FLAG_STEALTH + FLAG_XRAYS + FLAG_BLIND + FLAG_SEE_IN_DARK + FLAG_UNDEAD + +=head3 FORCE - type 114 - Forces + +Forces are a very 'thin' type. They don't have much behaviour other than +disappearing after a time and/or affecting the player if they are in his inventory. + +Forces only take effect on the player if they have set FLAG_APPLIED. + +Whether the duration field is processed or not a tick is controlled via the +speed and speed_left field. Look above at the generic description of these +fields. + +=over 4 + +=item duration + +While this field is greater than 0 the force/object is not destroyed. +It is decreased each tick by 1. + +If it reaches 0 the force/object is destroyed. + +This field can have this meaning for B object if that object has +FLAG_IS_USED_UP and FLAG_APPLIED set. See the description of FLAG_IS_USED_UP +what happens then. + +=back + +=head3 POTION_EFFECT - type 115 - Potion effects (resistancies) + +This object is generated by the POTION code when the potion is a +resistance giving potion. It has mainly the same behaviour as a FORCE. + +The specialty of the potion effect is that the resistancy it gives is absolute, +so if you drin a resistancy potion of fire+60 you will get 60% resistancy to fire. + +Multiple potion effects only give you the maximum of their resistancy.