A FoundryVTT module that improves battle immersion.
  • JavaScript 96.8%
  • CSS 3.2%
Find a file
2026-10-10 14:27:39 +02:00
foundry-vtt-autorelease@167c4b41c1 Update README.md, add autoversion 2026-10-10 14:27:39 +02:00
lang WIP 2026-07-08 10:29:43 +02:00
scripts Remove dead enemies from combat and end with victory when none remain 2026-10-10 11:32:45 +02:00
styles WIP 2026-07-07 20:54:04 +02:00
.gitmodules Update README.md, add autoversion 2026-10-10 14:27:39 +02:00
module.json Update README.md, add autoversion 2026-10-10 14:27:39 +02:00
README.md Update README.md, add autoversion 2026-10-10 14:27:39 +02:00

Battle Immersion

"AI" disclosure

Some or all of the code in this repository was generated with the assistance of LLM-based tools.

AI-generated code is not automatically owned by the person who generated it. No claim of ownership is made over third-party code or material included in this repository.

If you believe any code in this repository infringes your copyright, please contact me with the relevant details and I will review the matter and remove the material if appropriate.

This repository is intended for personal use only. The code is provided "as is", without warranties of any kind. I accept no responsibility or liability for any damage, data loss, security issues or other consequences resulting from its use.

Use this code at your own risk. You have been warned.

About

A Foundry VTT module for the Dragonbane system that makes combat feel more immersive.

When combat starts it:

  • Fades out the currently playing audio
  • Plays an encounter sting, then switches to a combat theme
  • Unhides hidden combatant tokens (configurable per token)
  • Pans and zooms the camera to the first combatant

During and after combat it:

  • Removes enemies from the combat tracker when they are marked dead
  • Ends combat with a victory theme when no enemies remain
  • Resumes the audio that was playing before combat

Compatibility

  • Foundry VTT 14
  • Dragonbane/Drakar och Demoner 4.x
  • Works alongside Year Zero Combat (tracker changes are left to that module)

Installation

In Foundry VTT, go to Add-on Modules → Install module and enter the manifest url: https://code.chuggybumba.com/thanius/battle-immersion/raw/branch/main/module.json

Configuration

Each theme phase (Encounter, Combat, Victory) takes a playlist, an optional single sound, and a "Play only once" toggle. Leave the sound empty to allow all songs in the playlist.

Themes can be set in three places:

  1. Module settings: default themes for every combat.
  2. Scene configuration: the Battle theme section overrides the module defaults for that scene.
  3. Token configuration: the Battle theme tab overrides the scene for combats that include that token. Hostile tokens win over neutral tokens.

The token configuration also has Unhide token when engaged (on by default) in its appearance settings.

Enemies and victory

Tokens with Hostile or Neutral disposition count as enemies. An enemy is handled as dead when it is marked defeated in the combat tracker or gets the dead status effect from the token HUD.

When the last enemy dies, combat ends without the confirmation dialog and the Victory theme plays. Deleting a combat manually does not play the Victory theme.

Integration

The module listens to Foundry hooks:

  • combatStart
  • combatEnd / deleteCombat
  • updateCombatant (defeated toggle)
  • createActiveEffect (dead status effect)