Mythology & Cosmology with Pantheon design templates
Mythology in MUDs fails when lore exists only in help files. This guide covers implementation of plane-aware room flags, deity faction tracking, and afterlife transition mechanics that persist across player deaths. Assumes a C/LPC codebase with standard room/object/player architectures.

Audit existing divine references
Map all current spells, skills, and socials that reference gods or planes. Document which use hardcoded strings versus dynamic lookups. This prevents breaking existing content when introducing deity objects.
⚠ Common Pitfalls
- •Assuming grep catches all string references
- •Missing hardcoded deity names in combat messages
Define planar topology with room flags
Allocate room flags or properties for plane identifiers (Material, Ethereal, Astral, etc.). Update your movement code to check plane transitions and apply appropriate restrictions or transformations.
#define PLANE_MATERIAL 0
#define PLANE_ETHEREAL 1
#define PLANE_ASTRAL 2
/* In move_char() */
if (ROOM_PLANE(ch->in_room) != ROOM_PLANE(to_room)) {
if (!can_transcend_planes(ch, ROOM_PLANE(ch->in_room), ROOM_PLANE(to_room))) {
send_to_char("You lack the means to cross that boundary.\r\n", ch);
return;
}
apply_plane_shift_effects(ch, ROOM_PLANE(to_room));
}⚠ Common Pitfalls
- •Running out of room flags on 32-bit systems
- •Forgetting to handle plane transitions during recall spells
Implement deity objects with faction tracking
Create deity structures linked to player objects storing favor points, patron status, and religious alignment. Update combat and spellcasting to check deity relations for spell efficacy or social standing.
struct deity_data {
char *name;
int plane_id;
int alignment_mask;
struct spell_list *granted_spells;
};
struct player_deity_data {
struct deity_data *patron;
int favor;
int piety_level;
bool excommunicated;
};⚠ Common Pitfalls
- •Storing deity strings instead of pointers causing memory bloat
- •Not handling patron desertion edge cases
Build myth-tracking variables on player objects
Add persistent variables tracking which cosmological truths the player has witnessed or enacted. Use these to gate plane access or deity interactions rather than level checks alone.
#define MYTH_WITNESSED_CREATION 1
#define MYTH_DEFILED_SHRINE 2
bool check_myth_prerequisite(struct char_data *ch, int myth_flag) {
return IS_SET(GET_MYTH_FLAGS(ch), myth_flag);
}⚠ Common Pitfalls
- •Using int instead of long for bitvectors limiting myth expansion
- •Not persisting myth flags in pfile
Create afterlife transition pipeline
Override death sequences to route corpses and souls through your cosmological pipeline. Implement transitional rooms for different afterlives based on deity patronage and plane affinity.
void handle_death(struct char_data *ch) {
int destination_plane = determine_afterlife_plane(ch);
struct room_data *afterlife = get_afterlife_room(destination_plane, ch);
char_from_room(ch);
char_to_room(ch, afterlife);
if (destination_plane != PLANE_MATERIAL) {
SET_BIT(AFF_FLAGS(ch), AFF_ETHEREAL);
send_to_char("Your essence drifts beyond the veil...\r\n", ch);
}
}⚠ Common Pitfalls
- •Breaking corpse retrieval mechanics
- •Creating infinite death loops if afterlife rooms lack exits
Design pantheon command interface
Implement player-facing commands (pantheon, commune, sacrifice) that interface with deity objects. Include cooldowns and location checks (shrines, temples) to prevent spam.
⚠ Common Pitfalls
- •Allowing deity communication from any room breaking immersion
- •Not rate-limiting prayer commands
Integrate cosmology with spell parsing
Modify spell casting to check planar alignment and deity favor. Spells cast on foreign planes may behave differently or fail based on your magic system mapping.
int calculate_spell_power(struct char_data *ch, int spellnum) {
int base_power = GET_LEVEL(ch);
/* Planar resonance check */
if (spell_plane[spellnum] == ROOM_PLANE(ch->in_room)) {
base_power += (base_power * 0.25);
} else if (opposing_planes(spell_plane[spellnum], ROOM_PLANE(ch->in_room))) {
base_power = (base_power * 0.5);
}
/* Deity check */
if (ch->player_deity && spell_deity[spellnum] == ch->player_deity->deity_id) {
base_power += get_favor_bonus(ch);
}
return base_power;
}⚠ Common Pitfalls
- •Floating point math in combat calculations causing lag
- •Not caching plane lookups
Establish lore consistency checkpoints
Add validation functions to quest completion and object loading that verify mythological consistency. Flag content that references deities or planes not yet defined in your pantheon registry.
⚠ Common Pitfalls
- •Checking consistency only at boot time missing runtime quest issues
- •Creating circular dependencies between quest and pantheon modules
What you built
Mythology systems require maintenance as your pantheon expands. Schedule quarterly reviews of deity favor distributions and planar traffic patterns. Monitor player usage of religious commands to identify which cosmological elements resonate versus those requiring mechanical adjustment.