home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / d / d-linux.zip / dm-dist / doc / dbsup.doc < prev    next >
Text File  |  1991-03-01  |  20KB  |  579 lines

  1. /* ************************************************************************
  2. *  Copyright (C) 1990, 1991 - see 'license.doc' for complete information. *
  3. ************************************************************************* */
  4.  
  5.                    DATABASE SUPPLEMENTAL DOCUMENTATION
  6.                             "dbsup.doc"
  7.  
  8.  
  9. World File field description:
  10. =============================
  11.  
  12. Main structure notes:
  13. ---------------------
  14.  
  15. #<virtual number> is:
  16.   A number for the given room. No two rooms may have the same number.
  17.   The <virtual number> must always increase when browsing down the 
  18.   world file (but increments can be larger than one).
  19.  
  20. <name>~<NL>:
  21.   This name is the "title" of the room. This title is also used in special
  22.   procedures like:
  23.     "exits"
  24.     "brief mode"
  25.  
  26. <description>~<NL>:
  27.   This is the general description of the room.
  28.  
  29. <zone nr> is:
  30.   The number of the zone in which this room is located. This number is used
  31.   for resetting zones and monster zone movement. See the zone file.
  32.  
  33. <room_flags> are:
  34.   A bitvector consisting of the room conditions as:
  35.  
  36.   DARK           1  Light must be used to see anything.
  37.   DEATH          2  A player 'dies' (no xp lost) when entering.
  38.                     It is a good idea to:
  39.                      *Have these rooms light, because then EXITS will show
  40.                       the room title, for example "In Boiling Water".
  41.                      *Make exits to all rooms from which one can enter the
  42.                       death_room, then the "death cry" will be heard by
  43.                       other members of the group considering following...
  44.   NO_MOB         4  No monsters may walk around in here
  45.   INDOORS        8  This is inside (a house,cave or dungeon for example)
  46.   LAWFULL       16  ??? 
  47.   NEUTRAL       32  ???
  48.   CHAOTIC       64  ???
  49.   NO_MAGIC     128  Not implemented.
  50.   TUNNEL       256  ???
  51.   PRIVATE      512  It is impossible to teleport to this room if it
  52.                     already contains two characters.
  53.                     Also the 'teleport' spell will never teleport a
  54.                     player into this room.
  55.  
  56. ??? means that the flag isn't used yet (and you Shouldn't use it either!)
  57.  
  58.  
  59. <sector_type> is:
  60.   This determines how many movement points are used when moving through
  61.   a location of the type - use one of the numbers 0..7 (they are NOT the
  62.   movement-points used - merely indexes to a lookup-table):
  63.  
  64.   SECT_INSIDE          0  Uses as if walking indoors
  65.   SECT_CITY            1  Uses as if walking in a city
  66.   SECT_FIELD           2  Uses as if walking in a field
  67.   SECT_FOREST          3  Uses as if walking in a forest
  68.   SECT_HILLS           4  Uses as if walking in hills
  69.   SECT_MOUNTAIN        5  Uses as if climbing in mountains
  70.   SECT_WATER_SWIM      6  Uses as if swimming
  71.   SECT_WATER_NOSWIM    7  Impossible to swim water - requires a boat
  72.  
  73.  
  74. Direction fields:
  75. -----------------
  76.  
  77. <Exit number> is one of:
  78.   0 = North
  79.   1 = East
  80.   2 = South
  81.   3 = West
  82.   4 = Up
  83.   5 = Down
  84.  
  85. <general description><NL>~<NL>:
  86.   What a player will see if he types 'look <direction>'
  87.  
  88. <keyword list>~<NL>:
  89.   used for commands like 'open', 'close', etc. should be 'door' for ordinary
  90.   doors. Example: An exit from a given room leads through a cupboard. The
  91.   keyword list for this exit might look like this:
  92.  
  93.   "cupboard door~"
  94.  
  95.  
  96. <Door flag> [NL]:
  97.  
  98.   If <Door Flag> is 1, the exit can be locked/unlocked/opened/closed/picked.
  99.   If it is 2, the exit can only be locked/unlocked/opened/closed.
  100.   If it is 0, these commands won't work. (The exit can still be closed at
  101.   reset, however; maybe to be opened by some special routine, like a concealed
  102.   handle).
  103.  
  104.   The state of the doors after reset may be controlled by a command in the
  105.   reset-command table (see the zone file). The initial state of a door is
  106.   open.
  107.  
  108. <Key Number> [NL]:
  109.   The number of the object which can unlock/lock the door (in the direction
  110.   given). If a player carries/holds this object, he can lock/unlock.
  111.   <Key Number> == -1 means no keyhole. If <Door flag> is 0, the value of this
  112.   field is ignored.
  113.  
  114. <to_room> <NL>:
  115.   The virtual number of the room to which the exit leads. If this number is
  116.   -1 (NOWHERE), the exit doesn't lead anywhere. This might be useful for
  117.   adding an exit-description in a direction which doesn't actually lead
  118.   anywhere.
  119.  
  120. ** Note about doors. You must make a door in both rooms that the door
  121.                      is set between.
  122.  
  123. Extra descriptions:
  124. -------------------
  125.  
  126. <blank separated keyword list>~<NL> is:
  127.   A list of the keywords that will allow the extra description to be
  128.   displayed. The keywords must must be seperated by blanks.
  129.  
  130.  
  131. <description><NL>~<NL>:
  132.   The description that is show when a player types 'look at <keyword>'
  133.   and keyword matches one of the above.
  134.  
  135.  
  136. Example of a room entry is the database:
  137. ----------------------------------------
  138.  
  139. #100
  140. The Lego temple~
  141.    You stand in a tiny, red temple; built entirely from Lego bricks. It is,
  142. sadly, not a very interesting place, and perhaps you should leave through the
  143. portal which leads south to a sunny garden.
  144. ~
  145. 1 12 0
  146. D2
  147. You see the grand portal of the Lego church. Beyond is an inviting garden.
  148. ~
  149. portal grand~
  150. 1 2 107
  151. E
  152. portal~
  153. The portal is high and arched, built out of lego bricks of the finest quality.
  154. ~
  155. E
  156. brick~
  157. The bricks are all in bright different colours.
  158. ~
  159. S
  160. #101
  161. .
  162. .
  163. .
  164.  
  165. Facts about this room is:
  166.   Room number 100
  167.   Zone number 1
  168.     Room Flags  (8+4=12) INDOORS and NO_MOB
  169.   Sector Type Inside (movement loss calc only)
  170.   One exit (D2) to the south with 'look south' description
  171.   Door Flag 1
  172.   Key no.   2
  173.   Leads to room 107
  174.     Extra description for the portal and bricks.
  175.  
  176. -------------------------------------------------------------------------
  177.  
  178. Monster fields description:
  179. ===========================
  180.  
  181. #<virtual number><NL> is:
  182.   The monsters virtual number. Rules are same as for room virtual numbers.
  183.  
  184. <namelist><!NL>~<NL>
  185.   The space-separated name alias list.
  186.  
  187. <short description><!NL>~<NL>
  188.   This string will be displayed when the monster take action, for example
  189.   if it is "The Beastly Fido", and fido leaves south the message will be
  190.   "The Beastly Fido leaves south."
  191.  
  192. <long description><NL>~<NL>
  193.   This description is displayed when the monster is in it's "default"
  194.   position. When not in the default position, a message like:
  195.   "<short description> is sleeping here." could be displayed.
  196.  
  197. <description><NL>~<NL>
  198.   This will be displayed when a player looks at the monster.
  199.  
  200. <action flags>[NL]
  201.  
  202.   This bitvector define how the monster behave.  The bits mean:
  203.  
  204.   ACT_SPEC         1  This means that there is a special programmed C
  205.                       procedure connected to the monster. When this bit
  206.                       is set the monster "function pointer" must be
  207.                       assigned in the "spec_assign.c" file.
  208.  
  209.   ACT_SENTINEL     2  When this bit is set the monster will NOT
  210.                       move around in the world.
  211.  
  212.   ACT_SCAVENGER    4  When this bit is set, monsters will pick up stuff
  213.                       lying on the ground. It will pick up the most
  214.                       expensive items first.
  215.  
  216.   ACT_ISNPC        8  RESERVED FOR INTERNAL USE
  217.  
  218.   ACT_NICE_THIEF  16  When this bit is set, a monster will not attack
  219.                       a thief which has been caught in the act of 
  220.                       stealing from this monster.
  221.  
  222.   ACT_AGGRESSIVE  32  When this bit is set, the monster will attack and
  223.                       attempt to kill any player it can get it's claws on.
  224.                       It will not attack players it can't see (for example
  225.                       dark rooms or when player is invisible, unless the
  226.                       monster can detect invisibility)
  227.  
  228.   ACT_STAY_ZONE   64  When this bit is set, the monster will never move
  229.                       into another zone of the world (this is good for
  230.                       keeping your monsters in your own adventure).
  231.  
  232.   ACT_WIMPY      128  When this bit is set, the monster will flee when it's
  233.                       getting percentwise low on hitpoints.
  234.                       If the monster is both aggressive and wimpy, then it
  235.                       will only attack players that are NOT awake! (ie. also
  236.                       suffering players).
  237.  
  238. <affection flags>[NL]
  239.  
  240.   This is a bitvector that indicates what the monster is affected by.
  241.   Puff could for example be able to "detect invisible" or maybe
  242.   "sanctuary" (1/2 damage). A lot of these bits are meant for players
  243.   only (in a context with a spell), and should NOT be used when indicated.
  244.   The bits are:
  245.  
  246.   AFF_BLIND             1         RESERVED PLAYERS
  247.   AFF_INVISIBLE         2         The monster is invisible
  248.   AFF_DETECT_EVIL       4         RESERVED PLAYERS
  249.   AFF_DETECT_INVISIBLE  8         The monster can see invisible players
  250.                                   (Especially good for aggressive npc's)
  251.   AFF_DETECT_MAGIC      16        RESERVED PLAYERS
  252.   AFF_SENCE_LIFE        32        RESERVED PLAYERS
  253.   AFF_HOLD              64        ??? DO NOT USE
  254.   AFF_SANCTUARY         128       The monster has sanctuary (1/2 damage)
  255.   AFF_GROUP             256       RESERVED PLAYERS
  256.   AFF_CURSE             1024      ??? DO NOT USE
  257.   AFF_FLAMING           2048      ??? DO NOT USE
  258.   AFF_POISON            4096      RESERVED PLAYERS
  259.   AFF_PROTECT_EVIL      8192      ??? DO NOT USE
  260.   AFF_PARALYSIS         16384     ??? DO NOT USE
  261.   AFF_MORDEN_SWORD      32768     ??? DO NOT USE
  262.   AFF_FLAMING_SWORD     65536     ??? DO NOT USE
  263.   AFF_SLEEP             131072    RESERVED PLAYERS
  264.   AFF_DODGE             262144    ??? DO NOT USE
  265.   AFF_SNEAK             524288    The message "The xxx leaves direction" will
  266.                                   not be displayed when the monster moves
  267.                                   out/in to a room.
  268.   AFF_HIDE              1048576   The monster will be hidden, and can only
  269.                                   be detected by a "sense life" spell
  270.   AFF_FEAR              2097152   ??? DO NOT USE   
  271.   AFF_CHARM             4194304   The monster will act as charmed when a
  272.                                   "follow <player>" is entered. Note that
  273.                                   players can't force monsters to follow
  274.                                   them.
  275.   AFF_FOLLOW            8388608   RESERVED PLAYERS
  276.  
  277.  
  278. <Alignment Flag>[NL]
  279.  
  280.   This is the monsters alignment, read as:
  281.   +1000 .. +350  Good Alignment
  282.    +349 .. -349  Neutral Alignment
  283.    -350 ..-1000 Evil Alignment
  284.  
  285. <Detailed/Simple flag><NL>
  286.  
  287.   This flag must be entered as a uppercase "S". S indicates that "Simple"
  288.   monster data follow. Anything but an S will be interpreted as if
  289.   "Detailed" monster data is to follow. We will NOT describe detailed
  290.   monsters as they are VERY detailed.
  291.  
  292.  
  293. <Level>
  294.    This is the level of the monster. See "defs.doc" for guidelines when
  295.    setting the level.
  296.  
  297. <THAC0>
  298.    The monsters THAC0.
  299.    See the file "defs.doc" for an explanation of armour vs. THAC0, and
  300.    guidelines for THAC0.
  301.    THAC0 is an abbrevation for "To Hit Armour Class Zero".
  302.  
  303. <AC>
  304.    The monsters armour class. See "defs.doc" for guidelines regarding
  305.    armour.
  306.  
  307. <Hit Points (format is xdy+z)>
  308.    This defines the number of hitpoints a given monster has. If this is
  309.    entered into the file:
  310.  
  311.    ... ... 3d8+10 ...
  312.  
  313.    the monster will have 10 hitpoints plus the result of rolling 3 dice
  314.    with 8 side, and adding their sum. All the numbers (even zero), the
  315.    plus sign, and the letter 'd' MUST be entered!!! Example:
  316.  
  317.    ..... 1d6+0 ....
  318.  
  319.  
  320. <Damage (as HP)><NL>
  321.    This is the damage a monster will cause when it is using NO weapons
  322.    (the Bare hand damage). The format is exacly like the one described
  323.    for hit points. A thing to note about damage:
  324.    The number after the plus sign, is the "strength bonus". This bonus
  325.    will apply to any weapons used, and bare hands too. Example:
  326.  
  327.    ..... 1d4+10
  328.  
  329.    This monster will damage between 11 and 14 hitpoints each round. If the
  330.    monster picks up and wields a tiny stick which give 1d2 damage, then the
  331.    monster will now damage by : 1d2 + 10 points. 
  332.  
  333. <Gold>
  334.    The amout of gold carried by the monster.
  335.  
  336. <Exp><NL>
  337.    The experience this monster has. Follow guidelines in "defs.doc".
  338.  
  339. <position>
  340.    This defines the monster's position when loaded into the game.
  341.    A position is one of:
  342.  
  343.    POSITION_DEAD       0  DO NOT USE
  344.    POSITION_MORTALLYW  1  DO NOT USE
  345.    POSITION_INCAP      2  DO NOT USE
  346.    POSITION_STUNNED    3  DO NOT USE
  347.    POSITION_SLEEPING   4  The monster is sleeping.
  348.    POSITION_RESTING    5  The monster is resting.
  349.    POSITION_SITTING    6  The monster is sitting.
  350.    POSITION_FIGHTING   7  DO NOT USE.
  351.    POSITION_STANDING   8  The monster is standing.
  352.  
  353.  
  354. <default position>
  355.    This is the position into which the monster will return after
  356.    a fight. This position also defines when the <long description>
  357.    is displayed - see above.
  358.  
  359. <sex><NL>
  360.    This is the monsters sex, on of:
  361.  
  362.    SEX_NEUTRAL   0
  363.    SEX_MALE      1
  364.    SEX_FEMALE    2
  365.  
  366.    No further explanation is needed (hopefully).
  367.  
  368.  
  369. Object fields description:
  370. ==========================
  371.  
  372. #<virtual number><NL>
  373.    See rules for rooms above.
  374.  
  375. <namelist>~<NL>:
  376.    Same as for monsters above.
  377.  
  378. <short description>~<NL>
  379.    This string will be displayed when the object is used. For example
  380.    if it is "a rubber raft", and a player drops it, then a message like:
  381.    "Monthy drops a rubber raft."
  382.    could be displayed.
  383.  
  384. <long description>~<NL>
  385.    This description is displayed when the object is lying on the ground.
  386.    For example, if it is "A furled umbrella lies here.~" then this message
  387.    is displayed when the umbrella is lying on the ground.
  388.  
  389. <action description>~<NL>
  390.    Do not use.
  391.  
  392. <type flag>[NL]
  393.    This defines what kind of item you are defining, it can be one of:
  394.  
  395.    ITEM_LIGHT      1  Item is a light.
  396.    ITEM_SCROLL     2  Not yet implemented
  397.    ITEM_WAND       3  Not yet implemented
  398.    ITEM_STAFF      4  Not yet implemented
  399.    ITEM_WEAPON     5  Item is a weapon
  400.    ITEM_FIREWEAPON 6  Not yet implemented
  401.    ITEM_MISSILE    7  Not yet implemented
  402.    ITEM_TREASURE   8  Item is a treasure (not money)
  403.    ITEM_ARMOR      9  Item is armour.
  404.    ITEM_POTION    10  Not yet implemented
  405.    ITEM_WORN      11  ???
  406.    ITEM_OTHER     12  Item is other
  407.    ITEM_TRASH     13  Item is trash
  408.    ITEM_TRAP      14  Not yet implemented
  409.    ITEM_CONTAINER 15  Item is a container
  410.    ITEM_NOTE      16  Item is a note that can be written upon (with a pen)
  411.    ITEM_DRINKCON  17  Item is a drink container, for example a bottle or
  412.                       a barrel or a wine-skin.
  413.                       A drinkcontainer whit contents must *always* have
  414.                       two names: 1. The name of the drink, 2. the name
  415.                       of the container, example:
  416.                        tea cup~
  417.  
  418.    ITEM_KEY       18  Item is a key
  419.    ITEM_FOOD      19  Item is food.
  420.    ITEM_MONEY     20  Item is money.
  421.    ITEM_PEN       21  Item is a pen.
  422.    ITEM_BOAT      22  Item is a boat, which must be carried by a player if
  423.                       the player wishes to enter NOSWIM room sector types.
  424.  
  425. <extra flag>[NL]
  426.    This bitvector defines mostly special effects:
  427.  
  428.    ITEM_GLOW            1  The item is glowing.
  429.    ITEM_HUM             2  The item is "humming"/"buzzing".
  430.    ITEM_DARK            4  ???
  431.    ITEM_LOCK            8  ???
  432.    ITEM_EVIL           16  ???
  433.    ITEM_INVISIBLE      32  Item is invisible.
  434.    ITEM_MAGIC          64  Item will show a magical aura when 'detect magic'
  435.                            is used.
  436.    ITEM_NODROP        128  Item can not be dropped (cursed for example)
  437.    ITEM_BLESS         256  Item is blessed.
  438.    ITEM_ANTI_GOOD     512 /* not usable by good people    */
  439.    ITEM_ANTI_EVIL    1024 /* not usable by evil people    */
  440.    ITEM_ANTI_NEUTRAL 2048 /* not usable by neutral people */
  441.  
  442.  
  443. <wear flag><NL>
  444.    This bitvector defines if items can be taken, and if they can be worn:
  445.  
  446.    ITEM_TAKE              1 Item is takeable.
  447.    ITEM_WEAR_FINGER       2 Can be worn on a finger (rings usually)
  448.    ITEM_WEAR_NECK         4 Can be worn around neck.
  449.    ITEM_WEAR_BODY         8 Can be worn on body.
  450.    ITEM_WEAR_HEAD        16 Can be worn on head.
  451.    ITEM_WEAR_LEGS        32 Can be worn on legs.
  452.    ITEM_WEAR_FEET        64 Can be worn on feet
  453.    ITEM_WEAR_HANDS      128 Can be worn on hands (gauntlets, etc)
  454.    ITEM_WEAR_ARMS       256 Can be worn on arms.
  455.    ITEM_WEAR_SHIELD     512 Can be used as a shield.
  456.    ITEM_WEAR_ABOUT     1024 ???
  457.    ITEM_WEAR_WAISTE    2048 Can be worn around the waiste (belt)
  458.    ITEM_WEAR_WRIST     4096 Can be worn on wrist (bracelets)
  459.    ITEM_WIELD          8192 Can be wielded and used as a weapon
  460.    ITEM_HOLD          16384 Item can be held in a hand.
  461.    ITEM_THROW         32768 Not yet implemented.
  462.                             Item can be thrown.
  463.  
  464. <value 0> <value 1> <value 2> <value 3> <NL>
  465.    These values are very central. They define the ability of items based on
  466.    the items <Item Type>. These values are defined in "values.doc". Note that
  467.    if you define an item as being anything but a weapon, you shouldn't set
  468.    the 'wield' flag. Many similar obvious rules apply. Example of 4 values:
  469.  
  470.    If the <Item Type> == ITEM_CONTAINER then the values are interpeted as:
  471.  
  472.       Value[0]: Maximum weight the container can contain.
  473.       Value[1]: Container flags:
  474.  
  475.         CLOSEABLE     - 1
  476.         PICKPROOF     - 2
  477.         CLOSED        - 4
  478.         LOCKED        - 8
  479.  
  480.       Value[2]: The item-number of the object which can open the object.
  481.                 -1 means no lockability.
  482.       Value[3]: Internal use for Corpses that must "rot".
  483.  
  484.  
  485. <weight>[NL]
  486.    The weight of the item in pounds.
  487.  
  488. <value>[NL]
  489.    The value of the item if sold - see "defs.doc" for ideas on prices.
  490.  
  491. <cost/day><NL>
  492.    The cost to store the item in the reception overnight.
  493.  
  494.  
  495.  
  496.  
  497. Several extra descriptions or none at all may appear. They follow the room
  498. format exactly.
  499.  
  500. 'E'<NL>
  501. <keyword-list>~<NL>
  502.    Exactly as in rooms.
  503.  
  504. <extra description><NL>~<NL>
  505.    Exactly as in rooms.
  506.  
  507.  
  508.  
  509. Between zero and two "affect's" may be set on an item. The affects could
  510. for example modify a characters strength, height etc. The affect only goes
  511. into affect when the character wear, wield or hold the item. The affect
  512. is removed when the character removes the items.
  513.  
  514. 'A'<NL>
  515.    When items are worn using wear/wield/grab/hold commands, the 'A' will
  516.    allow the items to affect a characters various abilities. Currently
  517.    a maximum of 2 'A' are allowed.
  518.  
  519. <location>[NL]
  520.    <location> is one of the below numbers, indicating which ability
  521.    will be changed.
  522.  
  523.    APPLY_NONE              0  DO NOT USE.
  524.    APPLY_STR               1
  525.    APPLY_DEX               2
  526.    APPLY_INT               3
  527.    APPLY_WIS               4
  528.    APPLY_CON               5
  529.    APPLY_SEX               6  DO NOT USE.
  530.    APPLY_CLASS             7  DO NOT USE.
  531.    APPLY_LEVEL             8  DO NOT USE.
  532.    APPLY_AGE               9
  533.    APPLY_CHAR_WEIGHT      10
  534.    APPLY_CHAR_HEIGHT      11
  535.    APPLY_MANA             12  DO NOT USE.
  536.    APPLY_HIT              13  The MAXIMUM number of hitpoints.
  537.    APPLY_MOVE             14  DO NOT USE.
  538.    APPLY_GOLD             15  DO NOT USE.
  539.    APPLY_EXP              16  DO NOT USE.
  540.    APPLY_AC               17
  541.    APPLY_ARMOR            17  Same as APPLY_AC
  542.    APPLY_HITROLL          18  The bonus/penalty to hit the opponent.
  543.    APPLY_DAMROLL          19  The bouns/penalty to damage the opponent.
  544.    APPLY_SAVING_PARA      20  These five are saving throws.
  545.    APPLY_SAVING_ROD       21
  546.    APPLY_SAVING_PETRI     22
  547.    APPLY_SAVING_BREATH    23
  548.    APPLY_SAVING_SPELL     24  This is the most used saving throw.
  549.  
  550.  
  551. <modifier><NL>
  552.  
  553.    The modifier is added to the APPLY_XXX ability of the character
  554.    when he uses an item, and is subtracted when he stops using it.
  555.    Take great care when using this. This is an example of an item of
  556.    improve strength and armour class. Example:
  557.  
  558.      A
  559.      1 2
  560.      A
  561.      17 -2
  562.  
  563.    This adds +2 to the strength, and adds -2 to the AC (thus improving it).
  564.    No more 'A'ffects is allowed at this time.
  565.  
  566. -------------------------------------------------------------------------
  567.  
  568. Abbrevations:
  569. =============
  570.  
  571. <contents> indicates that the contents MUST be entered.
  572.  
  573. [contents] indicates that the contents can OPTIONALLY be entered.
  574.  
  575. <NL> is Newline (return)
  576.  
  577. ! This indicates "NOT" - for example <!NL> means NO newline (ei. it is
  578.   forbidden to use newline here).
  579.