Skip to content

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

Merged
VirxEC merged 16 commits into
masterfrom
config-parsing-parity
Dec 2, 2026
Merged

VirxEC merged 16 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. Accept only declared enum names, ignoring case and surrounding whitespace.
  • 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.
  • Use auto_save_replay as the only replay-saving key.
  • 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.

Core changes

Merge RLBot/core#181 and RLBot/core#182 before or alongside this PR so both parsers accept the same replay key and enum names. Update configs that use auto_save_replays or numeric enum strings.

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 --isolated --python 3.11 pytest -q tests/test_config_parity.py tests/test_gateway.py passed all 79 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

@NicEastvillage NicEastvillage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the AI might have understood you a bit too literally.

Comment thread rlbot/config.py Resolved
Comment thread rlbot/config.py Resolved
Comment thread README.md Resolved
@VirxEC
VirxEC merged commit bcf3cad into master Dec 2, 2026
@VirxEC
VirxEC deleted the config-parsing-parity branch December 2, 2026 19:00
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

3 participants