Skip to content

Add portable native travel with destination-aware preflight - #114

Closed
Roxas2712 wants to merge 27 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-script-travel
Closed

Roxas2712 wants to merge 27 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-script-travel

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 22, 2026 •

Copy link
Copy Markdown

Adds API-3 warp(mapId, x, y, facing?) and remember_outdoor(mapId, x, y) on Gen1–3.

The public warp adapter and scripts share a pure destination planner. Whole-program preflight follows the reference engine's linear map context and validates subsequent object/block/movement rows against destination definitions without loading a live map. Dispatch validates live data again. Arrival binds the continuation to the destination map and idle runner, clears talking-NPC context, and waits for the foreground before running later rows. One-shot callbacks and a bounded native-transition deadline prevent stale continuations.

The already admitted native transition remains engine-owned on unload/timeout, so it can finish arrival bookkeeping and release its own locks. Busy destination scripts are preserved and cause the portable run to fail.

Dependency: merge #113 and prerequisites first. Focused change 4632d3a…7e62026.

Validation at clean head 7e620268d09f78d8fc01664ba2329eb6e3936763:

  • 185 focused checks, including actual native transitions across four versions, destination runner replacement, post-warp native block edits, same-map runtime reuse, overlay pauses, unload cleanup, replay, native failures and deadline behavior.
  • 206 existing public warp, 180 movement, 117 script-edit and 5,283 portable checks pass. The old unsupported-warp capability assertion is replaced with positive generation-aware travel coverage.
  • 120 cross-engine comparisons / 240 isolated loader runs against clean Gen1 79ea62f45fb2ea8f65d081a109431e4eb1bbdb36, including warp followed by player/NPC movement.
  • Full headless: 88/98 engine suites, SDK 3/3 and B30 pass.
  • All-PR integration 73b750d26fe1c74d1a419aa536b470035608910a: 93/103 engine suites, SDK 3/3, B30 and 120/240 cross-engine checks.
  • Both full commands exit 1 with exactly the same 27 prerequisite baseline FAIL lines; no additional failures. StyLua and git diff --check pass.

ROM-free tests use native logic with synthetic destination materialization. No ROM gameplay/pixel equivalence claim. Future geometry validation requires the relevant destination tileset; branches/native entry scripts may change conditions after admission, which are checked again at runtime.

Hosted Actions: API 3 contracts and ci are action_required (fork workflow approval). Hosted tests have not run; the results above are local.

# Conflicts:
#	src/mods/Loader.lua
# Conflicts:
#	docs/modding.md
#	src/mods/Loader.lua
#	src/world/WorldAPI.lua
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.

1 participant