← 输入框|github.com|刷新
Skip to content

Align Python config loading with core and fix server discovery - #49

Open
VirxEC wants to merge 13 commits into
masterfrom
config-parsing-parity
Open

VirxEC wants to merge 13 commits into
masterfrom
config-parsing-parity

Conversation

@VirxEC

@VirxEC VirxEC commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

The Python TOML helpers did not always produce the same match configuration as core. For example, a relative loadout_file could fail when the working directory differed from the match config directory. Server discovery also mistook the game port for the socket port when RLBotServer started with both arguments.

Changes

  • Align config defaults, per-agent auto_start, platform environment overrides, and the Psyonix fallback with core. Expand platform environment values once and report invalid numeric enum values as ConfigParsingException.
  • Resolve loadout paths relative to the config that declares them. Supply zeroed paint settings when the paint table is absent. Reject invalid team IDs instead of selecting the orange loadout.
  • Read the socket port from the first argument after the server executable. Ignore later arguments and keep the .exe suffix when looking up a server by an explicit path.
  • Give each socket relay and renderer its own mutable state. Update the development setup to use uv and document how to run the tests.
  • Bump the package version to 2.0.0-beta.58.

Fixes #44. Related to #45: the loadout regressions above are covered by tests, but the exact symptom reported there has not been confirmed.

Why use None for game-state defaults?

Python evaluates a default argument when it defines the function, not each time it calls the function. With balls={} or cars={}, calls that omit the argument reuse the same dictionary, even across instances of the same manager class. If a call mutates that dictionary, later calls can see the change.

set_game_state_parts() now uses None to mean no ball or car updates. The helper does not mutate the dictionaries today, so callers that omit those arguments still send the same game-state message.

Testing

uv run --locked pytest -q tests passed all 73 tests. Server discovery tests use mocked process data. No live Windows server or Rocket League match was tested.

Comment thread rlbot/managers/bot.py Resolved

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

find_server_process reads the wrong port when RLBotServer has more than one argument

2 participants