… | |
… | |
94 | |
94 | |
95 | If the object is on the active list and speed_left is lower or |
95 | If the object is on the active list and speed_left is lower or |
96 | equal to 0 the absolute value of the speed field is added to speed_left |
96 | equal to 0 the absolute value of the speed field is added to speed_left |
97 | on the end of the tick. |
97 | on the end of the tick. |
98 | |
98 | |
|
|
99 | 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 |
|
|
101 | the more often the object is processed. |
|
|
102 | |
99 | =item no_drop (0|1) |
103 | =item no_drop (0|1) |
100 | |
104 | |
101 | Sets the flag FLAG_NO_DROP. |
105 | Sets the flag FLAG_NO_DROP. |
102 | See Flags section below. |
106 | See Flags section below. |
103 | |
107 | |
… | |
… | |
112 | See Flags section below. |
116 | See Flags section below. |
113 | |
117 | |
114 | =item auto_apply (0|1) |
118 | =item auto_apply (0|1) |
115 | |
119 | |
116 | Sets the flag FLAG_AUTO_APPLY. |
120 | Sets the flag FLAG_AUTO_APPLY. |
|
|
121 | See Flags section below. |
|
|
122 | |
|
|
123 | =item activate_on_push (0|1) (default: 1) |
|
|
124 | |
|
|
125 | Sets the flag FLAG_ACTIVATE_ON_PUSH. |
|
|
126 | See Flags section below. |
|
|
127 | |
|
|
128 | =item activate_on_release (0|1) (default: 1) |
|
|
129 | |
|
|
130 | Sets the flag FLAG_ACTIVATE_ON_RELEASE. |
117 | See Flags section below. |
131 | See Flags section below. |
118 | |
132 | |
119 | =item editable (more than deprecated) |
133 | =item editable (more than deprecated) |
120 | |
134 | |
121 | This field had a special meaning for crossedit, which used parts |
135 | This field had a special meaning for crossedit, which used parts |
… | |
… | |
162 | or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. |
176 | or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. |
163 | |
177 | |
164 | =item FLAG_AUTO_APPLY |
178 | =item FLAG_AUTO_APPLY |
165 | |
179 | |
166 | This flag has currently only meaning for the TREASURE type, see below. |
180 | This flag has currently only meaning for the TREASURE type, see below. |
|
|
181 | |
|
|
182 | =item FLAG_ACTIVATE_ON_PUSH |
|
|
183 | |
|
|
184 | This flag has only meaning for objects that can be linked together |
|
|
185 | with the 'connected' field and controls wether the object should |
|
|
186 | be activated when the connection is 'pushed' or it is 'released'. |
|
|
187 | |
|
|
188 | This flag is by default on. |
|
|
189 | |
|
|
190 | =item FLAG_ACTIVATE_ON_RELEASE |
|
|
191 | |
|
|
192 | This flag has only meaning for objects that can be linked together |
|
|
193 | with the 'connected' field and controls wether the object should |
|
|
194 | be activated when the connection is 'pushed' or it is 'released'. |
|
|
195 | |
|
|
196 | This flag is by default on. |
167 | |
197 | |
168 | =back |
198 | =back |
169 | |
199 | |
170 | =head2 Description of type specific attributes |
200 | =head2 Description of type specific attributes |
171 | |
201 | |
… | |
… | |
301 | with the treasurelist specified here. (I guess it's highly undefined what |
331 | with the treasurelist specified here. (I guess it's highly undefined what |
302 | happens if there is not a spell in the potions inventory). |
332 | happens if there is not a spell in the potions inventory). |
303 | |
333 | |
304 | =item on_use_yield <archetype> |
334 | =item on_use_yield <archetype> |
305 | |
335 | |
306 | When this object is applied this object will be created. |
336 | When this object is applied an instance of <archetype> will be created. |
307 | This field is also used by FOOD and POISON. |
|
|
308 | |
337 | |
309 | =item subtypes <potion subtype> |
338 | =item subtypes <potion subtype> |
310 | |
339 | |
311 | see include/spells.h for possible potion subtypes, there are currently 4: |
340 | see include/spells.h for possible potion subtypes, there are currently 4: |
312 | |
341 | |
… | |
… | |
329 | =item POT_BALM |
358 | =item POT_BALM |
330 | |
359 | |
331 | Unused, default behaiour of a potion. |
360 | Unused, default behaiour of a potion. |
332 | |
361 | |
333 | =back |
362 | =back |
|
|
363 | |
|
|
364 | =back |
|
|
365 | |
|
|
366 | =head3 FOOD - type 6 - Eatable stuff |
|
|
367 | |
|
|
368 | This is for objects that are representing general eatables like |
|
|
369 | beef or bread. |
|
|
370 | |
|
|
371 | The main difference between FOOD, FLESH and DRINK is that they |
|
|
372 | give different messages. |
|
|
373 | |
|
|
374 | The specialty of FLESH is that it inherits the resistancies of the |
|
|
375 | monsters it was generated in and will let dragons raise their resistancies |
|
|
376 | with that. |
|
|
377 | |
|
|
378 | If a player runs low on food he will grab for FOOD, DRINK and POISON |
|
|
379 | and if he doesn't find any of that he will start eating FLESH. |
|
|
380 | |
|
|
381 | =over 4 |
|
|
382 | |
|
|
383 | =item title <string> |
|
|
384 | |
|
|
385 | If the food has a title or is cursed it is considered 'special', which means that the |
|
|
386 | fields Str, Dex, Con, Int, Wis, Pow, resist_<resistancy>, hp and sp |
|
|
387 | are interpreted and have further effects on the player. |
|
|
388 | |
|
|
389 | The higher the food field is the longer the improvement of the player lasts |
|
|
390 | (except for hp and sp). |
|
|
391 | |
|
|
392 | =item food <number> |
|
|
393 | |
|
|
394 | This is the amount of food points the player gets when he eats this. |
|
|
395 | |
|
|
396 | =item on_use_yield <archetype> |
|
|
397 | |
|
|
398 | When this object is applied an instance of <archetype> will be created. |
334 | |
399 | |
335 | =back |
400 | =back |
336 | |
401 | |
337 | =head3 WEAPON - type 15 - Weapons |
402 | =head3 WEAPON - type 15 - Weapons |
338 | |
403 | |
… | |
… | |
478 | FLAG_XRAYS |
543 | FLAG_XRAYS |
479 | FLAG_BLIND |
544 | FLAG_BLIND |
480 | FLAG_SEE_IN_DARK |
545 | FLAG_SEE_IN_DARK |
481 | FLAG_UNDEAD |
546 | FLAG_UNDEAD |
482 | |
547 | |
|
|
548 | =head3 DRINK - type 54 - Drinkable stuff |
|
|
549 | |
|
|
550 | See FOOD description. |
|
|
551 | |
|
|
552 | =head3 CHECK_INV - type 64 - Inventory checkers |
|
|
553 | |
|
|
554 | This object checks whether the player has a specific item in his |
|
|
555 | inventory when he moves above the inventory checker. If the player has |
|
|
556 | the item (or not, which can be controlled with a flag) a connection will be triggered. |
|
|
557 | |
|
|
558 | If you set move_block you can deny players and monsters to reach the space where |
|
|
559 | the inventory checker is on, see 'move_block' description below. |
|
|
560 | |
|
|
561 | The conditions specified by hp, slaying and race are concationated with OR. |
|
|
562 | So matching one of those conditions is enough. |
|
|
563 | |
|
|
564 | =over 4 |
|
|
565 | |
|
|
566 | =item move_block <move type bitmask> |
|
|
567 | |
|
|
568 | If you set this field to block a movetype the move code will block any moves |
|
|
569 | onto the space with the inventory checker, IF the moving object doesn't have |
|
|
570 | (or has - if last_sp = 0) the item that the checker is searching for. |
|
|
571 | |
|
|
572 | =item last_sp (0|1) |
|
|
573 | |
|
|
574 | If last_sp is 1 'having' the item that is being checked for will |
|
|
575 | activate the connection or make the space with the checker non-blocking. |
|
|
576 | If last_sp is 0 'not having' the item will activate the connection |
|
|
577 | or make the space with the checker non-blocking. |
|
|
578 | |
|
|
579 | =item last_heal (0|1) |
|
|
580 | |
|
|
581 | If last_heal is 1 the matching item will be removed if the inventory checker |
|
|
582 | activates a connection and finds the item in the inventory. |
|
|
583 | |
|
|
584 | (A inventory checker that blocks a space won't remove anything from inventories) |
|
|
585 | |
|
|
586 | =item hp <number> |
|
|
587 | |
|
|
588 | If this field is not 0 the inventory checker will search for an object |
|
|
589 | with the type id <number>. |
|
|
590 | |
|
|
591 | =item slaying <string> |
|
|
592 | |
|
|
593 | If this field is set the inventory checker will search for an object that |
|
|
594 | has the same string in the slaying field (for example a key string of a key). |
|
|
595 | |
|
|
596 | =item race <string> |
|
|
597 | |
|
|
598 | If this field is set the inventory checker will search for an object which |
|
|
599 | has the archetype name that matches <string>. |
|
|
600 | |
|
|
601 | =item connected <connection id> |
|
|
602 | |
|
|
603 | This is the connection that will be activated. |
|
|
604 | |
|
|
605 | =back |
|
|
606 | |
|
|
607 | =head3 FLESH - type 72 - Organs and body parts |
|
|
608 | |
|
|
609 | See FOOD description. |
|
|
610 | |
|
|
611 | =head3 HOLE - type 94 - Holes |
|
|
612 | |
|
|
613 | Holes are holes in the ground where objects can fall through. When the hole |
|
|
614 | opens and/or is completly open all objects above it fall through (more |
|
|
615 | precisely: if their head is above the hole). |
|
|
616 | |
|
|
617 | Trapdoors can only transfer the one who falls through to other coordinates |
|
|
618 | on the B<same> map. |
|
|
619 | |
|
|
620 | =over 4 |
|
|
621 | |
|
|
622 | =item maxsp (0|1) |
|
|
623 | |
|
|
624 | This field negates the state of the connection: When maxsp is 1 the pit will |
|
|
625 | open/close when the connection is deactivated. Otherwise it will open/close |
|
|
626 | when the connection is activated. This field only has effect when the |
|
|
627 | connection is triggered. So if you put a closed hole on a map, and the |
|
|
628 | connection is deactivated, and maxsp is 1 the hole will remain closed until the |
|
|
629 | connection was triggered once. |
|
|
630 | |
|
|
631 | =item connected <connection id> |
|
|
632 | |
|
|
633 | This is the connection id, which lets the hole opening or closing when |
|
|
634 | activated. The flags FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE control |
|
|
635 | at which connection state the object is activated. |
|
|
636 | |
|
|
637 | For example: if FLAG_ACTIVATE_ON_RELEASE is set to 0 the hole won't react when |
|
|
638 | the connection is released. |
|
|
639 | |
|
|
640 | =item wc <number> (internal) |
|
|
641 | |
|
|
642 | This is an internal flag. If it is greater than 0 it means that the hole is not |
|
|
643 | yet fully open. More preciesly: this field is the animation-step and if it is |
|
|
644 | set to the 'closed' step of the animation the hole is closed and if it is on |
|
|
645 | the 'open' animation step (wc = 0), the hole is open. |
|
|
646 | |
|
|
647 | =item sp <number> |
|
|
648 | |
|
|
649 | The destination y coordinates on the same map. |
|
|
650 | |
|
|
651 | =item hp <number> |
|
|
652 | |
|
|
653 | The destination x coordinates on the same map. |
|
|
654 | |
|
|
655 | =back |
|
|
656 | |
483 | =head3 FORCE - type 114 - Forces |
657 | =head3 FORCE - type 114 - Forces |
484 | |
658 | |
485 | Forces are a very 'thin' type. They don't have much behaviour other than |
659 | Forces are a very 'thin' type. They don't have much behaviour other than |
486 | disappearing after a time and/or affecting the player if they are in his inventory. |
660 | disappearing after a time and/or affecting the player if they are in his |
|
|
661 | inventory. |
487 | |
662 | |
488 | Forces only take effect on the player if they have set FLAG_APPLIED. |
663 | Forces only take effect on the player if they have set FLAG_APPLIED. |
489 | |
664 | |
490 | Whether the duration field is processed or not a tick is controlled via the |
665 | Whether the duration field is processed or not a tick is controlled via the |
491 | speed and speed_left field. Look above at the generic description of these |
666 | speed and speed_left field. Look above at the generic description of these |
492 | fields. |
667 | fields. |
493 | |
668 | |
|
|
669 | NOTE: Setting FLAG_IS_USED_UP on an force will also consider the 'food' field |
|
|
670 | like stated above in the FLAG_IS_USED_UP description. BUT: If the food field reaches |
|
|
671 | 0 before duration and FLAG_APPLIED is set, the force will last for 'duration'. |
|
|
672 | If the FLAG_APPLIED is not set the force is removed when food reaches 0. |
|
|
673 | Generally this means: FLAG_IS_USED_UP doesn't have good semantics on forces. |
|
|
674 | |
494 | =over 4 |
675 | =over 4 |
495 | |
676 | |
496 | =item duration |
677 | =item duration |
497 | |
678 | |
498 | While this field is greater than 0 the force/object is not destroyed. |
679 | While this field is greater than 0 the force/object is not destroyed. It is |
499 | It is decreased each tick by 1. |
680 | decreased each tick by 1. |
500 | |
681 | |
501 | If it reaches 0 the force/object is destroyed. |
682 | If it reaches 0 the force/object is destroyed. |
502 | |
683 | |
503 | This field can have this meaning for B<any> object if that object has |
684 | This field can have this meaning for B<any> object if that object has |
504 | FLAG_IS_USED_UP and FLAG_APPLIED set. See the description of FLAG_IS_USED_UP |
685 | FLAG_IS_USED_UP and FLAG_APPLIED set. See the description of FLAG_IS_USED_UP |
… | |
… | |
506 | |
687 | |
507 | =back |
688 | =back |
508 | |
689 | |
509 | =head3 POTION_EFFECT - type 115 - Potion effects (resistancies) |
690 | =head3 POTION_EFFECT - type 115 - Potion effects (resistancies) |
510 | |
691 | |
511 | This object is generated by the POTION code when the potion is a |
692 | This object is generated by the POTION code when the potion is a resistance |
512 | resistance giving potion. It has mainly the same behaviour as a FORCE. |
693 | giving potion. It has mainly the same behaviour as a FORCE. |
513 | |
694 | |
514 | The specialty of the potion effect is that the resistancy it gives is absolute, |
695 | The specialty of the potion effect is that the resistancy it gives is absolute, |
515 | so if you drin a resistancy potion of fire+60 you will get 60% resistancy to fire. |
696 | so if you drin a resistancy potion of fire+60 you will get 60% resistancy to |
|
|
697 | fire. |
516 | |
698 | |
517 | Multiple potion effects only give you the maximum of their resistancy. |
699 | Multiple potion effects only give you the maximum of their resistancy. |