Skip to content

About

Multiplayer mod for dwarf fortress

Resources

Stars

34 stars

Watchers

5 watching

Forks

Latest commit

 

History

47 Commits

Folders and files

Repository files navigation

Multi Dwarf / DFCapture

Play one Dwarf Fortress together w/ friends through your browser. The host runs the game with DFHack; friends open a link and get their own camera, controls, menus, and HUD. LAN only.

The current MultiDwarf mod is on Steam Workshop.

New features go to the Workshop version, which includes Original, Experimental, and Native gameplay modes. I'll keep this browser version updated for Dwarf Fortress and DFHack compatibility.

Support development: Ko-fi · Patreon

Video showcase of the mod (older version)

Original / Experimental and Native

Here's how the browser interface compares with Native, which uses Dwarf Fortress's own menus and tools. The Native captures are from a two-PC Workshop session on v10.0.25.

Original / Experimental (custom interface) Native (Dwarf Fortress interface)
Player cursors and views
Original interface showing another player's cursor, name, and elevation

Native gameplay showing Baxyo's remote cursor beside the workshops
Location pings
Pinging a location through the original interface

A live Native multiplayer location ping and its coordinate notice

The Workshop version also has in-game chat and shared selection previews:

Chat Shared selection previews
Opening Native multiplayer chat and typing hello without leaving the game Another player's selection rectangle moving beside the workshops in Native gameplay

Assigning player owned dwarves and managing favorite dwarf HUDs

Reqs

This version is built for:

  • Dwarf Fortress 53.17
  • DFHack 53.17-r1
  • Windows x64
  • Fortress mode

Linux players have reported success with Proton, but I haven't tested it personally. Play over LAN or private VPN. I use PiVPN / WireGuard and its worked great.

Install

  1. Install DFHack 53.17-r1 directly into your Dwarf Fortress game folder.
  2. download latest from Releases page for a dfcapture package.
  3. Extract it, then copy the hack folder into the Dwarf Fortress folder with Dwarf Fortress.exe. Merge it.

Put the files in the actual Dwarf Fortress game folder, even if you also have a separate Steam DFHack installation. The layout should look like this:

Usage

Please keep normal fortress backups and include your DFHack logs when reporting a crash.

In the game, open the DFHack launcher (Ctrl + Shift + D) and run:

gui/dfcapture

A small window lets you start and stop the server.

DFCapture server window

DFCapture player link

Give every viewer a link:

  • You: http://localhost:8765/view?player=YOURNAME
  • Friends: http://<your-LAN-IP>:8765/view?player=THEIRNAME
  • Example: http://192.168.1.202:8765/view?player=player1

Friends need to be on the same network or connected through your private VPN. If you prefer the command line, load a fortress and use:

capture-stream-start 8765 0.0.0.0
capture-stream-stop

Build from source

This is an external DFHack plugin, so it builds as part of a matching DFHack source tree.

  1. Clone DFHack at the matching tag, with submodules:

    git clone --recursive --branch 53.17-r1 https://github.com/DFHack/dfhack
  2. Clone this repository into DFHack's external plugin directory:

    git clone https://github.com/SourceAirbender/multi-dwarf dfhack/plugins/external/dfcapture_public
  3. Configure DFHack using its Windows build instructions. I use Visual Studio 2022.

  4. Build just this plugin:

    cmake --build dfhack/build/VC2022 --config Release --target dfcapture_public

The result is dfcapture.plug.dll. Copy it, the web/ directory, dfcapture.lua, and scripts/gui/dfcapture.lua into the matching locations shown above.

cpp-httplib is vendored in third_party/cpp-httplib/, so no extra checkout is needed.

License

DFCapture is licensed under the GNU Affero General Public License v3.0 (AGPL version 3 only). See LICENSE. Because it serves over a network, the AGPL also requires offering the source to people who use it remotely.

It builds on DFHack (Zlib), continues the approach of DFPlex (Zlib), descends from webfort (ISC), and embeds cpp-httplib (MIT). Full third party notices and license text are in NOTICE.

About

Multiplayer mod for dwarf fortress

Resources

Stars

34 stars

Watchers

5 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages