This guide will help you create your first mod for Remixed Dungeon. We'll start with simple modifications and work up to more complex ones.
Before starting, make sure you have:
Android/data/com.nyrds.pixeldungeon.ml/files/ (on Android)version.json file
{
"version": 1,
"name": "My First Mod"
}
items/weapon/ dagger.png to replace the dagger sprite)items/weapon/ in files like short_sword.jsonExample modification:
{
"class": "com.watabou.pixeldungeon.items.weapon.melee.ShortSword",
"name:en": "Modified Short Sword",
"name:ru": "Модифицированный короткий меч",
"damageMin": 3, // Original value might be 4
"damageMax": 8, // Original value might be 8
"ac": "ATTACK",
"imageIndex": 0
}
The game's assets follow a specific organization:
actors/ - Mobs, NPCs, and other entitiesactors/mobs/ - Monster definitionsactors/buffs/ - Status effectsitems/ - All items in the gameitems/weapon/ - Weaponsitems/armor/ - Armoritems/rings/ - Ringsitems/potions/ - Potionsitems/scrolls/ - ScrollslevelsDesc/ - Level definitions and dungeon structureres/ - Text strings and localizationres/values/ - English textsres/values-ru/ - Russian textssounds/ - Sound effectsmusic/ - Background musicsprites/ - Game graphics
To modify in-game text, create a res/values/strings.json file in your mod:
{
"DungeonTitle": "My Custom Dungeon",
"WelcomeMsg": "Welcome to my modded version!"
}
To change a mob's properties, copy the mob's JSON file to your mod:
{
"class": "com.watabou.pixeldungeon.actors.mobs.Rat",
"name:en": "Giant Rat",
"HP": 15, // Higher HP
"damageMin": 3, // Higher damage
"damageMax": 6, // Higher damage
"exp": 3, // More experience
"loot": "gold", // Additional loot
"lootChance": 0.5 // Higher chance for loot
}
For more complex modifications, you can use Lua scripts. The correct approach uses specialized libraries:
Example: items/custom_item.lua
local RPD = require "scripts/lib/commonClasses" local item = require "scripts/lib/item" return item.init{ desc = function() return { image = 0, imageFile = "items.png", name = "Explosive Item", info = "An explosive item that damages enemies when thrown.", stackable = true, upgradable = false, isFlies = true, defaultAction = "THROW" } end, onThrow = function(self, cell, user) -- Custom behavior when item is thrown RPD.glog("Custom item thrown at " .. cell.x .. ", " .. cell.y) -- Add explosion effect -- Blast functionality would need to be implemented using specific game mechanics RPD.topEffect(RPD.Dungeon.level():cell(cell.x, cell.y), "blast") end }
Reference the script in your item's JSON using the correct format:
{
"class": "com.watabou.pixeldungeon.items.Item",
"name:en": "Explosive Item"
}
Note: Modern Remixed Dungeon uses the library-based approach that's defined entirely in the Lua file rather than through JSON script references.
version.json file exists and is properly formattedWhen your mod is complete and tested:
Once you're comfortable with basic modding:
Remember to always backup your save files before testing new mods!