Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If you have no other pokeballs, be wiling to use ultra balls #3332

Closed
wants to merge 1 commit into from

Conversation

elicwhite
Copy link
Contributor

Right now I have 0 pokeballs, 0 greatballs, and 60 ultra balls. The bot was refusing to catch anything because it only wanted to use ultraballs on VIPs. If we have no other balls, we should be willing to use ultra balls.

@Dwite
Copy link

Dwite commented Aug 9, 2016

I think this will use ultraball even if there are other pokeballs when Pokemon catch rate is very low, but I'm not 100% sure about it, maybe extend condition?

@elicwhite
Copy link
Contributor Author

elicwhite commented Aug 9, 2016

The lowest available pokeball is chosen with this logic:

current_ball = ITEM_POKEBALL
while items_stock[current_ball] == 0 and current_ball < maximum_ball:
  current_ball += 1

So it picks the lowest pokeball that is in stock.

@Dwite
Copy link

Dwite commented Aug 9, 2016

Ok

@leanderjanssen
Copy link

Personally I would like this behaviour to be configurable through configuration.
I would like to save my ultraballs for my defined VIPs.

@AcorpBG
Copy link
Contributor

AcorpBG commented Aug 9, 2016

I run my bot with this change since the catch was reworked. Yes it will use more ultraballs the best way to deal with this is to be able to set both max_ball_non_vip and ideal_catch_rate_before_throw_non_vip

@elicwhite
Copy link
Contributor Author

The challenge for me is that I don't get very many low level pokeballs from pokestops anymore, so I'm completely out of pokeballs that it is willing to use, but it still tries to catch pokemon and complains that there are no available balls. While it is definitely important to save some to be able to catch VIPs, if it isn't willing to use ultraballs for regular pokemon, the bot essentially stops doing anything.

@achretien
Copy link
Contributor

Agreed wit @TheSavior

PokeBalls: 78 | GreatBalls: 0 | UltraBalls: 200

@Philipp59
Copy link

Philipp59 commented Aug 9, 2016

@TheSavior

current_ball = ITEM_POKEBALL
while items_stock[current_ball] == 0 and current_ball < maximum_ball:
  current_ball += 1

will this also be a fix for #3271 ?

@AcorpBG
Copy link
Contributor

AcorpBG commented Aug 9, 2016

    maximum_ball = ITEM_ULTRABALL
     ideal_catch_rate_before_throw = 0.9 if is_vip else 0.5

I'm running it like this right now after lvl 20 you get alot more great and ultra balls with this config I'm forcing it to use more great/ultra balls and berries and also it is way more effective in catching
Still would love to have this as config options I would make it but I don't quite understand the config system since pokemon_catch_worker look like task but is not acting like task

@heki-ru
Copy link

heki-ru commented Aug 9, 2016

I think we should be able to specify minimum catch rate for every ball via config. And for berries too. Also berry must be thrown every catch attempt, not only first one, because it boost only one attempt.

@elicwhite
Copy link
Contributor Author

I think the problems you guys are bringing up with configuring pokemon catching is valuable, but I'm not sure it is relevant to this PR. This PR simply allows us to catch pokemon when we still have balls left. Changing the logic of how we pick balls is something we should tackle separately.

@DimaVIII
Copy link

DimaVIII commented Aug 10, 2016

@TheSavior If you fix this can you please also investigate this two issues #3271 & #3287 they appear after the last changes as there been so many pokeball changes and it's damaging the bot. There are many infinity loops and so on.
e4c54dc Special around this commit the pokeball issues start to appear.
Thank you!

@elicwhite
Copy link
Contributor Author

@douglascamata Please review

@licklake
Copy link

there should be an option to reserve (lets say 10 for e.g.) ultraballs for v.i.p pokemon only

@elicwhite
Copy link
Contributor Author

It sounds like there is more logic that needs to go into this to satisfactorily cover everyone's use cases than I am willing to work on for this right now. In the short term I can modify my config to keep more low level pokeballs.

@elicwhite elicwhite closed this Aug 10, 2016
@solderzzc solderzzc deleted the use-ultraball branch August 10, 2016 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants