DARKOVER 2.0 Builder Documentation for Darkover MUD ZONE.TXT Version 2.2 Last Updated: 4/1/2008 Landis ZONE.TXT Index: 1.......The Zone File 2.......Zone Archetype 3.......If Flags 4.......Example 4.1.....Header 4.2.....M Command 4.3.....O Command 4.4.....G Command 4.5.....E Command 4.6.....P Command 4.7.....D Command 4.8.....N Command 4.9.....U Command 4.10....F Command 4.11....T Command 4.12....R Command 4.13....A Command 4.14....C Command 4.15....X Command 4.16....Y Command 4.17....J Command 5.......Example file 1.......The Zone File --------------------- The zone file tells the MUD where everything goes, how does are short, what mobs are wearing, etc. The zone file also tells the MUD how often to reset that zone. The file is divided into two parts, the header file and the commands section. 2.......Zone Archetype ---------------------- #VNUM Area Name~ S #99999 $~ 3.......If Flags ---------------- Just wanted to put a special note on if-flags here. The first value for each command is the if-flag. If this value is 0 the MUD will try to execute the current command no matter what. If the flag is non-zero (commonly 1) the MUD will only execute the command if the previous command was successful. This is a very important flag! Say you equip a mob with a certain item. Before the next zone reset that mob is not killed. During the next reset, the MUD will again put that item on the mob unless the if-flag is non zero. You should use values of 1 for all if-flags equipping mobs or putting items into containers. 4.......Example --------------- #1 Sample Zone for a City V1.0 (Eldritch, levels 1-10, sample.zon)~ 150 40 2 1 * COMMANDS * S #99999 $~ 4.1.....Header The first line of the header contains the VNUM of the zone. This is typically your set of vnums/100, so if you have vnums 6000-699, your zone number is 60. The second line is the title of your zone. Note the note at the end of the title -- (BuilderName, TargetLevels, filename). The closing flags just help with administrative stuff on the mud itself. The first value in the third line is the highest possible numberd room in that zone. This number should be obtained from Rall the Builder Guy. The second zero is the number of hours between zone resets. This should be set to about 20 for towns or heavily traveled areas, or about 40 for other zones. The third value is the type of zone reset. 0 is a no reset zone, 1 resets whenever no players are present, 2 resets at any time. Most zones should be type 2. The fourth value is the status of the zone. 0 is for connected, 1 is for unconnected. Flag your zone as 1 until an immortal can put it in for you, at which time they will set this to 1. Following the header is each zone command on it's own line. 4.2.....M Command M The max number is the limit of that type of mob in the whole world. This should be set to limit the number of that mob in your zone. Say mob number 123 is a pixie. if you want three pixies sitting in room 100, the zone file would read: M 0 123 3 100 * 3 pixies in room 100 M 0 123 3 100 M 0 123 3 100 The if-flag for this command should always be 0. 4.3.....O Command O This command puts objects in a room, such as fountains or bulletin boards or chests or miscellaneous objects you just want lying around the room. The if-flag for this command should always be 0. This command will only load ONE item of a certain vnum into a room. If you wish to load mutltiple items into a room, use the U command. 4.4.....G Command G This command gives an item to the mob just loaded. Be sure to set the if-flag for this to 1. See O command for max exist advice. Generally set the max exist to how many mobs you have. So if you give item 100 to 5 mobs, set the max-exist at 5. The G flag will simply put the object into the mob's inventory. 4.5.....E Command E This command equips a mob with a certain item. Again, be sure to set the if-flags for these to 1. The E command will attempt to equip the LAST LOADED mob with the arguments. The wear positions are: 0 light 1 Right Finger 2 Left Finger 3 Neck 4 Body 5 Head 6 Legs 7 Feet 8 Hands 9 Trinket 10 Shield 11 About Body 12 Waist 13 Jewelry 14 Wield 15 Hold 16 Right Wrist 17 Left Wrist See the give command for max-exist advice. If you want to equip a mob with two weapons, set one weapon as 'wield' and the second as 'held.' The mud will set it as wielding two weapons. 4.6.....P Command P This command puts an object into a container. I really suggest you make the if-flag value 1 and put this immediately after the container load. Also, the MUD doesn't handle multiple containers of the same VNUM very well, so if you want multiple containers of the same type with an object in them, make separate VNUMs for each incidence of the container. 4.7.....D Command D This command opens or closes a door. Room VNUM is the room of the door is in. The exit # is the same as for direction entries in the world file, as below: (north) 0 4 (up) | / (west) 3-+-1 (east) + | / 2 5 (down) (south) The doorstates are: 0 Open 1 Closed 2 Closed and locked 3 Open and hidden 4 Closed and hidden 5 Closed, hidden and locked 6 Closed, hidden, locked and can't be found at all Set the if-flags here at 0. 4.8.....N Command N The max number for this command is the limit of this type of mob in the room, not the world. This is most useful for guards. Say you loaded some guards (mob 123) into rooms 100, 101 and 102 using the M command. M 0 123 3 100 M 0 123 3 101 M 0 123 3 102 If the guards in room 101 and 102 are killed, on the zone reset a mob will be loaded first into room 100 and then into 102. This can screw up your guards. To avoid this, use the N command as follows: N 0 123 1 100 N 0 123 1 101 N 0 123 1 102 The if-flag for this command should always be 0. This command should only be used with sentinel mobs!! 4.9.....U Command U This command puts objects in a room, such as fountains or bulletin boards or chests or miscellaneous objects you just want lying around the room. The if-flag for this command should always be 0. This command allows you to load copies of an object into a room and disregarding the world max exist number. The max exist number for this command is how many of that vnum object can be loaded into a single room. This command is most useful for loading single copies of an object into a room when there are many in the world. 4.10....F Command F This command is a variation of the M command that causes the mob loaded to follow the last mob loaded. It appropriately used after a successful M or N command. NOTE: FOLLOWERS SHOULD BE SET TO SENTINEL. Or else they'll just kind of wander around on their own. If they're set to sentinel, they'll still follow the leader (who should probably be a wanderer) around. M 0 123 1 100 * the king F 1 125 3 1 * horse for the king F 1 124 2 0 * armed guard F 1 125 3 1 * guard's horse F 1 124 2 0 * armed guard F 1 125 3 1 * guard's horse If the previously loaded mob (the leader) is itself a follower, then the loaded mob will follow *its* leader, *unless* that follower is a mount. In the example above, the king is the leader and his horse and 2 guards are followers. The guards' horses follow different rules, because they are mounts. They follow the guards, not the king. The second guard loaded will still follow the king, not the first guard, because non-mounts don't count as leaders. In this example, he(?) will follow the mount's mountie's leader, the king. This can be confusing, but it is flexable. The if-flag for this command should always be 1. 4.11....T Command T This command is similer to the F command. Where F is a variation of M, T is a variation of N. The if-flag for this command should always be 1. 4.12....R Command R This command randomly returns either a 1 or a 0 to the next zone command. It is useful for assigning equipment that only loads every once-in-a-while. M 0 2500 3 100 * load a mob E 1 2506 11 2 * give that mob a shield R 1 45 * 45% of the time... E 1 2501 16 1 * give that mob a sword Note that if multiple R's and E's are used in sequence, the chain will be broken with the first R to return a 0. Put the R's with the lowest percentages last. The if-flag for the command after this one should always be 1. 4.13....A Command A This command is similar to the A used in the .obj file. It applies a permanent affect to a mobile. Affect type is spell it affects with. Make it 0 if the affect shouldn't be associated with a spell. Modifier is the ammount to affect by, and location is what it affects, as listed in object.txt. M 0 2500 3 100 * load a mob A 1 0 1 5 * +5 Strength A 1 0 24 -10 * -10 saving_spell A 1 140 0 0 * cage spell - no modifiers A 1 161 18 2 * bless major, +2 hitroll A 1 161 19 2 * bless major, +2 damage The if-flag for this command should always be 1. Do not assign a mob with an affect it already has. 4.14....C Command C C This command returns a semi-random value dependent on the month of Darkover's year. Darkover's calendar is as follows: 0 Geimhreadh - 1st month of winter 1 Nollag - 2nd month of winter 2 Eanair - 3rd month of winter 3 Feabhra - 4th month of winter 4 Marta - 5th month of winter 5 Earrach - 1st month of spring 6 Aibrean - 2nd month of spring 7 Bealtaine - 3rd month of spring 8 Meitheamh - 4th month of spring 9 Samhradh - 1st month of summer 10 Luil - 2nd month of summer 11 Lunasa - 3rd month of summer 12 Mean Fomhair - 4th month of summer 13 Fomhair - 1st month of autumn 14 Deireadh Fomhair - 2nd month of autumn 15 Ruis - 3rd month of autumn 16 Samhna - 4th month of autumn "C 0 2 7" will return true if the month is 2, 3, 4, 5, 6 or 7 and false otherwise. "C 0 7 2" is exactly the opposite of "C 0 2 7". 4.15....X Command X This command purges the room of mobs and objs with a chance based on the percent. 4.16....Y command Y This command makes the exit defined by go from the first room, to the second room. 4.17....J Command J -1 The J command is used to signify the start or end of a J block. When commands in a zone file are loaded, they are loaded sequentially. Each command that has an if-flag of 1 will depend on the success of the last command. Commands with an if-flag of 0 always execute. If the last command failed to run and the command below it has an if-flag of 1, that command will also fail so on and so forth until the next command with an if-flag of 0. This makes loading equipment on a mob a little quirky. Since the E command needs a mob, you need to load a mob and then follow that with E commands that have if flags of 1. If one of those E commands fails, or, is dependant on an R command, the whole chain breaks. J blocks solve this by comparing the if-flag of all commands inside a J block to the command that executed right before the opening J block. This allows the commands to operate independently of each other, but still depend on a master command. Currently, the only commands supported inside of a J block are: E and R. You may not nest J blocks and always remember to close your J block. If you use an R command inside a J block, it affects ONLY the NEXT command. This allows you to base loads on percentages but not worry about it breaking the chain. J blocks if-flags should always be 0 followed by a -1. If the command above the opening J block command fails, all commands with an if-flag of 1 in the J block will also fail. All commands in the J block should have their if-flag set to 1. M 0 2500 3 100 * load a mob (master command) J 0 -1 * open the J block R 1 45 * if this fails only the next command fails E 1 2506 11 2 * if this fails, it will not break the chain E 1 2501 16 1 * give that mob a sword J 0 -1 * close the J block 5...Example Zone File --------------------- Zone files are really pretty tricky, so we've included this one to give you an idea of how it works. The following file is woodhelm.zon. #123 Woodhelm -- Home of the Woodelves~ 12399 5 2 * * object tables * O 0 12305 1 12397 * the fountain O 0 3099 99 12397 * bulletin board O 0 12309 1 12304 * bank O 0 1204 99 12392 * arena portal * * mob tables * M 0 12300 1 12311 * wardancer guildmaster M 0 12301 1 12326 * druid M 0 12302 1 12350 * ranger M 0 12303 1 12376 * thief * M 0 12304 1 12309 * wardancer guard M 0 12305 1 12323 * druid M 0 12306 1 12347 * ranger M 0 12307 1 12374 * thief * M 0 12308 1 12305 * importer G 1 12300 99 * map G 1 12301 99 * canoe G 1 12302 99 * torch G 1 12303 99 * pathmarker G 1 12304 99 * waterskin G 1 3050 99 * id scroll G 1 3051 99 * detect_i potion G 1 3052 99 * recall scroll G 1 3055 99 G 1 12311 99 M 0 12309 1 12343 * green grocer G 1 12306 99 * fruit G 1 12307 99 * rations M 0 12310 1 12314 * smith G 1 3041 99 G 1 3042 99 G 1 3043 99 G 1 3044 99 G 1 3045 99 G 1 3046 99 G 1 3070 99 G 1 3071 99 G 1 3075 99 G 1 3076 99 G 1 3080 99 G 1 3081 99 G 1 3085 99 G 1 3086 99 * M 0 12311 18 12301 * 18 posted guards E 1 12308 28 16 M 0 12311 18 12301 E 1 12308 28 16 M 0 12311 18 12301 E 1 12308 28 16 M 0 12311 18 12301 E 1 12308 28 16 M 0 12311 18 12358 E 1 12308 28 16 M 0 12311 18 12358 E 1 12308 28 16 M 0 12311 18 12358 E 1 12308 28 16 M 0 12311 18 12358 E 1 12308 28 16 M 0 12311 18 12303 E 1 12308 28 16 M 0 12311 18 12303 E 1 12308 28 16 M 0 12311 18 12315 E 1 12308 28 16 M 0 12311 18 12315 E 1 12308 28 16 M 0 12311 18 12342 E 1 12308 28 16 M 0 12311 18 12342 E 1 12308 28 16 M 0 12311 18 12338 E 1 12308 28 16 M 0 12311 18 12338 E 1 12308 28 16 M 0 12311 18 12337 E 1 12308 28 16 M 0 12311 18 12337 E 1 12308 28 16 * M 0 12313 5 12386 * 5 council elders M 0 12313 5 12387 M 0 12313 5 12390 M 0 12313 5 12380 M 0 12313 5 12382 * M 0 12314 1 12364 * wizened elf E 1 12312 1 16 * portal key * M 0 12315 10 12397 * wood elves M 0 12315 10 12397 M 0 12315 10 12397 M 0 12315 10 12397 M 0 12315 10 12318 M 0 12315 10 12318 M 0 12315 10 12334 M 0 12315 10 12334 M 0 12315 10 12345 M 0 12315 10 12345 * M 0 12316 10 12315 * 10 squirrels E 1 12310 99 17 * and meat M 0 12316 10 12337 E 1 12310 99 17 M 0 12316 10 12340 E 1 12310 99 17 M 0 12316 10 12338 E 1 12310 99 17 M 0 12316 10 12359 E 1 12310 99 17 M 0 12316 10 12360 E 1 12310 99 17 M 0 12316 10 12362 E 1 12310 99 17 M 0 12316 10 12361 E 1 12310 99 17 M 0 12316 10 12378 E 1 12310 99 17 M 0 12316 10 12379 E 1 12310 99 17 * M 0 12317 2 12371 * 2 shifty elves M 0 12317 2 12371 * M 0 12318 5 12320 * 5 rabbits E 1 12310 99 17 M 0 12318 5 12346 E 1 12310 99 17 M 0 12318 5 12333 E 1 12310 99 17 M 0 12318 5 12308 E 1 12310 99 17 M 0 12318 5 12330 E 1 12310 99 17 * M 0 12319 1 12312 * innkeep M 0 12320 1 12397 * messenger * M 0 12321 15 12301 * shifty elf M 0 12321 15 12307 M 0 12321 15 12311 M 0 12321 15 12317 M 0 12321 15 12323 M 0 12321 15 12329 M 0 12321 15 12335 M 0 12321 15 12341 M 0 12321 15 12347 M 0 12321 15 12353 M 0 12321 15 12359 M 0 12321 15 12365 M 0 12321 15 12373 M 0 12321 15 12379 M 0 12321 15 12385 * * door tables * D 0 12309 0 1 * wardancer guild D 0 12310 2 1 * D 0 12347 0 1 * ranger guild D 0 12348 2 1 * D 0 12374 3 1 * thief guild D 0 12375 1 1 * D 0 12386 1 2 * portal S #99999 $~