rpd:modding_non_java_techniques
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| rpd:modding_non_java_techniques [2025/12/25 18:23] – auto lint fix Mikhael | rpd:modding_non_java_techniques [2025/12/25 18:24] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Non-Java Modding Techniques ====== | ||
| + | Remixed Dungeon provides extensive modding capabilities without requiring Java programming knowledge. This guide covers all the non-Java modding techniques you can use to create modifications. | ||
| + | |||
| + | ===== Resource Override Modding ===== | ||
| + | |||
| + | The simplest type of modding involves replacing game resources directly. | ||
| + | |||
| + | ==== Sprite Replacement ==== | ||
| + | * Locate original sprites in the assets directory | ||
| + | * Create new sprites with the same dimensions and format | ||
| + | * Place them in the same directory structure in your mod folder | ||
| + | |||
| + | Example directory structure: | ||
| + | |||
| + | < | ||
| + | MyMod/ | ||
| + | ├── sprites/ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | └── version.json | ||
| + | </ | ||
| + | |||
| + | ==== Sound and Music Replacement ==== | ||
| + | * Replace sound effects by placing new files in '' | ||
| + | * Replace background music by placing new files in '' | ||
| + | * Keep the same filenames to ensure the game loads your replacements | ||
| + | |||
| + | ==== Text and Localization ==== | ||
| + | * Modify game text by creating '' | ||
| + | * Add new languages by creating '' | ||
| + | * Format: <code json> | ||
| + | |||
| + | ===== JSON-Based Modding ===== | ||
| + | |||
| + | JSON files control most game content and mechanics in Remixed Dungeon. | ||
| + | |||
| + | ==== Item Modding ==== | ||
| + | Create custom items by defining them in JSON files: | ||
| + | |||
| + | <code json> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Mob Modding ==== | ||
| + | Create or modify creatures: | ||
| + | |||
| + | <code json> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Level Modding ==== | ||
| + | Design custom levels using JSON: | ||
| + | |||
| + | <code json> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | "################################", | ||
| + | "# | ||
| + | "# | ||
| + | "################################" | ||
| + | ], | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ], | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Dungeon Structure ==== | ||
| + | Modify how levels connect by editing '' | ||
| + | |||
| + | <code json> | ||
| + | { | ||
| + | " | ||
| + | {" | ||
| + | {" | ||
| + | ], | ||
| + | " | ||
| + | {" | ||
| + | ] | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripting ===== | ||
| + | |||
| + | Lua scripts provide dynamic behavior without Java coding. | ||
| + | |||
| + | ==== Basic Lua Structure ==== | ||
| + | <code lua> | ||
| + | local RPD = require " | ||
| + | local item = require " | ||
| + | local M = {} | ||
| + | |||
| + | return item.init{ | ||
| + | desc = function() | ||
| + | return { | ||
| + | image = 0, | ||
| + | imageFile | ||
| + | name = " | ||
| + | info = " | ||
| + | stackable | ||
| + | upgradable | ||
| + | isFlies | ||
| + | defaultAction = " | ||
| + | } | ||
| + | end, | ||
| + | |||
| + | -- Function that can be called from JSON | ||
| + | execute = function(self, | ||
| + | if action == " | ||
| + | -- Add fire damage | ||
| + | RPD.affectBuff(hero, | ||
| + | RPD.glog(" | ||
| + | end | ||
| + | end | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Correct Lua Functions ==== | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | ==== Item Scripts ==== | ||
| + | <code lua> | ||
| + | local RPD = require " | ||
| + | local item = require " | ||
| + | |||
| + | return item.init{ | ||
| + | desc = function() | ||
| + | return { | ||
| + | image = 1, | ||
| + | imageFile | ||
| + | name = " | ||
| + | info = "An explosive item that damages enemies.", | ||
| + | stackable | ||
| + | upgradable | ||
| + | isFlies | ||
| + | defaultAction = " | ||
| + | } | ||
| + | end, | ||
| + | |||
| + | actions = function() | ||
| + | return {RPD.Actions.EXPLODE} | ||
| + | end, | ||
| + | |||
| + | -- Called when item is used | ||
| + | execute = function(self, | ||
| + | if action == RPD.Actions.EXPLODE then | ||
| + | local level = RPD.Dungeon.level() | ||
| + | local cell = hero: | ||
| + | |||
| + | -- Damage all creatures in radius | ||
| + | local mobs = level: | ||
| + | for i = 0, mobs: | ||
| + | local mob = mobs:get(i) | ||
| + | if level: | ||
| + | mob: | ||
| + | RPD.glog(" | ||
| + | end | ||
| + | end | ||
| + | |||
| + | -- Also damage the hero slightly | ||
| + | hero: | ||
| + | RPD.glog(" | ||
| + | end | ||
| + | end | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Mob Scripts ==== | ||
| + | <code lua> | ||
| + | local RPD = require " | ||
| + | local mob = require " | ||
| + | |||
| + | return mob.init{ | ||
| + | spawn = function(self, | ||
| + | -- Called when the mob is created | ||
| + | RPD.glog(" | ||
| + | end, | ||
| + | |||
| + | act = function(self) | ||
| + | -- Called each turn when mob is active | ||
| + | local hero = RPD.Dungeon.hero | ||
| + | local distance = RPD.Dungeon.level(): | ||
| + | |||
| + | if distance <= 2 then | ||
| + | -- Heal the mob | ||
| + | self: | ||
| + | RPD.glog(" | ||
| + | end | ||
| + | |||
| + | -- Spend time for this turn | ||
| + | self: | ||
| + | end, | ||
| + | |||
| + | -- Called when mob is attacked | ||
| + | onAttackProc = function(self, | ||
| + | -- Chance to counter-attack | ||
| + | if math.random() < 0.3 then -- 30% chance | ||
| + | enemy: | ||
| + | end | ||
| + | return damage | ||
| + | end, | ||
| + | |||
| + | die = function(self, | ||
| + | -- Handle death | ||
| + | RPD.glog(" | ||
| + | end | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Buff Scripts ==== | ||
| + | <code lua> | ||
| + | local RPD = require " | ||
| + | local buff = require " | ||
| + | |||
| + | return buff.init{ | ||
| + | desc = function() | ||
| + | return { | ||
| + | icon = 10, | ||
| + | name = " | ||
| + | info = " | ||
| + | } | ||
| + | end, | ||
| + | |||
| + | attach = function(self, | ||
| + | -- Called when buff is applied | ||
| + | RPD.glog(" | ||
| + | return true | ||
| + | end, | ||
| + | |||
| + | act = function(self) | ||
| + | -- Called each turn while buff is active | ||
| + | if math.random() < 0.1 then -- 10% chance per turn | ||
| + | self.target: | ||
| + | end | ||
| + | |||
| + | -- Continue for another turn | ||
| + | return true | ||
| + | end, | ||
| + | |||
| + | detach = function(self) | ||
| + | -- Called when buff is removed | ||
| + | RPD.glog(" | ||
| + | end | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Tiled Level Editor ===== | ||
| + | |||
| + | Create complex custom levels using the Tiled map editor: | ||
| + | |||
| + | ==== Getting Tiled ==== | ||
| + | * Download Tiled from https:// | ||
| + | * Use the custom Tiled extension provided with Remixed Dungeon | ||
| + | |||
| + | ==== Level Structure ==== | ||
| + | * Create a new tilemap with the correct dimensions | ||
| + | * Use the original tilesets as a base or create new ones | ||
| + | * Place special objects for spawns, items, and exits | ||
| + | * Export as JSON format for use in the game | ||
| + | |||
| + | ==== Object Types ==== | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | ===== Configuration Files ===== | ||
| + | |||
| + | ==== version.json ==== | ||
| + | <code json> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Bestiary Configuration ==== | ||
| + | Control what mobs appear where: | ||
| + | |||
| + | <code json> | ||
| + | { | ||
| + | " | ||
| + | {" | ||
| + | {" | ||
| + | ], | ||
| + | " | ||
| + | {" | ||
| + | {" | ||
| + | ] | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Tips for Successful Non-Java Modding ===== | ||
| + | |||
| + | ==== Planning Your Mod ==== | ||
| + | * Start with simple resource swaps before moving to complex JSON configurations | ||
| + | * Look at existing game files as examples for your own | ||
| + | * Test frequently to avoid accumulating errors | ||
| + | * Keep backups of working configurations | ||
| + | |||
| + | ==== File Organization ==== | ||
| + | * Follow the same directory structure as the original game | ||
| + | * Use clear, descriptive names for your files | ||
| + | * Group related content in subdirectories | ||
| + | * Document complex mods with a README file | ||
| + | |||
| + | ==== Testing and Debugging ==== | ||
| + | * Enable your mod in-game and start a new game to test | ||
| + | * Check the game's log files for errors if something doesn' | ||
| + | * Test on multiple save files to ensure compatibility | ||
| + | * Use simple test cases before implementing complex features | ||
| + | |||
| + | ==== Community Resources ==== | ||
| + | * Share your work on the Remixed Dungeon Discord server | ||
| + | * Look at other mod authors' | ||
| + | * Collaborate with other modders for complex projects | ||
| + | * Report bugs or request features through the official channels | ||
| + | |||
| + | With these techniques, you can create extensive modifications to Remixed Dungeon without writing a single line of Java code! | ||
rpd/modding_non_java_techniques.txt · Last modified: by 127.0.0.1
