Skip to content

Commit 198efca

Browse files
Adjust dropshot info
1 parent 12e0fca commit 198efca

File tree

1 file changed

+63
-61
lines changed

1 file changed

+63
-61
lines changed

docs/v5/botmaking/dropshot.md

Lines changed: 63 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
!!! warning "RLBot does not have access to tile data or ball energy levels"
2+
Currently, RLBot v5 does not have access to the position or state information of individual dropshot tiles nor the ball energy level described on this page.
3+
These features were lost with the Psyoninx API. Long term, we hope to return this data to RLBot.
4+
15
To make RLBot start a Dropshot game you have to set the following values in `match.toml`:
26

37
```toml
@@ -6,9 +10,6 @@ game_mode = "Dropshot"
610
game_map_upk = "ShatterShot_P"
711
```
812

9-
??? warning "RLBot doesn't have access to individual tile data"
10-
RLBot v5 currently doesn't have access to the position or state information of individual dropshot tiles. This is a known issue that was present in RLBot v4, but this information might return.
11-
1213
## Tiles
1314

1415
There are 140 tiles in total.
@@ -19,60 +20,6 @@ The tiles are hexagonal in shape. The distance between centres is 768 uu (except
1920

2021
![A Dropshot tile's dimensions](/img/dropshot/tiles.png)
2122

22-
## Goals
23-
24-
There are 2 goals under the floor, one per team.
25-
26-
Locations and owning team can be found in the agent's FieldInfo as GoalInfo objects. In Python `self.field_info.goals` will be a list of the goals with following attributes:
27-
28-
```python
29-
class GoalInfo:
30-
team_num: int
31-
location: Vector3
32-
direction: Vector3
33-
width: float
34-
height: float
35-
```
36-
37-
Example: To access the location of tile 0 in Python, write: `self.field_info.goals[0].location`
38-
39-
The goals provided are as follows:
40-
41-
```rust
42-
[
43-
GoalInfo {
44-
team_num: 0,
45-
location: Vector3 {
46-
x: 0.0,
47-
y: -4430.0,
48-
z: -1040.0,
49-
},
50-
direction: Vector3 {
51-
x: -8.742278e-8,
52-
y: -0.0,
53-
z: 1.0,
54-
},
55-
width: 5408.0,
56-
height: 12640.0,
57-
},
58-
GoalInfo {
59-
team_num: 1,
60-
location: Vector3 {
61-
x: 0.0,
62-
y: 4430.0,
63-
z: -1040.0,
64-
},
65-
direction: Vector3 {
66-
x: -8.742278e-8,
67-
y: -0.0,
68-
z: 1.0,
69-
},
70-
width: 5408.0,
71-
height: 12640.0,
72-
},
73-
]
74-
```
75-
7623
## Arena
7724

7825
The tiles are layed out in rows of `7,8,9,10,11,12,13 |middle| 13,12,11,10,9,8,7`. Where tile 0 is in the blue corner (back left if you are on blue team) and tile 139 is in an orange corner (back left if you are on the orange team).
@@ -95,7 +42,7 @@ Note that the tiles on the boundaries are not complete - the rounded base of the
9542

9643
You may notice that tiles' locations are at z=0, but floor level is z=3.2. This is because the tiles have a thickness.
9744

98-
#### Within arena script
45+
**Within arena script**
9946

10047
Here's a small script to check if a point is within the arena:
10148

@@ -121,20 +68,21 @@ def is_within_arena(point: Vector3) -> bool:
12168

12269
Ball radius: 102.24 uu
12370

124-
The ball has three phases.
71+
The ball has three stages of charge.
12572

12673
- 0: Normal
12774
- 1: Charged
12875
- 2: Super Charged
12976

130-
The ball gains charge as it is hit by cars. When a car exerts a force on the ball, the ball charges up equal to the magnitude of the force (energy). The ball enters the next phase when it reaches a certain threshold:
77+
The ball gains charge as it is hit by cars. When a car exerts a force on the ball, the ball charges up equal to the magnitude of the force (energy). The ball enters the next stage when it reaches a certain threshold:
13178

13279
- Charged: 2500 energy
13380
- Super Charged: 11000 energy
13481

13582
However, a hit does not always charge the ball. To make the ball charge up, the impact must be at least 500 energy, otherwise the ball will not charge at all. Furthermore, when the ball gets hit, it will temporarily accept less energy. The variable `force_accum_recent` stores the accumulated absorbed force (energy), but no more than 2500 energy. It decays over time at a rate of 2500 energy per second, and the ball will at most absorb `2500 - force_accum_recent` energy on a hit. Combined, this prevents players from charging the ball too quickly, limited to 2500 energy every second.
13683

137-
*Example: if you hit the ball with an impact of 2000 uu/s at t=0, and you hit the ball again with a force of 2000 uu/s at t=0.5, the `force_accum_recent` has decayed by 1250 and will be 750 when you hit the ball the second time, and therefore the ball will not accept more than 1750 energy, which means 250 energy gets lost.*
84+
??? example "Ball Charging Example"
85+
If you hit the ball with an impact of 2000 uu/s at t=0, then the balls energy as well as `force_accum_recent` becomes 2000. A half second later at t=0.5, the `force_accum_recent` has decreased by 1250 and is at 750. If you at t=0.5 hit the ball again with a force of 2000 uu/s, the ball will not accept more than 1750 energy (2500 - `force_accum_recent`), which means 250 energy gets lost.
13886

13987
The ball's charge is reset, whenever it damages a floor tile owned by the opponent of whoever last touched the ball. To make damage the ball must hit the tile with a velocity of 250 uu/s or more perpendicular to the surface of contact. The side of a tile can only be hit if there's an open tile next to it, so usually the ball will hit the top of the tiles, and in those cases only the Z velocity matters, and must be 250 uu/s or more to make damage. There is also must have passed 0.2 seconds since the last time the ball damaged a tile.
14088

@@ -162,3 +110,57 @@ Kickoff spawn locations are similar to soccar spawn locations, but not identical
162110
## Boost regeneration
163111

164112
In Dropshot you regenerate boost at a rate of about 10 boost/sec. However, you do not regen boost while boosting. When you stop boosting (or run out of boost), there is a delay of about 0.5 second before you start gaining boost again. If you are at 0 boost and boost button is pressed, the timer will reset every 0.5 seconds until the button is released.
113+
114+
## Goals
115+
116+
There are 2 goals under the floor, one per team.
117+
118+
Locations and owning team can be found in the agent's FieldInfo as GoalInfo objects. In Python `self.field_info.goals` will be a list of the goals with following attributes:
119+
120+
```python
121+
class GoalInfo:
122+
team_num: int
123+
location: Vector3
124+
direction: Vector3
125+
width: float
126+
height: float
127+
```
128+
129+
Example: To access the location of the blue goal in Python, write: `self.field_info.goals[0].location`
130+
131+
The goals provided are as follows:
132+
133+
```rust
134+
[
135+
GoalInfo {
136+
team_num: 0,
137+
location: Vector3 {
138+
x: 0.0,
139+
y: -4430.0,
140+
z: -1040.0,
141+
},
142+
direction: Vector3 {
143+
x: -8.742278e-8,
144+
y: -0.0,
145+
z: 1.0,
146+
},
147+
width: 5408.0,
148+
height: 12640.0,
149+
},
150+
GoalInfo {
151+
team_num: 1,
152+
location: Vector3 {
153+
x: 0.0,
154+
y: 4430.0,
155+
z: -1040.0,
156+
},
157+
direction: Vector3 {
158+
x: -8.742278e-8,
159+
y: -0.0,
160+
z: 1.0,
161+
},
162+
width: 5408.0,
163+
height: 12640.0,
164+
},
165+
]
166+
```

0 commit comments

Comments
 (0)