Skip to content

Commit

Permalink
Core, Webhost, Docs: Replace all usages of player settings (Archipela…
Browse files Browse the repository at this point in the history
…goMW#3067)

* Replace all usages of player settings

* Fixed line break error

* Attempt to fix line break again

* Finally figure out what Pycharm did to this file

* Pycharm search failed me

* Remove duplicate s

* Update ArchipIdle

* Revert random newline changes from Pycharm

* Remove player settings from fstrings and rename --samesettings to --sameoptions

* Finally get PyCharm to not auto-format my commits, randomly inserting the newlines

* Removing player-settings

* Missed one

* Remove final line break error
Co-authored-by: Exempt-Medic <[email protected]>

---------

Co-authored-by: Exempt-Medic <[email protected]>
Co-authored-by: Exempt-Medic <[email protected]>
  • Loading branch information
3 people authored Apr 6, 2024
1 parent b296f64 commit 569c37c
Show file tree
Hide file tree
Showing 25 changed files with 52 additions and 60 deletions.
10 changes: 5 additions & 5 deletions Generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def mystery_argparse():

parser = argparse.ArgumentParser(description="CMD Generation Interface, defaults come from host.yaml.")
parser.add_argument('--weights_file_path', default=defaults.weights_file_path,
help='Path to the weights file to use for rolling game settings, urls are also valid')
parser.add_argument('--samesettings', help='Rolls settings per weights file rather than per player',
help='Path to the weights file to use for rolling game options, urls are also valid')
parser.add_argument('--sameoptions', help='Rolls options per weights file rather than per player',
action='store_true')
parser.add_argument('--player_files_path', default=defaults.player_files_path,
help="Input directory for player files.")
Expand Down Expand Up @@ -104,8 +104,8 @@ def main(args=None, callback=ERmain):
del(meta_weights["meta_description"])
except Exception as e:
raise ValueError("No meta description found for meta.yaml. Unable to verify.") from e
if args.samesettings:
raise Exception("Cannot mix --samesettings with --meta")
if args.sameoptions:
raise Exception("Cannot mix --sameoptions with --meta")
else:
meta_weights = None
player_id = 1
Expand Down Expand Up @@ -157,7 +157,7 @@ def main(args=None, callback=ERmain):
erargs.skip_output = args.skip_output

settings_cache: Dict[str, Tuple[argparse.Namespace, ...]] = \
{fname: (tuple(roll_settings(yaml, args.plando) for yaml in yamls) if args.samesettings else None)
{fname: (tuple(roll_settings(yaml, args.plando) for yaml in yamls) if args.sameoptions else None)
for fname, yamls in weights_cache.items()}

if meta_weights:
Expand Down
6 changes: 0 additions & 6 deletions WebHostLib/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ def weighted_options():
return render_template("weighted-options.html")


# TODO for back compat. remove around 0.4.5
@app.route("/games/<string:game>/player-settings")
def player_settings(game: str):
return redirect(url_for("player_options", game=game), 301)


# Player options pages
@app.route("/games/<string:game>/player-options")
@cache.cached()
Expand Down
2 changes: 1 addition & 1 deletion docs/settings api.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Archipelago Settings API

The settings API describes how to use installation-wide config and let the user configure them, like paths, etc. using
host.yaml. For the player settings / player yamls see [options api.md](options api.md).
host.yaml. For the player options / player yamls see [options api.md](options api.md).

The settings API replaces `Utils.get_options()` and `Utils.get_default_options()`
as well as the predefined `host.yaml` in the repository.
Expand Down
2 changes: 1 addition & 1 deletion settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Application settings / host.yaml interface using type hints.
This is different from player settings.
This is different from player options.
"""

import os.path
Expand Down
2 changes: 1 addition & 1 deletion worlds/adventure/docs/setup_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ an experience customized for their taste, and different players in the same mult

You can generate a yaml or download a template by visiting the [Adventure Options Page](/games/Adventure/player-options)

### What are recommended settings to tweak for beginners to the rando?
### What are recommended options to tweak for beginners to the rando?
Setting difficulty_switch_a and lowering the dragons' speeds makes the dragons easier to avoid. Adding Chalice to
local_items guarantees you'll visit at least one of the interesting castles, as it can only be placed in a castle or
the credits room.
Expand Down
4 changes: 2 additions & 2 deletions worlds/adventure/docs/setup_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ une expérience personnalisée à leur goût, et différents joueurs dans le mê

### Où puis-je obtenir un fichier YAML ?

Vous pouvez générer un yaml ou télécharger un modèle en visitant la [page des paramètres d'aventure](/games/Adventure/player-settings)
Vous pouvez générer un yaml ou télécharger un modèle en visitant la [page des paramètres d'aventure](/games/Adventure/player-options)

### Quels sont les paramètres recommandés pour s'initier à la rando ?
Régler la difficulty_switch_a et réduire la vitesse des dragons rend les dragons plus faciles à éviter. Ajouter Calice à
Expand Down Expand Up @@ -72,4 +72,4 @@ configuré pour le faire automatiquement.
Pour connecter le client au multiserveur, mettez simplement `<adresse>:<port>` dans le champ de texte en haut et appuyez sur Entrée (si le
le serveur utilise un mot de passe, saisissez dans le champ de texte inférieur `/connect <adresse> :<port> [mot de passe]`)

Appuyez sur Réinitialiser et commencez à jouer
Appuyez sur Réinitialiser et commencez à jouer
4 changes: 2 additions & 2 deletions worlds/alttp/docs/multiworld_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ wählen können!

### Wo bekomme ich so eine YAML-Datei her?

Die [Player Settings](/games/A Link to the Past/player-settings) Seite auf der Website ermöglicht das einfache Erstellen
Die [Player Options](/games/A Link to the Past/player-options) Seite auf der Website ermöglicht das einfache Erstellen
und Herunterladen deiner eigenen `yaml` Datei. Drei verschiedene Voreinstellungen können dort gespeichert werden.

### Deine YAML-Datei ist gewichtet!

Die **Player Settings** Seite hat eine Menge Optionen, die man per Schieber einstellen kann. Das ermöglicht es,
Die **Player Options** Seite hat eine Menge Optionen, die man per Schieber einstellen kann. Das ermöglicht es,
verschiedene Optionen mit unterschiedlichen Wahrscheinlichkeiten in einer Kategorie ausgewürfelt zu werden

Als Beispiel kann man sich die Option "Map Shuffle" als einen Eimer mit Zetteln zur Abstimmung Vorstellen. So kann man
Expand Down
4 changes: 2 additions & 2 deletions worlds/alttp/docs/multiworld_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ de multiworld puede tener diferentes opciones.

### Donde puedo obtener un fichero YAML?

La página "[Generate Game](/games/A%20Link%20to%20the%20Past/player-settings)" en el sitio web te permite configurar tu
La página "[Generate Game](/games/A%20Link%20to%20the%20Past/player-options)" en el sitio web te permite configurar tu
configuración personal y descargar un fichero "YAML".

### Configuración YAML avanzada
Expand All @@ -86,7 +86,7 @@ Si quieres validar que tu fichero YAML para asegurarte que funciona correctament

## Generar una partida para un jugador

1. Navega a [la pagina Generate game](/games/A%20Link%20to%20the%20Past/player-settings), configura tus opciones, haz
1. Navega a [la pagina Generate game](/games/A%20Link%20to%20the%20Past/player-options), configura tus opciones, haz
click en el boton "Generate game".
2. Se te redigirá a una pagina "Seed Info", donde puedes descargar tu archivo de parche.
3. Haz doble click en tu fichero de parche, y el emulador debería ejecutar tu juego automáticamente. Como el Cliente no
Expand Down
6 changes: 3 additions & 3 deletions worlds/alttp/docs/multiworld_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ peuvent avoir différentes options.

### Où est-ce que j'obtiens un fichier YAML ?

La page [Génération de partie](/games/A%20Link%20to%20the%20Past/player-settings) vous permet de configurer vos
La page [Génération de partie](/games/A%20Link%20to%20the%20Past/player-options) vous permet de configurer vos
paramètres personnels et de les exporter vers un fichier YAML.

### Configuration avancée du fichier YAML
Expand All @@ -87,7 +87,7 @@ Si vous voulez valider votre fichier YAML pour être sûr qu'il fonctionne, vous

## Générer une partie pour un joueur

1. Aller sur la page [Génération de partie](/games/A%20Link%20to%20the%20Past/player-settings), configurez vos options,
1. Aller sur la page [Génération de partie](/games/A%20Link%20to%20the%20Past/player-options), configurez vos options,
et cliquez sur le bouton "Generate Game".
2. Il vous sera alors présenté une page d'informations sur la seed, où vous pourrez télécharger votre patch.
3. Double-cliquez sur le patch et l'émulateur devrait se lancer automatiquement avec la seed. Etant donné que le client
Expand Down Expand Up @@ -207,4 +207,4 @@ Le logiciel recommandé pour l'auto-tracking actuellement est
3. Sélectionnez votre appareil SNES dans la liste déroulante.
4. Si vous voulez tracquer les petites clés ainsi que les objets des donjons, cochez la case **Race Illegal Tracking**
5. Cliquez sur le bouton **Start Autotracking**
6. Fermez la fenêtre "AutoTracker" maintenant, elle n'est plus nécessaire
6. Fermez la fenêtre "AutoTracker" maintenant, elle n'est plus nécessaire
2 changes: 1 addition & 1 deletion worlds/archipidle/docs/guide_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
[ArchipIDLE GitHub Releases Page](https://github.com/ArchipelagoMW/archipidle/releases)
3. Enter the server address in the `Server Address` field and press enter
4. Enter your slot name when prompted. This should be the same as the `name` you entered on the
setting page above, or the `name` field in your yaml file.
options page above, or the `name` field in your yaml file.
5. Click the "Begin!" button.
7 changes: 3 additions & 4 deletions worlds/archipidle/docs/guide_fr.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Guide de configuration d'ArchipIdle

## Rejoindre une partie MultiWorld
1. Générez un fichier `.yaml` à partir de la [page des paramètres du lecteur ArchipIDLE](/games/ArchipIDLE/player-settings)
1. Générez un fichier `.yaml` à partir de la [page des paramètres du lecteur ArchipIDLE](/games/ArchipIDLE/player-options)
2. Ouvrez le client ArchipIDLE dans votre navigateur Web en :
- Accédez au [Client ArchipIDLE](http://idle.multiworld.link)
- Téléchargez le client et exécutez-le localement à partir du
[Page des versions d'ArchipIDLE GitHub](https://github.com/ArchipelagoMW/archipidle/releases)
- Accédez au [Client ArchipIDLE](http://idle.multiworld.link)
- Téléchargez le client et exécutez-le localement à partir du [Page des versions d'ArchipIDLE GitHub](https://github.com/ArchipelagoMW/archipidle/releases)
3. Entrez l'adresse du serveur dans le champ `Server Address` et appuyez sur Entrée
4. Entrez votre nom d'emplacement lorsque vous y êtes invité. Il doit être le même que le `name` que vous avez saisi sur le
page de configuration ci-dessus, ou le champ `name` dans votre fichier yaml.
Expand Down
2 changes: 1 addition & 1 deletion worlds/dark_souls_3/docs/setup_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ placez-le à la racine du jeu (ex: "SteamLibrary\steamapps\common\DARK SOULS III

## Où trouver le fichier de configuration ?

La [Page de configuration](/games/Dark%20Souls%20III/player-settings) sur le site vous permez de configurer vos
La [Page de configuration](/games/Dark%20Souls%20III/player-options) sur le site vous permez de configurer vos
paramètres et de les exporter sous la forme d'un fichier.
4 changes: 2 additions & 2 deletions worlds/dlcquest/docs/fr_DLCQuest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Où se trouve la page des paramètres ?

La [page des paramètres du joueur pour ce jeu](../player-settings) contient tous les paramètres dont vous avez besoin pour configurer et exporter le fichier.
La [page des paramètres du joueur pour ce jeu](../player-options) contient tous les paramètres dont vous avez besoin pour configurer et exporter le fichier.


## Quel est l'effet de la randomisation sur ce jeu ?
Expand Down Expand Up @@ -46,4 +46,4 @@ Il y a aussi de nouveaux objets pièges, utilisés comme substituts, basés sur
Chaque fois qu'un objet est reçu en ligne, une notification apparaît à l'écran pour en informer le joueur.
Certains objets sont accompagnés d'une animation ou d'une scène qui se déroule immédiatement après leur réception.

Les objets reçus hors ligne ne sont pas accompagnés d'une animation ou d'une scène, et sont simplement activés lors de la connexion.
Les objets reçus hors ligne ne sont pas accompagnés d'une animation ou d'une scène, et sont simplement activés lors de la connexion.
4 changes: 2 additions & 2 deletions worlds/dlcquest/docs/setup_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Voir le guide d'Archipelago sur la mise en place d'un YAML de base : [Basic Mult

### Où puis-je obtenir un fichier YAML ?

Vous pouvez personnaliser vos paramètres en visitant la [page des paramètres du joueur DLC Quest] (/games/DLCQuest/player-settings).
Vous pouvez personnaliser vos paramètres en visitant la [page des paramètres du joueur DLC Quest](/games/DLCQuest/player-options).

## Rejoindre une partie multi-monde

Expand Down Expand Up @@ -52,4 +52,4 @@ Vous pouvez personnaliser vos paramètres en visitant la [page des paramètres d

Vous ne pouvez pas envoyer de commandes au serveur ou discuter avec les autres joueurs depuis DLC Quest, car le jeu ne dispose pas d'un moyen approprié pour saisir du texte.
Vous pouvez suivre l'activité du serveur dans votre console BepInEx, car les messages de chat d'Archipelago y seront affichés.
Vous devrez utiliser [Archipelago Text Client] (https://github.com/ArchipelagoMW/Archipelago/releases) si vous voulez envoyer des commandes.
Vous devrez utiliser [Archipelago Text Client] (https://github.com/ArchipelagoMW/Archipelago/releases) si vous voulez envoyer des commandes.
25 changes: 13 additions & 12 deletions worlds/generic/docs/advanced_settings_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@
This guide covers more the more advanced options available in YAML files. This guide is intended for the user who plans
to edit their YAML file manually. This guide should take about 10 minutes to read.

If you would like to generate a basic, fully playable YAML without editing a file, then visit the settings page for the
If you would like to generate a basic, fully playable YAML without editing a file, then visit the options page for the
game you intend to play. The weighted settings page can also handle most of the advanced settings discussed here.

The settings page can be found on the supported games page, just click the "Settings Page" link under the name of the
game you would like.
The options page can be found on the supported games page, just click the "Options Page" link under the name of the
game you would like.

* Supported games page: [Archipelago Games List](/games)
* 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 a link to download a full template file for that game which will have every option
Clicking on the "Export Options" button at the bottom-left will provide you with a pre-filled YAML with your options.
The player options 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

The Archipelago system generates games using player configuration files as input. These are going to be YAML files and
each world will have one of these containing their custom settings for the game that world will play.
each world will have one of these containing their custom options for the game that world will play.

## YAML Formatting

YAML files are a format of human-readable config files. The basic syntax of a yaml file will have a `root` node and then
different levels of `nested` nodes that the generator reads in order to determine your settings.
different levels of `nested` nodes that the generator reads in order to determine your options.

To nest text, the correct syntax is to indent **two spaces over** from its root option. A YAML file can be edited with
whatever text editor you choose to use though I personally recommend that you use Sublime Text. Sublime text
Expand Down Expand Up @@ -53,13 +54,13 @@ so `option_one_setting_one` is guaranteed to occur.

For `nested_option_two`, `option_two_setting_one` will be rolled 14 times and `option_two_setting_two` will be rolled 43
times against each other. This means `option_two_setting_two` will be more likely to occur, but it isn't guaranteed,
adding more randomness and "mystery" to your settings. Every configurable setting supports weights.
adding more randomness and "mystery" to your options. Every configurable setting supports weights.

## Root Options

Currently, there are only a few options that are root options. Everything else should be nested within one of these root
options or in some cases nested within other nested options. The only options that should exist in root
are `description`, `name`, `game`, `requires`, and the name of the games you want settings for.
are `description`, `name`, `game`, `requires`, and the name of the games you want options for.

* `description` is ignored by the generator and is simply a good way for you to organize if you have multiple files
using this to detail the intention of the file.
Expand All @@ -79,15 +80,15 @@ are `description`, `name`, `game`, `requires`, and the name of the games you wan

* `requires` details different requirements from the generator for the YAML to work as you expect it to. Generally this
is good for detailing the version of Archipelago this YAML was prepared for as, if it is rolled on an older version,
settings may be missing and as such it will not work as expected. If any plando is used in the file then requiring it
options may be missing and as such it will not work as expected. If any plando is used in the file then requiring it
here to ensure it will be used is good practice.

## Game Options

One of your root settings will be the name of the game you would like to populate with settings. Since it is possible to
One of your root options will be the name of the game you would like to populate with options. Since it is possible to
give a weight to any option, it is possible to have one file that can generate a seed for you where you don't know which
game you'll play. For these cases you'll want to fill the game options for every game that can be rolled by these
settings. If a game can be rolled it **must** have a settings section even if it is empty.
settings. If a game can be rolled it **must** have an options section even if it is empty.

### Universal Game Options

Expand Down
4 changes: 2 additions & 2 deletions worlds/generic/docs/triggers_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ about 5 minutes to read.

## What are triggers?

Triggers allow you to customize your game settings by allowing you to define one or many options which only occur under
Triggers allow you to customize your game options by allowing you to define one or many options which only occur under
specific conditions. These are essentially "if, then" statements for options in your game. A good example of what you
can do with triggers is the [custom mercenary mode YAML
](https://github.com/alwaysintreble/Archipelago-yaml-dump/blob/main/Snippets/Mercenary%20Mode%20Snippet.yaml) that was
Expand Down Expand Up @@ -148,4 +148,4 @@ In this example, if the `start_location` option rolls `landing_site`, only a sta
If `aqueduct` is rolled, a starting hint for Gravity Suit will also be created alongside the hint for Morph Ball.

Note that for lists, items can only be added, not removed or replaced. For dicts, defining a value for a present key will
replace that value within the dict.
replace that value within the dict.
4 changes: 2 additions & 2 deletions worlds/minecraft/docs/minecraft_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ guide : [Guide de configuration de base de Multiworld](/tutorial/Archipelago/se

### Où puis-je obtenir un fichier YAML ?

Vous pouvez personnaliser vos paramètres Minecraft en allant sur la [page des paramètres de joueur](/games/Minecraft/player-settings)
Vous pouvez personnaliser vos paramètres Minecraft en allant sur la [page des paramètres de joueur](/games/Minecraft/player-options)

## Rejoindre une partie MultiWorld

Expand Down Expand Up @@ -71,4 +71,4 @@ les liens suivants sont les versions des logiciels que nous utilisons.
- [Page des versions du mod Minecraft Archipelago Randomizer] (https://github.com/KonoTyran/Minecraft_AP_Randomizer/releases)
- **NE PAS INSTALLER CECI SUR VOTRE CLIENT**
- [Amazon Corretto](https://docs.aws.amazon.com/corretto/)
- choisissez la version correspondante et sélectionnez "Téléchargements" sur la gauche
- choisissez la version correspondante et sélectionnez "Téléchargements" sur la gauche
2 changes: 0 additions & 2 deletions worlds/minecraft/docs/minecraft_sv.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ shuffle_structures:
off: 0
```
För mer detaljer om vad varje inställning gör, kolla standardinställningen `PlayerSettings.yaml` som kommer med
Archipelago-installationen.
## Gå med i ett Multivärld-spel
Expand Down
Loading

0 comments on commit 569c37c

Please sign in to comment.