… | |
… | |
66 | |
66 | |
67 | =item face <facename> |
67 | =item face <facename> |
68 | |
68 | |
69 | The graphical appearance of this object. |
69 | The graphical appearance of this object. |
70 | |
70 | |
|
|
71 | =item x <number> |
|
|
72 | |
|
|
73 | The x position of the object when it is on a map. |
|
|
74 | |
|
|
75 | =item y <number> |
|
|
76 | |
|
|
77 | The y position of the object when it is on a map. |
|
|
78 | |
|
|
79 | =item map (internal) |
|
|
80 | |
|
|
81 | The map the object is on. |
|
|
82 | |
71 | =item invisible <number> |
83 | =item invisible <number> |
72 | |
84 | |
73 | If the <number> is greater than 0 the object is invisible. |
85 | If the <number> is greater than 0 the object is invisible. |
74 | For players this field reflects the duration of the invisibility |
86 | For players this field reflects the duration of the invisibility |
75 | and is decreased every tick by 1. |
87 | and is decreased every tick by 1. |
… | |
… | |
97 | on the end of the tick. |
109 | on the end of the tick. |
98 | |
110 | |
99 | This means: the lower the speed field is (but still above MIN_ACTIVE_SPEED) |
111 | This means: the lower the speed field is (but still above MIN_ACTIVE_SPEED) |
100 | the more seldom the object is processed. And the higher the speed field is |
112 | the more seldom the object is processed. And the higher the speed field is |
101 | the more often the object is processed. |
113 | the more often the object is processed. |
|
|
114 | |
|
|
115 | =item connected <number> |
|
|
116 | |
|
|
117 | When this field is set the object will be linked to a connection with the |
|
|
118 | id <number>. What happens when the connection is 'activated' depends on the |
|
|
119 | type of the object. |
|
|
120 | |
|
|
121 | When FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE they will control |
|
|
122 | when to activate the object, see description of these below for further details. |
102 | |
123 | |
103 | =item no_drop (0|1) |
124 | =item no_drop (0|1) |
104 | |
125 | |
105 | Sets the flag FLAG_NO_DROP. |
126 | Sets the flag FLAG_NO_DROP. |
106 | See Flags section below. |
127 | See Flags section below. |
… | |
… | |
203 | |
224 | |
204 | This flag has only meaning for objects that can be linked together |
225 | This flag has only meaning for objects that can be linked together |
205 | with the 'connected' field and controls wether the object should |
226 | with the 'connected' field and controls wether the object should |
206 | be activated when the connection is 'pushed' or it is 'released'. |
227 | be activated when the connection is 'pushed' or it is 'released'. |
207 | |
228 | |
|
|
229 | What 'pushed' and 'released' means depends on the object that |
|
|
230 | activates the connection. |
|
|
231 | |
208 | This flag is by default on. |
232 | This flag is by default on. |
209 | |
233 | |
210 | =item FLAG_ACTIVATE_ON_RELEASE |
234 | =item FLAG_ACTIVATE_ON_RELEASE |
211 | |
235 | |
212 | This flag has only meaning for objects that can be linked together |
236 | This flag has only meaning for objects that can be linked together |
213 | with the 'connected' field and controls wether the object should |
237 | with the 'connected' field and controls wether the object should |
214 | be activated when the connection is 'pushed' or it is 'released'. |
238 | be activated when the connection is 'pushed' or it is 'released'. |
|
|
239 | |
|
|
240 | What 'pushed' and 'released' means depends on the object that |
|
|
241 | activates the connection. |
215 | |
242 | |
216 | This flag is by default on. |
243 | This flag is by default on. |
217 | |
244 | |
218 | =item FLAG_NO_STEAL |
245 | =item FLAG_NO_STEAL |
219 | |
246 | |
… | |
… | |
563 | |
590 | |
564 | This is the range of the bolt, each space it advances this field is decreased. |
591 | This is the range of the bolt, each space it advances this field is decreased. |
565 | |
592 | |
566 | =back |
593 | =back |
567 | |
594 | |
|
|
595 | =head3 ARROW - type 13 - Arrows |
|
|
596 | |
|
|
597 | This is the type for objects that represent projectiles like arrows. |
|
|
598 | The movement of THROWN_OBJs behave similar to this type. |
|
|
599 | |
|
|
600 | Flying arrows are stopped either when they hit something blocking |
|
|
601 | (move_block) or something which is alive. |
|
|
602 | If it hits something that is alive, which doesn't have FLAG_REFL_MISSILE |
|
|
603 | set, it will inflict damage. If FLAG_REFL_MISSILE is set it will inflict |
|
|
604 | damage with a small chance which is affected by the 'level' field of the arrow. |
|
|
605 | |
|
|
606 | If FLAG_REFLECTING is set on the arrow it will bounce off everything |
|
|
607 | that is not alive and blocks it's movement. |
|
|
608 | |
|
|
609 | When an arrow is being shot it's dam, wc, attacktype, slaying fields will |
|
|
610 | be saved in the sp, hp, grace and spellarg fields of the object, to restore them |
|
|
611 | once the arrow has been stopped. |
|
|
612 | |
|
|
613 | =over 4 |
|
|
614 | |
|
|
615 | =item dam <number> |
|
|
616 | |
|
|
617 | The amount of damage that is being done to the victim that gets hit. |
|
|
618 | This field is recomputed when the arrow is fired and will consist |
|
|
619 | of the sum of a damage bonus (see description of the BOW type), |
|
|
620 | the arrows 'dam' field, the bows 'dam' field, the bows 'magic' field |
|
|
621 | and the arrows magic field. |
|
|
622 | |
|
|
623 | =item wc <number> |
|
|
624 | |
|
|
625 | The weaponclass of the arrow, which has effect on the propability of hitting. |
|
|
626 | |
|
|
627 | It 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 | |
|
|
632 | When the arrow is not being shot by an player dex_bonus and thaco_bonus and the |
|
|
633 | level is not added. |
|
|
634 | |
|
|
635 | The wc_mod is dependend on the fire mode of the bow. For a more detailed |
|
|
636 | explanation of dex_bonus, thaco_bonus and wc_mod please consult the code. |
|
|
637 | |
|
|
638 | =item magic <number> |
|
|
639 | |
|
|
640 | This field is added to the damage of the arrow when it is shot and |
|
|
641 | will also improve it's speed by 1/5 of it's value. |
|
|
642 | |
|
|
643 | =item attacktype <attacktype> |
|
|
644 | |
|
|
645 | Bitfield which decides the attacktype of the damage, see include/attackinc.h |
|
|
646 | On fireing the attacktype of the bow is added to the arrows attacktype. |
|
|
647 | |
|
|
648 | =item level <number> (interally used) |
|
|
649 | |
|
|
650 | The level of the arrow, this affects the propability of piercing FLAG_REFL_MISSILE, |
|
|
651 | see above in the ARROW description. |
|
|
652 | |
|
|
653 | The level is set when the arrow is fired to either the skill level or the |
|
|
654 | shooters level. |
|
|
655 | |
|
|
656 | =item speed <number> (internal) |
|
|
657 | |
|
|
658 | This field shouldn't be set directly in the archetype, the arrow will get it's |
|
|
659 | speed from the bow. This fields value has to be atleast 0.5 or otherwise the |
|
|
660 | arrow will be stopped immediatly. |
|
|
661 | |
|
|
662 | On fireing the speed of the arrow is computed of 1/5 of the |
|
|
663 | sum of the damage bonus (see BOW), bow magic and arrow magic. After that 1/7 |
|
|
664 | of the bows 'dam' field is added to the speed of the arrow. |
|
|
665 | |
|
|
666 | The minimum speed of an arrow is 1.0. |
|
|
667 | |
|
|
668 | While flying the arrows speed is decreased by 0.05 each time it's moved. |
|
|
669 | |
|
|
670 | If the speed is above 10.0 it goes straight through the creature it hits and |
|
|
671 | it's speed is reduced by 1. If the speed is lower or equal 10.0 the arrow is |
|
|
672 | stopped and either sticked into the victim (see weight field description) or |
|
|
673 | put on it's map square (if it didn't break, see description of the food field). |
|
|
674 | |
|
|
675 | =item weight <number> |
|
|
676 | |
|
|
677 | This field is the weight of the arrow, if the weight is below or equal 5000 (5 kg) |
|
|
678 | the arrow will stick in the victim it hits. Otherwise it will fall to the ground. |
|
|
679 | |
|
|
680 | =item food <number> |
|
|
681 | |
|
|
682 | The breaking percentage. 100% means: breaks on usage for sure. |
|
|
683 | |
|
|
684 | =item inventory (internal) |
|
|
685 | |
|
|
686 | If the flying/moving object has something in it's inventory and it stops, it |
|
|
687 | will be replaced with it's inventory. Otherwise it will be handled as usual, |
|
|
688 | which means: it will be calculated whether the arrow breaks and it will be |
|
|
689 | reset for reuse. |
|
|
690 | |
|
|
691 | =item slaying <string> |
|
|
692 | |
|
|
693 | When the bow that fires this arrow has it's slaying field set it is copied |
|
|
694 | to the arrows slaying field. Otherwise the arrows slaying field remains. |
|
|
695 | |
|
|
696 | =item move_type <movetype> (internally used) |
|
|
697 | |
|
|
698 | This field is set when the arrow is shot to MOVE_FLY_LOW. |
|
|
699 | |
|
|
700 | =item move_on <movetype> (internally used) |
|
|
701 | |
|
|
702 | This field is set when the arrow is shot to MOVE_FLY_LOW and MOVE_WALK. |
|
|
703 | |
|
|
704 | =item race <string> |
|
|
705 | |
|
|
706 | The race field is a unique key that assigns arrows, bows and quivers. When |
|
|
707 | shooting an arrow the bows race is used to search for arrows (which have the |
|
|
708 | same race as the bow) in the players inventory and will recursively search in |
|
|
709 | the 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 | |
|
|
715 | TODO, but take into account ARROW description above |
568 | |
716 | |
569 | =head3 WEAPON - type 15 - Weapons |
717 | =head3 WEAPON - type 15 - Weapons |
570 | |
718 | |
571 | This type is for general hack and slash weapons like swords, maces |
719 | This type is for general hack and slash weapons like swords, maces |
572 | and daggers and and .... |
720 | and daggers and and .... |
… | |
… | |
691 | - 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 |
692 | (minium is 0) |
840 | (minium is 0) |
693 | |
841 | |
694 | =item ac <number> |
842 | =item ac <number> |
695 | |
843 | |
696 | the amount of ac points the player's ac is decreased |
844 | the amount of ac points the player's ac is decreased when applying this object. |
697 | |
845 | |
698 | =item wc <number> |
846 | =item wc <number> |
699 | |
847 | |
700 | the amount of wc points the player's wc is decreased |
848 | the amount of wc points the player's wc is decreased when applying this object. |
701 | |
849 | |
702 | =back |
850 | =back |
703 | |
851 | |
704 | =head4 Player inherits following flags from weapons: |
852 | =head4 Player inherits following flags from weapons: |
705 | |
853 | |
… | |
… | |
723 | |
871 | |
724 | This field stores the hits the monster did yet. |
872 | This field stores the hits the monster did yet. |
725 | |
873 | |
726 | =back |
874 | =back |
727 | |
875 | |
|
|
876 | =head3 CREATOR - type 42 - Object creators |
|
|
877 | |
|
|
878 | Once 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 | |
|
|
881 | If FLAG_LIVESAFE is set the number of uses is unlimited. |
|
|
882 | |
|
|
883 | =over 4 |
|
|
884 | |
|
|
885 | =item hp <number> |
|
|
886 | |
|
|
887 | If FLAG_LIVE_SAVE is not set it is the absolute number of times the creator can |
|
|
888 | be used. |
|
|
889 | |
|
|
890 | =item speed <number> |
|
|
891 | |
|
|
892 | If speed is set the creator will create an object periodically, |
|
|
893 | see speed and speed_left fields in general object attribute description |
|
|
894 | for more details on how this period works. |
|
|
895 | |
|
|
896 | =item slaying <string> |
|
|
897 | |
|
|
898 | If set the generated object's name and |
|
|
899 | title will be set to this. |
|
|
900 | |
|
|
901 | =item other_arch <string> |
|
|
902 | |
|
|
903 | If the inventory of the creator is empty objects of the |
|
|
904 | archetype <string> will be generated. |
|
|
905 | |
|
|
906 | =item connected <number> |
|
|
907 | |
|
|
908 | See generic object attribute section. |
|
|
909 | |
|
|
910 | =back |
|
|
911 | |
728 | =head3 DRINK - type 54 - Drinkable stuff |
912 | =head3 DRINK - type 54 - Drinkable stuff |
729 | |
913 | |
730 | See FOOD description. |
914 | See FOOD description. |
731 | |
915 | |
732 | =head3 CHECK_INV - type 64 - Inventory checkers |
916 | =head3 CHECK_INV - type 64 - Inventory checkers |
… | |
… | |
778 | If this field is set the inventory checker will search for an object which |
962 | If this field is set the inventory checker will search for an object which |
779 | has the archetype name that matches <string>. |
963 | has the archetype name that matches <string>. |
780 | |
964 | |
781 | =item connected <connection id> |
965 | =item connected <connection id> |
782 | |
966 | |
783 | This is the connection that will be activated. |
967 | This is the connection that will be activated. The connection is |
|
|
968 | 'pushed' when someone enters the space with the inventory checker, |
|
|
969 | and it is 'released' when he leaves it. |
|
|
970 | |
|
|
971 | See also the description of the connected field in the generic object attribute |
|
|
972 | section. |
784 | |
973 | |
785 | =back |
974 | =back |
786 | |
975 | |
787 | =head3 FLESH - type 72 - Organs and body parts |
976 | =head3 FLESH - type 72 - Organs and body parts |
788 | |
977 | |
789 | See FOOD description. |
978 | See FOOD description. |
790 | |
979 | |
791 | =head3 MISC_OBJECT - type 79 - Misc. objects |
980 | =head3 MISC_OBJECT - type 79 - Misc. objects |
792 | |
981 | |
793 | A type for any object that has no special behaviour. |
982 | A type for any object that has no special behaviour. |
|
|
983 | |
|
|
984 | =head3 DUPLICATOR - type 83 - Duplicators or: Multiplicators |
|
|
985 | |
|
|
986 | This type of objects multiplies objects that are above it when it is activated. |
|
|
987 | You can even multiply by 0, which will destroy the object. |
|
|
988 | |
|
|
989 | =over 4 |
|
|
990 | |
|
|
991 | =item level <number> |
|
|
992 | |
|
|
993 | The multiplicator, if set to 0 or lower it will destroy the objects above it. |
|
|
994 | |
|
|
995 | =item other_arch <string> |
|
|
996 | |
|
|
997 | The archetype name of the objects which will be multiplied. |
|
|
998 | |
|
|
999 | =item connected <number> |
|
|
1000 | |
|
|
1001 | See generic object attribute section. |
|
|
1002 | |
|
|
1003 | =back |
794 | |
1004 | |
795 | =head3 HOLE - type 94 - Holes |
1005 | =head3 HOLE - type 94 - Holes |
796 | |
1006 | |
797 | Holes are holes in the ground where objects can fall through. When the hole |
1007 | Holes are holes in the ground where objects can fall through. When the hole |
798 | opens and/or is completly open all objects above it fall through (more |
1008 | opens and/or is completly open all objects above it fall through (more |
799 | precisely: if their head is above the hole). |
1009 | precisely: if their head is above the hole). |
|
|
1010 | |
|
|
1011 | When the HOLE is activated it's speed is set to 0.5. |
800 | |
1012 | |
801 | Trapdoors can only transfer the one who falls through to other coordinates |
1013 | Trapdoors can only transfer the one who falls through to other coordinates |
802 | on the B<same> map. |
1014 | on the B<same> map. |
803 | |
1015 | |
804 | =over 4 |
1016 | =over 4 |