feat(scripting): Phase 4 — ergonomics (file-watcher auto-reload, handle methods, tooling) #197

Open
opened 2026-07-24 19:01:28 +02:00 by marco · 0 comments
Owner

Follow-up to #183. DX niceties on top of the working spine.

Scope

  • File-watcher auto-reload (dev-only): debounced, cross-platform-safe, atomic-save-race-safe — edit .lua → auto /reloadscripts.
  • Lua handle wrappers: expose methods on the Mobile/Player handles (e.g. npc:say(...), player:getFlag(...)) so npc. autocompletes members, in addition to the free verbs. Generated into api.d.lua.
  • Authoring/debug tooling as needed (e.g. a /scripts listing, reload feedback).

Definition of Done (delta)

  • Editing a committed script auto-reloads in dev without a manual command (documented as dev-only).
  • Handle methods work at runtime and appear in api.d.lua (autocomplete on npc: / npc.), drift-check green.
  • docs/scripting.md + src/IsoMmo.Scripting/README.md updated. Base DoD + multi-platform hold.

Note: scripting spells stays deferred (casting/mana/pacing is authority- and timing-critical) — a separate future decision, not part of this.

Follow-up to #183. DX niceties on top of the working spine. ## Scope - **File-watcher auto-reload** (dev-only): debounced, cross-platform-safe, atomic-save-race-safe — edit `.lua` → auto `/reloadscripts`. - **Lua handle wrappers**: expose methods on the `Mobile`/`Player` handles (e.g. `npc:say(...)`, `player:getFlag(...)`) so `npc.` autocompletes members, in addition to the free verbs. Generated into `api.d.lua`. - Authoring/debug tooling as needed (e.g. a `/scripts` listing, reload feedback). ## Definition of Done (delta) - Editing a committed script auto-reloads in dev without a manual command (documented as dev-only). - Handle methods work at runtime and appear in `api.d.lua` (autocomplete on `npc:` / `npc.`), drift-check green. - `docs/scripting.md` + `src/IsoMmo.Scripting/README.md` updated. Base DoD + multi-platform hold. _Note: scripting **spells** stays deferred (casting/mana/pacing is authority- and timing-critical) — a separate future decision, not part of this._
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marco/IsoMmo#197
No description provided.