-
Notifications
You must be signed in to change notification settings - Fork 116
/
rlbot.fbs
886 lines (765 loc) · 20.2 KB
/
rlbot.fbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
namespace rlbot.flat;
table ControllerState {
/// -1 for full reverse, 1 for full forward
throttle:float;
/// -1 for full left, 1 for full right
steer:float;
/// -1 for nose down, 1 for nose up
pitch:float;
/// -1 for full left, 1 for full right
yaw:float;
/// -1 for roll left, 1 for roll right
roll:float;
/// true if you want to press the jump button
jump:bool;
/// true if you want to press the boost button
boost:bool;
/// true if you want to press the handbrake button
handbrake:bool;
/// true if you want to press the 'use item' button, used in rumble etc.
useItem:bool;
}
table PlayerInput {
playerIndex:int;
controllerState:ControllerState;
}
root_type PlayerInput;
// Values are in "unreal units"
struct Vector3 {
x:float;
y:float;
z:float;
}
/// Expresses the rotation state of an object in Euler angles, with values in radians.
struct Rotator {
pitch:float;
yaw:float;
roll:float;
}
/// Expresses the rotation state of an object.
/// Learn about quaternions here: https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
/// You can tinker with them here to build an intuition: https://quaternions.online/
struct Quaternion {
x:float;
y:float;
z:float;
w:float;
}
table BoxShape {
length:float;
width:float;
height:float;
}
table SphereShape {
diameter:float;
}
table CylinderShape {
diameter: float;
height:float;
}
union CollisionShape { BoxShape, SphereShape, CylinderShape }
table Touch {
/// The name of the player involved with the touch.
playerName:string;
/// Seconds that had elapsed in the game when the touch occurred.
gameSeconds:float;
/// The point of contact for the touch.
location:Vector3;
/// The direction of the touch.
normal:Vector3;
/// The Team which the touch belongs to, 0 for blue 1 for orange.
team:int;
/// The index of the player involved with the touch.
playerIndex:int;
}
table ScoreInfo {
score:int;
goals:int;
ownGoals:int;
assists:int;
saves:int;
shots:int;
demolitions:int;
}
table Physics {
location:Vector3;
rotation:Rotator;
velocity:Vector3;
angularVelocity:Vector3;
}
table PlayerInfo {
physics:Physics;
scoreInfo:ScoreInfo;
isDemolished:bool;
/// True if your wheels are on the ground, the wall, or the ceiling. False if you're midair or turtling.
hasWheelContact:bool;
isSupersonic:bool;
isBot:bool;
/// True if the player has jumped. Falling off the ceiling / driving off the goal post does not count.
jumped:bool;
/// True if player has double jumped. False does not mean you have a jump remaining, because the
/// aerial timer can run out, and that doesn't affect this flag.
doubleJumped:bool;
name:string;
team:int;
boost:int;
hitbox:BoxShape;
hitboxOffset:Vector3;
/// In the case where the requested player index is not available, spawnId will help
/// the framework figure out what index was actually assigned to this player instead.
spawnId: int;
}
table DropShotBallInfo {
absorbedForce:float;
damageIndex:int;
forceAccumRecent:float;
}
table BallInfo {
physics:Physics;
latestTouch:Touch;
dropShotInfo:DropShotBallInfo;
shape:CollisionShape;
}
table BoostPadState {
/// True if the boost can be picked up
isActive:bool;
/// The number of seconds since the boost has been picked up, or 0.0 if the boost is active.
timer:float;
}
enum TileState: byte {
Unknown = 0,
/// The default state of the tiles.
Filled = 1,
/// The state when a tile has been damaged.
Damaged = 2,
/// The state of a tile when it is open and a goal can be scored.
Open = 3
}
table DropshotTile {
/// The amount of damage the tile has sustained.
tileState: TileState;
}
table GameInfo {
secondsElapsed:float;
gameTimeRemaining:float;
isOvertime:bool;
isUnlimitedTime:bool;
/// True when cars are allowed to move, and during the pause menu. False during replays.
isRoundActive:bool;
/// True when the clock is paused due to kickoff, but false during kickoff countdown. In other words, it is true
/// while cars can move during kickoff. Note that if both players sit still, game clock start and this will become false.
isKickoffPause:bool;
/// Turns true after final replay, the moment the 'winner' screen appears. Remains true during next match
/// countdown. Turns false again the moment the 'choose team' screen appears.
isMatchEnded:bool;
worldGravityZ:float;
/// Game speed multiplier, 1.0 is regular game speed.
gameSpeed:float;
/// Tracks the number of physics frames the game has computed.
/// May increase by more than one across consecutive packets.
/// Data type will roll over after 207 days at 120Hz.
frameNum: int;
}
table TeamInfo {
teamIndex:int;
/// number of goals scored.
score:int;
}
table GameTickPacket {
players:[PlayerInfo];
boostPadStates:[BoostPadState];
ball:BallInfo;
gameInfo:GameInfo;
tileInformation:[DropshotTile];
teams:[TeamInfo];
}
root_type GameTickPacket;
/// The state of a rigid body in Rocket League's physics engine.
/// This gets updated in time with the physics tick, not the rendering framerate.
/// The frame field will be incremented every time the physics engine ticks.
table RigidBodyState {
frame:int;
location:Vector3;
rotation:Quaternion;
velocity:Vector3;
angularVelocity:Vector3;
}
/// Rigid body state for a player / car in the game. Includes the latest
/// controller input, which is otherwise difficult to correlate with consequences.
table PlayerRigidBodyState {
state:RigidBodyState;
input:ControllerState;
}
/// Rigid body state for the ball.
table BallRigidBodyState {
state:RigidBodyState;
}
/// Contains all rigid body state information.
table RigidBodyTick {
ball:BallRigidBodyState;
players:[PlayerRigidBodyState];
}
// This section deals with arena information, e.g. where the goals and boost locations are.
table GoalInfo {
teamNum:int;
location:Vector3;
direction:Vector3;
width:float;
height:float;
}
table BoostPad {
location:Vector3;
isFullBoost:bool;
}
table FieldInfo {
boostPads:[BoostPad]; // These will be sorted according to (y * 100 + x), and BoostInfo will be provided in the same order.
goals:[GoalInfo];
}
root_type FieldInfo;
// This section deals with desired game state, useful for teleporting cars around, etc.
struct Float {
val:float;
}
struct Bool {
val:bool;
}
// Values are in "unreal units"
table Vector3Partial {
x:Float;
y:Float;
z:Float;
}
// Values are in radians
table RotatorPartial {
pitch:Float;
yaw:Float;
roll:Float;
}
table DesiredPhysics {
location:Vector3Partial;
rotation:RotatorPartial;
velocity:Vector3Partial;
angularVelocity:Vector3Partial;
}
table DesiredBallState {
physics:DesiredPhysics;
}
table DesiredCarState {
physics:DesiredPhysics;
boostAmount:Float;
jumped:Bool;
doubleJumped:Bool;
}
table DesiredBoostState {
respawnTime:Float;
}
table DesiredGameInfoState {
worldGravityZ:Float;
gameSpeed:Float;
paused:Bool;
endMatch:Bool;
}
/// A console command which we will try to execute inside Rocket League.
/// See https://github.com/RLBot/RLBot/wiki/Console-Commands for a list of known commands.
table ConsoleCommand {
command:string;
}
table DesiredGameState {
ballState:DesiredBallState;
carStates:[DesiredCarState];
boostStates:[DesiredBoostState];
gameInfoState:DesiredGameInfoState;
consoleCommands:[ConsoleCommand];
}
root_type DesiredGameState;
enum RenderType : byte {
DrawLine2D = 1,
DrawLine3D = 2,
DrawLine2D_3D = 3,
DrawRect2D = 4,
DrawRect3D = 5,
DrawString2D = 6,
DrawString3D = 7,
DrawCenteredRect3D = 8
}
table Color {
a: ubyte = 0;
r: ubyte = 0;
g: ubyte = 0;
b: ubyte = 0;
}
table RenderMessage {
renderType: RenderType = 1;
color: Color;
/// For 2d renders this only grabs x and y
start: Vector3;
/// For 2d renders this only grabs x and y
end: Vector3;
/// Scales the x size of the text/rectangle, is used for rectangles assuming an initial value of 1
scaleX: int = 1;
/// Scales the y size of the text/rectangle, is used for rectangles assuming an initial value of 1
scaleY: int = 1;
text: string;
/// Rectangles can be filled or just outlines.
isFilled: bool;
}
table RenderGroup {
renderMessages:[RenderMessage];
/// The id of the render group
id: int;
}
root_type RenderGroup;
enum QuickChatSelection : byte {
Information_IGotIt = 0,
Information_NeedBoost = 1,
Information_TakeTheShot = 2,
Information_Defending = 3,
Information_GoForIt = 4,
Information_Centering = 5,
Information_AllYours = 6,
Information_InPosition = 7,
Information_Incoming = 8,
Compliments_NiceShot = 9,
Compliments_GreatPass = 10,
Compliments_Thanks = 11,
Compliments_WhatASave = 12,
Compliments_NiceOne = 13,
Compliments_WhatAPlay = 14,
Compliments_GreatClear = 15,
Compliments_NiceBlock = 16,
Reactions_OMG = 17,
Reactions_Noooo = 18,
Reactions_Wow = 19,
Reactions_CloseOne = 20,
Reactions_NoWay = 21,
Reactions_HolyCow = 22,
Reactions_Whew = 23,
Reactions_Siiiick = 24,
Reactions_Calculated = 25,
Reactions_Savage = 26,
Reactions_Okay = 27,
Apologies_Cursing = 28,
Apologies_NoProblem = 29,
Apologies_Whoops = 30,
Apologies_Sorry = 31,
Apologies_MyBad = 32,
Apologies_Oops = 33,
Apologies_MyFault = 34,
PostGame_Gg = 35,
PostGame_WellPlayed = 36,
PostGame_ThatWasFun = 37,
PostGame_Rematch = 38,
PostGame_OneMoreGame = 39,
PostGame_WhatAGame = 40,
PostGame_NiceMoves = 41,
PostGame_EverybodyDance = 42,
/// Custom text chats made by bot makers
MaxPysonixQuickChatPresets = 43,
/// Waste of CPU cycles
Custom_Toxic_WasteCPU = 44,
/// Git gud*
Custom_Toxic_GitGut = 45,
/// De-Allocate Yourself
Custom_Toxic_DeAlloc = 46,
/// 404: Your skill not found
Custom_Toxic_404NoSkill = 47,
/// Get a virus
Custom_Toxic_CatchVirus = 48,
/// Passing!
Custom_Useful_Passing = 49,
/// Faking!
Custom_Useful_Faking = 50,
/// Demoing!
Custom_Useful_Demoing = 51,
/// BOOPING
Custom_Useful_Bumping = 52,
/// The chances of that was 47525 to 1*
Custom_Compliments_TinyChances = 53,
/// Who upped your skill level?
Custom_Compliments_SkillLevel = 54,
/// Your programmer should be proud
Custom_Compliments_proud = 55,
/// You're the GC of Bots
Custom_Compliments_GC = 56,
/// Are you <Insert Pro>Bot? *
Custom_Compliments_Pro = 57,
/// Lag
Custom_Excuses_Lag = 58,
/// Ghost inputs
Custom_Excuses_GhostInputs = 59,
/// RIGGED
Custom_Excuses_Rigged = 60,
/// Mafia plays!
Custom_Toxic_MafiaPlays = 61,
/// Yeet!
Custom_Exclamation_Yeet = 62,
}
table QuickChat {
quickChatSelection: QuickChatSelection;
/// The index of the player that sent the quick chat
playerIndex: int;
/// True if the chat is team only false if everyone can see it.
teamOnly: bool;
messageIndex: int;
timeStamp: float;
}
root_type QuickChat;
/// A minimal version of player data, useful when bandwidth needs to be conserved.
table TinyPlayer {
location: Vector3;
rotation: Rotator;
velocity: Vector3;
hasWheelContact: bool;
isSupersonic: bool;
team: int;
boost: int;
}
/// A minimal version of the ball, useful when bandwidth needs to be conserved.
table TinyBall {
location: Vector3;
velocity: Vector3;
}
/// A minimal version of the game tick packet, useful when bandwidth needs to be conserved.
table TinyPacket {
players: [TinyPlayer];
ball: TinyBall;
}
table PredictionSlice {
/// The moment in game time that this prediction corresponds to.
/// This corresponds to 'secondsElapsed' in the GameInfo table.
gameSeconds: float;
/// The predicted location and motion of the object.
physics: Physics;
}
table BallPrediction {
/// A list of places the ball will be at specific times in the future.
/// It is guaranteed to sorted so that time increases with each slice.
/// It is NOT guaranteed to have a consistent amount of time between slices.
slices: [PredictionSlice];
}
/// A bot controlled by the RLBot framework
table RLBotPlayer {}
/// A normal human player
table HumanPlayer {}
/// A psyonix bot, e.g. All Star bot
table PsyonixBotPlayer {
botSkill: float;
}
/// A player that Rocket League treats as human, e.g. has a dedicated camera and can do training mode,
/// but is actually controlled by a bot.
table PartyMemberBotPlayer {}
union PlayerClass { RLBotPlayer, HumanPlayer, PsyonixBotPlayer, PartyMemberBotPlayer }
/// The car type, color, and other aspects of the player's appearance.
/// See https://github.com/RLBot/RLBot/wiki/Bot-Customization
table PlayerLoadout {
teamColorId: int;
customColorId: int;
carId: int;
decalId: int;
wheelsId: int;
boostId: int;
antennaId: int;
hatId: int;
paintFinishId: int;
customFinishId: int;
engineAudioId: int;
trailsId: int;
goalExplosionId: int;
loadoutPaint: LoadoutPaint;
/// Sets the primary color of the car to the swatch that most closely matches the provided
/// RGB color value. If set, this overrides teamColorId.
primaryColorLookup:Color;
/// Sets the secondary color of the car to the swatch that most closely matches the provided
/// RGB color value. If set, this overrides customColorId.
secondaryColorLookup:Color;
}
/// Specification for 'painted' items. See https://github.com/RLBot/RLBot/wiki/Bot-Customization
table LoadoutPaint {
carPaintId: int;
decalPaintId: int;
wheelsPaintId: int;
boostPaintId: int;
antennaPaintId: int;
hatPaintId: int;
trailsPaintId: int;
goalExplosionPaintId: int;
}
table PlayerConfiguration {
// Cannot be named 'class' because that breaks Java.
// Cannot be named 'playerClass' because that breaks C#.
variety: PlayerClass;
name: string;
team: int;
loadout: PlayerLoadout;
/// In the case where the requested player index is not available, spawnId will help
/// the framework figure out what index was actually assigned to this player instead.
spawnId: int;
}
enum GameMode : byte {
Soccer,
Hoops,
Dropshot,
Hockey,
Rumble,
Heatseeker
}
enum GameMap : byte {
DFHStadium,
Mannfield,
ChampionsField,
UrbanCentral,
BeckwithPark,
UtopiaColiseum,
Wasteland,
NeoTokyo,
AquaDome,
StarbaseArc,
Farmstead,
SaltyShores,
DFHStadium_Stormy,
DFHStadium_Day,
Mannfield_Stormy,
Mannfield_Night,
ChampionsField_Day,
BeckwithPark_Stormy,
BeckwithPark_Midnight,
UrbanCentral_Night,
UrbanCentral_Dawn,
UtopiaColiseum_Dusk,
DFHStadium_Snowy,
Mannfield_Snowy,
UtopiaColiseum_Snowy,
Badlands,
Badlands_Night,
TokyoUnderpass,
Arctagon,
Pillars,
Cosmic,
DoubleGoal,
Octagon,
Underpass,
UtopiaRetro,
Hoops_DunkHouse,
DropShot_Core707,
ThrowbackStadium,
ForbiddenTemple,
RivalsArena,
Farmstead_Night,
SaltyShores_Night,
NeonFields,
DFHStadium_Circuit
}
enum MatchLength : byte {
Five_Minutes,
Ten_Minutes,
Twenty_Minutes,
Unlimited
}
enum MaxScore : byte {
Unlimited,
One_Goal,
Three_Goals,
Five_Goals
}
enum OvertimeOption : byte {
Unlimited,
Five_Max_First_Score,
Five_Max_Random_Team
}
enum SeriesLengthOption : byte {
Unlimited,
Three_Games,
Five_Games,
Seven_Games
}
enum GameSpeedOption : byte {
Default,
Slo_Mo,
Time_Warp
}
enum BallMaxSpeedOption : byte {
Default,
Slow,
Fast,
Super_Fast
}
enum BallTypeOption : byte {
Default,
Cube,
Puck,
Basketball
}
enum BallWeightOption : byte {
Default,
Light,
Heavy,
Super_Light
}
enum BallSizeOption : byte {
Default,
Small,
Large,
Gigantic
}
enum BallBouncinessOption : byte {
Default,
Low,
High,
Super_High
}
enum BoostOption : byte {
Normal_Boost,
Unlimited_Boost,
Slow_Recharge,
Rapid_Recharge,
No_Boost
}
enum RumbleOption : byte {
No_Rumble, // Cannot be named None because that breaks Python.
Default,
Slow,
Civilized,
Destruction_Derby,
Spring_Loaded,
Spikes_Only,
Spike_Rush
}
enum BoostStrengthOption : byte {
One,
OneAndAHalf,
Two,
Ten
}
enum GravityOption : byte {
Default,
Low,
High,
Super_High
}
enum DemolishOption : byte {
Default,
Disabled,
Friendly_Fire,
On_Contact,
On_Contact_FF
}
enum RespawnTimeOption : byte {
Three_Seconds,
Two_Seconds,
One_Seconds,
Disable_Goal_Reset
}
table MutatorSettings {
matchLength: MatchLength;
maxScore: MaxScore;
overtimeOption: OvertimeOption;
seriesLengthOption: SeriesLengthOption;
gameSpeedOption: GameSpeedOption;
ballMaxSpeedOption: BallMaxSpeedOption;
ballTypeOption: BallTypeOption;
ballWeightOption: BallWeightOption;
ballSizeOption: BallSizeOption;
ballBouncinessOption: BallBouncinessOption;
boostOption: BoostOption;
rumbleOption: RumbleOption;
boostStrengthOption: BoostStrengthOption;
gravityOption: GravityOption;
demolishOption: DemolishOption;
respawnTimeOption: RespawnTimeOption;
}
enum ExistingMatchBehavior : byte {
/// Restart the match if any match settings differ. This is the default because old RLBot always worked this way.
Restart_If_Different,
/// Always restart the match, even if config is identical
Restart,
/// Never restart an existing match, just try to remove or spawn cars to match the configuration.
/// If we are not in the middle of a match, a match will be started. Handy for LAN matches.
Continue_And_Spawn,
}
table MatchSettings {
playerConfigurations: [PlayerConfiguration];
gameMode: GameMode;
gameMap: GameMap;
skipReplays: bool;
instantStart: bool;
mutatorSettings: MutatorSettings;
existingMatchBehavior: ExistingMatchBehavior;
enableLockstep: bool;
enableRendering: bool;
enableStateSetting: bool;
autoSaveReplay: bool;
/// The name of a upk file, like UtopiaStadium_P, which should be loaded.
/// If specified, this overrides gameMap. On Steam version of Rocket League,
/// this can be used to load custom map files, but on Epic version it only
/// works on the Psyonix maps. Still useful because maintaining the gameMap
/// enum as new Psyonix maps are added is annoying.
gameMapUpk: string;
}
table QuickChatMessages {
messages: [QuickChat];
}
/// Sent when connecting to RLBot to indicate what type of messages are desired.
/// This could be sent by a bot, or a bot manager governing several bots, an
/// overlay, or any other utility that connects to the RLBot process.
table ReadyMessage {
// If this is set, RLBot will send BallPrediction data back to the client when available.
wantsBallPredictions: bool;
// If this is set, RLBot will send QuickChatMessages to the client when available.
wantsQuickChat: bool;
// If this is set, RLBot will send MessagePacket data back to the client when available.
wantsGameMessages: bool;
}
/// Notification that a player triggers some in-game event, such as:
/// Win, Loss, TimePlayed;
/// Shot, Assist, Center, Clear, PoolShot;
/// Goal, AerialGoal, BicycleGoal, BulletGoal, BackwardsGoal, LongGoal, OvertimeGoal, TurtleGoal;
/// AerialHit, BicycleHit, BulletHit, /*BackwardsHit,*/ JuggleHit, FirstTouch, BallHit;
/// Save, EpicSave, FreezeSave;
/// HatTrick, Savior, Playmaker, MVP;
/// FastestGoal, SlowestGoal, FurthestGoal, OwnGoal;
/// MostBallTouches, FewestBallTouches, MostBoostPickups, FewestBoostPickups, BoostPickups;
/// CarTouches, Demolition, Demolish;
/// LowFive, HighFive;
table PlayerStatEvent
{
/// index of the player associated with the event
playerIndex:int;
/// Event type
statType:string;
}
/// Notification when the local player is spectating another player.
table PlayerSpectate
{
/// index of the player that is being spectated. Will be -1 if not spectating anyone.
playerIndex:int;
}
/// Rocket League is notifying us that some player has moved their controller. This is an *output*
table PlayerInputChange
{
playerIndex: int;
controllerState: ControllerState;
// These are provided by Rocket League, and I'm passing them through. Theoretically they could be
// inferred by jump + pitch + roll, but nice to have clarity.
dodgeForward:float;
dodgeRight:float;
}
union GameMessage
{
PlayerStatEvent,
PlayerSpectate,
PlayerInputChange
}
table GameMessageWrapper
{
Message:GameMessage;
}
/// We have some very small messages that are only a few bytes but potentially sent at high frequency.
/// Bundle them into a packet to reduce the overhead of sending data over TCP.
table MessagePacket
{
messages:[GameMessageWrapper];
// Corresponds with secondsElapsed in GameInfo
gameSeconds: float;
// Corresponds with the frameNum attribute in GameInfo
frameNum: int;
}