Skip to content

fix(worlds): accept custom apworlds without archipelago.json - #188

Merged
lallaria merged 2 commits into
mainfrom
didi/archipelago-json-manuals-7aad1a
Oct 18, 2026
Merged

lallaria merged 2 commits into
mainfrom
didi/archipelago-json-manuals-7aad1a

Conversation

@lallaria

Copy link
Copy Markdown
Contributor

Scope

Custom apworlds shipped without an archipelago.json (Manual apworlds, hand-built ones like ror2) no longer make Generate fail with KeyError: "There is no item named 'archipelago.json' in the archive".

Description

  • set_game_names reads every custom_worlds/*.apworld manifest, so one manifest-less file failed every generation, whatever games were requested.
  • APWorldContainer.read_contents now falls back, in order, to a Manual's Manual_<game>_<creator> id from data/game.json, then to the game the index lists for the apworld's module. Anything else still raises.
  • The fallback sets only game; with no world_version the existing precedence rule lets the custom file win over the venv copy, as sync_custom_world already did.
  • discover_custom_world_module drops its own Manual fallback in favour of the container's.

APContainer.py: APWorldContainer.read_contents falls back to a Manual_<game>_<creator> manifest from data/game.json when archipelago.json is missing, so set_game_names no longer fails generation on a Manual in custom_worlds.
Utils.py: discover_custom_world_module drops its duplicate Manual fallback.
test/general/test_world_install.py: cover set_game_names with a manifest-less Manual and a non-Manual apworld still raising.
APContainer.py: APWorldContainer.read_contents takes the indexed game for the apworld's module when there is no archipelago.json and it is not a Manual.
test/general/test_world_install.py: cover set_game_names serving an indexed apworld without a manifest.
@lallaria
lallaria merged commit af5c090 into main Oct 18, 2026
16 checks passed
@lallaria
lallaria deleted the didi/archipelago-json-manuals-7aad1a branch October 19, 2026 04:38
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