Skip to content

Add portable item and Pokémon gift scripts with owned native dialogs - #111

Closed
Roxas2712 wants to merge 24 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-script-gifts
Closed

Roxas2712 wants to merge 24 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-script-gifts

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 22, 2026 •

Copy link
Copy Markdown

Portable scripts can now give canonical items and Pokémon through the native bag, party, Pokédex, box and receipt/nickname flows.

Adds give_item(item, count?, gotText?, bagFullText?) and give_pokemon(species, level, skipNickname?, gotText?), with whole-program validation before admission and live store validation at dispatch. Native gift dialogs use owned, one-shot continuations, including transitions from receipt to question to naming. Cancellation, unloading, replaced saves and replayed callbacks cannot resume a retired script. Existing non-portable command callers keep their native behavior.

Dependency: merge #110 and its prerequisites first. This branch is stacked on #110 because those prerequisites are not yet upstream. Implementation-only diff: 235b8f9…7671788.

Validation at exact clean head 76717887264f26b93bc0343e27e23b93c607b88a:

  • 139 focused native gift/UI checks, including full bag, nickname YES/NO/naming, box deposit, old callbacks and unloading during before-give hooks.
  • 96 cross-engine comparisons / 192 isolated loader runs against clean Gen1 79ea62f45fb2ea8f65d081a109431e4eb1bbdb36, covering eight supported versions and actual native gift constructors.
  • Full headless suite: 85/95 engine suites, SDK 3/3 and B30 pass. The full command exits 1 with exactly the same 27 FAIL lines as the fresh prerequisite baseline; no additional failures.
  • All-PR integration 6e3d57541464e3b8f2354da33c34620109121fea: 90/100 engine suites, SDK 3/3 and B30 pass; same 27 baseline FAIL lines and 96/192 cross-engine checks.
  • StyLua on new modules/fixtures and git diff --check pass.

Tests use ROM-free fixtures with native commands and UI callbacks; no claim of ROM gameplay or pixel equivalence. Full-suite baseline failures and skipped ROM-content tier remain visible.

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