Skip to content

[Quests] Support Multiple Quest, Plugin, and Lua Module Paths#4906

Merged
Akkadius merged 3 commits intomasterfrom
akkadius/multiple-quest-load-dirs-support
Jun 9, 2025
Merged

[Quests] Support Multiple Quest, Plugin, and Lua Module Paths#4906
Akkadius merged 3 commits intomasterfrom
akkadius/multiple-quest-load-dirs-support

Conversation

@Akkadius
Copy link
Copy Markdown
Contributor

Description

This PR extends the EQEmulator server configuration system to support multiple directory paths for:

  • Quest scripts
  • Plugin scripts
  • Lua module search paths

This enables cleaner separation of public/private content, better modularization, and more flexible script organization.

✅ Key Features

  • New array config keys: quest_paths, plugin_paths, lua_module_paths
  • Falls back to quests, plugins, and lua_modules if arrays are not specified
  • Updated PathManager to resolve and log all paths
  • Lua package.path and package.cpath now include all configured lua_module_paths

🔧 Example eqemu_config.json

"directories": {
  "quest_paths": [
    "quests_private",
    "quests_public"
  ],
  "plugin_paths": [
    "plugins_private",
    "plugins_public"
  ],
  "lua_module_paths": [
    "lua_modules_private",
    "lua_modules_public"
  ],
  "maps": "Maps/",
  "patches": "assets/patches/",
  "opcodes": "assets/opcodes/",
  "shared_memory": "shared/",
  "logs": "logs/"
}

✅ Benefits

  • Layered and override-friendly path handling
  • Easier version control separation for shared vs. private scripts
  • No breaking changes — legacy keys are still supported as fallbacks

🧩 Compatibility

  • Fully backward compatible with legacy config using only quests, plugins, and lua_modules
  • No behavior change unless new array fields are defined

Type of change

  • New feature (non-breaking change which adds functionality)

Testing

No testing done yet

Checklist

  • I have tested my changes
  • I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context.
  • I own the changes of my code and take responsibility for the potential issues that occur

@fryguy503
Copy link
Copy Markdown
Contributor

How is it handled if there is a situation where two of the same files exist in both locations?

@Akkadius
Copy link
Copy Markdown
Contributor Author

How is it handled if there is a situation where two of the same files exist in both locations?

Whatever directory you have defined first will take precedence

@Akkadius
Copy link
Copy Markdown
Contributor Author

Akkadius commented Jun 9, 2025

THJ been running it on prod for a week or so now

@Akkadius Akkadius merged commit befee1c into master Jun 9, 2025
2 checks passed
@Akkadius Akkadius deleted the akkadius/multiple-quest-load-dirs-support branch June 9, 2025 17:49
@Akkadius Akkadius mentioned this pull request Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants