Skip to content

reloadlua for mod development without a restart #94

Description

@cagatay-softgineer

Found by diffing pzctl against the game's documented command list, prompted by the pz-admin survey.

The command

/reloadlua "filename" - Reload a Lua script on the server.

Why it belongs in pzctl

pzctl already has a mod-authoring surface that this completes:

  • modlint.py checks mods for problems
  • modcheck.py detects mods needing updates
  • mods.py discovers Workshop content
  • the console streams server output over SSE

What is missing is the iterate step. Right now, testing a one-line Lua change means a full server restart - stop, boot, reload the world, rejoin. reloadlua replaces that with a single command, turning a multi-minute cycle into a moment.

For anyone developing a mod against their own server - which is a real part of this project's audience - this is the difference between pzctl being useful for development and only for operations.

Scope

  • Reload a named file, with the file picker scoped to the server's Lua directories
  • Pair it with the console view so the reload result and any resulting error are visible together - the errors are the entire point
  • Sensible next step after modlint.py flags a file: fix, reload, observe

Verify first

  1. What path form filename expects - absolute, relative to the server root, or relative to media/lua/. Unspecified in the docs, and getting it wrong means a silent no-op.
  2. Whether it reloads shared/server scripts only, or client ones too.
  3. What happens on a syntax error - whether the old script survives or the server is left in a broken state. If a bad reload can break a running server, the UI must say so plainly at the point of use, not in the wiki.
  4. Whether it works for Workshop mods or only loose files.

Answer 3 before exposing this to anyone's production server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions