Options¶
- class Options.Accessibility(value: int)¶
Bases:
Choice
Set rules for reachability of your items/locations.
Full: ensure everything can be reached and acquired.
Minimal: ensure what is needed to reach your goal can be acquired.
- alias_items = 0¶
- alias_locations = 0¶
- alias_none = 2¶
- aliases: ClassVar[Dict[str, int]] = {'items': 0, 'locations': 0, 'none': 2}¶
- default: ClassVar[Any] = 0¶
- display_name = 'Accessibility'¶
- name_lookup: ClassVar[Dict[T, str]] = {0: 'full', 2: 'minimal'}¶
- option_full = 0¶
- option_minimal = 2¶
- options: ClassVar[Dict[str, int]] = {'full': 0, 'items': 0, 'locations': 0, 'minimal': 2, 'none': 2}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- class Options.AssembleOptions(name, bases, attrs)¶
Bases:
ABCMeta
- class Options.BossMeta(name, bases, attrs)¶
Bases:
AssembleOptions
- class Options.Choice(value: int)¶
Bases:
NumericOption
- aliases: ClassVar[Dict[str, int]] = {}¶
- auto_display_name = True¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- class Options.CommonOptions(progression_balancing: 'ProgressionBalancing', accessibility: 'Accessibility')¶
Bases:
object
- accessibility: Accessibility¶
- as_dict(*option_names: str, casing: Literal['snake', 'camel', 'pascal', 'kebab'] = 'snake', toggles_as_bools: bool = False) Dict[str, Any] ¶
Returns a dictionary of [str, Option.value]
- Parameters:
option_names – names of the options to return
casing – case of the keys to return. Supports snake, camel, pascal, kebab
toggles_as_bools – whether toggle options should be output as bools instead of strings
- progression_balancing: ProgressionBalancing¶
- class Options.ConnectionsMeta(name: str, bases: tuple[type, ...], attrs: dict[str, Any])¶
Bases:
AssembleOptions
- class Options.DeathLink(value: int)¶
Bases:
Toggle
When you die, everyone who enabled death link dies. Of course, the reverse is true too.
- aliases: ClassVar[Dict[str, int]] = {}¶
- display_name = 'Death Link'¶
- name_lookup: ClassVar[Dict[T, str]] = {0: 'false', 1: 'true'}¶
- options: ClassVar[Dict[str, int]] = {'false': 0, 'true': 1}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- class Options.DefaultOnToggle(value: int)¶
Bases:
Toggle
- aliases: ClassVar[Dict[str, int]] = {}¶
- default: ClassVar[Any] = 1¶
- name_lookup: ClassVar[Dict[T, str]] = {0: 'false', 1: 'true'}¶
- options: ClassVar[Dict[str, int]] = {'false': 0, 'true': 1}¶
- class Options.ExcludeLocations(value: Iterable[str])¶
Bases:
LocationSet
Prevent these locations from having an important item.
- aliases: ClassVar[Dict[str, int]] = {}¶
- display_name = 'Excluded Locations'¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- value: T¶
- class Options.FreeText(value: str)¶
Bases:
Option
[str
]Text option that allows users to enter strings. Needs to be validated by the world or option definition.
- aliases: ClassVar[Dict[str, int]] = {}¶
- property current_key: str¶
- default: ClassVar[Any] = ''¶
- classmethod get_option_name(value: str) str ¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- value: T¶
- class Options.FreezeValidKeys(name, bases, attrs)¶
Bases:
AssembleOptions
- class Options.ItemDict(value: Dict[str, int])¶
Bases:
OptionDict
- aliases: ClassVar[Dict[str, int]] = {}¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- value: T¶
- verify_item_name: bool = True¶
- class Options.ItemLinks(*args, **kwargs)¶
Bases:
OptionList
Share part of your item pool with other players.
- aliases: ClassVar[Dict[str, int]] = {}¶
- default: ClassVar[Any] = []¶
- display_name = 'Item Links'¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- schema = Schema([{'name': And(<class 'str'>, <built-in function len>), 'item_pool': [And(<class 'str'>, <built-in function len>)], Optional('exclude'): [And(<class 'str'>, <built-in function len>)], 'replacement_item': Or(And(<class 'str'>, <built-in function len>), None), Optional('local_items'): [And(<class 'str'>, <built-in function len>)], Optional('non_local_items'): [And(<class 'str'>, <built-in function len>)], Optional('link_replacement'): Or(None, <class 'bool'>)}])¶
- value: T¶
- verify(world: Type[World], player_name: str, plando_options: PlandoOptions) None ¶
- static verify_items(items: List[str], item_link: str, pool_name: str, world, allow_item_groups: bool = True) Set ¶
- class Options.ItemSet(value: Iterable[str])¶
Bases:
OptionSet
- aliases: ClassVar[Dict[str, int]] = {}¶
- convert_name_groups: bool = True¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- value: T¶
- verify_item_name: bool = True¶
- class Options.ItemsAccessibility(value: int)¶
Bases:
Accessibility
Set rules for reachability of your items/locations.
Full: ensure everything can be reached and acquired.
Minimal: ensure what is needed to reach your goal can be acquired.
Items: ensure all logically relevant items can be acquired. Some items, such as keys, may be self-locking, and some locations may be inaccessible.
- aliases: ClassVar[Dict[str, int]] = {}¶
- default: ClassVar[Any] = 1¶
- name_lookup: ClassVar[Dict[T, str]] = {0: 'full', 1: 'items', 2: 'minimal'}¶
- option_items = 1¶
- options: ClassVar[Dict[str, int]] = {'full': 0, 'items': 1, 'locations': 0, 'minimal': 2, 'none': 2}¶
- value: int¶
- class Options.LocalItems(value: Iterable[str])¶
Bases:
ItemSet
Forces these items to be in their native world.
- aliases: ClassVar[Dict[str, int]] = {}¶
- display_name = 'Local Items'¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- value: T¶
- class Options.LocationSet(value: Iterable[str])¶
Bases:
OptionSet
- aliases: ClassVar[Dict[str, int]] = {}¶
- convert_name_groups: bool = True¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- value: T¶
- verify_location_name: bool = True¶
- class Options.NamedRange(value: int)¶
Bases:
Range
- aliases: ClassVar[Dict[str, int]] = {}¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- special_range_names: Dict[str, int] = {}¶
Special Range names have to be all lowercase as matching is done with text.lower()
- class Options.NonLocalItems(value: Iterable[str])¶
Bases:
ItemSet
Forces these items to be outside their native world.
- aliases: ClassVar[Dict[str, int]] = {}¶
- display_name = 'Non-local Items'¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- value: T¶
- class Options.NumericOption¶
Bases:
Option
[int
],Integral
,ABC
- aliases: ClassVar[Dict[str, int]] = {}¶
- default: ClassVar[Any] = 0¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- class Options.Option¶
Bases:
Generic
[T
]- aliases: ClassVar[Dict[str, int]] = {}¶
- auto_display_name = False¶
- property current_key: str¶
- property current_option_name: str¶
For display purposes. Worlds should be using current_key.
- default: ClassVar[Any]¶
- classmethod get_option_name(value: T) str ¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- rich_text_doc: bool | None = None¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- supports_weighting = True¶
- value: T¶
- verify(*args, **kwargs) None ¶
- visibility = 15¶
- class Options.OptionDict(value: Dict[str, Any])¶
Bases:
Option
[Dict
[str
,Any
]],VerifyKeys
,Mapping
[str
,Any
]- aliases: ClassVar[Dict[str, int]] = {}¶
- default: ClassVar[Any] = {}¶
- classmethod from_any(data: Dict[str, Any]) OptionDict ¶
- get_option_name(value)¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- supports_weighting = False¶
- value: T¶
- verify(*args, **kwargs) None ¶
- exception Options.OptionError¶
Bases:
ValueError
- class Options.OptionGroup(name: str, options: List[Type[Option[Any]]], start_collapsed: bool = False)¶
Bases:
NamedTuple
Define a grouping of options.
- name: str¶
Name of the group to categorize these options in for display on the WebHost and in generated YAMLS.
- start_collapsed: bool¶
Whether the group will start collapsed on the WebHost options pages.
- class Options.OptionList(value: Iterable[Any])¶
Bases:
Option
[List
[Any
]],VerifyKeys
- aliases: ClassVar[Dict[str, int]] = {}¶
- default: ClassVar[Any] = ()¶
- classmethod from_any(data: Any)¶
- classmethod from_text(text: str)¶
- get_option_name(value)¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- supports_weighting = False¶
- value: T¶
- verify(*args, **kwargs) None ¶
- class Options.OptionSet(value: Iterable[str])¶
Bases:
Option
[Set
[str
]],VerifyKeys
- aliases: ClassVar[Dict[str, int]] = {}¶
- default: ClassVar[Any] = frozenset({})¶
- classmethod from_any(data: Any)¶
- classmethod from_text(text: str)¶
- get_option_name(value)¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- supports_weighting = False¶
- value: T¶
- verify(*args, **kwargs) None ¶
- class Options.OptionsMetaProperty(name: str, bases: Tuple[type, ...], attrs: Dict[str, Any])¶
Bases:
type
- class Options.PerGameCommonOptions(progression_balancing: 'ProgressionBalancing', accessibility: 'Accessibility', local_items: 'LocalItems', non_local_items: 'NonLocalItems', start_inventory: 'StartInventory', start_hints: 'StartHints', start_location_hints: 'StartLocationHints', exclude_locations: 'ExcludeLocations', priority_locations: 'PriorityLocations', item_links: 'ItemLinks')¶
Bases:
CommonOptions
- exclude_locations: ExcludeLocations¶
- local_items: LocalItems¶
- non_local_items: NonLocalItems¶
- priority_locations: PriorityLocations¶
- start_hints: StartHints¶
- start_inventory: StartInventory¶
- start_location_hints: StartLocationHints¶
- class Options.PlandoBosses(value: str | int)¶
Bases:
TextChoice
Generic boss shuffle option that supports plando. Format expected is ‘location1-boss1;location2-boss2;shuffle_mode’. If shuffle_mode is not provided in the string, this will be the default shuffle mode. Must override can_place_boss, which passes a plando boss and location. Check if the placement is valid for your game here.
- aliases: ClassVar[Dict[str, int]] = {}¶
- bosses: ClassVar[Set[str] | FrozenSet[str]]¶
- classmethod can_place_boss(boss: str, location: str) bool ¶
- duplicate_bosses: bool = False¶
- classmethod from_text(text: str)¶
- classmethod get_shuffle_mode(option_list: List[str])¶
- locations: ClassVar[Set[str] | FrozenSet[str]]¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- classmethod valid_boss_name(value: str) bool ¶
- classmethod valid_location_name(value: str) bool ¶
- classmethod validate_plando_bosses(options: List[str]) None ¶
- verify(world: Type[World], player_name: str, plando_options: PlandoOptions) None ¶
- class Options.PlandoConnection(entrance, exit, direction, percentage)¶
Bases:
NamedTuple
- direction: Literal['entrance', 'exit', 'both']¶
Alias for field number 2
- entrance: str¶
Alias for field number 0
- exit: str¶
Alias for field number 1
- percentage: int¶
Alias for field number 3
- class Options.PlandoConnections(value: Iterable[PlandoConnection])¶
Bases:
Option
[List
[PlandoConnection
]]Generic connections plando. Format is: - entrance: “Entrance Name”
exit: “Exit Name” direction: “Direction” percentage: 100
Direction must be one of ‘entrance’, ‘exit’, or ‘both’, and defaults to ‘both’ if omitted. Percentage is an integer from 1 to 100, and defaults to 100 when omitted.
- aliases: ClassVar[Dict[str, int]] = {}¶
- classmethod can_connect(entrance: str, exit: str) bool ¶
Checks that a given entrance can connect to a given exit. By default, this will always return true unless overridden.
- default: ClassVar[Any] = ()¶
- display_name = 'Plando Connections'¶
- duplicate_exits: bool = False¶
Whether or not exits should be allowed to be duplicate.
- entrances: ClassVar[AbstractSet[str]]¶
- exits: ClassVar[AbstractSet[str]]¶
- classmethod from_any(data: Iterable[Mapping[str, Any] | PlandoConnection | Any] | Any) Self ¶
- classmethod get_option_name(value: List[PlandoConnection]) str ¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- supports_weighting = False¶
- classmethod validate_entrance_name(entrance: str) bool ¶
- classmethod validate_exit_name(exit: str) bool ¶
- classmethod validate_plando_connections(connections: Iterable[PlandoConnection]) None ¶
- verify(world: Type[World], player_name: str, plando_options: PlandoOptions) None ¶
- class Options.PlandoText(at, text, percentage)¶
Bases:
NamedTuple
- at: str¶
Alias for field number 0
- percentage: int¶
Alias for field number 2
- text: List[str]¶
Alias for field number 1
- class Options.PlandoTexts(value: Iterable[PlandoText])¶
Bases:
Option
[List
[PlandoText
]],VerifyKeys
- aliases: ClassVar[Dict[str, int]] = {}¶
- default: ClassVar[Any] = ()¶
- display_name = 'Plando Texts'¶
- classmethod from_any(data: Iterable[Mapping[str, Any] | PlandoText | Any] | Any) Self ¶
- classmethod get_option_name(value: List[PlandoText]) str ¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- supports_weighting = False¶
- value: T¶
- verify(world: Type[World], player_name: str, plando_options: PlandoOptions) None ¶
- verify_keys() None ¶
- class Options.PriorityLocations(value: Iterable[str])¶
Bases:
LocationSet
Prevent these locations from having an unimportant item.
- aliases: ClassVar[Dict[str, int]] = {}¶
- display_name = 'Priority Locations'¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- value: T¶
- class Options.ProgressionBalancing(value: int)¶
Bases:
NamedRange
A system that can move progression earlier, to try and prevent the player from getting stuck and bored early.
A lower setting means more getting stuck. A higher setting means less getting stuck.
- aliases: ClassVar[Dict[str, int]] = {}¶
- default: ClassVar[Any] = 50¶
- display_name = 'Progression Balancing'¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- range_end = 99¶
- range_start = 0¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- special_range_names: Dict[str, int] = {'disabled': 0, 'extreme': 99, 'normal': 50}¶
Special Range names have to be all lowercase as matching is done with text.lower()
- value: T¶
- class Options.Range(value: int)¶
Bases:
NumericOption
- aliases: ClassVar[Dict[str, int]] = {}¶
- classmethod get_option_name(value: int) str ¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- range_end = 1¶
- range_start = 0¶
- static triangular(lower: int, end: int, tri: float = 0.5) int ¶
Integer triangular distribution for lower inclusive to end inclusive.
Expects lower <= end and 0.0 <= tri <= 1.0. The result of other inputs is undefined.
- value: T¶
- class Options.Removed(value: str)¶
Bases:
FreeText
This Option has been Removed.
- aliases: ClassVar[Dict[str, int]] = {}¶
- default: ClassVar[Any] = ''¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- value: T¶
- visibility = 0¶
- class Options.StartHints(value: Iterable[str])¶
Bases:
ItemSet
Start with these item’s locations prefilled into the
!hint
command.- aliases: ClassVar[Dict[str, int]] = {}¶
- display_name = 'Start Hints'¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- value: T¶
- class Options.StartInventory(value: Dict[str, int])¶
Bases:
ItemDict
Start with these items.
- aliases: ClassVar[Dict[str, int]] = {}¶
- display_name = 'Start Inventory'¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- value: T¶
- verify_item_name: bool = True¶
- class Options.StartInventoryPool(value: Dict[str, int])¶
Bases:
StartInventory
Start with these items and don’t place them in the world.
The game decides what the replacement items will be.
- aliases: ClassVar[Dict[str, int]] = {}¶
- display_name = 'Start Inventory from Pool'¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- value: T¶
- verify_item_name: bool = True¶
- class Options.StartLocationHints(value: Iterable[str])¶
Bases:
LocationSet
Start with these locations and their item prefilled into the
!hint
command.- aliases: ClassVar[Dict[str, int]] = {}¶
- display_name = 'Start Location Hints'¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- rich_text_doc: bool | None = True¶
Whether the WebHost should render the Option’s docstring as rich text.
If this is True, the Option’s docstring is interpreted as reStructuredText, the standard Python markup format. In the WebHost, it’s rendered to HTML so that lists, emphasis, and other rich text features are displayed properly.
If this is False, the docstring is instead interpreted as plain text, and displayed as-is on the WebHost with whitespace preserved.
If this is None, it inherits the value of WebWorld.rich_text_options_doc. For backwards compatibility, this defaults to False, but worlds are encouraged to set it to True and use reStructuredText for their Option documentation.
- value: T¶
- class Options.TextChoice(value: str | int)¶
Bases:
Choice
Allows custom string input and offers choices. Choices will resolve to int and text will resolve to string
- aliases: ClassVar[Dict[str, int]] = {}¶
- property current_key: str¶
- classmethod from_text(text: str) TextChoice ¶
- classmethod get_option_name(value: T) str ¶
- name_lookup: ClassVar[Dict[T, str]] = {}¶
- options: ClassVar[Dict[str, int]] = {}¶
- value: str | int¶
- class Options.Toggle(value: int)¶
Bases:
NumericOption
- aliases: ClassVar[Dict[str, int]] = {}¶
- default: ClassVar[Any] = 0¶
- classmethod from_any(data: Any)¶
- classmethod get_option_name(value)¶
- name_lookup: ClassVar[Dict[T, str]] = {0: 'false', 1: 'true'}¶
- option_false = 0¶
- option_true = 1¶
- options: ClassVar[Dict[str, int]] = {'false': 0, 'true': 1}¶
- value: T¶
- class Options.VerifyKeys¶
Bases:
object
- aliases = {}¶
- convert_name_groups: bool = False¶
- name_lookup = {}¶
- options = {}¶
- valid_keys: Iterable = []¶
- valid_keys_casefold: bool = False¶
- value: Any¶
- verify(world: Type[World], player_name: str, plando_options: PlandoOptions) None ¶
- verify_item_name: bool = False¶
- verify_keys() None ¶
- verify_location_name: bool = False¶
- class Options.Visibility(*values)¶
Bases:
IntFlag
- all = 15¶
- complex_ui = 4¶
- none = 0¶
- simple_ui = 2¶
- spoiler = 8¶
- template = 1¶
- Options.dump_player_options(multiworld: MultiWorld) None ¶
- Options.generate_yaml_templates(target_folder: Union[str, 'pathlib.Path'], generate_hidden: bool = True) None ¶
- Options.get_option_groups(world: typing.Type[World], visibility_level: Visibility = <Visibility.template: 1>) Dict[str, Dict[str, Type[Option[Any]]]] ¶
Generates and returns a dictionary for the option groups of a specified world.
- Options.item_and_loc_options = [<class 'Options.LocalItems'>, <class 'Options.NonLocalItems'>, <class 'Options.StartInventory'>, <class 'Options.StartInventoryPool'>, <class 'Options.StartHints'>, <class 'Options.StartLocationHints'>, <class 'Options.ExcludeLocations'>, <class 'Options.PriorityLocations'>, <class 'Options.ItemLinks'>]¶
Options that are always populated in “Item & Location Options” Option Group. Cannot be moved to another group. If desired, a custom “Item & Location Options” Option Group can be defined, but only for adding additional options to it.