dndfog


Namedndfog JSON
Version 0.6.5 PyPI version JSON
download
home_pagehttps://mrthearman.github.io/dndfog/
SummaryDND battle map with fog of war
upload_time2024-01-21 13:25:02
maintainer
docs_urlNone
authorMatti Lamppu
requires_python>=3.10,<3.13
licenseMIT
keywords dnd fog war map combat infinite gird
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # DnD Fog

[![GitHub Workflow Status][status-badge]][status]
[![PyPI][pypi-badge]][pypi]
[![GitHub][licence-badge]][licence]
[![GitHub Last Commit][repo-badge]][repo]
[![GitHub Issues][issues-badge]][issues]
[![Downloads][downloads-badge]][pypi]
[![Python Version][version-badge]][pypi]

```shell
pip install dndfog
```

---

**Documentation**: [https://mrthearman.github.io/dndfog/](https://mrthearman.github.io/dndfog/)

**Source Code**: [https://github.com/MrThearMan/dndfog/](https://github.com/MrThearMan/dndfog/)

---

Create battlemaps for tabletop RPGs, like [D&D](https://www.dndbeyond.com/).

> 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.

![Example Map](https://github.com/MrThearMan/dndfog/blob/main/docs/img/example-map.png?raw=true)

## Features

- Infinite grid
- Add and remove a [fog of war](https://en.wikipedia.org/wiki/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
- Make markings on the map to show areas of effect or point out things to the players
- Save and load file to a single JSON file (no need to keep the image file separately!)

## How to use

When installing from [pypi](https://pypi.org/), 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](https://github.com/MrThearMan/dndfog/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
a positional argument `<filepath>` to add an initial file.

> The program does not autosave! You have to save (and override) the file yourself!

### Keyboard shortcuts

Toolbar:
- Open/close the toolbar: `TAB`
- Select tool from the toolbar: Quick select with the number keys `1-9` or click the
  tool button with `Left mouse button` when the toolbar is open

Camera:
- Move camera: `Click and drag: Middle mouse button`
- Zoom in: _Any tool except the `grid` tool_ selected from the toolbar + `Scroll wheel: Up`
- Zoom out: _Any tool except the `grid` tool_ selected from the toolbar + `Scroll wheel: Down`

Piece (quick select: `1`):
- Add a piece: Select the `piece` tool from the toolbar + `Right mouse button` on an empty square
- Remove a piece: Select the `piece` tool from the toolbar  + `Right mouse button` on a piece
- Move a piece: Select the `piece` tool from the toolbar  + `Click and drag: Left mouse button`

Fog (quick select: `2`):
- Add fog: Select the `fog` tool from the toolbar  + `Left mouse button`
- Remove fog: Select the `fog` tool from the toolbar  + `Right mouse button`
- Show/hide fog: `F1` or the checkbox in the `fog` toolbar
- Change fog size: Select the size to use from the `size` selector in the `fog` toolbar

Map (quick select: `3`):
- Move map image: Select the `map` tool from the toolbar + `Click and drag: Left mouse button`

Grid (quick select: `4`):
- Increase gridsize: Select the `grid` tool from the toolbar + `Scroll wheel: Up`
- Decrease gridsize: Select the `grid` tool from the toolbar + `Scroll wheel: Down`
- Show/hide grid: `F2` or the checkbox in the `fog` toolbar

Mark (quick select: `5`):
- Make markings: Select the `mark` tool from the toolbar + `Click and drag: Left mouse button`
- Erase markings: Select the `mark` tool from the toolbar + `Click and drag: Right mouse button`
- Clear markings: Click the `clear` button in the `mark` toolbar
- Change marker color: Use the color selector in the `mark` toolbar

Misc:
- Save file: `CTRL + S` (will skip file dialog if json data file already exists)
- Save file as: `CTRL + Shift + S` (will always open a file dialog)
- Open file: `CTRL + O`
- Quit program: Press the X mutton on the window

## Known issues or lacking features

- Matching program gridsize to background gridsize is a bit awkward
- When zooming, the program grid and background map might not stay aligned
- It's hard to keep track of combat, since there is no built-in turn order tracking
- It's too easy to accidentally remove fog you didn't mean to. There should be some way to
  layer fog, so that only some of it can be removed
- Markings do not scale when zooming
- There is no undo or redo
- There is no way to add pictures to pieces to identify them better

[status-badge]: https://img.shields.io/github/actions/workflow/status/MrThearMan/dndfog/test.yml?branch=main
[pypi-badge]: https://img.shields.io/pypi/v/dndfog
[licence-badge]: https://img.shields.io/github/license/MrThearMan/dndfog
[repo-badge]: https://img.shields.io/github/last-commit/MrThearMan/dndfog
[issues-badge]: https://img.shields.io/github/issues-raw/MrThearMan/dndfog
[version-badge]: https://img.shields.io/pypi/pyversions/dndfog
[downloads-badge]: https://img.shields.io/pypi/dm/dndfog

[status]: https://github.com/MrThearMan/dndfog/actions/workflows/test.yml
[pypi]: https://pypi.org/project/dndfog
[licence]: https://github.com/MrThearMan/dndfog/blob/main/LICENSE
[repo]: https://github.com/MrThearMan/dndfog/commits/main
[issues]: https://github.com/MrThearMan/dndfog/issues

            

Raw data

            {
    "_id": null,
    "home_page": "https://mrthearman.github.io/dndfog/",
    "name": "dndfog",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<3.13",
    "maintainer_email": "",
    "keywords": "dnd,fog,war,map,combat,infinite,gird",
    "author": "Matti Lamppu",
    "author_email": "lamppu.matti.akseli@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ff/74/d81177842de99f25e4bab3820560c29b2e23f8202f2bb3311aecaedaa656/dndfog-0.6.5.tar.gz",
    "platform": null,
    "description": "# DnD Fog\n\n[![GitHub Workflow Status][status-badge]][status]\n[![PyPI][pypi-badge]][pypi]\n[![GitHub][licence-badge]][licence]\n[![GitHub Last Commit][repo-badge]][repo]\n[![GitHub Issues][issues-badge]][issues]\n[![Downloads][downloads-badge]][pypi]\n[![Python Version][version-badge]][pypi]\n\n```shell\npip install dndfog\n```\n\n---\n\n**Documentation**: [https://mrthearman.github.io/dndfog/](https://mrthearman.github.io/dndfog/)\n\n**Source Code**: [https://github.com/MrThearMan/dndfog/](https://github.com/MrThearMan/dndfog/)\n\n---\n\nCreate battlemaps for tabletop RPGs, like [D&D](https://www.dndbeyond.com/).\n\n> Program is Windows only for now. This is due to the saving and loading widgets\n> being Windows only (using pywin32). You're free to modify the code to add file\n> loading and saving for other platforms.\n\n![Example Map](https://github.com/MrThearMan/dndfog/blob/main/docs/img/example-map.png?raw=true)\n\n## Features\n\n- Infinite grid\n- Add and remove a [fog of war](https://en.wikipedia.org/wiki/Fog_of_war) effect\n- Import maps from image files\n- Place, move and remove pieces on a grid (can be matched to image grid)\n- Place 1x1, 2x2, 3x3, or 4x4 pieces\n- Make markings on the map to show areas of effect or point out things to the players\n- Save and load file to a single JSON file (no need to keep the image file separately!)\n\n## How to use\n\nWhen installing from [pypi](https://pypi.org/), the library should come with a script\nnamed `dndfog` that you can run. It should be available in your environment if\nthe `Python\\Scripts` folder is set in PATH. You can also download an EXE from\nthe [GitHub releases](https://github.com/MrThearMan/dndfog/releases).\n\nWhen the program opens, you need to select an image file to use as a background,\nor a JSON data file to load a map from. You can also lauch the program with\na positional argument `<filepath>` to add an initial file.\n\n> The program does not autosave! You have to save (and override) the file yourself!\n\n### Keyboard shortcuts\n\nToolbar:\n- Open/close the toolbar: `TAB`\n- Select tool from the toolbar: Quick select with the number keys `1-9` or click the\n  tool button with `Left mouse button` when the toolbar is open\n\nCamera:\n- Move camera: `Click and drag: Middle mouse button`\n- Zoom in: _Any tool except the `grid` tool_ selected from the toolbar + `Scroll wheel: Up`\n- Zoom out: _Any tool except the `grid` tool_ selected from the toolbar + `Scroll wheel: Down`\n\nPiece (quick select: `1`):\n- Add a piece: Select the `piece` tool from the toolbar + `Right mouse button` on an empty square\n- Remove a piece: Select the `piece` tool from the toolbar  + `Right mouse button` on a piece\n- Move a piece: Select the `piece` tool from the toolbar  + `Click and drag: Left mouse button`\n\nFog (quick select: `2`):\n- Add fog: Select the `fog` tool from the toolbar  + `Left mouse button`\n- Remove fog: Select the `fog` tool from the toolbar  + `Right mouse button`\n- Show/hide fog: `F1` or the checkbox in the `fog` toolbar\n- Change fog size: Select the size to use from the `size` selector in the `fog` toolbar\n\nMap (quick select: `3`):\n- Move map image: Select the `map` tool from the toolbar + `Click and drag: Left mouse button`\n\nGrid (quick select: `4`):\n- Increase gridsize: Select the `grid` tool from the toolbar + `Scroll wheel: Up`\n- Decrease gridsize: Select the `grid` tool from the toolbar + `Scroll wheel: Down`\n- Show/hide grid: `F2` or the checkbox in the `fog` toolbar\n\nMark (quick select: `5`):\n- Make markings: Select the `mark` tool from the toolbar + `Click and drag: Left mouse button`\n- Erase markings: Select the `mark` tool from the toolbar + `Click and drag: Right mouse button`\n- Clear markings: Click the `clear` button in the `mark` toolbar\n- Change marker color: Use the color selector in the `mark` toolbar\n\nMisc:\n- Save file: `CTRL + S` (will skip file dialog if json data file already exists)\n- Save file as: `CTRL + Shift + S` (will always open a file dialog)\n- Open file: `CTRL + O`\n- Quit program: Press the X mutton on the window\n\n## Known issues or lacking features\n\n- Matching program gridsize to background gridsize is a bit awkward\n- When zooming, the program grid and background map might not stay aligned\n- It's hard to keep track of combat, since there is no built-in turn order tracking\n- It's too easy to accidentally remove fog you didn't mean to. There should be some way to\n  layer fog, so that only some of it can be removed\n- Markings do not scale when zooming\n- There is no undo or redo\n- There is no way to add pictures to pieces to identify them better\n\n[status-badge]: https://img.shields.io/github/actions/workflow/status/MrThearMan/dndfog/test.yml?branch=main\n[pypi-badge]: https://img.shields.io/pypi/v/dndfog\n[licence-badge]: https://img.shields.io/github/license/MrThearMan/dndfog\n[repo-badge]: https://img.shields.io/github/last-commit/MrThearMan/dndfog\n[issues-badge]: https://img.shields.io/github/issues-raw/MrThearMan/dndfog\n[version-badge]: https://img.shields.io/pypi/pyversions/dndfog\n[downloads-badge]: https://img.shields.io/pypi/dm/dndfog\n\n[status]: https://github.com/MrThearMan/dndfog/actions/workflows/test.yml\n[pypi]: https://pypi.org/project/dndfog\n[licence]: https://github.com/MrThearMan/dndfog/blob/main/LICENSE\n[repo]: https://github.com/MrThearMan/dndfog/commits/main\n[issues]: https://github.com/MrThearMan/dndfog/issues\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "DND battle map with fog of war",
    "version": "0.6.5",
    "project_urls": {
        "Homepage": "https://mrthearman.github.io/dndfog/",
        "Repository": "https://github.com/MrThearMan/dndfog"
    },
    "split_keywords": [
        "dnd",
        "fog",
        "war",
        "map",
        "combat",
        "infinite",
        "gird"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f5fae39825e88d715ced9281f42ab12382f0ee86a317e227fa09bf0b9d479242",
                "md5": "bf37127f74e1d7d342d6cefd84be6256",
                "sha256": "4046899fc82026def0edf5a3666510937e7a13258072f39f32adab38a8b9b3eb"
            },
            "downloads": -1,
            "filename": "dndfog-0.6.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bf37127f74e1d7d342d6cefd84be6256",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<3.13",
            "size": 24909,
            "upload_time": "2024-01-21T13:25:00",
            "upload_time_iso_8601": "2024-01-21T13:25:00.029788Z",
            "url": "https://files.pythonhosted.org/packages/f5/fa/e39825e88d715ced9281f42ab12382f0ee86a317e227fa09bf0b9d479242/dndfog-0.6.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ff74d81177842de99f25e4bab3820560c29b2e23f8202f2bb3311aecaedaa656",
                "md5": "0376de0f9ff41d0c1557464d44588e42",
                "sha256": "5f23042536ee4868bcd5a948963ecc4b7f99fcbeb020a7eb46c805dc59634ed9"
            },
            "downloads": -1,
            "filename": "dndfog-0.6.5.tar.gz",
            "has_sig": false,
            "md5_digest": "0376de0f9ff41d0c1557464d44588e42",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<3.13",
            "size": 18890,
            "upload_time": "2024-01-21T13:25:02",
            "upload_time_iso_8601": "2024-01-21T13:25:02.484545Z",
            "url": "https://files.pythonhosted.org/packages/ff/74/d81177842de99f25e4bab3820560c29b2e23f8202f2bb3311aecaedaa656/dndfog-0.6.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-21 13:25:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MrThearMan",
    "github_project": "dndfog",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dndfog"
}
        
Elapsed time: 2.66041s