Docs: Add detail on customizing the forced groups (#3371)

* 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>
This commit is contained in:
Aaron Wagener 2024-06-04 14:52:07 -05:00 committed by GitHub
parent 133167564c
commit 3cc391e9a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 4 deletions

View File

@ -86,17 +86,29 @@ class ExampleWorld(World):
``` ```
### Option Groups ### Option Groups
Options may be categorized into groups for display on the WebHost. Option groups are displayed alphabetically on the Options may be categorized into groups for display on the WebHost. Option groups are displayed in the order specified
player-options and weighted-options pages. Options without a group name are categorized into a generic "Game Options" by your world on the player-options and weighted-options pages. In the generated template files, there will be a comment
group. 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 ```python
from worlds.AutoWorld import WebWorld from worlds.AutoWorld import WebWorld
from Options import OptionGroup from Options import OptionGroup
from . import Options
class MyWorldWeb(WebWorld): class MyWorldWeb(WebWorld):
option_groups = [ option_groups = [
OptionGroup('Color Options', [ OptionGroup("Color Options", [
Options.ColorblindMode, Options.ColorblindMode,
Options.FlashReduction, Options.FlashReduction,
Options.UIColors, Options.UIColors,