Complete reference for room behavior flags
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.
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
}Effect: Limits the number of characters that can be in the room simultaneously.
CONFIG_TUNNEL_SIZECode References:
src/movement/movement.c - Blocks mounted entry
(do_simple_move())src/movement/movement.c - Enforces occupancy limit
(do_simple_move())src/wilderness/desc_engine.c - Dynamic room
descriptions (gen_room_description())Effect: Forces characters to move through the room one at a time in combat situations.
Code References:
src/movement/movement.c - Movement restrictions
(do_simple_move())src/combat/fight.c - Combat positioning checks
(guard_check(), compute_hit_damage(),
hit())Effect: Characters must be flying to remain in the room; non-flying characters fall.
Code References:
src/movement/movement_falling.c - Character falling
check (obj_should_fall(), char_should_fall(),
event_falling())src/movement/movement_falling.c - Object falling check
(obj_should_fall(), char_should_fall(),
event_falling())src/craft/craft.c - Crafting system checks
(reset_harvesting_rooms())Effect: Requires a skill check to enter the room.
Code References:
src/movement/movement.c - Entry skill check
(do_simple_move())src/craft/craft.c - Crafting restrictions
(reset_harvesting_rooms())Effect: Prevents flying creatures from entering the room.
Code References:
src/movement/movement.c - Entry restriction check
(do_simple_move())Effect: Limits room to 2 occupants maximum.
Code References:
src/movement/movement.c - Entry restriction
(do_enter())src/act/act.wizard.c - Teleport restrictions
(find_target_room())src/magic/spells.c - Spell targeting restrictions
(valid_mortal_tele_dest())src/obj/house.c - House management integration
(find_house(), hcontrol_build_house(),
hcontrol_destroy_house())Effect: NPCs will not wander into this room.
transferCode References:
src/mob/mob_act.c - Wandering destination check
(owner-local mobile agenda)Effect: Only staff (LVL_STAFF+) can enter this room.
Code References:
src/movement/movement.c - Level check on entry
(do_simple_move(), do_enter())Effect: Completely prevents all magic from functioning in the room.
Code References:
src/magic/spell_parser.c - Spell casting prevention
(call_magic(), do_gen_cast())src/combat/fight.c - Combat magic checks
(weapon_spells(), idle_weapon_spells())src/magic/magic.c - General magic check
(mag_room())Effect: Prevents teleportation into or out of the room.
Code References:
src/magic/spells.c - Teleport destination check
(valid_mortal_tele_dest(), spell_recall(),
spell_luskan_recall())src/magic/spells.c - Multiple recall/teleport spell
checks (valid_mortal_tele_dest(),
spell_recall(), spell_luskan_recall())src/act/act.other.c - Recall and portal restrictions
(do_abundantstep(), do_shadowstep())Effect: Prevents summoning spells from targeting this room.
Code References:
src/magic/spells.c - Summon spell checks
(spell_summon())Effect: Prevents recall/return spells from working.
Code References:
src/magic/spells.c - Multiple recall spell checks (8
matches) (spell_recall(),
spell_luskan_recall(),
spell_triboar_recall())Effect: Prevents all forms of combat and aggressive actions.
Code References:
src/combat/fight.c - Combat initiation blocks
(check_killer(), damage(),
hit())src/magic/spells.c - Offensive spell blocks
(event_acid_arrow(), event_aqueous_orb(),
event_implode())src/combat/grapple.c - Grappling prevention
(do_grapple())src/magic/domain_powers.c - Domain power checks
(do_eviltouch(), do_lightningarc(),
do_aciddart())src/magic/spell_parser.c - Spell casting restrictions
(call_magic(), do_gen_cast())Effect: Applies arena combat, PvP, and death handling to a room regardless of its VNUM.
Code References:
src/core/utils.h - Arena-room classification
(IS_ARENA(), IN_ARENA())src/core/utils.c - Arena bypass for PvP eligibility
(pvp_ok(), pvp_ok_single())src/combat/fight.c - Arena combat and death
handlingEffect: Kills characters or deals severe damage when entering/remaining in room.
Code References:
src/act/act.informative.c - Display warnings
(look_at_room_number(), look_at_room())src/movement/movement.c - Entry damage/death
(do_enter())src/mob/mob_act.c - NPC avoidance (owner-local mobile
agenda)src/magic/spells.c - Teleport blocking
(valid_mortal_tele_dest())src/act/act.other.c - Additional teleport checks
(do_shadowstep())Effect: Blocks sound-based abilities and prevents communication.
Code References:
src/act/act.comm.c - Communication blocking
(is_tell_ok(), do_gen_comm())src/character/bardic_performance.c - Bardic performance
prevention (can_perform())src/magic/spell_parser.c - Spell casting restriction
(psionics exempt) (say_spell(),
cast_spell())src/act/act.social.c - Social action blocking
(do_gmote())Effect: Marks room as indoors for various game mechanics.
Code References:
src/core/utils.c - Weather and outdoor checks
(is_room_outdoors(), ultra_blind())src/movement/movement.c - Outdoor transition detection
(do_leave())src/vessels/vessels_rooms.c - Vehicle room templates
(load_ship_room_templates_from_db(),
create_ship_room(),
room_has_outside_view())Effect: Doubles natural regeneration rates for HP, mana, and movement.
Code References:
src/core/limits.c - HP regeneration doubling
(regen_hps())src/magic/spell_prep.c - Spell preparation bonus
(compute_spells_prep_time())Effect: Suppresses ordinary weather and precipitation messages while leaving the room outdoors.
NO_PRECIP
roomsCode References:
src/core/weather.c - Weather-message filtering
(sect_no_weather())Effect: Doubles the net PSP gained during each non-combat regeneration tick.
PSPREGEN
roomsCode References:
src/core/limits.c - PSP tick acceleration
(regen_psp())Effect: Updates an NPC’s remembered home room after it successfully walks out of the marked room.
home_reset behavior without
occupying the room’s special-procedure slotCode References:
src/movement/movement.c - Successful-movement
integration (do_simple_move())src/spec/spec_rol_conversion.c - RoL home update
(rol_update_mobile_home_after_move())Effect: Persists that a converted RoL room used the source Astral Plane sector.
Code References:
scripts/world/wtool_lib/rol_transform.py -
Source-sector conversion metadatasrc/spec/spec_rol_conversion.c - Astral-forged weapon
bonus selectionEffect: Prevents natural healing and regeneration.
Code References:
src/core/limits.c - Regeneration blocking
(regen_hps())Effect: Forces the room to be dark regardless of other conditions.
Code References:
src/core/utils.c - Darkness calculations
(room_is_daylit(), room_is_dark(),
is_room_in_sunlight())src/wilderness/desc_engine.c - Dynamic description
generation (gen_room_description())src/magic/magic.c - Darkness spell interaction
(mag_room())src/events/mud_event.c - Temporary darkness removal
(event_countdown())Effect: Creates magical darkness that penetrates normal light sources.
Code References:
src/core/utils.c - Darkness calculations
(room_is_daylit(), room_is_dark(),
is_room_in_sunlight())src/act/act.informative.c - Display and description
handling (look_at_room_number(),
look_at_room(), do_scan())Effect: Creates magical light that prevents the room from being dark.
Code References:
src/core/utils.c - Light calculation override
(room_is_dark())Effect: Creates fog that obscures vision and limits visibility.
Code References:
src/act/act.informative.c - Vision restrictions
(look_at_room_number(), look_at_room(),
look_in_direction())src/movement/asciimap.c - Automap limitation
(do_map())src/magic/spells.c - Gust of wind removes fog
(perform_dispel())src/core/utils.c - Weather and vision checks
(ultra_blind(), is_room_in_sunlight())Effect: Prevents tracking abilities from working through this room.
Code References:
src/movement/movement_tracks.c - Track skill blocking
(should_create_tracks())src/movement/graph.c - Pathfinding restrictionsrc/mob/mob_act.c - NPC tracking limitation
(owner-local mobile agenda)Effect: Marks room as part of a player house.
Code References:
src/obj/house.c - House management
(find_house(), hcontrol_build_house(),
hcontrol_destroy_house())src/core/handler.c - Crash save integration
(obj_to_room(), obj_from_room())src/act/act.wizard.c - Teleport restrictions and admin
tools (find_target_room(), do_switch(),
do_zcheck())Effect: Marks that items in this house room should be saved.
Code References:
src/obj/house.c - Save operations
(hcontrol_destroy_house(),
hcontrol_pay_house())src/core/handler.c - Auto-flagging on item changes
(obj_to_room(), obj_from_room())src/olc/hsedit.c - House editor cleanup
(hsedit_delete_house())Effect: Marks room as a house atrium (entry point).
Code References:
src/obj/house.c - House system integration
(find_house(), hcontrol_build_house(),
hcontrol_destroy_house())src/movement/movement.c - Entry point detection
(do_simple_move())src/olc/hsedit.c - House editor management
(hsedit_save_internally(),
hsedit_delete_house())Effect: Marks room as part of the overworld/wilderness map system.
Code References:
src/act/act.informative.c - Automap checks
(do_survey())src/movement/asciimap.c - Map rendering
(show_worldmap())src/vessels/routing.c - Navigation system
(start_flight_to_destination_luminari())src/act/act.wizard.c - Administrative flag setting
(do_setworldsect())Effect: Marks room as part of a vehicle or vessel.
Code References:
src/vessels/vessels_rooms.c -
room_templates[] sets ROOM_VEHICLE on every
(load_ship_room_templates_from_db(),
create_ship_room()) built-in ship room template;
load_ship_room_templates_from_db() uses the same pair as
the fallback when a database row omits the flags columnsrc/vessels/vessels_rooms.c -
create_ship_room() copies the flag onto the
(load_ship_room_templates_from_db(),
create_ship_room()) generated roomNote: 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.
Effect: Marks room as a resource harvesting location.
Code References:
src/craft/crafting_new.c - Harvest node detection
(will_room_have_harvest_materials())Effect: Marks room as a player-run shop.
Note: Limited code references suggest this may be partially implemented or planned feature.
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.
Effect: Persists the jail identity of a converted Realms of Luminari room.
Code References:
scripts/world/wtool_lib/rol_transform.py - RoL
room-flag conversionEffect: Marks room as being edited in the Online Level Creator (OLC).
Code References:
src/act/act.wizard.c - Administrative cleanup avoidance
(do_zcheck())Effect: Temporary flag used by pathfinding algorithms.
Code References:
src/movement/graph.c - Pathfinding algorithmsrc/act/act.wizard.c - Cleanup detection
(do_zcheck())Effect: Marks room as extremely small.
Note: Limited code references suggest this is primarily a builder/thematic flag.
Effect: Marks room as very small.
Note: Limited code references suggest this is primarily a builder/thematic flag.
Effect: Marks room as having an airy, open quality.
Note: No direct code references found; likely thematic or planned feature.
Effect: Forces a random trap to always generate in this room.
Code References:
src/combat/traps_new.c - Forced trap generation
(auto_generate_object_trap(),
auto_generate_zone_traps())src/core/db.c - Zone loading trap setup
(reset_zone())Effect: Marks room as eligible for random treasure chest spawning.
Note: Limited code references suggest this may be a planned or partially implemented feature.
Effect: Indicates the room contains a trap.
Note: Limited code references suggest integration with trap system.
Effect: Indicates room description should be generated dynamically.
Note: Limited code references suggest this is a specialized builder flag.
Effect: Marks room as occupied or reserved.
Note: No direct code references found; may be planned feature.
Effect: Marks room as a valid docking location for vessels.
Note: No code references found; likely planned feature for vessel system expansion.
| 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 |
Stacking Flags: Many flags can be combined for compound effects
Common Combinations:
Flags to Avoid Setting Manually:
ROOM_FLAGGED(room, FLAG) macroSET_BIT_AR(ROOM_FLAGS(room), FLAG)REMOVE_BIT_AR(ROOM_FLAGS(room), FLAG)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:
Primary Files:
src/core/structs.h - Flag definitions (the
ROOM_* define block ending at
ROOM_ROL_ASTRAL)src/movement/movement.c - Movement restriction
checkssrc/magic/spell_parser.c - Magic restriction
checkssrc/combat/fight.c - Combat restriction checkssrc/core/utils.c - Light and vision calculationssrc/act/act.informative.c - Room description
handlingsrc/obj/house.c - House system integrationsrc/vessels/vessels_rooms.c - Vehicle system
integrationChecking 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
}Last Updated: November 6, 2024
Version: 1.0
Maintainer: LuminariMUD Development Team