Update needed for new Baby Pokémon
Description: We need an update here, with the new Pokémon added. Their data, their family ideas, the evolution info, etc.
I still have the problem that I do not understand how this could be added to this API here. Maybe it's time to plan ahead a bit and find a way for the other Pokémon coming soon?
Somebody can help or advice? I think Pokémon will fail to load, because new Pokémon are not updated here.
Things like these always happen when things are just starting to roll.. :-( Please fix soon!! Thank you so very very much!
tracked my problems down to accessing PokemonMetaRegistry.java for PICHU..
java.lang.NullPointerException at com.pokegoapi.api.pokemon.PokemonDetails.getPokemonFamily(PokemonDetails.java:98) at com.pokegoapi.api.pokemon.PokemonDetails.getCandy(PokemonDetails.java:94) at com.pokegoapi.api.pokemon.Pokemon.canPowerUp(Pokemon.java:178)
Next step.. find way to update PokemonMetaRegistry..
So Evolutions.java, PokemonMetaRegistry.java and PokemonMoveMetaRegistry.java needs to be updated. I did an PR on Evolutions.java and added the baby Pokémon there...
@clangdev just open a copy of PokemonMetaRegistry.java and add the new 2. Gen. Baby Pokémon Meta and shoot a Pull Request
I would do that, but i don't know the right stats. I hoped/expected this MetaRegistry to be generated somehow.
Pretty sure all info is derived by POGOProtos (protobuf) https://github.com/AeonLucid/POGOProtos
https://pokemongo.gamepress.gg/ this site has the latest stats
@clangdev was ist possible to call getPokemonId(), getIvInPercentage() as well as the individuall values and getCP() of Pichu?
sry. currently at work and away from games. calling getPokemonId() is ok. name() and number() is set. Problems occur when I remember right if FamilyId is queried.
@tommywuhaojie: thx, but missing info is by far more complex, like cinematic-move-animation-id.
@clangdev dude could you do me a favour and check if I could get the current CP, IV (attack, stamina, defence) and IV in percent of a baby Pokémon? I do not have a baby Pokémon yet to test it :( ...
//CP, IV (attack, stamina, defence) and IV in percent
System.out.println(pokemon.getPokemonId().getNumber()+"# "+pokemon.getPokemonId().name()+ " CP: "+pokemon.getCp()+" IVA: "+pokemon.getIndividualAttack()+" IVS: "+pokemon.getIndividualStamina()+" IVD: "+pokemon.getIndividualDefense()+" IV%: "+pokemon.getIvInPercentage());
172# PICHU CP: 204 IVA: 14 IVS: 13 IVD: 12 IV%: 86.66
This is not worth saying if POGOProtos has a new version, that counts it is the hash (ie the hash bypass of api) ... But its ... it is not obvious 0.49. 1 required
Quick and dirty fix.. just to get rid of that NPE.. Evolutions.java needs to be updated otherwise and there may occur more NPEs like that with more new babies.
Values are basically quick copy and minimum customized based on Pikachu entry. Just c&p in class-body as static code.
{
PokemonMeta metap;
metap = new PokemonMeta();
metap.setTemplateId(" V0172_POKEMON_PICHU");
metap.setFamily(PokemonFamilyId.FAMILY_PIKACHU);
metap.setPokemonClass(PokemonClass.COMMON);
metap.setType2(PokemonType.NONE);
metap.setPokedexHeightM(0.4);
metap.setHeightStdDev(0.05);
metap.setBaseStamina(70);
metap.setCylRadiusM(0.37);
metap.setBaseFleeRate(0.1);
metap.setBaseAttack(112);
metap.setDiskRadiusM(0.555);
metap.setCollisionRadiusM(0.185);
metap.setPokedexWeightKg(6);
metap.setMovementType(MovementType.NORMAL);
metap.setType1(PokemonType.ELECTRIC);
metap.setCollisionHeadRadiusM(0.185);
metap.setMovementTimerS(10);
metap.setJumpTimeS(1);
metap.setModelScale(1.48);
metap.setUniqueId("V0172_POKEMON_PICHU");
metap.setBaseDefense(101);
metap.setAttackTimerS(29);
metap.setWeightStdDev(0.75);
metap.setCylHeightM(0.74);
metap.setCandyToEvolve(50);
metap.setCollisionHeightM(0.518);
metap.setShoulderModeScale(0.5);
metap.setBaseCaptureRate(0.16);
metap.setParentId(PokemonId.UNRECOGNIZED);
metap.setCylGroundM(0);
metap.setQuickMoves(new PokemonMove[]{
PokemonMove.QUICK_ATTACK_FAST,
PokemonMove.THUNDER_SHOCK_FAST
});
metap.setCinematicMoves(new PokemonMove[]{
PokemonMove.DISCHARGE,
PokemonMove.THUNDER,
PokemonMove.THUNDERBOLT
});
metap.setNumber(25);
metap.setBuddyDistance(1.0);
PokemonMetaRegistry.getMeta().put(PokemonId.PICHU, metap);
PokemonMetaRegistry.getMeta().get(PokemonId.PIKACHU).setParentId(PokemonId.PICHU);;
}
@clangdev thank you sir. So in order to get the values that you queried (name, IV, and CP) I need to update manually PokeMetaRegistry and Evolutions in my own external library source?
Working on removing PokemonMetaRegistry and other registries and replacing them with server retrieved settings.
@sino123: You do not need to change anything to get the values I posted for you.
My other posting just hotfixes NPE for querying Pichu FamilyId
@gegy1000 make sense :)
@gegy1000 Really? That would be the best thing you could ever do! Love you.
@clangdev how can I update the POGOProtos ? In my project I added gradle dependency compile 'com.pokegoapi:PokeGOAPI-library:0.4.1' but when I look into the POGOProtos ressources it does not have the new Pokemon in... Do I need to update/sync the library somehow?
P.S.: could not get the new Pokemon with your code, seems I have an old lib