Table of Contents

Getting Started with Modding

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.

Prerequisites

Before starting, make sure you have:

Your First Simple Mod: Resource Override

Step 1: Create a Mod Directory

Step 2: Add Required Files

    {
      "version": 1,
      "name": "My First Mod"
    }
 

Step 3: Override a Resource

Step 4: Test Your Mod

Your First JSON Mod: Changing Item Properties

Step 1: Find the Item File

Step 2: Copy to Your Mod

Example 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
}

Step 3: Test Your Changes

Understanding the Directory Structure

The game's assets follow a specific organization:

Basic JSON Modding

Changing Text

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!"
}

Modifying Mobs

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
}

Using Lua Scripts for Advanced Mods

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.

Testing and Debugging Your Mod

Common Issues

Debugging Tips

Sharing Your Mod

When your mod is complete and tested:

Next Steps

Once you're comfortable with basic modding:

Remember to always backup your save files before testing new mods!