Initial_transfer does not transfer last Pokemon
Expected Behavior
Initial_transfer transfers all eligible Pokemon based on release config.
Actual Behavior
Even if Pokemon fits transfer criteria set in release config, if it is the last Pokemon of it's type in your inventory, it will NOT transfer.
Steps to Reproduce
- Have a Pokemon be it's only type in your inventory (i.e. 1 zubat).
- Have that Pokemon be eligible for initial_transfer based on your release config.
- Initial_transfer set to true.
- Pokemon does not transfer.
Other Information
OS: OSX Git Commit: db5b719dba2faebf9401b929811d0308e2561317
Proposal
This logic should either be in config (i.e. transfer_last_pokemon: true/false) or removed (users can tweak their release config).
Wow nice try! I think this may be related to the boundary case?
+1
First we need to keep track of the already catched Pokemons, I could'nt find, so maybe creating a db for it.
hi @libaniocv thanks for the response. but I'm not quite clear with what you mean. do you mind to explain more detail? thanks
anyway @johnw424 and @xc-mezcal did you guys already found the solution? I'm stuck
Sorry for my bad english. Look at the file data/pokemon.json It is a database of available pokemons in the game. We need a separate, but similar database for each user to keep track of the already catched Pokemons, so we can make scripts to update the criteria to release based on the pokemons we catch. Example: I have a Ratata with CP 40 and a Ratata with CP 60. My criteria will be "release Ratata with CP lower than 60". If i catch a Ratata with CP 100, the criteria should be "release Ratata with CP lower than 100". Something like, in the catch_worker line 135
if status is 1: logger.log( '[x] Captured {}! [CP {}] [IV {}]'.format( pokemon_name, cp, pokemon_potential ), 'green' ) json.dumps( { 'name' : pokemon_name, 'cp' : cp, 'potential' : pokemon_potential, } ,'catched.json')
That's just a idea, and maybe hard-coded
@felixzzz No, this is still and issue. @libaniocv We don't need a database. You can just use an API call to see your current Pokemon statuses. Your proposal introduces more complexity and less customization. What if someone doesn't care about Rattata and wants to remove them all? What if someone wants to remove based on IV? What if someone wants to remove certain Pokemon based on CP logic and others based on IV logic? Your proposal to hardcode this will require the user to potentially setup CP and IV release logic for every single Pokemon. The good thing is that all of these different user requirements are already set by the user in the "release" config. We should just use "release" config as the only logic for initial_transfer.
@johnw424 As far as I understand, this line https://github.com/PokemonGoF/PokemonGo-Bot/blob/6e99169d963bd8637dfb55426650f2fe15e694bd/pokemongo_bot/init.py#L181 suggests that it uses the initial_transfer key from the config.json to decide who to transfer initially. Also, it is actually the minimum CP value. So, if your initial_transfer value is 100, all your pokemons with CP < 100 (except the top one of each type) will be transferred. You can change this line https://github.com/PokemonGoF/PokemonGo-Bot/blob/6e99169d963bd8637dfb55426650f2fe15e694bd/pokemongo_bot/cell_workers/initial_transfer_worker.py#L27 to use n instead of 1 to keep the top n pokemons.
@felixzzz @johnw424 @TheGoldenXY
This is not actually an issue. It should be called an wanted feature. Because, we have a logic that initial transfer always keep the maximum CP pokemon. So if you only have 1 left, whatever it is, we just kept it.
The fix should be add an option in config file whether to kept the max CP pokemon when initial transfer. That will solve your problem.
hi @xc-mezcal , thanks for your response. I understand we keep 1 maximum CP pokemon, but what happen is it's not transfering at all, even the lowest CP/IV *I did some experiment on confg.json. even try always_release option but it seems the transfer not responding to the config.json
CMIIW @johnw424
so now I'm reverting to ac29a09a8ccfdee40e1d6eaf9efff0f8b3890748
*here seems okay (but not using release config)
@Felix
Well, let's say,
currently, keep 1 maximum CP pokemon has a higher priority than release CP/IV config.
So, if you have a stronger pokemon, that lower one will be initial transferred. And if you keep getting better pokemon, eventually, you will get one with CP/IV above your release_config.
Hope this solve your problem.
On Thu, Jul 28, 2016 at 1:01 AM, Felix [email protected] wrote:
hi @xc-mezcal https://github.com/xc-mezcal , thanks for your response. I understand we keep 1 maximum CP pokemon, but what happen is it's not transfering at all, even the lowest CP/IV *I did some experiment on confg.json. even try always_release option but it seems the transfer not responding to the config.json
CMIIW @johnw424 https://github.com/johnw424
so now I'm reverting to ac29a09 https://github.com/PokemonGoF/PokemonGo-Bot/commit/ac29a09a8ccfdee40e1d6eaf9efff0f8b3890748
*here seems okay (but not using release config)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PokemonGoF/PokemonGo-Bot/issues/1109#issuecomment-235801487, or mute the thread https://github.com/notifications/unsubscribe-auth/ATetbrrl6khKiA1iqFUW-Mv9ZlvzoIbcks5qaDebgaJpZM4JVzJA .