Category:Modder Guides

'''WARNING: The game is still in active alpha development. Mods you make aren’t guaranteed to work with the latest version of the game. Your mods are entirely up to you to maintain, unless someone decides to patch your mod for you. Warning probably sounds scarier than it actually is.'''

Text Editors
Have no doubts, you do need an editor beyond the one that came with your system. They will properly read and understand .json files, will come with a boat load of useful features, and generally ensure you have a much better time while modding. Don't stress your editor choice too much, as you can easily change it at any time (though there may be issues with indents).

Do know that these all have portable versions if you want your editor and modding work on say, a USB, separate from your main system.

There are other well-made text editors beyond the three listed here, but these are among the best free editors out there. Two of the editors here have a proven track record with Threshold.

Atom
Portable version (download the zip/archive for your platform from the latest release)
 * Supports all desktop platforms.
 * Well featured.
 * Built-in package support, useful for linter support. (Search for "linter", "linter-ui-default", and "linter-jsonlint" packages. Say yes to any dependencies.)
 * Built-in folder navigation and management.
 * Highly flexible customization.
 * The fastest and most reliable syntax highlighting, but slow boot times on setups with a heavy number of packages.
 * Git and github integration. (If you don't know what these are, don't sweat it and move on)
 * Currently used by Threshold.

Visual Studio Code
Portable version
 * Supports all desktop platforms.
 * Most featured editor out of the box.
 * Built-in folder navigation and management.
 * Fast built-in package support with the largest collection. JSON linter pre-installed.
 * Simplest to use customization.
 * Middle-of-the-road boot times and performance.
 * Git and github integration.

Notepad++
For the portable version, go to the Downloads page, select the latest version, and grab the zip file. NOTE: When using Notepad++, please use spaces for tabs, and just in case, utf-8 encoding! This helps prevent weirdness between editors.
 * Windows only.
 * Was used by Threshold during the initial creation of the game.
 * Feature-lite.
 * Has built-in folder navigation under View -> Folder As Workspace. Cannot manage folders and files, only serving as a shortcut.
 * Lightweight on your system compared to the other editors, thanks to a lack of electron.
 * ... As a result, it is the fastest to boot up.
 * Supports packages and customization, though not quite as convenient.
 * Settings -> Preferences -> Language -> 'Replace by space' on the right.
 * Settings -> Preferences -> New document -> Encoding -> choose UTF-8 without BOM.

Linter
It is highly encouraged to use a JSON Linter in your editor of choice. It will help you avoid critical errors that cause the game to crash from improper JSON formatting. If you really don't wish to use a Linter, then you can use this handy website to debug JSON formatting issues.

Making Your Mod
It is important to know how content is created in Monster Girl Dreams first, to understand how you will be modding. Firstly, you will not be coding in python. Instead, you will be utilizing custom functions Threshold specifically made for developing content, in a text file format called JSON.

You can find the .json files the base game uses in a folder neatly called “Json” in game/Json. Do give it a look. You will find all of the games .json files to be plainly readable and modifiable as-is. You can also find music, images, and sound effects called upon by the .json files in game/music, game/images, and game/sfx respectively.

However, you will not be working in these folders directly. That can cause all sorts of issues. As you’re likely familiar with, you will be putting your creations in game/Mods.

If you’ve ever given any existing mods a look, making a mod is as simple as it looks. Creating a folder with its name in game/Mods. They can contain anything you please, but there is of course that one file type the game will be somewhat particular about: JSON.

JSON Folders
The game does expect your .json files to be organized in folders of particular names, so it can easily locate them and load them into the correct databases on startup. Where they are placed within your mods folder does not particularly matter, for as long as all relevant .json files are under them. Be sure to check the base game’s game/Json folder to see how Threshold chose to organize them. While maybe obvious, do not place them inside one another.

You also only need to provide a certain JSON folder if you intend to use it. With that out of the way, here is each type:


 * Adventures | Adventures are the first-time runs you do before you fully unlock a location. This also includes all special menu choices you have in the locations map, such as “Shortcut To Nara” or “Visit Amy”, telling the game what they require to be unlocked or what event they will point to.
 * Events | Contains all events and combat events. Events encompass a vast number of scenes and moments within the game, you will find them pretty much everywhere you read the text box along the bottom of the screen. This includes brothel events. Combat events would be events specific to combat encounters when just a Skill is too simple. An example would be the blue slime asking if you are okay with anal insertion.
 * Fetishes | Contains both fetishes and addictions for the game. You can, in fact, make new fetishes. You only need to make a single json file that provides a list of new fetishes. Lesser known are addictions, which track particular milestones with characters. They work in a very similar manner and fall under the same system, but are typically hidden from the player. Use them both with care.
 * Items | This will contain all of the consumables, equipment, and key items in the game.
 * Locations | Pretty self-descriptive, it encompasses all jsons related to the locations you find on the map when you select “Go Adventuring!” from the town. This includes what icons they should use, default BG and music, unlock requirements, what Adventures it has, and how the exploration via the grimoire will work.
 * Monsters | This will contain all of the monsters in the game, including NPCs. Note how they are organized per location in the base game, it’s a handy tip. Also of note in the base game are outliers like the brothel specific iterations of various MGs, or certain NPCs not categorized into any particular folder.
 * Perks | This will contain all of the perks in the game, including monster only perks.
 * Skills | This will contain all of the skills in the game, including the monster skills.

Remember you do not have to follow how the base game organizes the contents within each of these folders, that can be done however you want!

Lastly, if you have incomplete .json files or an entire folder of .json files that aren’t yet ready and you don’t want it to be loaded by the game on startup, simply put a _underscore at the beginning of its name to prevent the game from including it. You can see the base game utilizing this for template and example JSON files.

Music and Art Summary
You’re free to add whatever you please, just do try to be sensible and avoid using copyrighted materials. Give credit to your sources.

All one has to do when adding their own game assets like music or art, is add them to your mod’s folder. The game does not check any particular folders for them, they can be named and organized however you please.

Note that when referring to the filepath of your assets via functions in your .json files, you will naturally be fighting the base game filepaths that are hard-coded in the functions. As such, you will typically be using a file path similar to the code block below.

To explain, ../ tells the game that you wish to go back a directory. So if you were in Directory/FolderA/FolderB, using ../ will take you to Directory/FolderA. Any image, music, or sound will require you to go two folders back up. Map related assets are two directories deep (images/map/), so you will need to use ../ twice in cases where you are making a new location on the map. Console

The in-game console can be very useful for debugging and testing your mod at a rapid pace, without having to manually build up a save towards what you want. See the wiki for Console information.

Releasing Your Mod
When you feel your work is ready to be shared with the world, you’ll have a couple of choices on how you can go about uploading it and making it easily accessible for all to find. No worries, as there are more than plenty of free file hosts out there!

… The trick is finding ones that allow mods for NSFW games.

Uploading

 * Mega is a popular one for its flexible TOU, file cap size, and download speed. However, you may run into long term hosting issues. It also requires an account. This was a common choice for MGD modders.
 * Anonfile has a very flexible TOU, good download speed, a large file cap of 20GB, and what is assumed to be lifetime hosting. While it has yet to be used to host an MGD mod, there are plenty of other NSFW projects that have used this platform as their host.
 * For the technically inclined, Github has proven to be a very advanced and appealing hosting platform, as it doubles as a place for people to download your mod, and to help you manage your work. Especially useful for those who intend to collaborate on mod projects. Given its more advance use-case, it isn’t a good choice for those wishing for as simple of a modding experience as possible.
 * Lastly, the MGD Discord. Simply upload your mod alongside your post in #mod-posting, and share the download link anywhere else, without requiring the downloader to fire up Discord. The server can currently handle mods up to 50MB in size.

Where To Share
There are two key places you are encouraged to share the link to your mod. Otherwise, you’re free to share it anywhere you like, at least, as far as you can with something like this.


 * The Mod List page on the wiki. There is a tab in the How-To Guides section for how you should format and include your mod in the list, for the sake of keeping a clean presentation. Don’t sweat it too hard. The popularity of downloads here is only second to…
 * In #mod-posting on the MGD Discord. This makes up for a majority of mod downloads during your first week or two of launch, then most traffic will be coming from the wiki. If you want instantaneous exposure and feedback for your creation, this place will get you it.

Help
If you need help, please get on the MGD Discord. There are tons of knowledgeable, depraved, and friendly people there willing to help you, no matter how big or small your problem is. Head to the #modding-help channel towards the bottom of the list. You can also leave comments down below on this page, though it may take longer to get a response in comparison.