DND battle map with fog of war
Project description
DnD Fog
pip install dndfog
Documentation: https://mrthearman.github.io/dndfog/
Source Code: https://github.com/MrThearMan/dndfog/
Create battlemaps for tabletop RPGs, like D&D.
Program is Windows only for now. This is due to the saving and loading widgets being Windows only (using pywin32). You're free to modify the code to add file loading and saving for other platforms.
Features
- Infinite grid
- Add and remove a fog of war effect
- Import maps from image files
- Place, move and remove pieces on a grid (can be matched to image grid)
- Place 1x1, 2x2, 3x3, or 4x4 pieces
- Place and remove AOE's
- Save and load file to JSON files (background image saved in the JSON file!)
How to use
When installing from pypi, the library should come with a script
named dndfog
that you can run. It should be available in your environment if
the Python\Scripts
folder is set in PATH. You can also download an EXE from
the GitHub releases.
When the program opens, you need to select an image file to use as a background,
or a JSON data file to load a map from. You can also lauch the program with extra
arguments --file=<filepath>
or --gridsize=<size>
to change the opening parameters.
The program does not autosave! You have to save (and override) the file yourself!
Keyboard shortcuts
- Remove fog:
CTRL + Left mouse button
- Add fog:
CTRL + Shift + Left mouse button
- Add a piece:
Right mouse button
- Remove a piece:
Double click: Right mouse button
- Move a piece:
Click and drag: Left mouse button
- Move camera:
Click and drag: Middle mouse button
- Move background map:
ALT + Click and drag: Left mouse button
- Add AOE:
CTRL + Click and drag: Right mouse button (change size)
- Remove AOE:
CTRL + Shift + Double click: Right mouse button
- Zoom in:
Scroll wheel: Up
- Zoom out:
Scroll wheel: Down
- Increase gridsize:
ALT + Scroll wheel: Up
- Decrease gridsize:
ALT + Scroll wheel: Down
- Select 1x1 piece placement:
1
- Select 2x2 piece placement:
2
- Select 3x3 piece placement:
3
- Select 4x4 piece placement:
4
- Show/hide fog:
F1
- Show/hide grid:
F12
- Save file:
CTRL + S
- Open file:
CTRL + O
- Quit program:
Esc
Known issues or lacking features
-
When zooming, the program grid and background map might not stay aligned, if you have moved the background map. This is due to the background map offset not being scaled correctly to the new zoom level. Usually this should be only a few pixels, and you can fix it quickly by moving the background.
-
Cut grid size in half / double gridsize
-
Turn order tracking
-
Layers for fog
-
Matching program gridsize to background gridsize is a bit awkward. You can change it with
ALT + Scroll wheel
, but there is bound to be some misalignment that you have to correct by moving the background. -
There is no undo or redo.
-
There is no way to add pictures to pieces.
-
There is no way to mark/point on things on the map (apart from the mouse cursor).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.