This is a script that facilitates track and field style events for Rocket League bots, e.g. waypoint races, shotput, etc.
It uses the Scripts system and Matchcomms.
Track and Field relies on RLBotGUI.
- Clone this repository
- Open RLBotGUI, and in that interface:
- Add -> Load Folder
- Choose the folder where this code lives
- In the "Scripts" section, toggle on "Track and Field".
- If there's a yellow triangle, click it and install dependencies.
- Choose bots to compete, drag them on to any team.
- Start the match
- Expect the match to start, and the bots to de-spawn during kickoff.
- Follow instructions that will appear in-game.
Event progress is saved in a file at ./data/current_competition.json, and and additional files in subfolders.
- You can resume an event by re-running the match through RLBotGUI
- If you want to start a new event, you must move or rename current_competition.json.
To compete in Track and Field, a bot must support Matchcomms.
- Upon startup, the bot should send a message to matchcomms in this format:
{ "readyForTrackAndField": True, "supportedEvents": ["WaypointRace", "etc"] }
- The bot will then need to listen for message(s) from matchcomms regarding the event they're participating in.
Each python file in the 'events' folder has specific documentation on the message(s) it sends and how a bot is expected to behave.
Pull requests are welcome!
Create a new class in the 'events' folder, as a subclass of Event
(see event.py). You may find it convenient to copy-paste waypoint_race.py
and modify it to create your new event.
To start using your event, modify the get_event_list
function in
track_and_field.py.