Skip to content

Commit

Permalink
Docs: Add detail on customizing the forced groups (ArchipelagoMW#3371)
Browse files Browse the repository at this point in the history
* Docs: Fix incorrect assertion in option group docs and add detail on customizing the forced groups.

* add docs for the visibility attribute

* typos

* review comments

* missed one

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* better wording

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
  • Loading branch information
2 people authored and wu4 committed Jun 6, 2024
1 parent cfabe09 commit 039f45f
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions docs/options api.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,29 @@ class ExampleWorld(World):
```

### Option Groups
Options may be categorized into groups for display on the WebHost. Option groups are displayed alphabetically on the
player-options and weighted-options pages. Options without a group name are categorized into a generic "Game Options"
group.
Options may be categorized into groups for display on the WebHost. Option groups are displayed in the order specified
by your world on the player-options and weighted-options pages. In the generated template files, there will be a comment
with the group name at the beginning of each group of options. The `start_collapsed` Boolean only affects how the groups
appear on the WebHost, with the grouping being collapsed when this is `True`.

Options without a group name are categorized into a generic "Game Options" group, which is always the first group. If
every option for your world is in a group, this group will be removed. There is also an "Items & Location Options"
group, which is automatically created using certain specified `item_and_loc_options`. These specified options cannot be
removed from this group.

Both the "Game Options" and "Item & Location Options" groups can be overridden by creating your own groups with
those names, letting you add options to them and change whether they start collapsed. The "Item &
Location Options" group can also be moved to a different position in the group ordering, but "Game Options" will always
be first, regardless of where it is in your list.

```python
from worlds.AutoWorld import WebWorld
from Options import OptionGroup
from . import Options

class MyWorldWeb(WebWorld):
option_groups = [
OptionGroup('Color Options', [
OptionGroup("Color Options", [
Options.ColorblindMode,
Options.FlashReduction,
Options.UIColors,
Expand Down

0 comments on commit 039f45f

Please sign in to comment.