Wld File - torilmud/docs GitHub Wiki

Wld File

The *.wld file, or the world file, contains all the rooms in your zone. It is loaded once and only once at boot.

Notes:

  • First Line: The first line of the file should be: <*> File Version 1 <*>
  • Last Line: There must be a blank line at the bottom of the file.

Wld File Format

Room Format Example Room
#room number #70004
room title~ &+RThe Main Road&N~
room description &+L This road is the vital vein of the community. Wagons
&+Land packages are carried down this road from the northern
&+Lstores on Market Square to the gates towards the south.
&+LScores of batiri and hobgoblins traverse this pathway to
&+Ltrade with each other. Smoke rises from some chimneys
&+Loff to the east, and the bones of dead humans litter the
&+Lroadway. A hatch is visible against the side of a building
&+Lto the east, and you see a sign at the end of the road.&N
~ ~
<zone #> <room flags> <sector type> <Length> <Width> <Height> 700 1 1 30 75 500
Human Readable Fields:
(optional) FLAGS: FLAGS: magic light, heal
(optional) SECTOR: SECTOR: city
(optional) SUBZONE: SUBZONE: 223
direction fields D0
~
~
0 0 70007
trap fields (optional) door trap trapdoor secret hatch~
17 0 70005 1 1 10 100 0 0 100
[extra descriptions] E
sign~
&+rA smear of blood covers the name of the town.&N
~
S Must be capitalized S
  • Human Readable Fields: These are new and are completely optional. If used, the flags should be delimited by commas. They can take the place of the additive flags or be used in addition to them.

Room Basics

Room Number

A unique number for the given room. No two rooms may have the same number. The room number must always increase when browsing down the world file (but increments can be larger than one). Placing rooms in your .wld file out of order or out of your zone's range will lead to bootup errors.

Room Title

This name is the "title" of the room. Please note that all room titles should be capitalized. i.e. all the major words except ones like, and, the, of, etc need to be capitalized. You can use ANSI here.

Room Description

This is the general description of the room.

  • It must be indented with 3 spaces on the first line (don't use tab) as well as at least 5 lines long.
  • Reusing descriptions is discouraged.
  • Descriptions should be objective, avoid the use of personal pronouns. Don't assume the player is in the room when writing the description as there are many ways to see into a room from elsewhere. (Example: Clairvoyance)
  • Don't put actions or activity into the room description, save these for echoes in the social file.

Zone Number

The number of the zone in which this room is located. This number is used for resetting zones and monster zone movement. The number usually equals the room numbers divided by 100 , i.e. zone 700 would contain rooms 70000-70099.

Length, Width, Height

No Longer Used

The length, width and height of rooms can be set manually or auto-created on by testmud when the files are converted. Make sure you talk to your areas supervisor before manually setting these values as they can affect your zone in very subtle ways, for example: aggro archer's not firing from adjacent rooms, falling damage increasing by too much, rooms becoming single file without the actual flag.

Room Flags

Room Flag Bit Value Bit # Human Readable Comments
DARK 1 1 "Dark" The room is dark, a light must be used to see anything without ultravision.
NO_MOB 4 3 "No Mob" Mobiles will not wander into the room.
INDOORS 8 4 "Indoors" This is inside (a house,cave or dungeon for example).
ROOM_SILENT 16 5 "Silent" No speaking in this room.
UNDERWATER 32 6 "Underwater" Underwater room, need water breathing
NORECALL 64 7 "No Recall" Cannot recall from here
NO_MAGIC 128 8 "No Magic" No magical spells will work here.
TUNNEL 256 9 "Tunnel" Also known as No-Fly rooms
PRIVATE 512 10 "Private" Only two people allowed in here, not recommended.
ARENA 1024 11 "Arena" Flag for arena rooms ONLY.
SAFE_ZONE 2048 12 "Safe Zone" Peace rooms, no combat or stealing of any kind here. Use with care. Note: Aggressive Sentinel mobs loaded in peace rooms will wander in and out randomly.
NO_PRECIP 4096 13 "No Precipitation" If it's outdoors, but there's some sort of covering.
SINGLE_FILE 8192 14 "Single File" Where people cant go around each other in a room. Room MUST have 2 exits for single_file to work.
JAIL 16384 15 "Jail" This is a jail cell, used only in hometowns!
NO_TELEPORT 32768 16 "No Teleport" Can't teleport/gate to or from these rooms.
NO_CAMP 65536 17 "No Camp" Voiding or camping here will send players to a safe room
HEAL 131072 18 "Heal" You regain stats twice as fast here I call bullshit on psp regen with this flag, go ahead prove me wrong -G
NO_HEAL 262144 19 "No Heal" Inhibits all regeneration. Confirmed for hp regen at least
DOCKABLE 1048576 21 "Dockable" Room is used by ocean going ships to load and unload.
MAGIC_DARK 2097152 22 "Magic Dark" Room has a magic darkness cast on it.
MAGIC_LIGHT 4194304 23 "Magic Light" Room has a magic light spell cast on it.
NO_SUMMON 8388608 24 "No Summon" Cannot summon or be summoned to or from this room
BURNING 67108864 27 "Burning" Room on fire, players take damage unless protected
ROOM_AIRY_WATER 536870912 30 "Airy Water" Breathable underwater room Underwater but you can breath
ROOM_SOLID_FOG 1073741824 31 "Solid Fog" Blocks farsee, archery missiles, pc's track skill, sunblind and scanning.
MAGIC_OK 2147483648 32 "Magic Ok" Magic OK to use if zone is !magic
PSPREGEN 34359738368 36 "PSP Regen" accelerated PSP regeneration rate looks like it works
ROOM_GLOBE_OF_DARKNESS 137438953472 38 "Globe of Darkness" room is under the effect of a globe of darkness, wankers using ultravision wont be blinded
ROOM_MUD 2199023255552 42 "Mud" Affected by rock to mud spell, (can't bash)
ROOM_ROCK 4398046511104 43 "Rock" Affected by mud to rock spell
ROOM_INN 17592186044416 45 "Inn" This flag is required for the storage command to work.
ROOM_SUN_SHADOW 35184372088832 46 "Sun Shadow" Blocks sunblind
ROOM_EARTH_FOG 70368744177664 47 "Earth Fog" Earth Fog Spell, blocks sunblind
ROOM_FIRE_FOG 140737488355328 48 "Fire Fog" Fire Fog Spell, lights up room

Sector Types

Sector type has an influence on many things, not just movement cost and a mob's ability to leave them (see STAY_SECTOR). We'll try listing some examples below the chart.

  • Use the Bit # to assign a sector in the WLD file. You may only select 1 sector for each room.

  • Use the Bit Value to assign sectors to a Distro Machine. You can add more than one of these together to include multiple sectors in your distro.

Bit Value Sector Name Bit # Human Readable Brief Description
1 SECT_INSIDE 0 "Inside" Uses as if walking indoors
2 SECT_CITY 1 "City" Uses as if walking in a city
4 SECT_FIELD 2 "Field" Uses as if walking in a field
8 SECT_FOREST 3 "Forest" Uses as if walking in a forest
16 SECT_HILLS 4 "Hills" Uses as if walking in hills
32 SECT_MOUNTAIN 5 "Mountains" Uses as if climbing in mountains
64 SECT_WATER_SWIM 6 "Water Swim" Uses as if swimming
128 SECT_WATER_NOSWIM 7 "Water No Swim" Impossible to swim water - requires a boat
256 SECT_NO_GROUND 8 "No Ground" Must be flying/levitating
512 SECT_UNDERWATER 9 "Underwater" Need water breathing here
1024 SECT_UNDERWATER_GR 10 "Underwater Ground" Underwater, on the bottom, can bash
2048 SECT_FIREPLANE 11 "Plane of Fire" Used in the elemental plane of fire.
4096 SECT_OCEAN 12 "Ocean" Use if in the ocean or vast seas only!
8192 SECT_UNDRWLD_WILD 13 "Underdark Wild" [underworld flags: intended to be used for
16384 SECT_UNDRWLD_CITY 14 "Underdark City" underground settings; drow, duergars, mind
32768 SECT_UNDRWLD_INSIDE 15 "Underdark Inside" flayers, etc]
65536 SECT_UNDRWLD_WATER 16 "Underdark Water Swim"
131072 SECT_UNDRWLD_NOSWIM 17 "Underdark Water No Swim"
262144 SECT_UNDRWLD_NOGROUND 18 "Underdark No Ground"
524288 SECT_AIR_PLANE 19 "Plane of Air" Used in Elemental Plane of Air
1048576 SECT_WATER_PLANE 20 "Plane of Water" Used in Elemental Plane of Water
2097152 SECT_EARTH_PLANE 21 "Plane of Earth" Used in Elemental Plane of Earth
4194304 SECT_ETHEREAL 22 "Ethereal Plane" Used in Ethereal Plane
8388608 SECT_ASTRAL 23 "Astral Plane" Used in Astral Plane
16777216 SECT_ICE_PLANE 24 "Ice" Used in Elemental Plane of Ice
33554432 SECT_UD_UNDERWATER 25 "Underdark Underwater" Underworld Underwater
67108864 SECT_UD_UNDERWATER_GR 26 "Underdark Underwater Ground" Underworld Underwater with Ground
1073741824 SECT_SMOKE_PLANE 30 "Plane of Smoke" Used in the Plane of Smoke
2147483648 SECT_MAGMA_PLANE 31 "Plane of Magma" Used in the Plane of Magma
4294967296 SECT_TOXIC 32 "Toxic" Players can not breathe - need prot gas
8589934592 SECT_ICEPLANE 33 "Plane of Ice" Used in the Plane of Ice (need prot cold or take damage)
17179869184 SECT_FREEZING_WATER 34 "Underwater Freezing" Need both prot cold AND waterbreathing
  • Setting a sector related to the planes will cause the room to be ignored when gating prime/planeshifting prime, the reverse is not however, true. Setting your zone with the sector FIRE_PLANE will not make portals to your zone open upon gating fire/planeshifting fire.
  • Using Sector NO_GROUND with no down exit equals a death trap, players who are not flying will die with no warning.
  • Using the UNDRWLD sectors will mean that only evil races will be able to relocate/open portals to that room.
  • Many of these sectors restrict camping, some of them have very unique messages.

Subzones

Sub zones are a new way or expressing arbitrary sections inside of a zone. Each room can be tagged with a subzone number from 1 to 32,768. Mobs with the new STAY_SUBZONE flag will respect their subzone boundaries just as they do with zone boundaries - they won't hunt or move outside of their subzone for any reason. We can use this to set up sections inside of zones where patrols and hunters will not leave. This also works nicely with the new AUTO_HUNT flag.

Note: Subzones are exclusive to each zone, so even if two zones connect to each other, and both rooms in zone A and zone B are marked with the same sub zone number, the mob will not cross over.

Note 2: With the addition of the new .config and .tpl files, this option has been depreciated in favor of subzones created in the .config file.

#70004
&+RThe Main Road&N~ 
&+L This road is the vital vein of the community. Wagons 
&+Land packages are carried down this road from the northern 
&+Lstores on Market Square to the gates towards the south. 
&+LScores of batiri and hobgoblins traverse this pathway to 
&+Ltrade with each other. Smoke rises from some chimneys 
&+Loff to the east, and the bones of dead humans litter the 
&+Lroadway. A hatch is visible against the side of a building 
&+Lto the east, and you see a sign at the end of the road.&N 
~
700 1 1 30 75 500
FLAGS: magic light, heal 
SECTOR: city 
SUBZONE: 23 
D0 
~ 
~ 
0 0 70007 
E 
sign~ 
&+rA smear of blood covers the name of the town.&N 
~ 
S

Direction Fields

Format:

D[exit number]
[exit description, (*optional*)]
~
[keyword list]~
[Door flag][key number][to_room][trap fields (optional)]

Exit number

The direction the exit leads to. It is one of:

North 0
East 1
South 2
West 3
Up 4
Down 5

Exit Description

Exit descriptions are currently not visible thanks to the "scan" command.

Keyword list

Used for commands like open and close. Should be 'door' for ordinary doors but can have multiple entries, like door, secret, entrance, trapdoor - all separated by spaces....

Door Flag

These first four values are not additive, pick only one.
0 There is no door leading that way, just a passageway
1 The exit can be opened/closed only
2 The exit can be locked/unlocked/opened/closed/picked w/ lockpick
3 Then same as 2, but un-pickable/un-doorbashable
The next three are additive, so add their values to your above choice.
4 For secret doors. The search command will be required before the door can be found
8 For blocked exits. A switch item will be needed to open the exit ask a god for help if you wish to make blocked exits.
16 For trapped exits, will require the disarm skill before the door can be opened

The state of the doors after reset may be controlled by a command in the .zon or .tpl files (see the zon file or Zone Commands). The default state of a door is open (0).

Key Number

The number of the object which can unlock/lock the door. If [Door flag] is 0, the value of this field is ignored.

  • To make the door magical and open only when a special word is spoken (like the magic gate east of WD), make this field -2. The last word in the door [keyword list] will be the triggering word.

To Room

The virtual number of the room to which the exit leads.

⚠️ **GitHub.com Fallback** ⚠️