Core: Add Framework for jsonworld loading - #6347
Draft
qwint wants to merge 15 commits into
Draft
Conversation
qwint
marked this pull request as draft
July 20, 2026 00:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this fixing or adding?
Adds a jsonworld abstract world class and helper functions to define expected formats
adds a doc to describe these formats and tests to ensure they are working as expected
Note: I fully expect more formats to be defined for different usecases, but I don't believe itemizing all of those is a blocker for this pr
What is a blocker for this pr is defining how the worlds get loaded and their final format, some suggestions I've thought about and had in discussions are:
world_name.jsonfiles with no metadata and either live in custom_worlds or a new folder. probably the easiest but the least usefulworld_name.apworldformat defined as a new type of APWorldContainer with specific manifest values and no init. would be the cleanest, but I don't know how easy it would be to guarenteed safely load (i.e. if someone did package with python code is it then no longer a safe file to load)world_name.apjsonworldthat would act similar to the apworld suggestion but be loaded in a different process that would not try to import them at allan additional note is the current code has no webworld definition, there is a reasonable argument that there should be one defined and the appropriate .md files should be ingested and served if webhost is to support these worlds, but that does add complexity to the format (or at least limits us to a APWorldContainer-like that can include extra files)
How was this tested?
converted my air delivery implementation into a jsonworld file https://github.com/qwint/Archipelago/blob/da2ba4dfa261546b79554fc4223655b7c745ca81/custom_worlds/air_delivery.json
and loaded it directly with
If this makes graphical changes, please attach screenshots.