Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

PokemonData unknown33 #238

Merged
merged 3 commits into from
Nov 6, 2016
Merged

Conversation

DrDelay
Copy link
Contributor

@DrDelay DrDelay commented Oct 4, 2016

If you have a buddy-pokemon that has earned at least 1 candy this field 33 is part of the PokemonData-response.

This was found looking for a solution to NicklasWallgren/PokemonGoAPI-PHP#142.

Using either of bramp/protoc-gen-php or google/protobuf this surplus field causes an error while decoding.

@vankxr
Copy link

vankxr commented Oct 5, 2016

Do you know the range of the value?

I am thinking it is something like buddy_km_complete since BuddyPokemon from PlayerData doesn't provide enough information to get the km you have already walked with your buddy. Right?

@DrDelay
Copy link
Contributor Author

DrDelay commented Oct 5, 2016

Good guess! I will compare it with the km walked right after work today.

@vankxr
Copy link

vankxr commented Oct 5, 2016

Maybe not buddy_km_distance but total_buddy_km_walked. Re though of that when reading:

The primary obvious difference to me between these two accounts is "buddy test" has 1 buddy candy earned and under single digit km's walked on buddy, and "older buddy" has a substantially larger amount of candies earned and higher km's walked, (double/triple digits). Not sure if this is related, but i'll see if i can test any other accounts to try and isolate.

@voxx at NicklasWallgren/PokemonGoAPI-PHP#142 (comment)

EDIT: It definetly appears to be the total kilometers walked with that buddy, look at this: http://i.imgur.com/1bNB41A.png

Look at this from the Game Master
http://imgur.com/a/jQEwt
They state km_buddy_distance and do the math (UNK33 / buddy_km_distance) and you will get the total candy awarded and a little bit more, since I removed them from buddy before they completed another candy award

@DrDelay
Copy link
Contributor Author

DrDelay commented Oct 5, 2016

You are right, this is what I get for a buddy-Pokémon that has earned a candy:

object(POGOProtos\Data\PokemonData)#18 (34) {
  // (...)
  ["pokemon_id":protected]=>
  object(POGOProtos\Enums\PokemonId)#19 (2) {
    ["value":protected]=>
    int(7)
    ["name":protected]=>
    string(8) "SQUIRTLE"
  }
  // (...)
  ["buddy_candy_awarded":protected]=>
  int(1)
  ["buddy_total_km_walked":protected]=>
  float(3)
}

What bothers me / is strange is that I have a buddy with about 1.5km walked (it shows that in the App on my phone), but no candy earned yet (I'd need to walk a total of 3km). The field is empty for this Pokémon:

object(POGOProtos\Data\PokemonData)#22 (34) {
  // (...)
  ["pokemon_id":protected]=>
  object(POGOProtos\Enums\PokemonId)#23 (2) {
    ["value":protected]=>
    int(4)
    ["name":protected]=>
    string(10) "CHARMANDER"
  }
  // (...)
  ["buddy_candy_awarded":protected]=>
  NULL
  ["buddy_total_km_walked":protected]=>
  NULL
}

So, how does the App know that I already walked 1.5km? The conclusion would be the data is also somewhere else.

@vankxr
Copy link

vankxr commented Oct 5, 2016

Or maybe it only stores the data when you change your buddy, try to change it

@DrDelay
Copy link
Contributor Author

DrDelay commented Oct 6, 2016

It tells me all my progress would be lost if I switched the buddy..

I checked this field in the profile response:

    object(POGOProtos\Data\BuddyPokemon)#24 (5) {
      ["unknownFieldSet":protected]=>
      NULL
      ["extensions":protected]=>
      NULL
      ["id":protected]=>
      int(-1048968017966580097)
      ["start_km_walked":protected]=>
      NULL
      ["last_km_awarded":protected]=>
      NULL
    }

My buddy is linked (by ID), but also here no km count.

If it really only stores the km once 3 is reached instead of really counting up serverside there is tamper potential here (if we were evil people 😈).

@vankxr
Copy link

vankxr commented Oct 7, 2016

I mean, it only stores the km walked on the pokémon data once you change the buddy, although it does not read it back when you switch the buddy again.

@RedSparr0w
Copy link

RedSparr0w commented Oct 7, 2016

if it is stored client side then if you logged into your account on a different device it should show your buddy as 0km walked right?
(Before the km walked is sent to the server based on your 1.5km data not coming in)

@vankxr
Copy link

vankxr commented Oct 7, 2016

Yes, it males sense, but i dont know, just guessing...

@RedSparr0w
Copy link

it would also make sense due to reports of eggs & buddy distance increasing at different rates

@vankxr
Copy link

vankxr commented Oct 7, 2016

@RedSparr0w did you get something? About info Stored clientside

Also, @DrDelay in your last post where you provided the BuddyPokemon proto data, did you move in game after setting the buddy? It can be null because you didnt move, so your km walked didnt update (remember km walked updates are not done "very" frequently)

@AeonLucid
Copy link
Owner

Please let me know if this is still relevant.

@AeonLucid AeonLucid closed this Nov 6, 2016
@DrDelay
Copy link
Contributor Author

DrDelay commented Nov 6, 2016

I think this is still relevant @AeonLucid, I am still receiving the following PokemonData when requesting my inventory:

{
  1: 0x202b7a81cd7e388c
  2: 7
  3: 13
  4: 10
  5: 10
  6: 221
  7: 57
  15: 0x3f031d25
  16: 0x412663e6
  17: 10
  18: 10
  19: 10
  20: 0x3dc08312
  26: 1475152263159
  29: 1
  30: "SquirtlePie"
  32: 1
  33: 0x40400000
}

@vankxr, I just requested the profile again (like a month after setting it and walking 1.1km) and still get this for the BuddyPokemon (no km counts):

{
  1: 0xf1715125345b3e7f
}

Field 33 is also not set for all of my Pokémon. I even wiped all data from the PoGo app of my phone and logged in again, the km were still there. I think we are missing something 😆.

@AeonLucid
Copy link
Owner

@DrDelay So field 33 of PokemonData is float buddy_total_km_walked for sure?

@AeonLucid AeonLucid reopened this Nov 6, 2016
@voxx
Copy link

voxx commented Nov 6, 2016

https://www.diffchecker.com/niL59D8q

Yes, it is, and there are a few additional ones now too. See the diff above. that should give you what you're looking for I think.

-voxx

@AeonLucid AeonLucid merged commit ae1a042 into AeonLucid:master Nov 6, 2016
@AeonLucid
Copy link
Owner

AeonLucid commented Nov 6, 2016

@voxx Is the right one the full 1.13.4 IOS .proto file? If so, where did you obtain it?

@DrDelay DrDelay deleted the patch1-pokemondata-uk33 branch November 6, 2016 21:09
@voxx
Copy link

voxx commented Nov 6, 2016

It's from 0.41.x iirc, but its still relevant, There have been no protos changes since then afaik.

@voxx
Copy link

voxx commented Nov 6, 2016

It was from waryas.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants