Skip to content

Rename config to config_file and boost to boost_amount #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "A high performance Python interface for communicating with RLBot
dynamic = ["version"]
requires-python = ">= 3.11"
dependencies = [
"rlbot_flatbuffers~=0.13.0",
"rlbot_flatbuffers~=0.14.0",
"psutil==6.*",
]
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions rlbot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def load_match_config(config_path: Path | str) -> flat.MatchConfiguration:

players = []
for car_table in config.get("cars", []):
car_config = __str(car_table, "config")
car_config = __str(car_table, "config_file")
name = __str(car_table, "name")
team = __team(car_table)
loadout_file = __str(car_table, "loadout_file") or None
Expand Down Expand Up @@ -108,7 +108,7 @@ def load_match_config(config_path: Path | str) -> flat.MatchConfiguration:

scripts = []
for script_table in config.get("scripts", []):
if script_config := __str(script_table, "config"):
if script_config := __str(script_table, "config_file"):
abs_config_path = (config_path.parent / script_config).resolve()
scripts.append(load_script_config(abs_config_path))
else:
Expand All @@ -126,7 +126,7 @@ def load_match_config(config_path: Path | str) -> flat.MatchConfiguration:
ball_weight=__enum(mutator_table, "ball_weight", flat.BallWeightMutator),
ball_size=__enum(mutator_table, "ball_size", flat.BallSizeMutator),
ball_bounciness=__enum(mutator_table, "ball_bounciness", flat.BallBouncinessMutator),
boost=__enum(mutator_table, "boost_amount", flat.BoostMutator),
boost_amount=__enum(mutator_table, "boost_amount", flat.BoostAmountMutator),
rumble=__enum(mutator_table, "rumble", flat.RumbleMutator),
boost_strength=__enum(mutator_table, "boost_strength", flat.BoostStrengthMutator),
gravity=__enum(mutator_table, "gravity", flat.GravityMutator),
Expand Down
10 changes: 5 additions & 5 deletions tests/hivemind.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ type = "human"
team = 0

[[cars]]
config = "hivemind/bot.toml"
config_file = "hivemind/bot.toml"
team = 0

[[cars]]
config = "hivemind/bot.toml"
config_file = "hivemind/bot.toml"
team = 0

[[cars]]
config = "hivemind/bot.toml"
config_file = "hivemind/bot.toml"
team = 1

[[cars]]
config = "hivemind/bot.toml"
config_file = "hivemind/bot.toml"
team = 1

[[cars]]
config = "hivemind/bot.toml"
config_file = "hivemind/bot.toml"
team = 1
2 changes: 1 addition & 1 deletion tests/human_vs_atba.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ type = "human"
team = 0

[[cars]]
config = "atba/atba.bot.toml"
config_file = "atba/atba.bot.toml"
team = 1
2 changes: 1 addition & 1 deletion tests/human_vs_necto.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ type = "human"
team = 0

[[cars]]
config = "necto/bot.toml"
config_file = "necto/bot.toml"
team = 1
2 changes: 1 addition & 1 deletion tests/psy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ game_map_upk = "Stadium_P"

[[cars]]
team = 0
config = "psy/bot.toml"
config_file = "psy/bot.toml"
type = "psyonix"
skill = "beginner"

Expand Down
2 changes: 1 addition & 1 deletion tests/render_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ type = "human"
team = 0

[[scripts]]
config = "render_test/script.toml"
config_file = "render_test/script.toml"
8 changes: 4 additions & 4 deletions tests/rlbot.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ auto_save_replay = false
[[cars]]
# The location of the configuration file for your agent here
# The path is always relative to the folder that this file is in
config = "atba/atba.bot.toml"
config_file = "atba/atba.bot.toml"
# Which team the player should be on:
# team 0 (blue) shoots on positive goal, team 1 (orange) shoots on negative goal
team = 0
Expand All @@ -27,12 +27,12 @@ team = 0
type = "rlbot"

[[cars]]
config = "atba/atba.bot.toml"
config_file = "atba/atba.bot.toml"
team = 1
# you don't have to specify type/skill for rlbots

[[cars]]
config = "necto/bot.toml"
config_file = "necto/bot.toml"
team = 0

[[cars]]
Expand All @@ -58,4 +58,4 @@ ball_bounciness = "SuperHigh"
boost_amount = "UnlimitedBoost"
rumble = "SpikesOnly"
boost_strength = "OneAndAHalf"
respawn_time = "OneSecond"
respawn_time = "OneSecond"
4 changes: 2 additions & 2 deletions tests/series.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ existing_match_behavior = "ContinueAndSpawn"
skip_replays = true

[[cars]]
config = "necto/bot.toml"
config_file = "necto/bot.toml"
team = 1

[[cars]]
config = "necto/bot.toml"
config_file = "necto/bot.toml"
team = 0