Skip to content

Add portable auxiliary battle menu actions and shared native contracts - #152

Closed
Roxas2712 wants to merge 27 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-battle-auxiliary
Closed

Roxas2712 wants to merge 27 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-battle-auxiliary

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 23, 2026 •

Copy link
Copy Markdown

Mods need engine-specific battle patches to open an auxiliary tool from START. This adds Gen1Recomp's battle.menu_auxiliary contract at Gen2Recomped's settled native player-command boundary for GB, GBA and DS. Only literal true takes the input; otherwise ordinary native navigation runs once.

The hook receives Game and {kind = "wild" | "trainer"}. Eligibility is captured before presentation catch-up, then revalidated before dispatch. Covered screens, queued/forced actions, pending doubles choices, unsupported battle variants and unfinished HP/status/animation presentation cannot reach the hook. Owner/session invalidation or opening an overlay also stops stale native fallthrough. This is an input seam, not a checkpoint API.

Includes the capability/catalog wiring, an unchanged portable consumer, shared native-backend tests, documentation and pinned cross-engine CI. The existing trainer fixture now accepts an optional consumer name so both contracts reuse the same native construction paths.

Validation

  • 3,660/3,660 native Gen2 checks across all 15 games and native API 1/2, unified API 2 and API 3: claim/fallthrough, wrapper failures, original Game/context, unsafe phases, rejection before HP catch-up, stale sessions, overlays, unsubscribe and doubles with absent slots.
  • Same consumer on both actual SDKs/native command-menu updates for Red, Yellow, Gold, FireRed and Emerald in all four SDK configurations: 80 worker runs / 120 paired observations across feature and combined trees. Gen2 unified API 2 is compared against Gen1 native API 2; Gen1 has no callback_format extension. Shared reference: clean 79ea62f45fb2ea8f65d081a109431e4eb1bbdb36.
  • Feature: 104/114 engine suites, SDK 3/3, B30 profile passes. The ten known baseline suites still produce exactly the parent's 26 failure lines; no new failures.
  • Combined fork test tree bc9a07e3e3135f47b289dc7a9aefe76ab63a0c35: 159/159 engine suites, SDK 3/3, B30 profile and all requested ROM-free tiers pass.
  • Native LÖVE 11.5 smoke runs on that combined tree reached New Game/world/introduction for Red, Gold, FireRed and Emerald, using isolated copies of existing imported caches. These prove startup, not complete playthroughs or universal mod compatibility.
  • StyLua, actionlint and whitespace checks pass. The workflow also includes the pinned Gen1 native Gen2/Gen3 hook suites unchanged; ROM-dependent tiers remain separate.

Stack

Depends on #151 and its prerequisites. Feature-only diff.

The fork testing branch combines the existing portability/test-fix series and includes an isolated launcher. Its fork-only testing helpers are not part of this feature diff.

Hosted CI

All 13 GitHub workflows currently report action_required, pending maintainer approval for this fork PR. The auxiliary contract run has no jobs yet. The passing validation above was run locally against the published feature commit and the combined fork runtime; hosted CI has not executed.

# 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