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

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.

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.