Skip to content

Random Encounter Table System #80

Description

@FirebrickRed

Summary

YAML-driven random encounter tables for wilderness travel, dungeon exploration, and other scenarios. DM rolls dice, system spawns appropriate encounters with entities, messages, and effects.

Phase: 4 - DM Tools
Systems: Encounter System, Entity System, DM Tools

Prerequisites

Goals

  • /dmencounter roll <table> <result> - Execute table entry
  • /dmencounter list - Show available tables
  • YAML encounter table format (d20, d100, custom dice)
  • Entity spawning with count variance (1d4+1)
  • Formation positioning (nearby, surround, line)
  • Message broadcasts and effects
  • Tab completion for table IDs

YAML Format

# DMContent/Encounters/wilderness_night.yml
id: wilderness_night
name: "Wilderness Night Watch"
dice_type: d20

encounters:
  1-5:
    description: "Uneventful night"
    spawn: []
    
  6-10:
    description: "Distant howling"
    effects:
      - type: message
        text: "You hear wolves howling..."
    
  11-15:
    description: "Wolf pack attack"
    spawn:
      - id: wolf
        count: "1d4+1"
        location: nearby
        formation: scattered
    effects:
      - type: message
        text: "Hungry wolves emerge!"
        
  19-20:
    description: "Owlbear!"
    spawn:
      - id: owlbear
        count: 1
        location: nearby

Commands

# List available tables
/dmencounter list
> wilderness_night (d20)
> dungeon_exploration (d100)
> urban_encounters (d20)

# Roll on table
Player: "I rolled a 14 for watch"
DM: /dmencounter roll wilderness_night 14
> Using: Wilderness Night Watch
> Result (11-15): Wolf pack attack
> [System spawns 3 wolves nearby]
> Broadcast: "Hungry wolves emerge from the darkness!"

Features

  • Dice types: d20, d100, d6, d12, custom ranges
  • Count variance: Use dice notation (1d4+1, 2d6, etc.)
  • Formations: nearby, surround, line, scattered, custom
  • Effects: Messages, sounds, combat start
  • Tab completion: /dmencounter roll <TAB> shows all table IDs

Location

DMContent/
└── Encounters/
    ├── wilderness_night.yml
    ├── dungeon_dangers.yml
    ├── urban_day.yml
    └── custom/
        └── my_campaign.yml

Next Steps

After completing this issue, tackle:

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnpc/entityFor issues pertaining to npc's or monsters and is referred to as entities in the mod pack

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions