This quick reference guide covers the most common modding tasks you can accomplish without Java coding in Remixed Dungeon.
/Android/data/com.nyrds.pixeldungeon.ml/files/YourModName/ (Android)C:\Users\YourName\.remixed-dungeon\mods\YourModName\ (Desktop)version.json - Mod metadata and dependenciesres/values/strings.json - Text translationslevelsDesc/ - Level definitionsactors/mobs/ - Creature definitionsitems/ - Item definitions (weapon, armor, etc.)buffs/ - Status effect definitions1. Find original sprite in game assets 2. Create your new sprite in the same format/dimensions 3. Place in matching directory in your mod:
YourMod/
└── sprites/
└── items/
└── weapon.png (replaces original weapon sprites)
YourMod/
└── sounds/
└── your_sound.wav (use same filename as original)
YourMod/
└── music/
└── your_track.ogg (use same filename as original)
Create items/weapon/short_sword.json in your mod:
{
"class": "com.watabou.pixeldungeon.items.weapon.melee.ShortSword",
"damageMin": 6, // Increased from default
"damageMax": 12, // Increased from default
"name:en": "Enhanced Short Sword"
}
Create actors/mobs/rat.json in your mod:
{
"class": "com.watabou.pixeldungeon.actors.mobs.Rat",
"HP": 20, // Increased from default
"damageMin": 8, // Increased from default
"exp": 4 // Increased from default
}
Create res/values/strings.json in your mod:
{
"CustomMessage": "This is my custom message!",
"NewItemName": "Legendary Sword of Awesomeness",
"NewItemDesc": "This sword is incredibly awesome."
}
target:damage(amount, source) - Deal damage to target (e.g., target:damage(10, source))target:heal(amount, source) - Heal target (e.g., target:heal(5, source))RPD.affectBuff(target, RPD.Buffs.Poison, duration) - Apply poison to targetRPD.affectBuff(target, RPD.Buffs.Burning, duration) - Apply burn to targetRPD.affectBuff(target, RPD.Buffs.Paralysis, duration) - Apply paralysis to targetRPD.spawnMob(mobClass, cell, mobDesc) - Spawn a new mob at a specific celllocal item = RPD.item(itemClass, quantity) - Create an itemDungeon.level():drop(item, cell) - Drop an item at a specific cellRPD.topEffect(pos, effectName) - Show effect at a position (top layer)RPD.bottomEffect(pos, effectName) - Show effect at a position (bottom layer)RPD.objectEffect(pos, effectName) - Show effect at a position (object layer)RPD.playSound(soundName) - Play a sound effectRPD.Dungeon.hero - Get the player characterRPD.Dungeon.level():mobs() - Get all mobs on the current levelRPD.Dungeon.level():cell(x, y) - Get terrain type at positionRPD.Dungeon.level():distance(pos1, pos2) - Get distance between two positionsmath.random() - Generate random number
items/weapon/ice_wand.json:
{
"class": "com.watabou.pixeldungeon.items.weapon.missiles.MissileWeapon",
"name:en": "Ice Wand",
"desc:en": "A wand that shoots ice bolts. Freezes enemies temporarily.",
"imageIndex": 25,
"damageMin": 3,
"damageMax": 7,
"AC": "ZAP",
"script": "items/ice_wand.lua",
"onZap": "freezeBolt"
}
items/ice_wand.lua:
local RPD = require "scripts/lib/commonClasses" local item = require "scripts/lib/item" return item.init{ desc = function() return { image = 25, imageFile = "items.png", name = "Ice Wand", info = "A wand that shoots ice bolts. Freezes enemies temporarily.", stackable = false, upgradable = true, isFlies = false, defaultAction = "ZAP" } end, actions = function() return {RPD.Actions.ZAP} end, execute = function(self, item, hero, action) if action == RPD.Actions.ZAP then -- Find mob at target location local level = RPD.Dungeon.level() local allMobs = level:mobs() local target = nil for i = 0, allMobs:size()-1 do local mob = allMobs:get(i) if mob:getPos() == hero:getPos() then -- Simplified example - would need actual targeting target = mob break end end if target then -- Deal damage target:damage(5, hero) -- Damage target, source is hero -- Freeze for 3 turns - using paralysis as an example RPD.affectBuff(target, RPD.Buffs.Paralysis, 3) RPD.glog("The ice bolt freezes " .. target:name() .. "!") -- Visual effect RPD.topEffect(target:getPos(), "ice") end end end }
{
"version": 1,
"name": "My Ice Mod",
"author": "Your Name"
}
{
"class": "com.watabou.pixeldungeon.items.armor.Armor",
"onEquip": "equipEffect",
"onUnequip": "unequipEffect"
}
function M.equipEffect(item, hero) -- In practice, you would use different mechanics as properties may not work this way RPD.glog("You feel protected from flames!") end function M.unequipEffect(item, hero) RPD.glog("Your fire protection fades.") end
function M.onTurn(mob) if math.random() < 0.1 then -- 10% chance per turn local mobPos = mob:getPos() local summonPos = nil -- Find an empty adjacent cell local level = RPD.Dungeon.level() for direction = 0, 7 do local adjCell = mobPos + RPD.PathFinder.CIRCLE8[direction + 1] if level:cellValid(adjCell) and level:passable:adjCell(adjCell) and level:freeCell(adjCell) then summonPos = adjCell break end end if summonPos then local rat = RPD.spawnMob("Rat", summonPos, {}) RPD.glog(mob:name() .. " summons help!") end end end
function M.useItem(item, cell) -- Change terrain at target location local level = RPD.Dungeon.level() level:set(cell.x, cell.y, RPD.Terrain.CHASM) RPD.glog("The ground opens up!") end
Before releasing your mod:
version.json exist and have correct format?version.json is in the root of your mod directoryThis quick reference should help you tackle most non-Java modding tasks in Remixed Dungeon!