Skip to content

KrapfalAT/astral-bridge-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AstralBridge — FoundryVTT Module

Receives dice rolls from D&D Beyond via a local Python bridge server and posts them in FoundryVTT as native rolls in real time.

D&D Beyond (browser) ──▶ Python Bridge ──WebSocket──▶ This Module ──▶ FoundryVTT Chat

Features

  • Native Foundry rolls with exact D&D Beyond dice values (d20, damage dice, modifiers)
  • Attack rolls — target picker with AC comparison → ✓ HIT / ✗ MISS / ★ CRIT; Force Hit override
  • Damage rolls — confirmation dialog with target selector, crit doubling, direct HP apply
  • Healing rolls — target picker, HP capped at max, multi-target support
  • Skill checks & saving throws — all 6 attributes, 18 skills, death saves
  • Initiative — auto-sets initiative value in the active combat tracker
  • Floating numbers — damage/heal amounts float above tokens (requires Sequencer)
  • Automated Animations — triggers AA on hit (requires Automated Animations)
  • Dice So Nice — 3D dice for DDB rolls (requires Dice So Nice)
  • HP Sync — compares D&D Beyond max HP with Foundry actor on first roll; prompts to update if different (off by default)
  • Spell & weapon lookup via D&D 5e API — school, damage type, properties, flavour text in chat
  • Rich chat cards with HP bars, hit/miss badges, damage type icons, and D&D 5e API flavour

Requirements

Optional (features degrade gracefully without them):


Installation

Copy the astral-bridge folder into your FoundryVTT Data/modules/ directory and enable it in Settings → Manage Modules.


Settings

Setting Default Description
Bridge WebSocket URL ws://localhost:8765/ws Address of the running Python bridge
Roll Mode Public Roll How DDB rolls appear in Foundry chat
Auto-set Initiative Updates combat tracker on initiative rolls
Dice So Nice Animation Show 3D dice for DDB rolls
Automated Animations Trigger AA on damage hits
Damage Confirmation Dialog Show target picker before applying damage
Floating Numbers Floating damage/heal numbers via Sequencer
HP Sync Compare DDB max HP with Foundry on first roll per session

How It Works

The module (GM only) connects to the Python bridge via WebSocket on startup and automatically reconnects every 5 seconds on disconnect.

Incoming messages with type: "ddb-roll" are routed to the roll handler, which:

  1. Matches the DDB character name to a Foundry actor
  2. Looks up spell/weapon info from the D&D 5e API (cached)
  3. Builds a native Foundry chat roll with the exact dice results
  4. Shows an interactive dialog for attack/damage/heal target selection
  5. Applies HP changes directly to actor data

Combat turn changes in Foundry are sent back to the bridge (type: "combat-turn") so the bridge can trigger LED signals and other effects.


Character Name Matching

The module matches the character name from DDB against actor names in Foundry. If Bichael May rolls in DDB, the Foundry actor must also be named Bichael May for the speaker portrait and token targeting to work. Rolls still post to chat if no match is found.


Disclaimer

This is not an official D&D Beyond or FoundryVTT product. It uses an unofficial local WebSocket bridge that listens to the DDB game log. Use at your own risk.

Built with the assistance of Claude (Anthropic).


License

GNU General Public License v3.0 — see LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors