MoT3rror / egginc-coop-tracker

0 stars 1 forks source link

Get Boost Token Info #21

Closed MoT3rror closed 3 years ago

MoT3rror commented 3 years ago

Unclaim tokens may be possible to get without glitching the game:

https://github.com/fanaticscripter/EggContractor/blob/master/misc/protobuf/ei.proto#L167-L170

ayavilevich commented 3 years ago

Interesting. This "sImulation" object doesn't seem to be part of fantasticscripter's protobuf in use https://github.com/fanaticscripter/EggContractor/blob/master/api/egginc.proto

We can try to add this to our https://github.com/MoT3rror/egginc-coop-tracker/blob/master/js/Proto/egginc.proto and see what we get.

I should have some availability again in a few more days. If you want you can assign this to me and I will check.

ayavilevich commented 3 years ago

note, need to be careful not to glitch it. here is an explanation of the possible issue: https://github.com/fanaticscripter/EggContractor/blob/e70c9f1e6e9f730ffbdd21b6d37777bd18590399/api/egginc.proto#L489

ayavilevich commented 3 years ago

ok, nm, "Simulation" is just something we call "Farms" https://github.com/MoT3rror/egginc-coop-tracker/blob/master/js/Proto/egginc.proto#L127

we currently stop at item 21. all we need to do is add definitions for more of the items.

        repeated ActiveBoost active_boosts = 22;
        optional uint32 time_cheats_detected = 23;
        optional double time_cheat_debt = 24;
        optional uint32 boost_tokens_received = 25;
        optional uint32 boost_tokens_spent = 26;
        optional uint32 boost_tokens_given = 28;
        optional uint32 unclaimed_boost_tokens = 27;
        optional double gametime_until_next_boost_token = 29;
MoT3rror commented 3 years ago

I don't think you will glitch it at all since this part of the backup. It is also possible this data isn't available till the user opens the app.

ayavilevich commented 3 years ago

Agree that it should not be possible to glitch by just reading the backup.

I will test if the data is available in the new coop that just started today.

btw, I tried to request the backup and when I looked at it is seems that some fields are not in sync with what happens in the game. For example prestigeCashEarned was often less than what I have in the app. Like it take some time for it to update. Any idea why? Is there some caching there? How realtime are the details in the backup?

MoT3rror commented 3 years ago

I am going to guess that the app only updates when an event occurred. This event could be every minute/when research changes a lot. It could also be related to them using multiple servers and how they keep data synced between servers.

ayavilevich commented 3 years ago

Confirming that "unclaimedBoostTokens" holds the needed data. full path: backup.farms[x].unclaimedBoostTokens

also: backup.contracts.currentCoopStatuses[x].gifts lists the gifts. to be seen if this is just unclaimed or if it will list all items even after accepting them.

test again a few times to confirm and see how fast the data is available in the API.

ayavilevich commented 3 years ago

ok, after further tests I am bearing bad news.

unclaimedBoostTokens is the number of tokens that the user has, in his app, but which he hasn't opened yet. So they show as a box in a circle in the top right part of the screen. So user has to open the app and then not open the gift for this to be useful. I think all "unclaimed" fields are just that. Before you open the app and sync you have unclaimedBoostTokens = 0.

One of the tests I have done had was requesting for another user. I guess he has done just that.

"gifts" shows the list of what makes unclaimedBoostTokens. I got this for another user but was not able to get this for my own user when testing. It is just missing. So I am not sure what makes this appear or not. I am also not sure if it will populate once gift was sent but before opening the app.

@MoT3rror I can provide samples in a private channel.