User Tools

Site Tools


rpd:lua_scripts

Lua Scripts

Lua Script

Lua Scripts are used in Remixed Dungeon to implement custom game logic and behaviors.

Overview

Lua scripts provide a way to implement custom mechanics, behaviors, and content in Remixed Dungeon without requiring Java code changes.

Script Locations

  • RemixedDungeon/src/main/assets/scripts/actors/ - Actor behavior scripts
  • RemixedDungeon/src/main/assets/scripts/ai/ - AI behavior scripts
  • RemixedDungeon/src/main/assets/scripts/buffs/ - Status effect scripts
  • RemixedDungeon/src/main/assets/scripts/items/ - Custom item functionality
  • RemixedDungeon/src/main/assets/scripts/lib/ - Utility libraries
  • RemixedDungeon/src/main/assets/scripts/mobs/ - Custom mob behaviors
  • RemixedDungeon/src/main/assets/scripts/npc/ - NPC scripts
  • RemixedDungeon/src/main/assets/scripts/objects/ - Level objects and features
  • RemixedDungeon/src/main/assets/scripts/services/ - Game services
  • RemixedDungeon/src/main/assets/scripts/spells/ - Spell mechanics
  • RemixedDungeon/src/main/assets/scripts/startup/ - Initialization scripts
  • RemixedDungeon/src/main/assets/scripts/stats/ - Equipment stats
  • RemixedDungeon/src/main/assets/scripts/stuff/ - Various game components
  • RemixedDungeon/src/main/assets/scripts/traps/ - Trap mechanics
  • RemixedDungeon/src/main/assets/scripts/userServices/ - User service implementations

Script Capabilities

  • Custom item functionality and effects
  • New mob AI behaviors and mechanics
  • Spell implementations
  • Buff and debuff logic
  • Trap effects and triggers
  • NPC dialogues and behaviors
  • Level object interactions

Script Structure

Lua scripts typically follow a specific structure with required functions:

  • desc() function to define the script's properties
  • cast() or other action functions to implement behavior
  • Resource loading and initialization

Integration

Scripts are integrated into the game engine and can interact with Java classes through the RPD library.

Benefits

  • Rapid prototyping without Java compilation
  • Easier modding support
  • Dynamic behavior changes
  • Simplified custom content creation
rpd/lua_scripts.txt · Last modified: by 127.0.0.1