Settings API

Application settings / host.yaml interface using type hints. This is different from player options.

class settings.Bool

Bases: object

class settings.GeneralOptions

Bases: Group

class OutputPath

Bases: OptionalUserFolderPath

Where to place output files

output_path: OutputPath = 'output'
class settings.GeneratorOptions

Bases: Group

Options for Generation

class EnemizerPath

Bases: LocalFilePath

Location of your Enemizer CLI, available here: https://github.com/Ijwu/Enemizer/releases

is_exe: bool = True

Special cross-platform handling for executables

class MetaFilePath

Bases: str

Meta file name, within the stated player_files_path location

class PanicMethod

Bases: str

What to do if the current item placements appear unsolvable. raise -> Raise an exception and abort. swap -> Attempt to fix it by swapping prior placements around. (Default) start_inventory -> Move remaining items to start_inventory, generate additional filler items to fill locations.

class PlandoOptions

Bases: str

List of options that can be plando’d. Can be combined, for example “bosses, items” Available options: bosses, items, texts, connections

class PlayerFilesPath

Bases: OptionalUserFolderPath

Folder from which the player yaml files are pulled from

class Players

Bases: int

amount of players, 0 to infer from player files

class Race(*values)

Bases: IntEnum

Create encrypted race roms and flag games as race mode

OFF = 0
ON = 1
class Spoiler(*values)

Bases: IntEnum

Create a spoiler file 0 -> None 1 -> Spoiler without playthrough or paths to playthrough required items 2 -> Spoiler with playthrough (viable solution to goals) 3 -> Spoiler with playthrough and traversal paths towards items

BASIC = 1
FULL = 3
NONE = 0
PLAYTHROUGH = 2
class WeightsFilePath

Bases: str

general weights file, within the stated player_files_path location gets used if players is higher than the amount of per-player files found to fill remaining slots

enemizer_path: EnemizerPath = 'EnemizerCLI/EnemizerCLI.Core'
loglevel: str = 'info'
logtime: bool = False
meta_file_path: MetaFilePath = 'meta.yaml'
panic_method: PanicMethod = 'swap'
plando_options: PlandoOptions = 'bosses, connections, texts'
player_files_path: PlayerFilesPath = 'Players'
players: Players = 0
race: Race = 0
spoiler: Spoiler = 3
weights_file_path: WeightsFilePath = 'weights.yaml'
class settings.Group

Bases: object

as_dict(*args: str, downcast: bool = True) Dict[str, Any]
property changed: bool
dump(f: TextIO, level: int = 0) None

Dump Group to stream f at given indentation level

get(key: str, default: Any = None) Any
classmethod get_type_hints() Dict[str, Any]

Returns resolved type hints for the class

items() List[Tuple[str, Any]]
update(dct: Dict[str, Any]) None
class settings.LocalFilePath

Bases: _LocalPath, FilePath

class settings.LocalFolderPath

Bases: _LocalPath, FolderPath

class settings.OptionalLocalFilePath

Bases: LocalFilePath

required: bool = False

Marks the file as required and opens a file browser when missing

class settings.OptionalLocalFolderPath

Bases: LocalFolderPath

required: bool = False

Marks the file as required and opens a file browser when missing

class settings.OptionalUserFilePath

Bases: UserFilePath

required: bool = False

Marks the file as required and opens a file browser when missing

class settings.OptionalUserFolderPath

Bases: UserFolderPath

required: bool = False

Marks the file as required and opens a file browser when missing

class settings.Path

Bases: str

browse(**kwargs: Any) T | None

Opens a file browser to search for the file

copy_to: str | None = None

If not None, copy to AP folder instead of linking it

description: str | None = None

Title to display when browsing for the file

exists() bool
is_exe: bool = False

Special cross-platform handling for executables

required: bool = True

Marks the file as required and opens a file browser when missing

resolve() str
classmethod validate(path: str) None

Overload and raise to validate input files from browse

class settings.SNIOptions

Bases: Group

class SNIPath

Bases: LocalFolderPath

Set this to your SNI folder location if you want the MultiClient to attempt an auto start, does nothing if not found

class SnesRomStart

Bases: str

Set this to false to never autostart a rom (such as after patching) True for operating system default program Alternatively, a path to a program to open the .sfc file with

snes_rom_start: SnesRomStart | bool = True
sni_path: SNIPath = 'SNI'
class settings.ServerOptions

Bases: Group

Options for MultiServer Null means nothing, for the server this means to default the value These overwrite command line arguments!

class AutoShutdown

Bases: int

Automatically shut down the server after this many seconds without new location checks, 0 to keep running

class CollectMode

Bases: str

Collect modes A Collect sends the remaining items to a world that collects “disabled” -> clients can’t collect, “enabled” -> clients can always collect “auto” -> automatic collect on goal completion “auto-enabled” -> automatic collect on goal completion and manual collect is also enabled “goal” -> collect is allowed after goal completion

class Compatibility(*values)

Bases: IntEnum

Compatibility handling 2 -> Recommended for casual/cooperative play, attempt to be compatible with everything across all versions 1 -> No longer in use, kept reserved in case of future use 0 -> Recommended for tournaments to force a level playing field, only allow an exact version match

FULL = 2
OFF = 0
ON = 1
class DisableItemCheat

Bases: Bool

Disallow !getitem

class HintCost

Bases: int

Relative point cost to receive a hint via !hint for players so for example hint_cost: 20 would mean that for every 20% of available checks, you get the ability to hint, for a total of 5

class LocationCheckPoints

Bases: int

Client hint system Points given to a player for each acquired item in their world

class LogNetwork(*values)

Bases: IntEnum

log all server traffic, mostly for dev use

OFF = 0
ON = 1
class ReleaseMode

Bases: str

Release modes A Release sends out the remaining items from a world that releases “disabled” -> clients can’t release, “enabled” -> clients can always release “auto” -> automatic release on goal completion “auto-enabled” -> automatic release on goal completion and manual release is also enabled “goal” -> release is allowed after goal completion

class RemainingMode

Bases: str

Remaining modes !remaining handling, that tells a client which items remain in their pool “enabled” -> Client can always ask for remaining items “disabled” -> Client can never ask for remaining items “goal” -> Client can ask for remaining items after goal completion

class ServerPassword

Bases: str

Allows for clients to log on and manage the server. If this is null, no remote administration is possible.

auto_shutdown: AutoShutdown = 0
collect_mode: CollectMode = 'auto'
compatibility: Compatibility = 2
disable_item_cheat: DisableItemCheat | bool = False
disable_save: bool = False
hint_cost: HintCost = 10
host: str | None = None
location_check_points: LocationCheckPoints = 1
log_network: LogNetwork = 0
loglevel: str = 'info'
logtime: bool = False
multidata: str | None = None
password: str | None = None
port: int = 38281
release_mode: ReleaseMode = 'auto'
remaining_mode: RemainingMode = 'goal'
savefile: str | None = None
server_password: ServerPassword | None = None
class settings.Settings(location: str | None)

Bases: Group

bizhawkclient_options: BizHawkClientOptions = <settings.BizHawkClientOptions object>
dump(f: TextIO, level: int = 0) None

Dump Group to stream f at given indentation level

property filename: str | None
general_options: GeneralOptions = <settings.GeneralOptions object>
generator: GeneratorOptions = <settings.GeneratorOptions object>
save(location: str | None = None) None
server_options: ServerOptions = <settings.ServerOptions object>
sni_options: SNIOptions = <settings.SNIOptions object>
class settings.UserFilePath

Bases: _UserPath, FilePath

class settings.UserFolderPath

Bases: _UserPath, FolderPath

settings.fmt_doc(cls: type, level: int) str
settings.get_settings() Settings

Returns settings from the default host.yaml