Skip to content

Pre-Planned Combat Scenario System #81

Description

@FirebrickRed

Summary

YAML-driven combat scenarios for pre-configured encounters like guard ambushes, boss fights, or scripted events. More complex than random tables, with formations, conditional events, and combat integration.

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

Prerequisites

Goals

  • /dmencounter spawn <scenario> - Execute scenario
  • /dmencounter scenarios - List available scenarios
  • Entity spawning with formations (surround, line, flanking)
  • Conditional events (if defeated, if fled)
  • Combat start integration (initiative tracker future)
  • Tab completion for scenario IDs

YAML Format

# DMContent/Scenarios/town_guard_arrest.yml
id: town_guard_arrest
name: "Town Guard Arrest"
description: "Guards attempt to arrest the party"

spawn:
  - id: town_guard
    count: 4
    formation: surround
    group_initiative: true
    random_names: true
    
  - id: guard_captain
    count: 1
    custom_name: "Captain Thorne"
    location: back

on_spawn:
  - type: message
    text: "\"You're under arrest!\""
    speaker: "Captain Thorne"
  - type: combat_start

conditions:
  - trigger: all_defeated
    effects:
      - type: message
        text: "The guards are defeated!"
      - type: consequence
        id: "town_reputation_hostile"
        
  - trigger: entity_defeated
    entity: guard_captain
    effects:
      - type: message
        text: "\"Retreat!\" shout the guards"
      - type: entity_action
        action: flee
        targets: [town_guard]

Commands

# List scenarios
/dmencounter scenarios
> town_guard_arrest (5 entities)
> kobold_ambush (8 entities)
> dragon_lair_boss (1 entity + minions)

# Spawn scenario
DM: /dmencounter spawn town_guard_arrest
> Spawning scenario: Town Guard Arrest
> Created group "town_guard_arrest" with 5 entities
> Broadcast: "You're under arrest!"
> Combat started (initiative tracker)

Formation Types

  • surround: Circle around party center
  • line: Straight line facing party
  • flanking: Split to sides of party
  • back: Behind other entities
  • scattered: Random positions in area
  • custom: Specific coordinates

Conditional Events (Future)

  • all_defeated: All entities in scenario defeated
  • entity_defeated: Specific entity defeated
  • hp_threshold: Entity below X% HP
  • turn_count: After X combat rounds
  • party_action: If party flees, surrenders, etc.

Location

DMContent/
└── Scenarios/
    ├── town_guard_arrest.yml
    ├── kobold_ambush.yml
    ├── dragon_boss_fight.yml
    └── custom/
        └── my_encounter.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