MultiWorld

class BaseClasses.MultiWorld(players: int)

Bases: object

class AttributeProxy(rule)

Bases: object

class RegionManager(players: int)

Bases: object

add_group(new_id: int)
append(region: Region)
entrance_cache: Dict[int, Dict[str, Entrance]]
extend(regions: Iterable[Region])
location_cache: Dict[int, Dict[str, Location]]
region_cache: Dict[int, Dict[str, Region]]
add_group(name: str, game: str, players: AbstractSet[int] = frozenset({})) Tuple[int, Group]

Create a group with name and return the assigned player ID and group. If a group of this name already exists, the set of players is extended instead of creating a new one.

can_beat_game(starting_state: CollectionState | None = None) bool
completion_condition: Dict[int, Callable[[CollectionState], bool]]
create_item(item_name: str, player: int) Item
debug_types = False
early_items: Dict[int, Dict[str, int]]
exclude_locations: Dict[int, Options.ExcludeLocations]
find_item(item: str, player: int) Location
find_item_locations(item: str, player: int, resolve_group_locations: bool = False) List[Location]
find_items_in_locations(items: Set[str], player: int, resolve_group_locations: bool = False) List[Location]
fulfills_accessibility(state: CollectionState | None = None)

Check if accessibility rules are fulfilled with current or supplied state.

game: Dict[int, str]
get_all_ids() Tuple[int, ...]
get_all_state(use_cache: bool, allow_partial_entrances: bool = False) CollectionState
get_entrance(entrance_name: str, player: int) Entrance
get_entrances(player: int | None = None) Iterable[Entrance]
get_file_safe_player_name(player: int) str
get_filled_locations(player: int | None = None) List[Location]
get_game_groups(game_name: str) Tuple[int, ...]
get_game_players(game_name: str) Tuple[int, ...]
get_game_worlds(game_name: str)
get_items() List[Item]
get_location(location_name: str, player: int) Location
get_locations(player: int | None = None) Iterable[Location]
get_name_string_for_object(obj: HasNameAndPlayer) str
get_out_file_name_base(player: int) str

the base name (without file extension) for each player’s output file for a seed

get_placeable_locations(state=None, player=None) List[Location]
get_player_groups(player: int) Set[int]
get_player_name(player: int) str
get_reachable_locations(state: CollectionState | None = None, player: int | None = None) List[Location]
get_region(region_name: str, player: int) Region
get_regions(player: int | None = None) Collection[Region]
get_sendable_spheres() Iterator[Set[Location]]

yields a set of multiserver sendable locations (location.item.code: int) for each logical sphere

If there are unreachable locations, the last sphere of reachable locations is followed by an empty set, and then a set of all of the unreachable locations.

get_spheres() Iterator[Set[Location]]

yields a set of locations for each logical sphere

If there are unreachable locations, the last sphere of reachable locations is followed by an empty set, and then a set of all of the unreachable locations.

get_unfilled_locations(player: int | None = None) List[Location]
get_unfilled_locations_for_players(location_names: List[str], players: Iterable[int])
groups: Dict[int, Group]
has_beaten_game(state: CollectionState, player: int | None = None) bool
indirect_connections: Dict[Region, Set[Entrance]]
is_race: bool = False
itempool: List[Item]

Called to link together items in the itempool related to the registered item link groups.

local_early_items: Dict[int, Dict[str, int]]
local_items: Dict[int, Options.LocalItems]
non_local_items: Dict[int, Options.NonLocalItems]
per_slot_randoms: Utils.DeprecateDict[int, random.Random]

Deprecated. Please use self.random instead.

plando_connections: List
plando_items: List[List[Dict[str, Any]]]
plando_options: PlandoOptions
plando_texts: List[Dict[str, str]]
property player_ids: Tuple[int, ...]
player_name: Dict[int, str]
precollected_items: Dict[int, List[Item]]
priority_locations: Dict[int, Options.PriorityLocations]
progression_balancing: Dict[int, Options.ProgressionBalancing]
push_item(location: Location, item: Item, collect: bool = True)
push_precollected(item: Item)
random: random.Random
regions: RegionManager
register_indirect_condition(region: Region, entrance: Entrance)

Report that access to this Region can result in unlocking this Entrance, state.can_reach(Region) in the Entrance’s traversal condition, as opposed to pure transition logic.

secure()
seed_name: str
set_options(args: Namespace) None
set_seed(seed: int | None = None, secure: bool = False, name: str | None = None)
start_hints: Dict[int, Options.StartHints]
start_inventory: Dict[int, Options.StartInventory]
start_inventory_from_pool: Dict[int, Options.StartInventoryPool]
start_location_hints: Dict[int, Options.StartLocationHints]
state: CollectionState
unlocks_new_location(item: Item) bool
property world_name_lookup
worlds: Dict[int, 'AutoWorld.World']