Skip to content

reset_parameter_mask_and_values ​

python
reset_parameter_mask_and_values(reset_parameters: dict[str, int] | None, reset_parameter_index: dict[str, int] | None) -> tuple[int, list[int]]

Resolve reset-parameter overrides into the (bitmask, values) pair the unsafe wire format expects.

Values are emitted in ascending bit (parameter index) order to match the C# parser.

Parameters:

  • reset_parameters (dict[str, int] | None) – Name -> value overrides, or None.
  • reset_parameter_index (dict[str, int] | None) – The build's name -> bit index map, or None when the OakEmu build does not expose ResetParameterNames.

Returns:

  • tuple[int, list[int]] – (mask, values); (0, []) when there are no overrides.

Raises:

  • RuntimeError – If overrides are supplied but the OakEmu build does not support them.
  • KeyError – If a parameter name is not a known reset parameter.

Source