-
Notifications
You must be signed in to change notification settings - Fork 0
/
analytics.proto
397 lines (331 loc) · 9.38 KB
/
analytics.proto
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
syntax = "proto3";
package Analytics;
import "google/protobuf/descriptor.proto";
enum RedisKeyType
{
UNKNOWN = 0;
SET = 1;
RPUSH = 2;
HMSET = 3;
}
message PointEvent
{
string radius = 1;
string weight = 2;
}
message LineEvent
{
string radius = 1;
string weight = 2;
}
extend google.protobuf.MessageOptions
{
// how this message will be stored in the redis database
RedisKeyType rediskeytype = 5000;
// this suffix may be optionally used when generating the key value for caching the contents of a message,
// so that multiple types of a given message may be cached, using this suffix prepended to the message type name
string redishmsetkey = 5001;
// use a string literal or the value of a field of the message to further uniquify the redis key by appending a key space suffix
string rediskeysuffix = 5002;
bool useJsonEncoding = 5003;
string objectname = 5005;
}
extend google.protobuf.FieldOptions
{
// this associates a field with an set of enumeration data so that values can be mapped to something readable
string enumkey = 4001;
bool editable = 4002;
int32 expires = 4003;
bool enumflags = 4004;
bool tooltip = 4005;
bool hidden = 4006;
bool enumflagsindexed = 4007;
bool editable_key = 4008;
bool track_event = 4009;
PointEvent point_event = 4012;
LineEvent line_event = 4013;
}
message EditorChangeValue
{
string messageType = 1;
string fieldName = 2;
string payload = 3;
}
message EditorChanges
{
repeated EditorChangeValue changes= 1;
}
message RangeF
{
float min = 1;
float max = 2;
}
message RangeI
{
int32 min = 1;
int32 max = 2;
}
message Vec3
{
float x = 1;
float y = 2;
float z = 3;
}
message Vec3Color
{
float x = 1;
float y = 2;
float z = 3;
uint32 color = 4;
}
message Vec4
{
float x = 1;
float y = 2;
float z = 3;
float w = 4;
}
message Line
{
Vec3 p0 = 1;
Vec3 p1 = 2;
}
message Euler
{
float heading = 1;
float pitch = 2;
float roll = 3;
}
message Material
{
string name = 1;
uint32 contents = 2 [(enumkey)="CONTENT_FLAGS", (enumflags)=true];
uint32 surfaceFlags = 3 [(enumkey)="SURFACE_FLAGS", (enumflags)=true];
bool renderEvents = 4;
}
enum PrimitiveType
{
Triangles = 0;
Lines = 1;
Points = 2;
Quad = 3;
}
message PrimitiveOptions
{
uint32 partIndex = 1 [(editable_key)=true];
uint32 overrideSurfaceFlags = 2 [(editable)=true,(enumkey)="SURFACE_FLAGS", (enumflags)=true];
}
message Primitive
{
PrimitiveType type = 1;
uint32 materialIndex = 2;
PrimitiveOptions options = 3;
float size = 4;
repeated Vec3Color vertices = 5;
}
message Mesh
{
repeated Primitive primitives = 1;
repeated Material materials = 2;
string name = 3;
}
// compression schemes may be utilized to reduce the size of certain message types
enum Compression
{
Compression_None = 0;
Compression_FastLZ = 1;
}
message UTCTime
{
int32 hour = 1;
int32 minute = 2;
int32 second = 3;
int32 day = 4;
int32 month = 5;
int32 year = 6;
}
message GameInfo
{
option (rediskeytype) = SET;
option (useJsonEncoding) = true;
UTCTime timeStamp = 1;
string mapName = 2;
string gameName = 3;
string gameVersion = 4;
}
message GameEnum
{
option (rediskeytype) = HMSET;
option (redishmsetkey) = "enumname";
message EnumPair
{
string name = 1;
int64 value = 2;
}
repeated EnumPair values = 1;
string enumname = 2;
bool isbitfield = 3;
}
message GameNavNotFound
{
option (rediskeytype) = RPUSH;
string mapName = 1;
}
message GameNavAutoDownloaded
{
option (rediskeytype) = RPUSH;
string mapName = 1;
}
message GameAssert
{
option (rediskeytype) = RPUSH;
string condition = 1;
string file = 2;
int32 line = 3;
}
message GameCrash
{
option (rediskeytype) = RPUSH;
string info = 1;
}
message GameMeshData
{
option (rediskeytype) = HMSET;
option (redishmsetkey) = "modelName";
Compression compressionType = 1;
string modelName = 2;
bytes modelBytes = 3;
uint32 modelBytesUncompressed = 4;
}
message GameEntityInfo
{
option (rediskeytype) = HMSET;
option (redishmsetkey) = "entityIndex";
option (objectname) = "Entity(%entityIndex% - %entityName%)";
message Ammo
{
uint32 ammoType = 1 [(enumkey)="AMMO_TYPE"];
uint32 ammoCount = 2;
}
string entityName = 1;
int32 entityIndex = 2;
int32 entitySerial = 3;
int32 groupId = 4 [(enumkey)="GROUP_ID"];
int32 classId = 5 [(enumkey)="CLASS_ID"];
int32 team = 6 [(enumkey)="TEAM_ID"];
int64 entityFlags = 7 [(enumkey)="ENTITY_FLAGS", (enumflagsindexed)=true];
int32 category = 8 [(enumkey)="CATEGORY_ID", (enumflagsindexed)=true];
int32 powerUps = 9 [(enumkey)="POWERUP_ID", (enumflagsindexed)=true];
int64 navFlags = 10 [(enumkey)="NAV_FLAGS"];
Vec3 eulerRotation = 11 [(hidden)=true];
Vec3 position = 12 [(hidden)=true];
Vec3 eyeOffset = 13 [(hidden)=true];
Vec3 eyeDir = 14 [(hidden)=true];
RangeI health = 15;
RangeI armor = 16;
Vec3 boundsMin = 17;
Vec3 boundsMax = 18;
repeated Ammo ammo = 19;
bool deleted = 1000 [(hidden)=true];
}
message GameEntityPosition
{
option (rediskeytype) = RPUSH;
Vec3 position = 1 [(point_event).radius = "32", (point_event).weight = "1"];
int32 team = 2 [(enumkey)="TEAM_ID", (track_event)=true];
}
message GameNode
{
option (rediskeytype) = HMSET;
option (redishmsetkey) = "nodePath";
string nodePath = 1 [(editable_key)=true];
Vec3 eulerRotation = 2;
Vec3 translation = 3;
string meshName = 4;
int32 entityId = 10;
string entityName = 11;
int32 activeState = 12 [(enumkey)="MODEL_STATE"];
int64 navFlagsActive = 13 [(enumkey)="NAV_FLAGS"];
int64 navFlagsOverride= 14 [(enumkey)="NAV_FLAGS", (editable)=true];
int32 shapeMode = 15 [(enumkey)="SHAPEMODE", (editable)=true];
}
message GameWeaponFired
{
option (rediskeytype) = RPUSH;
option (useJsonEncoding) = true;
Vec3 position = 1 [(point_event).radius = "64", (point_event).weight = "1"];
int32 attackTeam = 2 [(enumkey)="TEAM_ID", (track_event)=true];
int32 weaponId = 3 [(enumkey)="WEAPON_ID", (track_event)=true];
int32 firedByClass = 4 [(enumkey)="CLASS_ID", (track_event)=true];
}
message GameDeath
{
option (rediskeytype) = RPUSH;
Vec3 position = 1 [(point_event).radius = "32", (point_event).weight = "1"];
int32 victimTeam = 2 [(enumkey)="TEAM_ID", (track_event)=true];
int32 attackTeam = 3 [(enumkey)="TEAM_ID", (track_event)=true];
string meansOfDeath = 4 [(track_event)=true];
}
message GameKilledSomeone
{
option (rediskeytype) = RPUSH;
Vec3 position = 1 [(point_event).radius = "32", (point_event).weight = "1"];
int32 victimTeam = 2 [(enumkey)="TEAM_ID", (track_event)=true];
int32 attackTeam = 3 [(enumkey)="TEAM_ID", (track_event)=true];
string meansOfDeath = 4 [(track_event)=true];
}
message GameRecieveDamage
{
option (rediskeytype) = RPUSH;
Vec3 position = 1 [(point_event).radius = "32", (point_event).weight = "damageAmount"];
int32 victimTeam = 2 [(enumkey)="TEAM_ID", (track_event)=true];
int32 attackTeam = 3 [(enumkey)="TEAM_ID", (track_event)=true];
int32 weaponId = 4 [(enumkey)="WEAPON_ID", (track_event)=true];
string damageType = 5 [(track_event)=true];
float damageAmount = 6;
}
message GameInflictDamage
{
option (rediskeytype) = RPUSH;
Vec3 position = 1 [(point_event).radius = "32", (point_event).weight = "damageAmount"];
int32 victimTeam = 2 [(enumkey)="TEAM_ID", (track_event)=true];
int32 attackTeam = 3 [(enumkey)="TEAM_ID", (track_event)=true];
int32 weaponId = 4 [(enumkey)="WEAPON_ID", (track_event)=true];
string damageType = 5 [(track_event)=true];
float damageAmount = 6;
}
message GameRadiusDamage
{
option (rediskeytype) = RPUSH;
option (useJsonEncoding) = true;
Vec3 position = 1 [(point_event).radius = "damageRadius", (point_event).weight = "damageAmount"];
string damageType = 2;
float damageAmount = 3;
float damageRadius = 4;
}
message GameNavigationStuck
{
option (rediskeytype) = RPUSH;
int32 entityId = 1;
Vec3 position = 2 [(point_event).radius = "32", (point_event).weight = "1"];
}
message GameVoiceMacro
{
option (rediskeytype) = RPUSH;
int32 entityId = 1;
int32 voiceMacro = 2 [(enumkey)="VOICE_MACRO", (track_event)=true];
Vec3 position = 3 [(point_event).radius = "32", (point_event).weight = "1"];
}
enum LogType
{
Log = 0;
Warning = 1;
Error = 3;
}
message GameLogMessage
{
option (rediskeytype) = RPUSH;
LogType logType = 1;
string logMessage = 2;
string logExtraInfo = 3;
}