Summary
Automatically select appropriate encounter tables based on player location (biome + time of day). Integrates with custom datapacks and reduces DM workload during travel.
Phase: 4 - DM Tools (Advanced)
Systems: Encounter System, Biome Detection, Automation
Prerequisites
Goals
- Detect player biome using Bukkit API
- Detect time of day (day/night/dusk/dawn)
- YAML configuration:
biomes: [forest, plains] and time: day
/dmencounter auto - Auto-select and roll on matching table
/dmencounter watch enable - Notify DM on biome changes
- Tab completion shows biome-appropriate tables
- Works with custom datapack biomes
YAML Format
# DMContent/Encounters/forest_day.yml
id: forest_day_encounters
name: "Forest Daytime Encounters"
# Biome targeting
biomes:
- forest
- birch_forest
- dark_forest
- flower_forest
# Supports vanilla + custom datapack biomes
time: day # day, night, dusk, dawn, any
# Rest of encounter table...
encounters:
1-10:
description: "Peaceful forest"
spawn: []
Biome Detection
// Bukkit API provides biome detection
Location loc = player.getLocation();
Biome biome = loc.getBlock().getBiome();
// Examples:
// - Biome.FOREST
// - Biome.DARK_FOREST
// - Custom datapack biomes work automatically!
Commands
# Auto-select table based on current location
/dmencounter auto
> Detected: Dark Forest biome, Night time
> Using table: "dark_forest_night_encounters"
> Rolling d20... Result: 14
> [Executes encounter]
# Watch for biome changes
/dmencounter watch enable
> Biome watch enabled
# Player moves to new biome
> You entered: Plains biome
> Suggested tables:
> - plains_day_encounters
> - grassland_travel
> Use /dmencounter auto or /dmencounter roll <table> <result>
# Disable watch
/dmencounter watch disable
> Biome watch disabled
Tab Completion Intelligence
# When in forest biome
/dmencounter roll <TAB>
> forest_day_encounters
> forest_night_encounters
> dark_forest_dangers
> [Other tables shown but grayed out]
Integration with Datapacks
# Works with custom biomes from datapacks!
# Example: Custom campaign datapack with "haunted_forest" biome
id: haunted_forest_encounters
name: "Haunted Forest Encounters"
biomes:
- haunted_forest # Custom biome from datapack
- cursed_woods # Another custom biome
# System auto-detects these
Features
- Biome detection: Vanilla + custom datapack biomes
- Time detection: Day/night cycle awareness
- Auto-selection:
/dmencounter auto picks best match
- Watch mode: Notifies DM when crossing biomes
- Tab completion: Shows relevant tables first
- Fallback: If no match, shows all tables
Example Workflow
DM enables watch mode at session start:
/dmencounter watch enable
Party travels through wilderness:
> Entered: Forest biome (Day)
> Suggested: forest_day_encounters
Player: "I keep watch during travel"
DM: /dmencounter auto
> Using: Forest Daytime Encounters
> Rolled 8: "You spot a deer in the distance"
Party enters dark forest at night:
> Entered: Dark Forest biome (Night)
> Suggested: dark_forest_night_encounters
> Warning: Dangerous area!
DM: /dmencounter auto
> Using: Dark Forest Night Encounters
> Rolled 17: "Shadowy figures approach!"
Next Steps
No immediate next steps - this is an advanced feature enhancing the encounter system.
Related Issues
Summary
Automatically select appropriate encounter tables based on player location (biome + time of day). Integrates with custom datapacks and reduces DM workload during travel.
Phase: 4 - DM Tools (Advanced)
Systems: Encounter System, Biome Detection, Automation
Prerequisites
Goals
biomes: [forest, plains]andtime: day/dmencounter auto- Auto-select and roll on matching table/dmencounter watch enable- Notify DM on biome changesYAML Format
Biome Detection
Commands
Tab Completion Intelligence
Integration with Datapacks
Features
/dmencounter autopicks best matchExample Workflow
Next Steps
No immediate next steps - this is an advanced feature enhancing the encounter system.
Related Issues