Room Flags Reference

Complete reference for room behavior flags

Room Flags Documentation

This document provides comprehensive information about all room flags (ROOM_*) used in LuminariMUD. Room flags control various mechanics, restrictions, and behaviors of rooms throughout the game world.

Table of Contents


Overview

Room flags are bitflags defined in src/core/structs.h and are checked throughout the codebase using the ROOM_FLAGGED() macro. There are currently 48 room flags (indices 0-47) that control everything from movement restrictions to magical effects.

Usage Pattern:

if (ROOM_FLAGGED(room_rnum, ROOM_FLAGNAME)) {
    // Flag is set, apply restrictions/effects
}

Movement & Access Restrictions

ROOM_TUNNEL (Index: 8)

Effect: Limits the number of characters that can be in the room simultaneously.

Code References:

ROOM_SINGLEFILE (Index: 20)

Effect: Forces characters to move through the room one at a time in combat situations.

Code References:

ROOM_FLY_NEEDED (Index: 18)

Effect: Characters must be flying to remain in the room; non-flying characters fall.

Code References:

ROOM_CLIMB_NEEDED (Index: 32)

Effect: Requires a skill check to enter the room.

Code References:

ROOM_NOFLY (Index: 26)

Effect: Prevents flying creatures from entering the room.

Code References:

ROOM_PRIVATE (Index: 9)

Effect: Limits room to 2 occupants maximum.

Code References:

ROOM_NOMOB (Index: 2)

Effect: NPCs will not wander into this room.

Code References:

ROOM_STAFFROOM (Index: 10)

Effect: Only staff (LVL_STAFF+) can enter this room.

Code References:


Magic Restrictions

ROOM_NOMAGIC (Index: 7)

Effect: Completely prevents all magic from functioning in the room.

Code References:

ROOM_NOTELEPORT (Index: 21)

Effect: Prevents teleportation into or out of the room.

Code References:

ROOM_NOSUMMON (Index: 24)

Effect: Prevents summoning spells from targeting this room.

Code References:

ROOM_NORECALL (Index: 19)

Effect: Prevents recall/return spells from working.

Code References:


Combat & PvP Restrictions

ROOM_PEACEFUL (Index: 4)

Effect: Prevents all forms of combat and aggressive actions.

Code References:

ROOM_ARENA (Index: 43)

Effect: Applies arena combat, PvP, and death handling to a room regardless of its VNUM.

Code References:

ROOM_DEATH (Index: 1)

Effect: Kills characters or deals severe damage when entering/remaining in room.

Code References:

ROOM_SOUNDPROOF (Index: 5)

Effect: Blocks sound-based abilities and prevents communication.

Code References:


Environmental Effects

ROOM_INDOORS (Index: 3)

Effect: Marks room as indoors for various game mechanics.

Code References:

ROOM_REGEN (Index: 17)

Effect: Doubles natural regeneration rates for HP, mana, and movement.

Code References:

ROOM_NO_PRECIP (Index: 42)

Effect: Suppresses ordinary weather and precipitation messages while leaving the room outdoors.

Code References:

ROOM_PSP_REGEN (Index: 45)

Effect: Doubles the net PSP gained during each non-combat regeneration tick.

Code References:

ROOM_ROL_HOME_RESET (Index: 46)

Effect: Updates an NPC’s remembered home room after it successfully walks out of the marked room.

Code References:

ROOM_ROL_ASTRAL (Index: 47)

Effect: Persists that a converted RoL room used the source Astral Plane sector.

Code References:

ROOM_NOHEAL (Index: 25)

Effect: Prevents natural healing and regeneration.

Code References:


Vision & Perception

ROOM_DARK (Index: 0)

Effect: Forces the room to be dark regardless of other conditions.

Code References:

ROOM_MAGICDARK (Index: 22)

Effect: Creates magical darkness that penetrates normal light sources.

Code References:

ROOM_MAGICLIGHT (Index: 23)

Effect: Creates magical light that prevents the room from being dark.

Code References:

ROOM_FOG (Index: 27)

Effect: Creates fog that obscures vision and limits visibility.

Code References:

ROOM_NOTRACK (Index: 6)

Effect: Prevents tracking abilities from working through this room.

Code References:


Special Room Types

ROOM_HOUSE (Index: 11)

Effect: Marks room as part of a player house.

Code References:

ROOM_HOUSE_CRASH (Index: 12)

Effect: Marks that items in this house room should be saved.

Code References:

ROOM_ATRIUM (Index: 13)

Effect: Marks room as a house atrium (entry point).

Code References:

ROOM_WORLDMAP (Index: 16)

Effect: Marks room as part of the overworld/wilderness map system.

Code References:

ROOM_VEHICLE (Index: 40)

Effect: Marks room as part of a vehicle or vessel.

Code References:

Note: the flag is set by the vessel room generator and read by the vessel system as a whole. It is not consulted directly by the docking or movement code, so do not expect to find it there.

ROOM_HARVEST_NODE (Index: 38)

Effect: Marks room as a resource harvesting location.

Code References:

ROOM_PLAYER_SHOP (Index: 35)

Effect: Marks room as a player-run shop.

Note: Limited code references suggest this may be partially implemented or planned feature.

ROOM_ROAD (Index: 39)

Effect: Marks room as a road or path.

Note: No direct code references found; likely used by zone builders for thematic purposes or planned features.


System & Administrative Flags

ROOM_ROL_JAIL (Index: 44)

Effect: Persists the jail identity of a converted Realms of Luminari room.

Code References:

ROOM_OLC (Index: 14)

Effect: Marks room as being edited in the Online Level Creator (OLC).

Code References:

ROOM_BFS_MARK (Index: 15)

Effect: Temporary flag used by pathfinding algorithms.

Code References:


Size Restrictions

ROOM_SIZE_TINY (Index: 30)

Effect: Marks room as extremely small.

Note: Limited code references suggest this is primarily a builder/thematic flag.

ROOM_SIZE_DIMINUTIVE (Index: 31)

Effect: Marks room as very small.

Note: Limited code references suggest this is primarily a builder/thematic flag.

ROOM_AIRY (Index: 28)

Effect: Marks room as having an airy, open quality.

Note: No direct code references found; likely thematic or planned feature.


Zone Features

ROOM_RANDOM_TRAP (Index: 36)

Effect: Forces a random trap to always generate in this room.

Code References:

ROOM_RANDOM_CHEST (Index: 37)

Effect: Marks room as eligible for random treasure chest spawning.

Note: Limited code references suggest this may be a planned or partially implemented feature.

ROOM_HASTRAP (Index: 33)

Effect: Indicates the room contains a trap.

Note: Limited code references suggest integration with trap system.

ROOM_GENDESC (Index: 34)

Effect: Indicates room description should be generated dynamically.

Note: Limited code references suggest this is a specialized builder flag.

ROOM_OCCUPIED (Index: 29)

Effect: Marks room as occupied or reserved.

Note: No direct code references found; may be planned feature.

ROOM_DOCKABLE (Index: 41)

Effect: Marks room as a valid docking location for vessels.

Note: No code references found; likely planned feature for vessel system expansion.


Complete Flag Reference

Quick Reference Table

Index Flag Name OLC Display Name Primary Purpose Category
0 ROOM_DARK Dark Forces darkness Vision
1 ROOM_DEATH Death-Trap Death trap Hazard
2 ROOM_NOMOB No-Mob NPC restriction Movement
3 ROOM_INDOORS Indoors Indoor room Environment
4 ROOM_PEACEFUL Peaceful No combat Combat
5 ROOM_SOUNDPROOF Soundproof Blocks sound Perception
6 ROOM_NOTRACK No-Track Blocks tracking Perception
7 ROOM_NOMAGIC No-Magic No magic Magic
8 ROOM_TUNNEL Tunnel Occupancy limit Movement
9 ROOM_PRIVATE Private 2 person limit Movement
10 ROOM_STAFFROOM Staff-Room Staff only Access
11 ROOM_HOUSE House Player house Special
12 ROOM_HOUSE_CRASH House-Crash House save flag System
13 ROOM_ATRIUM Atrium House entrance Special
14 ROOM_OLC OLC Being edited System
15 ROOM_BFS_MARK * Pathfinding temp System
16 ROOM_WORLDMAP Worldmap Wilderness map Special
17 ROOM_REGEN Regenerating Double regen Environment
18 ROOM_FLY_NEEDED Fly-Needed Must fly Movement
19 ROOM_NORECALL No-Recall No recall Magic
20 ROOM_SINGLEFILE Singlefile One at a time Movement
21 ROOM_NOTELEPORT No-Teleport No teleport Magic
22 ROOM_MAGICDARK Magical-Darkness Magical darkness Vision
23 ROOM_MAGICLIGHT Magical-Light Magical light Vision
24 ROOM_NOSUMMON No-Summon No summoning Magic
25 ROOM_NOHEAL No-Heal No healing Environment
26 ROOM_NOFLY No-Fly Flying blocked Movement
27 ROOM_FOG Fogged Fog obscurement Vision
28 ROOM_AIRY Airy Airy atmosphere Environment
29 ROOM_OCCUPIED Occupied Occupied status Special
30 ROOM_SIZE_TINY Tiny-Sized-Room Tiny size Size
31 ROOM_SIZE_DIMINUTIVE Diminutive-Sized-Room Diminutive size Size
32 ROOM_CLIMB_NEEDED Climb-Needed Requires climbing Movement
33 ROOM_HASTRAP Trapped Contains trap Zone Feature
34 ROOM_GENDESC Wild-Generated-Desc Generated desc System
35 ROOM_PLAYER_SHOP Player-Shop Player shop Special
36 ROOM_RANDOM_TRAP Random-Trap Random trap spawn Zone Feature
37 ROOM_RANDOM_CHEST Random-Chest Random chest spawn Zone Feature
38 ROOM_HARVEST_NODE Always-Load-Harvest-Node Harvest location Special
39 ROOM_ROAD Road Road/path Environment
40 ROOM_VEHICLE Vehicle Vehicle room Special
41 ROOM_DOCKABLE Dockable Docking location Special
42 ROOM_NO_PRECIP No-Precipitation Suppress weather messages Environment
43 ROOM_ARENA Arena Arena combat and death rules Combat
44 ROOM_ROL_JAIL RoL-Jail RoL justice compatibility marker System
45 ROOM_PSP_REGEN Psionic-Regeneration Double PSP tick gain Environment
46 ROOM_ROL_HOME_RESET RoL-Home-Reset Retarget NPC home after successful exit System
47 ROOM_ROL_ASTRAL RoL-Astral Preserve converted Astral room identity System

Usage Guidelines

For Builders

  1. Stacking Flags: Many flags can be combined for compound effects

    • ROOM_DARK + ROOM_MAGICDARK = absolute darkness
    • ROOM_PEACEFUL + ROOM_NOMAGIC = complete safe zone
    • ROOM_INDOORS + ROOM_REGEN = safe indoor rest area
  2. Common Combinations:

    • Safe Town: ROOM_PEACEFUL + ROOM_INDOORS
    • Death Trap: ROOM_DEATH + ROOM_NOTELEPORT + ROOM_NORECALL
    • Private Meeting: ROOM_PRIVATE + ROOM_SOUNDPROOF
    • Challenging Dungeon: ROOM_DARK + ROOM_NORECALL + ROOM_NOTELEPORT
  3. Flags to Avoid Setting Manually:

    • ROOM_BFS_MARK (system temporary flag)
    • ROOM_HOUSE_CRASH (auto-set by house system)
    • ROOM_OLC (OLC system flag)

For Developers

  1. Checking Flags: Always use ROOM_FLAGGED(room, FLAG) macro
  2. Setting Flags: Use SET_BIT_AR(ROOM_FLAGS(room), FLAG)
  3. Removing Flags: Use REMOVE_BIT_AR(ROOM_FLAGS(room), FLAG)
  4. Temporary Flags: BFS_MARK is the only truly temporary flag; others may be modified by spells/events but should persist in world files

Common Patterns

Safe Zones: Typically use ROOM_PEACEFUL to prevent combat. Consider adding ROOM_NORECALL for dungeons where escape should be limited.

Darkness: Use ROOM_DARK for natural darkness, ROOM_MAGICDARK for magical darkness that resists light sources.

Movement Restrictions:

Magic Control:


Code References

Primary Files:

Checking Flags:

// Standard check
if (ROOM_FLAGGED(room_rnum, ROOM_PEACEFUL)) {
    // Peaceful room logic
}

// Multiple flags
if (ROOM_FLAGGED(room, ROOM_DARK) && ROOM_FLAGGED(room, ROOM_MAGICDARK)) {
    // Absolute darkness
}

Modifying Flags:

// Set flag
SET_BIT_AR(ROOM_FLAGS(room), ROOM_DARK);

// Remove flag
REMOVE_BIT_AR(ROOM_FLAGS(room), ROOM_DARK);

// Check if set
if (IS_SET_AR(ROOM_FLAGS(room), ROOM_DARK)) {
    // Flag is set
}

Notes


Last Updated: November 6, 2024
Version: 1.0
Maintainer: LuminariMUD Development Team

↑