diff --git a/docs/apworld specification.md b/docs/apworld specification.md index ba2f2dbbb885..98cd25a73032 100644 --- a/docs/apworld specification.md +++ b/docs/apworld specification.md @@ -1,7 +1,7 @@ # apworld Specification Archipelago depends on worlds to provide game-specific details like items, locations and output generation. -Those are located in the `worlds/` folder (source) or `/lib/worlds/` (when installed). +Those are located in the `worlds/` folder (source) or `/lib/worlds/` (when installed). See [world api.md](world%20api.md) for details. apworld provides a way to package and ship a world that is not part of the main distribution by placing a `*.apworld` diff --git a/docs/world api.md b/docs/world api.md index 4df8efa4e3c8..22ec0dd62b47 100644 --- a/docs/world api.md +++ b/docs/world api.md @@ -22,8 +22,8 @@ allows using WebSockets. ## Coding style -AP follows all the PEPs. When in doubt use an IDE with coding style -linter, for example PyCharm Community Edition. +AP follows [style.md](https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/style.md). +When in doubt use an IDE with coding style linter, for example PyCharm Community Edition. ## Docstrings @@ -44,7 +44,7 @@ class MyGameWorld(World): ## Definitions This section will cover various classes and objects you can use for your world. -While some of the attributes and methods are mentioned here not all of them are, +While some of the attributes and methods are mentioned here, not all of them are, but you can find them in `BaseClasses.py`. ### World Class @@ -56,11 +56,12 @@ game. ### WebWorld Class A `WebWorld` class contains specific attributes and methods that can be modified -for your world specifically on the webhost. +for your world specifically on the webhost: -`settings_page` which can be changed to a link instead of an AP generated settings page. +`settings_page`, which can be changed to a link instead of an AP generated settings page. `theme` to be used for your game specific AP pages. Available themes: + | dirt | grass (default) | grassFlowers | ice | jungle | ocean | partyTime | stone | |---|---|---|---|---|---|---|---| | | | | | | | | | @@ -75,26 +76,27 @@ prefixed with the same string as defined here. Default already has 'en'. ### MultiWorld Object The `MultiWorld` object references the whole multiworld (all items and locations -for all players) and is accessible through `self.world` inside a `World` object. +for all players) and is accessible through `self.multiworld` inside a `World` object. ### Player The player is just an integer in AP and is accessible through `self.player` -inside a World object. +inside a `World` object. ### Player Options Players provide customized settings for their World in the form of yamls. -Those are accessible through `self.world.[self.player]`. A dict +Those are accessible through `self.multiworld.[self.player]`. A dict of valid options has to be provided in `self.option_definitions`. Options are automatically added to the `World` object for easy access. -### World Options +### World Settings -Any AP installation can provide settings for a world, for example a ROM file, accessible through `self.settings.option` -or `cls.settings.option` (new API) or `Utils.get_options()["_options"]["