Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add detail on customizing the forced groups #3371

Merged
merged 6 commits into from
Jun 4, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, allowing specifying options to add to them, as well as change whether they start collapsed. The "Item &
alwaysintreble marked this conversation as resolved.
Show resolved Hide resolved
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