vinnymac / PokeNurse

💉 A tool for Pokémon Go to aid in transferring and evolving Pokémon
284 stars 55 forks source link

Parse downloadItemTemplates for base stats #175

Closed vinnymac closed 7 years ago

vinnymac commented 7 years ago

It seems that if you run downloadItemTemplates after the user logs in we can gather tons of information on items, pokemon, as well as moves. We should probably use this instead of the base stats. I am not sure if we can completely drop the base stats, but it looks like if we moved to this entirely we wouldn't have to update the app whenever new pokemon get released. It would automate the process of staying up to date with the movesets/pokemon and make this a lot easier to maintain.

Work for this has started on the parseItemTemplates branch.

As an example, a pidgey in the download template looks like this

{  
   "template_id":"V0016_POKEMON_PIDGEY",
   "pokemon_settings":{  
      "pokemon_id":16,
      "model_scale":1.6799999475479126,
      "type":1,
      "type_2":3,
      "camera":{  
         "disk_radius_m":0.3779999911785126,
         "cylinder_radius_m":0.25200000405311584,
         "cylinder_height_m":0.5040000081062317,
         "cylinder_ground_m":0,
         "shoulder_mode_scale":0.5
      },
      "encounter":{  
         "base_capture_rate":0.4000000059604645,
         "base_flee_rate":0.20000000298023224,
         "collision_radius_m":0.13439999520778656,
         "collision_height_m":0.25200000405311584,
         "collision_head_radius_m":0.12600000202655792,
         "movement_type":1,
         "movement_timer_s":10,
         "jump_time_s":1.399999976158142,
         "attack_timer_s":29
      },
      "stats":{  
         "base_stamina":80,
         "base_attack":85,
         "base_defense":76,
         "dodge_energy_delta":0
      },
      "quick_moves":[  
         219,
         221
      ],
      "cinematic_moves":[  
         80,
         45,
         121
      ],
      "animation_time":[  
         1.666700005531311,
         0.666700005531311,
         1.666700005531311,
         1.833299994468689,
         0,
         1.833299994468689,
         0.800000011920929,
         1.3333330154418945
      ],
      "evolution_ids":[  
         17
      ],
      "evolution_pips":1,
      "rarity":0,
      "pokedex_height_m":0.30000001192092896,
      "pokedex_weight_kg":1.7999999523162842,
      "parent_pokemon_id":0,
      "height_std_dev":0.03750000149011612,
      "weight_std_dev":0.22499999403953552,
      "km_distance_to_hatch":0,
      "family_id":16,
      "candy_to_evolve":12,
      "km_buddy_distance":1,
      "buddy_size":1,
      "model_height":0.30000001192092896
   },
   "item_settings":null,
   "move_settings":null,
   "move_sequence_settings":null,
   "type_effective":null,
   "badge_settings":null,
   "camera":null,
   "player_level":null,
   "gym_level":null,
   "battle_settings":null,
   "encounter_settings":null,
   "iap_item_display":null,
   "iap_settings":null,
   "pokemon_upgrades":null,
   "equipped_badges":null,
   "quest_settings":null,
   "avatar_customization":null
}