Mods & Scripts
Split Path

Split Path

Adds the feature to split a path in a similar way to splitting a wall, i.e. by enabling “Edit Points” and hitting backspace when highlighting an region between two vertices.

Note that undo and redo capability is included. Also the end point configuration (fade in, fade out, shrink and grow) is copied from the original path, you can change these after splitting the path using my Minor Utils mod.

Limitations & Caveats

Performance may be impacted as it does rely on calling functions every frame.

If you experience odd behaviour by Dungeondraft after splitting a path such as an inability to select paths or edit their points, saving and reopening will resolve these.

Versions

v1.0.5 Fixes to ensure deleting points does not also split the path

v1.0.2 Fixed issue with the logic which means sometimes the wrong split point was calculated

v1.0.1 Now both Delete key and Backspace key will trigger the split

v1.0.0 Release version

Mods & Scripts
Import Watabou One Page Dungeon

Import Watabou One Page Dungeon

A tool to take the JSON output of the Watabou One Page Dungeon Generator and draw the core features into Dungeondraft for further change and editing.

  • Walls
  • Columns
  • Floor (created as Patterns)
  • Wall shadows (created as paths)
  • Doors (as Portals or Objects)
  • Stairs
  • Columns (and column shadows as objects)
  • Lights (created procedurally)

Limitations & Caveats

You should always save and reopen a map after importing a new dungeon JSON as some assets act oddly until this is done.

Water and “notes” are not supported in the current version.

Versions

v1.0.1 Fixed bug in lights creation where min wall distances exceeding the room size causes a crash.

v1.0.0 Release version

Mods & Scripts
Minor Utils

Minor Utility Options

A set of minor functions to enhance the core experience of Dungeondraft:

  • Option to add buttons to the root menu for all of the tools
  • Option to add key mapping for all of the core tools
  • Option to have stored templates for the Scatter Tool
  • Modify width, smoothness and end types for paths selected with the Select Tool
  • Feature to send a wall to the back or front when using the Select Tool
  • Persist grid visibility across sessions
  • Add feature for random mirroring to the Scatter Tool

Limitations & Caveats

Performance may be impacted as it does rely on calling functions every frame.

Using this mod with other mods that directly update the in built tool panels may result in inconsistent behaviour although at time of writing there are no known incompatibilities.

Versions

v1.0.2 Fixed bug with shortcut keys to recognise Command, Shift, Ctrl and Alt key presses

v1.0.1 Added feature to implement random mirroring in the Scatter Tool

v1.0.0 Release version

Mods & Scripts
Additional Search Options

Additional Search Options

Modifies the UI for the Wall, Pattern and Terrain tools to add the ability to search & filter for assets.

Search options also added to the select tool for Walls and Patterns.

Limitations & Caveats

Searching in the Pattern tool requires pre-selecting one of these categories: Simple Tiles, Patterns or Patterns Colorable.

The mod does not support search in the Building tool.

Using this mod with other mods that directly update the in built tool panels may result in inconsistent behaviour although at time of writing there are no known incompatibilities.

Versions

v1.2.5 – added feature button to show paths in the library panel where the asset has already been used on the map. Replaces the “used” objects logic as the in-built version is inconsistent. Fixed bug with used assets search list display.

v1.2.4 – added feature button to show patterns & terrain in the grid where there is a corresponding used terrain or pattern with the same pack and name.

v1.2.0 – added feature to show only previously used walls & patterns. Removed feature to allow selected walls to be manipulated as this will be added to Minor Utils mod.

v1.1.4 – added feature to allow walls selected in the select tool to be pulled to the front or sent to the back of other walls

v1.1.3 – improved performance for searches for high asset counts by removing unnecessary function calls

v1.1.2 – added support to display default colours in the main tool grids; fixed background bug where search functions were repeatedly called unnecessarily

v1.1.1 – updated terrain tool search with additional option to move the terrain search to the right side panel of the UI

Mods & Scripts
Order Objects For Hex Maps

Order Display of Objects by Y Position

A very simple mod to make Dungeondraft act a little like Wonderdraft for objects and have objects with a lower y position to be displayed behind ones with higher y position values.

This is primarily intended for use with assets with a slight consistent perspective in particular 2MTT World Hex assets.

Primary Usage – 2MTT World Map Hex Assets

The expected use case for this mod is for use with 2MTT Hex assets. It is assumed that base hexes will be placed at, say, layer 100 with roads at, say, layer 200 and buildings at, say, layer 300.

The easiest way to makes these maps is for the hexes to align to 2 squares in height and for the “Custom Snap Mod” to be installed with the snap set to 1/4 square.

Suggested Linked Content

Custom Snap Mod by Hieronymos

World Map Hex Tiles by 2-Minute Tabletop

Suggested Linked Content

Version 1.1 – added option to reorder objects after every object placed. Removed __macosx folder from zip file.

Version 1.0 – initial release

Usage

The tool can be found under the Objects Menu. Note that implementation of the change can not be undone.

Tool Script
Custom Snap Mod

Set your own snap separation and offset using this mod.

Works for squares, rectangles, and of course as of version 1.1.2 also hexagons!!

Supports both hexagons with pointy end up and with the flat side up.

How to use.

  • You can find the menu to interact with this mod in the Settings category.
  • Switch between vanilla snapping and custom snapping using the ‘Enable’ button in this menu.
  • You can still turn off snapping altogether with the vanilla keybind (‘S’ by default).
  • With the mod and snapping enabled, all the tools should properly snap to the given grid.
  • Simply select a snapping resolution from the presets, or enable the advanced mode to set your own custom resolution or even an offset.

FAQ.

Q. Can I snap for hexagonal maps?
A. Absolutely! Simply check out one of the respective presets, or click one of the hexagonal icons in the mod’s tool.

Q. Even though I set the mod to hex snapping, the grid stays square.
A. Unfortunately I don’t know how to implement that (yet). But I’m working on it! In the meantime Moulk’s Hex Grid Pattern asset might serve you well.

Q. Does the mod save my settings?
A. Yes. You can find the file with the settings by navigating ‘Menu’ -> ‘Open User Folder’ and there look for ‘custom_snap_mod_data.txt’ Note that this file only shows up after you edit your setting for the first time.

Q. The Portal tool doesn’t snap to walls.
A. Yes. It snaps properly in Freestanding mode but unfortuantely, due to a technology constraint, it cannot work in Anchored mode.

Q. The Select tool doesn’t snap to where it should.
A. It snaps based on distance moved. This is how it works in vanilla, too. You can still snap individual objects normally as the other tools do, by “instant dragging” them without selecting them first.

Q. What are the offset sliders doing?
A. Using these, you can move all the snap points an equal distance. Useful when you want to place objects slightly off-centred from the grid. Pro tip: you can manually enter a negative value.

Q. Offset tool? Where can I find that?
A. Enable the advanced section of the tool.

Q. I was hoping I could set my own distance for the snapping points.
A. You can! Simply enable the advanced section of the tool and play around with the Spacing sliders.

Q. Why is there 2 sliders for spacing and offset each?
A. If you turn off the locked aspect ratio, you can set a separate spacing and offset for each axis. Useful for isometric maps.

Q. What are the ‘Lock Aspect Ratio’ toggles doing?
A. Turning them off lets you use the sliders for each axis separately (see the point above). This behaviour is turned off by default so you don’t have to change 2 values every time.

Q. What are the ‘Corner’ and ‘Edge’ buttons at the bottom of the advanced setting doing?
A. Hexagons’ sizes are measured differently by different artists and tools. Sometimes they’re measured from the corners, which are the furthest points from the center. And at other times they’re measured from the middle of the edges, which are the closest points to the center. Using these buttons you can switch between these settings.

Q. Nothing is snapping anymore.
A. Have you accidentally disabled the mod or turned off snapping altogether? Try pressing ‘S’. Or maybe you are just using a very fine snapping resolution. Try lowering the spacing.

Q. The snapping is back to vanilla.
A. You might have disabled the mod. Or alternatively you might have set the snap spacing to either 256 or 128 which are the default values for normal snapping and half snapping.

Compatibility.

  • No known imcompatiblities as of yet. Please notify me and the other authors if you find any and maybe there will be a compatibility patch in the future.
  • The mod is highly dependent on the order of operations and manually adding functionality for multiple tools. Therefore any mods with custom tools may cause unforseen behaviour, such as:
    1. Working perfectly with this mod.
    2. Simply work as intended without benefiting from the Custom Snap Mod.
    3. Have some functionalities snap to the vanilla grid and others to the modded grid.
    4. A random one of the above based on load order.

Thanks

Many thanks to you for checking out my mod, to MBMM for saving me hours of bugfixing, Moulk for testing and some of the assets used in the display, and also Gnomefactory for some of the assets used in the display. I hope you’re going to have a lot of fun with this mod. Should you come across issues or potential for improvements, come find me (Hieronymos) in the modding channel in the official Megasploot Discord

Mods & Scripts
Dropshadower

Donate to me on Ko-Fi!

Automated, high-quality dropshadows!

Dropshadower implements high-quality, adjustable shadows for objects and portals.

Note: Dungeondraft 1.1.0.6 or higher recommended.

Features

  • Adjustable in real-time
  • Shadows are exportable
  • Shadows can be adjusted to render below their parent object, or below the objects layer
  • Saves seamlessly to your map
  • Shadow settings can be copied and pasted

Installation

Download the most recent version, and unzip it into your mod directory. No other steps are needed

Licensing

Dropshadower is completely free for personal and commercial use, but donations are appreciated. You can donate using the “Buy me a Coffee” button at the top. I’m currently unemployed, so anything helps!

Tool Script
RasterPainter

Donate to me on Ko-Fi!

Raster Graphics for Dungeondraft

RasterPainter is a mod for Dungeondraft that implements basic raster graphics capabilities in the form of a simple layer based editor.

Features

  • Import external files into your map (WebP, PNG and JPEG supported)
  • Export raster layers to image files for editing (Export formats: WebP, PNG and JPEG)
  • Use your light assets as brushes
  • Full Undo and Redo Support (Requires _Lib)
  • Draw and blend terrain seamlessly
  • Layer opacity and tinting
  • Layers persist even if map is loaded without the mod
  • Position layers under or above objects, floors, walls or anything else
  • Add overlays to your map, by importing fog, clouds or anything else you want

Installation

Download the most recent version, and unzip it into your mod directory.
Then install _Lib

IMPORTANT!

Due to limitations of Dungeondrafts modding API, layers are stored in your .dungeondraft_map file, which will increase file sizes, save and load times, sometimes quite significantly. This can be mitigated to an extent by modifying the Render Scale in settings (requires _Lib to be installed). I’d also recommend only using the mod primarily to make finishing touches, rather than to build your entire map.

Also, please make a backup of your map file while using the mod! I’ve done my best to avoid crashes, but I can’t make guarantees

This mod can be quite heavy on RAM, especially at lower render scales, so be aware of this if you edit primarily on a laptop.

FAQ

  • Q: Painting is slow and freezes up Dungeondraft for a bit after every stroke
    A: Unfortunately this is something I can’t completely resolve. To improve responsiveness, lower your render scale in settings
  • Q: The ends of lines drawn using a brush have a line running through them
    A: Unfortunately this isn’t resolveable at present, but if it’s really bugging you and you have a very good computer and a lot of RAM, you can set your render scale to 1
  • Q: Drawing on a large map is blurry and pixelated
    A: Due to engine limitations, raster layers cannot have a resolution greater than 16384 x 16384. To avoid a confusing crash, RasterPainter will automatically reduce the render scale until the raster layer will fit into this limitation
  • Q: I tried using a custom assets as a brush, but the stroke is broken
    A: Not all light textures are suitable for use as brushes, particularly those that have a lot of empty space.
  • Q: I can’t undo or redo strokes!
    A: Full Redo and Undo functionality, along with the configuration menu, require _Lib to be installed to function
  • Q: I’ve run into a crash or bug!
    A: If you’re running into crashes or other bugs, please file an issue on the Github repository.
  • Q: When drawing a line, it doesn’t follow the mouse smoothly
    A: Make sure Snap mode is disabled

Donations

If this mod has been useful to you, or you’ve used it commercially, I’d very much appreciate a donation to my Ko-fi.

Tool Script
Item and Path Opacity

This mod lets you adjust the opacity of non-colorable objects and paths, as well as apply a tint to paths. The opacity and color values for each map are stored in a text file in the user folder of DungeonDraft.



Note: Using “Save as” doesn’t save opacity values at the moment. Using “Save as” followed by saving normally does work.

Export Tool Script
Universal VTT WebP Exporter

This mod allows you to export Universal VTT mods using the WebP image format instead of PNG. This can drastically reduce the file size of the resulting map file.


Tool Script
Draft Timer Mod

Do you sometimes wonder how much time you’ve sunk into a map? Well, I did so here we are. As long as the mod is active it keeps track of the time spent working on any map you have opened. To see the time spent simply navigate into the Settings category and click the clock icon. You’ll then get a handy overview of your current session as well as the rough time spent on the map in general, even across multiple devices.

Now with additional, handy user settings to automatically stop the timer while you are browsing other things or spending time away from your PC.


Tool Script
Scalable Walls

This mod lets you scale wall textures in the X (length) and Y (width) dimensions.


Note

Any walls which are scaled by this mod will have their textures changed to wood
if you open the map with the mod disabled. To fix this, enable the mod and use
the “Reset Scale” button on each wall before disabling it again. This will
restore the original textures.

Tool Script
Layered Trace Image

This mod lets you choose which layer the trace image will display in, allowing you to place it above props, walls, etc.


Tool Script
Flexible Resize

This mod lets you resize objects by height or width independently, instead of both at once.


Patch Notes

v1.2.0 – 11/12/23

  • Fixed objects resizing in some cases during a box selection
  • Fixed objects warping when mirrored using the Select Tool.
  • Added undo/redo history support.
  • Changed maximum Object Tool scale values from 25 to 4 to match the vanilla scale slider.

v1.1.0 – 11/2/23

  • Added height and width scaling to the Object Tool.
Tool Script
Easy Align

This simple mod lets you easily align objects through a new set of buttons on the Select tool.


Release Notes

v1.1.0 – 11/13/23
  • Added undo support.

Feedback

Please report any issues to the Github repo.

Tool Script
Linux Move Fix

Enabling this mod should restore the normal movement behaviour for the select tool. It can be toggled on and off using a new button at the top of the select tool panel.

USE AT YOUR OWN PERIL!

The modding API is still unstable, and the mod could have bugs. I would hate for anyone to lose their hard work to a crash. Save early and often!

Feedback

Please report any bugs you encounter to the GitHub repo.

I’ll do my best to address them while we wait for an official fix.

Mods & Scripts
Terrain Presets

This mod improves the Terrain Brush tool, adding the ability to create new biomes, and save / load them to a presets file. This mod improves compatibility with custom asset packs and terrains.

Please note, this mod is still in beta, and may be buggy while development continues. Compatibility between updates is not guaranteed at the moment.

Compatibility

This mod is incompatible with any other mod that modifies terrains or the terrain brush tool, as it overrides the default behavior of the tool itself.

Functionalities

Completed

  • Save / load biomes to a preset file
    • Please note: If you do not save the biomes file prior to closing your map or reloading the biomes, you will lose your terrain settings!
  • Create new biomes with a distinct name
  • Delete biomes from biome list
  • Compatibility with ‘Unlock 4 more slots’ button

In-progress

  • Saving chosen biomes between maps
  • Saving multiple presets in different files
    Mods & Scripts
    EssentialUtils

    A collection of tools for Dungeondraft 1.1.0.0+.

    Current functionality includes an eyedropper for assets, alignment tools and “Select Similar” functionality

    Eyedropper Tool / Picker

    Allows quick selection of anything on the map, and automatically switches to the relevant tool. You can quickly change to the picker tool by pressing P

    Known Limitations:
    – Using the Picker on Roofs will correctly set the Roof type, but this will not be reflected in the UI
    – When zoomed out, Light elements can sometimes be selected even when it appears it shouldn’t be. This is a limitation that I currently can’t work around
    – The shortcut P can be rebound, if _Lib is installed

    Alignment Tools

    Allows quick alignment of any selection made up of lights, objects and freestanding doors.

    Notes:
    – The first thing you select will be what all other selections align too
    – The first item selected will by default be highlighted with green. If you have _Lib installed, this can be configured
    – The alignment buttons will be disabled if your selection includes an item that can’t be aligned

    Known Limitations:
    – Alignment to edges of objects can be unreliable if objects in the selection aren’t rotated at angles a multiple of 90 degrees

    Select Similar

    Allows for quick selection of all cosmetically similar items on map. Selection criteria is listed below.

    Selection Criteria:
    – Portals: Texture
    – Objects: Texture, Color
    – Paths: Texture
    – Walls: Texture, Color
    – Pattern Shapes: Texture, Color and Rotation
    – Lights: Texture, Intensity and Range
    – Roofs: Texture and Roof Type

    Select Similar

    Allows viewing details on the number of instances of objects and textures used from an asset pack, as well as disabling them from within the mods UI. This is still somewhat WIP, and hasn’t been well tested, so use with care.

    Feedback Appreciated

    Mods & Scripts
    Text Generator

    Text Generator

    You can use this tool to generate random texts such as map-making prompts, locations, names and more.

    This tool adds a Text Generator to the Design panel in Dungeondraft. With this tool you can, yes indeed, generate text! Text is generated based on presets where a sentence such as “Make a map of a %location% during a %event%” where the variables (location and event) get replaced by a random value the corresponding variable list. This way you can make your own presets such as street name generators, map-making prompt generators, character generators and more! And share them of course!

    Creating JSON Files for the Text Generator

    The Text Generator allows you to generate random text based on preset files in JSON format. This page will guide you through the process of creating your own preset files.

    JSON Format

    The JSON format for preset files should follow the following structure:

    {
        "info": {
            "name": "Preset Name",
            "author": "Author Name",
            "description": "Description of the preset",
            "version": "1.0"
        },
        "formats": [
            "A format %variable1% inside of %variable2%",
            "Look, a %variable3%!",
            "Did you know that %variable1% has a lot of %variable2%?"
        ],
        "variables": {
            "variable1": [
                "Value 1",
                "Value 2",
                "Value 3"
            ],
            "variable2": [
                "Value 1",
                "Value 2",
                "Value 3"
            ],
            "variable3": [
                "Value 1",
                "Value 2",
                "Value 3"
            ]
        }
    }
    

    The JSON file should contain three main sections: info, formats, and variables.

    Info

    The info section should contain information about the preset, including the name, author, description, and version.

    formats

    The formats section should contain an array of format templates. These templates should include placeholders for variables, which will be replaced with random values when the text is generated.

    Variables

    The variables section should contain an object with keys representing the variable names and values representing an array of possible values for each variable.

    Creating Preset Files

    To create a preset file, follow these steps:

    1. Create a new file in a text editor.
    2. Copy the JSON format above and paste it into the new file.
    3. Replace the values in the info section with the appropriate information for your preset.
    4. Add format templates to the formats section, using placeholders for variables.
    5. Add variables to the variables section, with each variable name as a key and an array of possible values as the value.
    6. Save the file with a .json extension in the presets subfolder in the Text Generator mod folder.

    Using Preset Files

    To use a preset file in the Text Generator, follow these steps:

    1. Open the Text Generator in Dungeondraft.
    2. Select the preset from the dropdown menu.
    3. Click the “Generate Text” button to generate random text based on the selected preset.
    Mod Lib
    _Lib

    _Lib

    version  Dungeondraft Version  license

    This mod offers additional API to simplify implementing certain features like configs and improve mod compatibility.

    Current API:

    Using _Lib

    To be able to access _Lib’s Api put the following at the top of your mods `start()` method:

    Engine.emit_signal(“_lib_register_mod”, self)

    Alternatively check if the signal exists first to ensure _Lib is actually enabled:

    if not Engine.has_signal(“_lib_register_mod”):
        return
    Engine.emit_signal(“_lib_register_mod”, self)

    After registering your mod with _Lib you will now have an entry `Global.API` available that contains all of the _Lib APIs. For more info on how to use them check out the wiki or the example mod.