Skip to content

Commit c39cc97

Browse files
Merge pull request #40 from RLBot/various-updates
Add update schema, RocketHost, renames docs
2 parents fb41a62 + e1210e2 commit c39cc97

9 files changed

Lines changed: 301 additions & 84 deletions

File tree

docs/v5/botmaking/config-files.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,26 @@ The framework uses four types of config files, commonly known as:
99
- `loadout.toml` [GOTO](#loadout-config-files)
1010
- `match.toml` [GOTO](#match-config-files)
1111

12+
### Schema validation in IDEs
13+
14+
RLBot publishes JSON schemas that provide autocompletion, validation, and documentation for your config files directly in your editor.
15+
16+
Add a `#:schema` comment at the top of your config file to enable it:
17+
18+
```toml
19+
#:schema https://rlbot.org/schemas/agent.json
20+
```
21+
22+
- **`bot.toml` and `script.toml`** — use `https://rlbot.org/schemas/agent.json`
23+
- **`match.toml`** — use `https://rlbot.org/schemas/match.json`
24+
- **`loadout.toml`** — no schema is currently published
25+
26+
!!! tip "Editor setup"
27+
Not all editors support `#:schema` natively.
28+
- **VS Code** — works out of the box with the [Even Better TOML](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml) extension.
29+
- **Zed** — requires the [Tombli](https://github.com/schpet/tombli) extension to be installed.
30+
- **Other editors** — check if your TOML plugin supports the `#:schema` comment directive.
31+
1232
## Bot & Script Config Files
1333

1434
A bot/script config file defines a bot/script and its attributes, closely resembling the `PlayerConfiguration`/`ScriptConfiguration` from the [flatbuffer schema](https://github.com/RLBot/flatbuffers-schema/blob/main/schema/matchconfig.fbs).

docs/v5/botmaking/game-data.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,36 @@ In short:
1414
- **BallPrediction:** A highly accurate array of the ball's coming states, assuming no car hits it. It is sent alongside the game packet. See [BallPrediction](/v5/botmaking/ball-path-prediction/).
1515
- **Controller:** Contains a combination of pressed buttons. The bots send this to the RLBot server as often as possible in reponse to the GamePacket. If a tick is missed, the controller from previous tick is used.
1616

17+
### Notable v5 Renames from v4
18+
19+
Several fields were renamed from v4 to v5. The flatbuffer schema is the authoritative reference, but here are the most impactful:
20+
21+
| v4 Name | v5 Name | Notes |
22+
|---------------------|---------------------|--------------------------------------------|
23+
| `GameTickPacket` | `GamePacket` | |
24+
| `game_cars` | `players` | |
25+
| `game_boosts` | `boost_pads` | |
26+
| `game_info` | `match_info` | |
27+
| `ball` | `balls` | Now a list (multi-ball support) |
28+
| `num_*` fields | *(removed)* | Use `len(list)` instead |
29+
| `is_round_active` | `match_phase` | Compare against `MatchPhase.Active` |
30+
| `is_kickoff_pause` | `match_phase` | Compare against `MatchPhase.Kickoff` |
31+
| `is_match_ended` | `match_phase` | Compare against `MatchPhase.Ended` |
32+
| `has_wheel_contact` | `air_state` | Compare against `AirState.OnGround` |
33+
| `spawn_id` | `player_id` | In `ControllableTeamInfo` |
34+
| `MatchSettings` | `MatchConfiguration`| |
35+
| `FieldInfoPacket` | `FieldInfo` | |
36+
| `CollisionShape` | `shape` | Now a direct union type |
37+
1738
### Language-Specific Guides
1839

19-
**V4:**
40+
- [Python (v5)](https://github.com/RLBot/python-interface/wiki/Migration)
41+
- [Rust](https://github.com/RLBot/rust-interface)
42+
- [C#](https://github.com/RLBot/csharp-interface)
43+
44+
**V4 (legacy):**
2045

2146
- [Python](https://github.com/RLBot/RLBotPythonExample/wiki/Input-and-Output-Data)
2247
- [Java](https://github.com/RLBot/RLBotJavaExample/wiki/Input-and-Output-Data)
2348
- [C#](https://github.com/RLBot/RLBotCSharpExample/wiki/Input-and-Output-Data)
24-
- [Rust](https://docs.rs/rlbot/0.5.0/rlbot/#structs)
2549
- [Nim](https://github.com/RecruitMain707/NimExampleBot/wiki/Data-structure)

docs/v5/botmaking/rendering.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Rendering allows you to draw objects on screen, which can make debugging and tes
66

77
When installing the RLBotGUI, rendering will be disabled by default. You can turn it on by clicking 'Extra' and ticking 'Enable Rendering' in the GUI.
88

9-
RLBot v5 doesn't have any keybinds to toggle rendering mid-match. Mid-match render toggling is a todo item as we figure out the best way to do this.
9+
RLBot v5 doesn't have keybinds to toggle rendering mid-match, but bots and scripts can programmatically request a change. Doing this in the GUI is a work in progress. See [Rendering status](#rendering-status) below.
1010

1111
## Render anchors
1212

@@ -66,6 +66,27 @@ There are a few ways to get around this.
6666

6767
If you absolutely have to re-render a lot of items every frame, you're out of luck.
6868

69+
## Rendering status
70+
71+
In RLBot v5, bots and scripts can check whether rendering is enabled and request changes:
72+
73+
- `renderer.can_render` — Returns `True` if your agent is allowed to render, `False` if rendering has been disabled.
74+
- `update_rendering_status(status, index, is_bot)` — Request that rendering be enabled or disabled for your agent.
75+
Has no effect if rendering is set to `DebugRendering.AlwaysOff` in the match configuration.
76+
- `status``True` to request rendering enabled, `False` to disable it.
77+
- `index` and `is_bot` — Optional; leave as defaults to target your own agent.
78+
79+
See the [RenderingStatus flatbuffer](https://github.com/RLBot/flatbuffers-schema/blob/main/schema/rendering.fbs) for the underlying message structure.
80+
81+
## Text alignment
82+
83+
String renders support horizontal and vertical alignment:
84+
85+
- **`TextHAlign`**: `Left`, `Center`, or `Right`
86+
- **`TextVAlign`**: `Top`, `Center`, or `Bottom`
87+
88+
These work for both `String2D` and `String3D` renders. For example, `Center`/`Center` will center the text on the anchor point.
89+
6990
## Language-specific examples
7091

7192
- [Python](https://github.com/RLBot/python-interface/wiki/Rendering)

docs/v5/community/rlbot-pack.md

Lines changed: 112 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,116 @@
11
# RLBot Pack
22

3-
The RLBotPack is a repository holding frequently requested bots in one convenient place. The main intended users are people joining the discord looking for a fun bot to try out. It may also be useful as a way for people running streams to get an up-to-date version of your bot.
3+
The RLBot Pack is a collection of ready-to-use bots and scripts that any RLBot user can download and play against with a single click. It's the easiest way to discover community-made bots and the recommended source for tournament organizers and streamers.
44

5-
The details for the v5 botpack are still a WIP. However, there are somethings we know for sure:
5+
## For Users: Getting Bots from the Pack
66

7-
- All bots and scripts will be required to compile into a single executable file
8-
- Source code will be submitted to a central repository where a trusted, automated system will build and publish it
7+
The botpack is built into the RLBot GUI. When you open the bot list, bots from the pack appear alongside your local bots. The GUI handles downloading, updating, and launching them automatically.
8+
9+
If you want to browse what's available or check the source code, the botpack lives at **[github.com/RLBot/botpack](https://github.com/RLBot/botpack)**.
10+
11+
## For Bot Makers: Submitting Your Bot
12+
13+
Everyone is welcome to submit their bot or script to the pack. The process is different from v4 — v5 uses a tool called **Bob** to build bots inside Docker containers, producing compiled executables that work without any language runtime dependencies.
14+
15+
### Submission Requirements
16+
17+
| Requirement | Details |
18+
|---|---|
19+
| **Open source** | Your submission must be open source and its repository must contain all necessary files and/or only use public dependencies. |
20+
| **`bot.toml` or `script.toml`** | A properly configured config file (see [Configuration Files](/v5/botmaking/config-files)). You need a unique `agent_id` — strongly prefer the format `<yourname>/<botname>/<version>`. |
21+
| **`bob.toml`** | A build configuration file so Bob can compile and package your bot. See the [examples repository](https://github.com/swz-git/bob-example) for language-specific setups. |
22+
| **License** | Recommended but optional. If you don't include a `LICENSE` file, the botpack defaults to MIT. Your license must allow the botpack to use and distribute your code. |
23+
| **Skill limit** | Your bot must be roughly Grand Champion rank or lower (at most as strong as Nexto). If your bot scores 42 goals before Nexto reaches 28 in any soccar mode, it's too strong. This prevents cheaters from abusing your bot in ranked play. |
24+
25+
### How Bob Works
26+
27+
[Bob](https://github.com/swz-git/bob) builds your bot inside a Docker container, producing a compiled binary that works on Windows and Linux without requiring users to install your language runtime. The botpack uses Bob to generate incremental patches so users only download what changed between releases.
28+
29+
To set up Bob for your bot:
30+
31+
1. Install **Docker** and make sure it's running.
32+
2. Add a `bob.toml` to your bot's repository. The structure varies by language:
33+
34+
**Python (hardcoded bot):**
35+
```toml
36+
[[config]]
37+
project_name = "my-bot"
38+
bot_configs = ["./bot.toml"]
39+
40+
[config.builder_config]
41+
builder_type = "python"
42+
build_mode = "hardcoded"
43+
entrypoint = "bot.py"
44+
requirements = "./requirements.txt"
45+
```
46+
47+
**Python (ML bot, e.g. RLGym):**
48+
```toml
49+
[[config]]
50+
project_name = "my-ml-bot"
51+
bot_configs = ["./bot.toml"]
52+
53+
[config.builder_config]
54+
builder_type = "python"
55+
build_mode = "rlgym"
56+
entrypoint = "bot.py"
57+
requirements = "./requirements.txt"
58+
```
59+
60+
**Rust:**
61+
```toml
62+
[[config]]
63+
project_name = "my-rust-bot"
64+
bot_configs = ["./bot.toml"]
65+
66+
[config.builder_config]
67+
builder_type = "rust"
68+
targets = ["x86_64-pc-windows-gnu", "x86_64-unknown-linux-musl"]
69+
bin_name = "my_bot"
70+
```
71+
72+
**C#:**
73+
```toml
74+
[[config]]
75+
project_name = "my-csharp-bot"
76+
bot_configs = ["./bot.toml"]
77+
78+
[config.builder_config]
79+
builder_type = "csharp"
80+
project = "./MyBot.csproj"
81+
```
82+
83+
**C++ / custom setup:**
84+
```toml
85+
[[config]]
86+
project_name = "my-cpp-bot"
87+
bot_configs = ["./bot.toml"]
88+
89+
[config.builder_config]
90+
builder_type = "custom"
91+
dockerfile = "./dockerfile"
92+
values = { windows_binary = "./mybot.exe", linux_binary = "./mybot" }
93+
```
94+
95+
See the **[bob-example repository](https://github.com/swz-git/bob-example)** for more complete, working examples for each language.
96+
97+
3. Test your build locally: `bob build bob.toml`
98+
4. Submit your bot (see below).
99+
100+
### How to Submit
101+
102+
1. Fork **[github.com/RLBot/botpack](https://github.com/RLBot/botpack)**.
103+
2. Add your bot's repository as a git submodule:
104+
```
105+
git submodule add https://github.com/yourname/your-bot.git
106+
```
107+
3. Open a pull request. A maintainer will review your submission and, once accepted, Bob will automatically build and publish it to the pack.
108+
109+
??? tip "Pre-built binaries aren't accepted"
110+
Bob exists to ensure all bots in the pack are built in a reproducible, trustable environment. Submissions that include pre-built binaries will not be accepted — your source code must be buildable by Bob.
111+
112+
## Licensing
113+
114+
By default, submodules in the botpack fall under the MIT license. If your bot's repository includes its own `LICENSE` file, that license takes precedence — as long as it still allows the botpack to use and distribute your code.
115+
116+
You can request removal of your bot from the botpack at any time by opening an issue or PR on the botpack repository.

docs/v5/framework/sockets-specification.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ If this is not performed, then various functionality will be limited, for exampl
4545
- `CoreMessage.FieldInfo`
4646
- `CoreMessage.ControllableTeamInfo` - sent for bots & scripts. If `AgentId` was invalid or blank, this will be empty.
4747
If this was intentional, continue as normal.
48-
1. Parse `CoreMessage.ControllableTeamInfo` for your `team`, `index`(s), and `spawnId`(s).
48+
1. Parse `CoreMessage.ControllableTeamInfo` for your `team`, `index`(s), and `playerId`(s).
4949
There will be multiple if this is a bot that was designated as a hivemind.
5050
- If `team` is `0` or `1`: `index` will be the index of your bot in `CoreMessage.GamePacket`
5151
- If `team` is `2`: `index` will be the index of your script in `CoreMessage.MatchConfiguration`
52-
1. `identifier` can be used to find your bot/scripts's name in `MatchConfiguration`.
52+
1. `identifier` can be used to find your bot/script's name in `MatchConfiguration`.
5353
- For bots and scripts, `identifier` corresponds to `playerId`/`scriptId` (respectively).
5454
- **DO NOT USE `index` FOR BOTS**, they are not in the correct order in `MatchConfiguration`. Using `index` is ok for scripts but `identifier` can be used for both.
5555
1. Perform heavy initialization.
@@ -68,3 +68,9 @@ Requires the connection handshake to have been performed first. Depending on wha
6868
- Every tick, `BallPrediction` will always be sent before `GamePacket`.
6969
- If `BallPrediction` is not sent, it's because it was disabled in `ConnectionSettings`
7070
- `MatchComm` will arrive in between ticks. The sending of these packets can be disabled in `ConnectionSettings`
71+
- `RenderingStatus` is sent whenever the rendering permission for your agent changes (e.g. the user toggles it in the GUI).
72+
Your agent can also request a change by sending `InterfaceMessage.RenderingStatus` with a new `value`.
73+
If rendering is set to `DebugRendering.AlwaysOff`, requests will be ignored.
74+
- `Ping` packets can be sent by either side to verify connectivity.
75+
- Send `InterfaceMessage.Ping` to RLBotServer. RLBotServer will respond with `CoreMessage.Ping` containing the same `cookie` value.
76+
- The `cookie` field is an arbitrary byte string that can be used to correlate requests with responses.

0 commit comments

Comments
 (0)