Resolve OSE encounters — surprise, distance, reaction, monster stats, flee/evasion, parley. Use when the party encounters monsters or another entity.
Resolve encounters step-by-step using SRD rules, from surprise through reaction and non-combat resolution. Hands off to a combat skill if fighting starts.
The referee's constitution governs all behavior. Read it before beginning play if it is not already in context. Additionally:
uv run plugins/bx-referee/skills/referee/scripts/roll.py "<expr>"plugins/bx-referee/skills/referee/scripts/roll.pyplugins/bx-referee/skills/referee/references/srd_map.md (rules, classes, equipment, treasure)plugins/bx-referee/skills/referee/references/srd_monsters.mdplugins/bx-referee/skills/referee/references/srd_spells.mduv run plugins/bx-referee/skills/referee/scripts/roll.py "2d6"
The GM invokes with /encounter <monster> <count> <environment>, e.g. /encounter Goblin 3 dungeon. Arguments are available as $ARGUMENTS. If any are missing, use AskUserQuestion to prompt for them.
$0): SRD monster name (e.g., "Goblin", "Ogre")$1): Number of monsters, or "random" to roll from SRD range$2): dungeon or wildernessRead SRD rules: use the SRD map to find and Read Encounters.md, Evasion_and_Pursuit.md, Morale_(Optional_Rule).md
Read the monster page: use the monsters submap to find the file path, then Read it
Read party data from the active adventure's PARTY.md (determine adventure path from conversation context — the game root and adventure name are in SESSION.md)
srd/Encounters.md (Surprise section)srd/Encounters.md (Encounter Distance section)srd/Encounters.md — roll 2d6, apply CHA modifierIf the party chooses to flee:
If the party chooses to parley:
If a PC casts a spell during the encounter (before combat):
roll.py if applicable — do not reveal target numbers (Article II)Output a structured handoff block for the future combat skill:
## ENCOUNTER HANDOFF: COMBAT
**Environment:** [dungeon/wilderness], [terrain if wilderness]
**Distance:** [distance] feet
**Surprise:** [which side, if any, and rounds remaining]
**Party:**
[stat blocks from characters/ files]
**Monsters:**
[stat blocks with rolled HP]
**Notes:** [any relevant conditions — surprise, lighting, terrain]
Present monster stats in this compact format:
## GOBLIN x3
- AC 6 [13] | HD 1-1 (hp: 3, 5, 2) | Att 1 weapon | Dmg 1d6
- MV 60' (20') | ML 7 | Save D1 | AL Chaotic | XP 5 each
- SPECIAL: -1 to hit in sunlight. Hate dwarves.
Notes:
Core encounter rules:
EncountersEvasion_and_PursuitMorale_(Optional_Rule)Encounter tables (fetch as needed):
Dungeon_EncountersWilderness_EncountersMonster pages use the monster name as slug (e.g., Goblin, Ogre, Black_Dragon).