ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/pod/objects.pod
(Generate patch)

Comparing deliantra/server/pod/objects.pod (file contents):
Revision 1.7 by elmex, Tue Dec 19 21:06:08 2006 UTC vs.
Revision 1.14 by elmex, Wed Dec 20 19:53:10 2006 UTC

66 66
67=item face <facename> 67=item face <facename>
68 68
69The graphical appearance of this object. 69The graphical appearance of this object.
70 70
71=item x <number>
72
73The x position of the object when it is on a map.
74
75=item y <number>
76
77The y position of the object when it is on a map.
78
79=item map (internal)
80
81The map the object is on.
82
71=item invisible <number> 83=item invisible <number>
72 84
73If the <number> is greater than 0 the object is invisible. 85If the <number> is greater than 0 the object is invisible.
74For players this field reflects the duration of the invisibility 86For players this field reflects the duration of the invisibility
75and is decreased every tick by 1. 87and is decreased every tick by 1.
98 110
99This means: the lower the speed field is (but still above MIN_ACTIVE_SPEED) 111This means: the lower the speed field is (but still above MIN_ACTIVE_SPEED)
100the more seldom the object is processed. And the higher the speed field is 112the more seldom the object is processed. And the higher the speed field is
101the more often the object is processed. 113the more often the object is processed.
102 114
115=item connected <number>
116
117When this field is set the object will be linked to a connection with the
118id <number>. What happens when the connection is 'activated' depends on the
119type of the object.
120
121When FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE they will control
122when to activate the object, see description of these below for further details.
123
103=item no_drop (0|1) 124=item no_drop (0|1)
104 125
105Sets the flag FLAG_NO_DROP. 126Sets the flag FLAG_NO_DROP.
106See Flags section below. 127See Flags section below.
107 128
116See Flags section below. 137See Flags section below.
117 138
118=item auto_apply (0|1) 139=item auto_apply (0|1)
119 140
120Sets the flag FLAG_AUTO_APPLY. 141Sets the flag FLAG_AUTO_APPLY.
142See Flags section below.
143
144=item no_steal (0|1)
145
146Sets the flag FLAG_NO_STEAL.
147See Flags section below.
148
149=item reflecting (0|1)
150
151Sets the flag FLAG_REFLECTING.
152See Flags section below.
153
154=item reflect_spell (0|1)
155
156Sets the flag FLAG_REFL_SPELL.
157See Flags section below.
158
159=item no_skill_ident (0|1)
160
161Sets the flag FLAG_NO_SKILL_IDENT.
121See Flags section below. 162See Flags section below.
122 163
123=item activate_on_push (0|1) (default: 1) 164=item activate_on_push (0|1) (default: 1)
124 165
125Sets the flag FLAG_ACTIVATE_ON_PUSH. 166Sets the flag FLAG_ACTIVATE_ON_PUSH.
183 224
184This flag has only meaning for objects that can be linked together 225This flag has only meaning for objects that can be linked together
185with the 'connected' field and controls wether the object should 226with the 'connected' field and controls wether the object should
186be activated when the connection is 'pushed' or it is 'released'. 227be activated when the connection is 'pushed' or it is 'released'.
187 228
229What 'pushed' and 'released' means depends on the object that
230activates the connection.
231
188This flag is by default on. 232This flag is by default on.
189 233
190=item FLAG_ACTIVATE_ON_RELEASE 234=item FLAG_ACTIVATE_ON_RELEASE
191 235
192This flag has only meaning for objects that can be linked together 236This flag has only meaning for objects that can be linked together
193with the 'connected' field and controls wether the object should 237with the 'connected' field and controls wether the object should
194be activated when the connection is 'pushed' or it is 'released'. 238be activated when the connection is 'pushed' or it is 'released'.
195 239
240What 'pushed' and 'released' means depends on the object that
241activates the connection.
242
196This flag is by default on. 243This flag is by default on.
244
245=item FLAG_NO_STEAL
246
247When this flag is set this object can't be stolen. The flag will be
248resetted once the object is placed on a map.
249
250When this flag is set on a monster it can defent attempts of stealing
251(but in this context the flag is only used internally).
252
253=item FLAG_NO_SKILL_IDENT
254
255This flag is mostly used internal and prevents unidentified objects
256(objects which don't have FLAG_IDENTIFIED set) being identified by
257skills.
258
259This flag is used to mark objects to never being identified by a skill
260once a player failed to identify an object. So that multiple tries
261of identifying aren't more effective than one.
262
263=item FLAG_REFLECTING
264
265This flag is used by spell effects (eg. SP_BOLT), THROWN_OBJ and ARROW
266to indicate whether this object reflects off walls.
267
268=item FLAG_REFL_SPELL
269
270This flag indicates whether something reflects spells, like spell reflecting
271amuletts.
197 272
198=back 273=back
199 274
200=head2 Description of type specific attributes 275=head2 Description of type specific attributes
201 276
371The main difference between FOOD, FLESH and DRINK is that they 446The main difference between FOOD, FLESH and DRINK is that they
372give different messages. 447give different messages.
373 448
374The specialty of FLESH is that it inherits the resistancies of the 449The specialty of FLESH is that it inherits the resistancies of the
375monsters it was generated in and will let dragons raise their resistancies 450monsters it was generated in and will let dragons raise their resistancies
376with that. 451with that. If the monster has the POISON attacktype the FLESH
452will change into POISON.
377 453
378If a player runs low on food he will grab for FOOD, DRINK and POISON 454If a player runs low on food he will grab for FOOD, DRINK and POISON
379and if he doesn't find any of that he will start eating FLESH. 455and if he doesn't find any of that he will start eating FLESH.
380 456
381=over 4 457=over 4
396=item on_use_yield <archetype> 472=item on_use_yield <archetype>
397 473
398When this object is applied an instance of <archetype> will be created. 474When this object is applied an instance of <archetype> will be created.
399 475
400=back 476=back
477
478=head3 POISON - type 7 - Poisonous stuff
479
480This type is for objects that can poison the player when drinking.
481When applied it will hit the attacked with AT_POISON and will create
482a POISONING object in the one who was hit.
483
484=over 4
485
486=item level <number>
487
488This field affects the propability of poisoning. The higher the level difference
489between the one who is hit and the poision the mose propable it is the attacked
490one will be poisoned.
491
492=item slaying <race>
493
494On poison this field has the usual meaning of 'slaying', when the
495ones race matches the slaying field the damage done by the poison
496is multiplied by 3.
497
498=item hp <number>
499
500This is the amount of damage the player will receive from applying this. The
501attacktype AT_POISON will be used to hit the player and the damage will
502determine the strenght, duration and depletion of stats of the poisoning. The
503created POISONING object which is being placed in the one who was attacked will
504get the damage from this field (which is maybe adjusted by slaying or the
505resistancies).
506
507=item food <number>
508
5091/4 of <number> will be drained from the players food.
510
511=item on_use_yield <archetype>
512
513When this object is applied an instance of <archetype> will be created.
514
515=back
516
517=head3 BOOK - type 8 - Readable books
518
519This type is basically for representing text books in the game.
520
521Reading a book also identifys it (if FLAG_NO_SKILL_IDENT is not set).
522
523=over 4
524
525=item msg <text>
526
527This is the contents of the book. When this field is unset
528at treasure generation a random text will be inserted.
529
530=item skill <skill name>
531
532The skill required to read this book. (The most resonable
533skill would be literacy).
534
535=item exp <number>
536
537The experience points the player get for reading this book.
538
539=item subtype <readable subtype>
540
541This field determines the type of the readable.
542Please see common/readable.C in the readable_message_types table.
543
544=back
545
546=head3 CLOCK - type 9 - Clocks
547
548This type of objects just display the time when being applied.
549
550=head3 LIGHTNING - type 12 - Lightnings (DEPRECATED, see SPELL_EFFECT subtype SP_BOLT)
551
552This is a spell effect of a moving bolt. It moves straigt forward
553through the map until something blocks it.
554If FLAG_REFLECTING is set it even reflects on walls.
555
556FLAG_IS_TURNABLE should be set on these objects.
557
558=over 4
559
560=item move_type <movetype>
561
562This field affects the move type with which the lightning moves through
563the map and which map cells will reflect or block it.
564
565=item attacktype <attacktype>
566
567The attacktype with which it hits the objects on the map.
568
569=item dam <number>
570
571The damage this bolt inflicts when it hits objects on the map.
572
573=item Dex <number>
574
575This is the fork percentage, it is reduced by 10 per fork.
576And the damage is halved on each fork.
577
578=item Con <number>
579
580This value is a percentage of which the forking lightning
581is deflected to the left. This value should be mostly used internally.
582
583=item duration <number>
584
585The duration the bolt stays on a map cell. This field is decreased each time
586the object is processed (see the meaning of speed and speed_left fields in
587the object general description).
588
589=item range <number>
590
591This is the range of the bolt, each space it advances this field is decreased.
592
593=back
594
595=head3 ARROW - type 13 - Arrows
596
597This is the type for objects that represent projectiles like arrows.
598The movement of THROWN_OBJs behave similar to this type.
599
600Flying arrows are stopped either when they hit something blocking
601(move_block) or something which is alive.
602If it hits something that is alive, which doesn't have FLAG_REFL_MISSILE
603set, it will inflict damage. If FLAG_REFL_MISSILE is set it will inflict
604damage with a small chance which is affected by the 'level' field of the arrow.
605
606If FLAG_REFLECTING is set on the arrow it will bounce off everything
607that is not alive and blocks it's movement.
608
609When an arrow is being shot it's dam, wc, attacktype, slaying fields will
610be saved in the sp, hp, grace and spellarg fields of the object, to restore them
611once the arrow has been stopped.
612
613=over 4
614
615=item dam <number>
616
617The amount of damage that is being done to the victim that gets hit.
618This field is recomputed when the arrow is fired and will consist
619of the sum of a damage bonus (see description of the BOW type),
620the arrows 'dam' field, the bows 'dam' field, the bows 'magic' field
621and the arrows magic field.
622
623=item wc <number>
624
625The weaponclass of the arrow, which has effect on the propability of hitting.
626
627It is recomputed when the arrow is being fired by this formula:
628
629 wc = 20 - bow->magic - arrow->magic - (skill->level or shooter->level)
630 - dex_bonus - thaco_bonus - arrow->stats.wc - bow->stats.wc + wc_mod
631
632When the arrow is not being shot by an player dex_bonus and thaco_bonus and the
633level is not added.
634
635The wc_mod is dependend on the fire mode of the bow. For a more detailed
636explanation of dex_bonus, thaco_bonus and wc_mod please consult the code.
637
638=item magic <number>
639
640This field is added to the damage of the arrow when it is shot and
641will also improve it's speed by 1/5 of it's value.
642
643=item attacktype <attacktype>
644
645Bitfield which decides the attacktype of the damage, see include/attackinc.h
646On fireing the attacktype of the bow is added to the arrows attacktype.
647
648=item level <number> (interally used)
649
650The level of the arrow, this affects the propability of piercing FLAG_REFL_MISSILE,
651see above in the ARROW description.
652
653The level is set when the arrow is fired to either the skill level or the
654shooters level.
655
656=item speed <number> (internal)
657
658This field shouldn't be set directly in the archetype, the arrow will get it's
659speed from the bow. This fields value has to be atleast 0.5 or otherwise the
660arrow will be stopped immediatly.
661
662On fireing the speed of the arrow is computed of 1/5 of the
663sum of the damage bonus (see BOW), bow magic and arrow magic. After that 1/7
664of the bows 'dam' field is added to the speed of the arrow.
665
666The minimum speed of an arrow is 1.0.
667
668While flying the arrows speed is decreased by 0.05 each time it's moved.
669
670If the speed is above 10.0 it goes straight through the creature it hits and
671it's speed is reduced by 1. If the speed is lower or equal 10.0 the arrow is
672stopped and either sticked into the victim (see weight field description) or
673put on it's map square (if it didn't break, see description of the food field).
674
675=item weight <number>
676
677This field is the weight of the arrow, if the weight is below or equal 5000 (5 kg)
678the arrow will stick in the victim it hits. Otherwise it will fall to the ground.
679
680=item food <number>
681
682The breaking percentage. 100% means: breaks on usage for sure.
683
684=item inventory (internal)
685
686If the flying/moving object has something in it's inventory and it stops, it
687will be replaced with it's inventory. Otherwise it will be handled as usual,
688which means: it will be calculated whether the arrow breaks and it will be
689reset for reuse.
690
691=item slaying <string>
692
693When the bow that fires this arrow has it's slaying field set it is copied
694to the arrows slaying field. Otherwise the arrows slaying field remains.
695
696=item move_type <movetype> (internally used)
697
698This field is set when the arrow is shot to MOVE_FLY_LOW.
699
700=item move_on <movetype> (internally used)
701
702This field is set when the arrow is shot to MOVE_FLY_LOW and MOVE_WALK.
703
704=item race <string>
705
706The race field is a unique key that assigns arrows, bows and quivers. When
707shooting an arrow the bows race is used to search for arrows (which have the
708same race as the bow) in the players inventory and will recursively search in
709the containers (which are applied and have the same race as the bow and the arrow).
710
711=back
712
713=head3 BOW - type 14 - Bows, those that fire ARROWs
714
715TODO, but take into account ARROW description above
401 716
402=head3 WEAPON - type 15 - Weapons 717=head3 WEAPON - type 15 - Weapons
403 718
404This type is for general hack and slash weapons like swords, maces 719This type is for general hack and slash weapons like swords, maces
405and daggers and and .... 720and daggers and and ....
524 - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2 839 - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2
525 (minium is 0) 840 (minium is 0)
526 841
527=item ac <number> 842=item ac <number>
528 843
529the amount of ac points the player's ac is decreased 844the amount of ac points the player's ac is decreased when applying this object.
530 845
531=item wc <number> 846=item wc <number>
532 847
533the amount of wc points the player's wc is decreased 848the amount of wc points the player's wc is decreased when applying this object.
534 849
535=back 850=back
536 851
537=head4 Player inherits following flags from weapons: 852=head4 Player inherits following flags from weapons:
538 853
543 FLAG_XRAYS 858 FLAG_XRAYS
544 FLAG_BLIND 859 FLAG_BLIND
545 FLAG_SEE_IN_DARK 860 FLAG_SEE_IN_DARK
546 FLAG_UNDEAD 861 FLAG_UNDEAD
547 862
863=head3 GRIMREAPER - type 28 - Grimreapers
864
865These type are mostly used for monsters, they give the
866monster the ability to dissapear after 10 hits with AT_DRAIN.
867
868=over 4
869
870=item value <number>
871
872This field stores the hits the monster did yet.
873
874=back
875
876=head3 CREATOR - type 42 - Object creators
877
878Once a creator is activated by a connection it creates a number of objects
879(cloned from it's inventory or a new archetype from the other_arch slot).
880
881If FLAG_LIVESAFE is set the number of uses is unlimited.
882
883=over 4
884
885=item hp <number>
886
887If FLAG_LIVE_SAVE is not set it is the absolute number of times the creator can
888be used.
889
890=item speed <number>
891
892If speed is set the creator will create an object periodically,
893see speed and speed_left fields in general object attribute description
894for more details on how this period works.
895
896=item slaying <string>
897
898If set the generated object's name and
899title will be set to this.
900
901=item other_arch <string>
902
903If the inventory of the creator is empty objects of the
904archetype <string> will be generated.
905
906=item connected <number>
907
908See generic object attribute section.
909
910=back
911
548=head3 DRINK - type 54 - Drinkable stuff 912=head3 DRINK - type 54 - Drinkable stuff
549 913
550See FOOD description. 914See FOOD description.
551 915
552=head3 CHECK_INV - type 64 - Inventory checkers 916=head3 CHECK_INV - type 64 - Inventory checkers
598If this field is set the inventory checker will search for an object which 962If this field is set the inventory checker will search for an object which
599has the archetype name that matches <string>. 963has the archetype name that matches <string>.
600 964
601=item connected <connection id> 965=item connected <connection id>
602 966
603This is the connection that will be activated. 967This is the connection that will be activated. The connection is
968'pushed' when someone enters the space with the inventory checker,
969and it is 'released' when he leaves it.
970
971See also the description of the connected field in the generic object attribute
972section.
604 973
605=back 974=back
606 975
607=head3 FLESH - type 72 - Organs and body parts 976=head3 FLESH - type 72 - Organs and body parts
608 977
609See FOOD description. 978See FOOD description.
979
980=head3 MISC_OBJECT - type 79 - Misc. objects
981
982A type for any object that has no special behaviour.
983
984=head3 DUPLICATOR - type 83 - Duplicators or: Multiplicators
985
986This type of objects multiplies objects that are above it when it is activated.
987You can even multiply by 0, which will destroy the object.
988
989=over 4
990
991=item level <number>
992
993The multiplicator, if set to 0 or lower it will destroy the objects above it.
994
995=item other_arch <string>
996
997The archetype name of the objects which will be multiplied.
998
999=item connected <number>
1000
1001See generic object attribute section.
1002
1003=back
610 1004
611=head3 HOLE - type 94 - Holes 1005=head3 HOLE - type 94 - Holes
612 1006
613Holes are holes in the ground where objects can fall through. When the hole 1007Holes are holes in the ground where objects can fall through. When the hole
614opens and/or is completly open all objects above it fall through (more 1008opens and/or is completly open all objects above it fall through (more
615precisely: if their head is above the hole). 1009precisely: if their head is above the hole).
1010
1011When the HOLE is activated it's speed is set to 0.5.
616 1012
617Trapdoors can only transfer the one who falls through to other coordinates 1013Trapdoors can only transfer the one who falls through to other coordinates
618on the B<same> map. 1014on the B<same> map.
619 1015
620=over 4 1016=over 4
652 1048
653The destination x coordinates on the same map. 1049The destination x coordinates on the same map.
654 1050
655=back 1051=back
656 1052
1053=head3 POISONING - type 105 - The poisoning of players and monsters
1054
1055This type is doing the actual damage to the ones who were attacked
1056via AT_POISON (or drank POISON).
1057
1058The duration is handled via the FLAG_IS_USED_UP mechanism (please look
1059there for details).
1060
1061=over 4
1062
1063=item dam <number>
1064
1065Each time the poisoning is processed (which is determined by the speed and speed_left
1066fields, see the general object attributes above) it hits the player with
1067<number> damage and the AT_INTERNAL attacktype (means: it will simply
1068hit the player with no strings attached).
1069
1070=item food <number>
1071
1072Just a note: The posion is removed when food == 1 and not when
1073the whole duration is up, because the POISONING code has to remove
1074the poison-effects from the player before the FLAG_IS_USED_UP mechanism
1075deletes the POISONING object.
1076
1077=back
1078
657=head3 FORCE - type 114 - Forces 1079=head3 FORCE - type 114 - Forces
658 1080
659Forces are a very 'thin' type. They don't have much behaviour other than 1081Forces are a very 'thin' type. They don't have much behaviour other than
660disappearing after a time and/or affecting the player if they are in his 1082disappearing after a time and/or affecting the player if they are in his
661inventory. 1083inventory.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines