From 87a8e6e20c21c04d8fc9d72b92503df5a89d11d7 Mon Sep 17 00:00:00 2001 From: alwaysintreble Date: Thu, 24 Mar 2022 08:21:08 -0500 Subject: [PATCH] Documentation: minor updates (#320) * documentation: add links to other guides in adding games.md * documentation: add webworld to api.md * documentation: point people to docs folder and discord for help with adding games * tutorial: go a bit more in depth on downloading a template yaml * Make Ijwu happy * point to baseclasses.py in api.md and reformat links a bit --- README.md | 4 ++++ .../tutorial/archipelago/advanced_settings_en.md | 3 +-- docs/adding games.md | 11 ++++++++++- docs/api.md | 15 +++++++++++++-- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1d46e99b..3145a442 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ Currently, the following games are supported: * VVVVVV * Raft * Super Mario 64 +* Meritous +* Super Metroid/Link to the Past combo randomizer (SMZ3) * ChecksFinder For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/). @@ -59,6 +61,8 @@ Contributions are welcome. We have a few asks of any new contributors. Otherwise, we tend to judge code on a case to case basis. It is a generally good idea to stick to PEP-8 guidelines to ensure consistency with existing code. (And to make the linter happy.) +For adding a new game to Archipelago please see the docs folder for the relevant information and feel free to ask any questions in the #archipelago-dev channel in our discord. + ## Code of Conduct We conduct ourselves openly and inclusively here. Please do not contribute to an environment which makes other people uncomfortable. This means that we expect all contributors or participants here to: diff --git a/WebHostLib/static/assets/tutorial/archipelago/advanced_settings_en.md b/WebHostLib/static/assets/tutorial/archipelago/advanced_settings_en.md index 5bc3b4db..d59e3dab 100644 --- a/WebHostLib/static/assets/tutorial/archipelago/advanced_settings_en.md +++ b/WebHostLib/static/assets/tutorial/archipelago/advanced_settings_en.md @@ -9,8 +9,7 @@ The settings page can be found on the supported games page, just click the "Sett * Weighted settings page: [Archipelago Weighted Settings](/weighted-settings) Clicking on the "Export Settings" button at the bottom-left will provide you with a pre-filled YAML with your options. -The player settings page also has an option to download a fully filled out yaml containing every option with every -available setting for the available options. +The player settings page also has a link to download a full template file for that game which will have every option possible for the game including some that don't display correctly on the site. ## YAML Overview diff --git a/docs/adding games.md b/docs/adding games.md index 79b874a1..e1d7bf0e 100644 --- a/docs/adding games.md +++ b/docs/adding games.md @@ -6,6 +6,11 @@ There are two key steps to incorporating a game into Archipelago: - Game Modification - Archipelago Server Integration +Refer to the following documents as well: +- [network protocol.md](https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/network%20protocol.md) for network communication between client and server. +- [api.md](https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/api.md) for documentation on server side code and creating a world package. + + # Game Modification One half of the work required to integrate a game into Archipelago is the development of the game client. This is typically done through a modding API or other modification process, described further down. @@ -239,7 +244,11 @@ checks, what options to offer for the player’s yaml file, and the code to init Here’s an example of what your world module can look like: -![Example world module directory open in Window's Explorer](./img/archipelago-world-directory-example.png) +![Example world module directory open in Window's Explorer](./img/archipelago-world-directory-example.png) + +The minimum requirements for a new archipelago world are the package itself (the world folder containing a file named `__init__.py`), +which must define a `World` class object for the game with a game name, create an equal number of items and locations with rules, +a win condition, and at least one `Region` object. Let's give a quick breakdown of what the contents for these files look like. This is just one example of an Archipelago world - the way things are done below is not an immutable property of Archipelago. diff --git a/docs/api.md b/docs/api.md index e5ae85e7..01110e98 100644 --- a/docs/api.md +++ b/docs/api.md @@ -7,8 +7,8 @@ required to send and receive items between the game and server. Client implementation is out of scope of this document. Please refer to an existing game that provides a similar API to yours. Refer to the following documents as well: - * [network protocol.md](https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/network%20protocol.md) - * [adding games.md](https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/adding%20games.md) +- [network protocol.md](https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/network%20protocol.md) +- [adding games.md](https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/adding%20games.md) Archipelago will be abbreviated as "AP" from now on. @@ -43,12 +43,23 @@ 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, +but you can find them in `BaseClasses.py`. + ### World Class A `World` class is the class with all the specifics of a certain game to be included. It will be instantiated for each player that rolls a seed for that game. +### WebWorld Class + +A `WebWorld` class contains specific attributes and methods that can be modified +for your world specifically on the webhost. At the moment this comprises of `settings_page` +which can be changed to a link instead of an AP generated settings page; such is the case +for Final Fantasy. + ### MultiWorld Object The `MultiWorld` object references the whole multiworld (all items and locations