-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathegginc.proto
595 lines (535 loc) · 15.3 KB
/
egginc.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
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
syntax = "proto3";
option go_package = "github.com/fanaticscripter/EggContractor/api";
// http://afx-2-dot-auxbrainhome.appspot.com/ei/first_contact
message FirstContactRequestPayload {
BasicRequestInfo rinfo = 8;
string ei_user_id = 4;
string user_id = 1; // old style user ID, now game_services_id;
// using this seens to cause API response to return a
// pre-artifact backup; don't set post-artifact.
string game_services_id = 7; // old style user ID, e.g. G:1234567890
string device_id = 5; // A UUID
string username = 6;
uint32 client_version = 2;
Platform platform = 3;
}
message BasicRequestInfo {
string ei_user_id = 1;
uint32 client_version = 2;
string version = 3;
string build = 4;
string platform = 5;
}
enum Platform {
INVALID_PLATFORM = 0; // proto3 requires first enum value to be 0.
IOS = 1;
DROID = 2;
}
message FirstContactResponsePayload {
FirstContact payload = 1;
string _2 = 2; // unknown, a 256-bit signature/MAC
}
// Partially reverse engineered.
message FirstContact {
message Payload {
string user_id = 1;
string ei_user_id = 18;
string game_services_id = 16;
string device_id = 17;
string user_name = 2;
double approx_timestamp = 3;
uint32 version = 21;
bool force_offer_backup = 20;
bool force_backup = 22;
message Settings {
int32 sfx = 1;
int32 music = 2;
int32 notifications = 6;
int32 low_performance = 10;
int32 advertising = 14;
int32 developer_analytics_1 = 22; // Both toggle together
int32 developer_analytics_2 = 23;
double backup_timestamp = 24; // epoch timestamp
}
Settings settings = 4;
message Stats {
int32 drone_takedowns = 6;
repeated double farm_eggs_laid = 8; // One entry for each egg type.
int32 prestiges = 9;
int32 elite_drone_takedowns = 10;
int32 piggy_level = 11;
int32 boosts_used = 13;
}
Stats stats = 6;
message Progress {
uint64 lifetime_golden_eggs = 2;
uint64 lifetime_golden_eggs_spent = 3;
double prestige_earnings = 5;
double lifetime_earnings = 6;
uint64 piggy_bank = 7;
int32 permit_level = 8; // 0 - standard permit; 1 - pro permit
repeated EpicResearch epic_researches = 9;
repeated int64 max_farm_populations_reached = 18; // One entry for
// each egg type.
repeated TrophyType farm_trophy_level = 19; // One entry for
// each egg type.
int32 prophecy_eggs = 23;
int32 num_daily_gifts_collected = 28;
message Boost {
string id = 1;
int32 count = 2;
}
repeated Boost boosts = 30;
double soul_eggs = 34;
}
Progress progress = 7;
repeated Farm farms = 12;
message Contracts {
repeated Contract active_contracts = 1;
repeated Contract past_contracts = 2;
repeated string contract_ids = 3;
repeated CoopStatus active_coop_statuses = 4;
}
Contracts contracts = 13;
// WARNING: Defaults not applied due to proto3 limitations!
message Artifacts {
bool infusing = 1;
ArtifactInventoryItem item_being_infused = 2;
ArtifactSpec spec_being_infused = 13;
EggType egg_type_infusing = 3;
double infusing_eggs_required = 4;
double eggs_infused = 5;
double flow_percentage_artifacts = 6; // [default = 0.5];
bool fueling_enabled = 7; // [default = true];
bool infusing_enabled = 8; // [default = true];
MissionInfo.Spaceship last_fueled_ship = 9;
double inventory_score = 10;
bool enabled = 11;
bool intro_shown = 12;
}
Artifacts artifacts = 14;
ArtifactsDB artifacts_db = 15;
}
Payload data = 1;
}
message Farm {
EggType egg_type = 1;
double prestige_earnings = 2;
double _3 = 3; // on the same order of prestige_earnings but smaller,
// not sure what it is; gift earnings maybe?
double last_saved = 5; // epoch timestamp
int64 chicken_count = 6;
double eggs_laid = 9;
double eggs_paid_for = 10; // the only difference with eggs_laid seems to be
// that eggs_laid is not rounded, and this is
// rounded down.
int32 silos_owned = 11;
repeated int32 habitat_types = 12;
repeated int64 habitat_populations = 13;
repeated int32 vehicle_types = 17;
repeated int32 train_lengths = 21;
repeated Research researches = 18;
string contract_id = 20; // empty for home farm
// 22 is a list of active boosts
}
enum EggType {
INVALID_EGG = 0; // proto3 requires first enum value to be 0.
EDIBLE = 1;
SUPERFOOD = 2;
MEDICAL = 3;
ROCKET_FUEL = 4;
SUPER_MATERIAL = 5;
FUSION = 6;
QUANTUM = 7;
IMMORTALITY = 8;
TACHYON = 9;
GRAVITON = 10;
DILITHIUM = 11;
PRODIGY = 12;
TERRAFORM = 13;
ANTIMATTER = 14;
DARK_MATTER = 15;
AI = 16;
NEBULA = 17;
UNIVERSE = 18;
ENLIGHTENMENT = 19;
// Contract-only eggs.
CHOCOLATE = 100;
EASTER = 101;
WATERBALLOON = 102;
FIREWORK = 103;
PUMPKIN = 104;
// Placeholder for undiscovered eggs.
UNKNOWN = 1000;
}
enum TrophyType {
NO_TROPHY = 0;
BRONZE = 1;
SILVER = 2;
GOLD = 3;
PLATINUM = 4;
DIAMOND = 5;
}
message Research {
string id = 1;
int32 level = 2;
}
message EpicResearch {
string id = 1;
int32 level = 2;
}
message Contract {
ContractProperties props = 1;
string code = 2;
double started = 3; // epoch timestamp
int32 _4 = 4; // unknown; example: 1
double production_deadline = 5; // epoch timestamp
double completed_goal = 6;
int32 _7 = 7; // unknown; example: 1
double collection_deadline = 9; // epoch timestamp
// 2 days after production deadline
int32 _10 = 10; // unknown; example: 10
double player_contribution = 11;
string player_id = 13;
int32 num_goals_completed = 14;
int32 _15 = 15; // unknown; example: 1
}
// ContractProperties contains player/session-agnostic properties of a contract.
message ContractProperties {
string id = 1;
EggType egg_type = 2;
repeated Reward rewards = 3; // seems always for elite
// for standard rewards, check reward_tiers[1]
bool coop_allowed = 4;
int32 max_coop_size = 5;
double expiry_timestamp = 6;
double duration_seconds = 7; // total time to complete
string name = 9;
string description = 10;
bool debug = 11;
int32 max_boosts = 12;
double max_soul_eggs = 13;
int32 min_client_version = 14;
double token_interval_minutes = 15;
message RewardTier {
repeated Reward rewards = 1;
}
repeated RewardTier reward_tiers = 16;
}
message Reward {
int32 _1 = 1;
double goal = 2;
RewardType type = 3;
string name = 4;
double count = 5;
double _6 = 6; // unknown; maybe a difficulty indicator?
}
enum RewardType {
INVALID_REWARD = 0; // proto3 requires first enum value to be 0.
// Never encountered 1.
GOLDEN_EGG = 2;
SOUL_EGG = 3;
PROPHECY_EGG = 4;
EPIC_RESEARCH = 5;
PIGGY_GOLDEN_EGG = 6;
PIGGY_MULTIPLY = 7; // e.g. xmas-trash "Quantum Trash Bag"
// (type:7, name:"subtype", count:2)
PIGGY_LEVEL_UP = 8;
BOOST = 9;
}
message ArtifactsDB {
repeated ArtifactInventoryItem inventory_items = 1;
uint64 item_sequence = 2;
repeated InventorySlot inventory_slots = 3;
message ActiveArtifactSlot {
bool occupied = 1;
uint64 item_id = 2;
}
repeated ActiveArtifactSlot active_artifacts = 7;
message ActiveArtifactSet {
repeated ActiveArtifactSlot slots = 1;
}
repeated ActiveArtifactSet active_artifact_sets = 11;
repeated ArtifactSpec discovered_artifacts = 8;
message CraftableArtifact {
ArtifactSpec spec = 1;
bool seen = 2;
uint32 count = 3;
}
repeated CraftableArtifact craftable_artifacts = 9;
repeated CraftableArtifact crafting_counts = 10;
repeated MissionInfo mission_infos = 4;
repeated MissionInfo mission_archive = 5;
}
message ArtifactSpec {
enum Name {
LUNAR_TOTEM = 0;
NEODYMIUM_MEDALLION = 3;
BEAK_OF_MIDAS = 4;
LIGHT_OF_EGGENDIL = 5;
DEMETERS_NECKLACE = 6;
VIAL_MARTIAN_DUST = 7;
ORNATE_GUSSET = 8;
THE_CHALICE = 9;
BOOK_OF_BASAN = 10;
PHOENIX_FEATHER = 11;
TUNGSTEN_ANKH = 12;
AURELIAN_BROOCH = 21;
CARVED_RAINSTICK = 22;
PUZZLE_CUBE = 23;
QUANTUM_METRONOME = 24;
SHIP_IN_A_BOTTLE = 25;
TACHYON_DEFLECTOR = 26;
INTERSTELLAR_COMPASS = 27;
DILITHIUM_MONOCLE = 28;
TITANIUM_ACTUATOR = 29;
MERCURYS_LENS = 30;
TACHYON_STONE = 1;
DILITHIUM_STONE = 31;
SHELL_STONE = 32;
LUNAR_STONE = 33;
SOUL_STONE = 34;
PROPHECY_STONE = 39;
QUANTUM_STONE = 36;
TERRA_STONE = 37;
LIFE_STONE = 38;
CLARITY_STONE = 40;
EXTRATERRESTRIAL_ALUMINUM = 13;
ANCIENT_TUNGSTEN = 14;
SPACE_ROCKS = 15;
ALIEN_WOOD = 16;
GOLD_METEORITE = 17;
TAU_CETI_GEODE = 18;
CENTAURIAN_STEEL = 19;
ERIDANI_FEATHER = 20;
DRONE_PARTS = 35;
CELESTIAL_BRONZE = 41;
LALANDE_HIDE = 42;
SOLAR_TITANIUM = 43;
TACHYON_STONE_FRAGMENT = 2;
DILITHIUM_STONE_FRAGMENT = 44;
SHELL_STONE_FRAGMENT = 45;
LUNAR_STONE_FRAGMENT = 46;
SOUL_STONE_FRAGMENT = 47;
PROPHECY_STONE_FRAGMENT = 48;
QUANTUM_STONE_FRAGMENT = 49;
TERRA_STONE_FRAGMENT = 50;
LIFE_STONE_FRAGMENT = 51;
CLARITY_STONE_FRAGMENT = 52;
UNKNOWN = 10000;
}
Name name = 1;
enum Level {
INFERIOR = 0;
LESSER = 1;
NORMAL = 2;
GREATER = 3;
SUPERIOR = 4;
}
Level level = 2;
enum Rarity {
COMMON = 0;
RARE = 1;
EPIC = 2;
LEGENDARY = 3;
}
Rarity rarity = 3;
EggType egg = 4;
enum Type {
ARTIFACT = 0;
STONE = 1;
INGREDIENT = 2;
STONE_INGREDIENT = 3;
}
}
message ArtifactInventoryItem {
uint64 item_id = 1;
CompleteArtifact artifact = 2;
double quantity = 3;
string server_id = 4;
}
message CompleteArtifact {
ArtifactSpec spec = 1;
repeated ArtifactSpec stones = 2;
}
message InventorySlot {
bool occupied = 1;
uint32 item_id = 2;
}
message MissionInfo {
enum Spaceship {
CHICKEN_ONE = 0;
CHICKEN_NINE = 1;
CHICKEN_HEAVY = 2;
BCR = 3;
MILLENIUM_CHICKEN = 4;
CORELLIHEN_CORVETTE = 5;
GALEGGTICA = 6;
CHICKFIANT = 7;
VOYEGGER = 8;
HENERPRISE = 9;
}
Spaceship ship = 1;
enum Status {
FUELING = 0;
PREPARE_TO_LAUNCH = 5;
EXPLORING = 10;
RETURNED = 15;
ANALYZING = 16;
COMPLETE = 20;
ARCHIVED = 25;
}
Status status = 2;
enum DurationType {
SHORT = 0;
LONG = 1;
EPIC = 2;
TUTORIAL = 3;
}
DurationType duration_type = 3;
message Fuel {
EggType egg = 1;
double amount = 2;
}
repeated Fuel fuel = 4;
double duration_seconds = 5;
double seconds_remaining = 6;
string identifier = 7;
double start_time_derived = 8;
uint32 capacity = 9;
string mission_log = 10;
}
// http://afx-2-dot-auxbrainhome.appspot.com/ei/coop_status
message CoopStatusRequestPayload {
string contract_id = 1;
string code = 2;
string player_id = 3;
}
message CoopStatusResponsePayload {
CoopStatus status = 1;
string _2 = 2; // unknown, a 256-bit signature/MAC
}
message CoopStatus {
string contract_id = 1;
double eggs_laid = 2;
string code = 3;
message Member {
string id = 1;
string name = 2;
double eggs_laid = 3;
bool active = 4; // "snoozers" who haven't reported in in 24 hours
// have this field set to false
int32 _5 = 5; // unknown; example: 1 or 2
double eggs_per_second = 6;
int32 _7 = 7; // unknown; example: 7
double earning_bonus_oom = 11; // EB is 10^(earning_bonus_oom + 2)%
int32 tokens = 12;
}
repeated Member members = 4;
double seconds_until_production_deadline = 5;
int32 _6 = 6; // unknown, maybe bool; example: 0
double seconds_until_collection_deadline = 7;
int32 _8 = 8; // unknown, maybe bool; example: 0
string creator_id = 9;
bool public = 10;
message TokenGift {
string gifter_id = 1;
int32 tokens = 2;
string gifter_name = 3;
}
// token_gifts is only available if player_id is specified in
// CoopStatusRequestPayload, and only gifts for the requested player are
// returned.
//
// WARNING: gifts are only returned once, meaning that if you intercept a
// response carrying gifts without feeding it to the game, the gifts would
// simply vanish from game state unless you MITM /coop_status and edit the
// response (which is also an obvious cheating vector to bypass the chore of
// token griding).
repeated TokenGift token_gifts = 11;
}
// http://afx-2-dot-auxbrainhome.appspot.com/ei/get_periodicals
message GetPeriodicalsRequestPayload {
string user_id = 1;
bool piggy_full = 2;
bool piggy_found_full = 3;
double seconds_full_realtime = 4;
double seconds_full_gametime = 5;
uint32 lost_increments = 7;
double soul_eggs = 8;
uint32 current_client_version = 10;
bool debug = 11;
BasicRequestInfo rinfo = 12;
}
message GetPeriodicalsResponsePayload {
Periodicals periodicals = 1;
string _2 = 2; // unknown, a 256-bit signature/MAC
}
message Periodicals {
message Sales {
repeated Sale sales = 1;
}
Sales sales = 1;
message Events {
repeated Event events = 1;
}
Events events = 2;
message Contracts {
repeated ContractProperties contracts = 1;
double response_timestamp = 2; // epoch seconds; as to why the hell the
// response timestamp is nested in such an
// awkward position, I have no damn clue.
}
Contracts contracts = 3;
}
message Sale {
string sale_type = 1; // Example: "piggy_break"
double seconds_remaining = 2;
string sale_amount = 3; // Example: "40%"; no equivalent numeric field
string id = 4; // Example: "gametime-piggy-sale"
// I'm not actually sure this is an ID
}
message Event {
string id = 1;
double seconds_remaining = 2;
string event_type = 3;
double multiplier = 4; // For discount events, this is the final price
// multiplier, e.g. 0.3 for 70% off research.
string message = 5;
}
// http://afx-2-dot-auxbrainhome.appspot.com/ei_afx/config
message ArtifactsConfigurationRequestPayload {
BasicRequestInfo rinfo = 2;
uint32 client_version = 1;
}
message ArtifactsConfigurationResponsePayload {
ArtifactsConfigurationResponse config = 1;
string _2 = 2; // unknown, a 256-bit signature/MAC
}
message ArtifactsConfigurationResponse {
repeated MissionParameters mission_parameters = 1;
message MissionParameters {
MissionInfo.Spaceship ship = 1;
repeated Duration durations = 3;
message Duration {
MissionInfo.DurationType duration_type = 1;
double seconds = 2;
float quality = 3;
float min_quality = 4;
float max_quality = 5;
uint32 capacity = 6;
}
uint32 capacity_DEPRECATED = 2;
}
repeated ArtifactParameters artifact_parameters = 2;
message ArtifactParameters {
ArtifactSpec spec = 1;
double base_quality = 2;
double odds_multiplier = 4;
double value = 3;
double crafting_price = 5;
double crafting_price_low = 6;
uint32 crafting_price_domain = 7;
double crafting_price_curve = 8;
}
}