PokemonGoBot icon indicating copy to clipboard operation
PokemonGoBot copied to clipboard

[OBSERVATION] Uses highest rank balls first

Open Marrcroger opened this issue 10 years ago • 6 comments

I've noticed that the bot uses the highest ranked pokeballs first.

Not sure if this was intentional, as I run out of ultra balls due to the spawn rate being so low while I am constantly dropping pokeballs.

I was able to fix this for my build by changing reversing the ball index list to put priority on the lowest rank pokeballs instead with a chance to use higher rank balls.

fun CatchablePokemon.catch(captureProbability: CaptureProbability, itemBag: ItemBag, desiredCatchProbability: Double): CatchResult? {
    val ballTypes = captureProbability.pokeballTypeList
    val probabilities = captureProbability.captureProbabilityList
    var ball: ItemId? = null
    var needCurve = false
    var needRazzBerry = false
    var highestAvailable: ItemId? = null
    for ((index, ballType) in ballTypes.withIndex().reversed()) {              <--- Reverse the list
        val probability = probabilities.get(index)
        val ballAmount = itemBag.getItem(ballType).count
        if (ballAmount == 0) {
            continue;
        } else {

Marrcroger avatar Jul 26 '16 00:07 Marrcroger

This is likely an issue with your catch probability setting in config.settings

what do you have it set to? I'm thinking you've set a value near 1.0

pilotchute avatar Jul 26 '16 02:07 pilotchute

In 4.1 I was having this issue but now I'm 4.2 it seems to be working a lot better

MrJokerer avatar Jul 26 '16 02:07 MrJokerer

26 Jul 12:35:58: Found pokemon CATERPIE 26 Jul 12:35:58: Encountered pokemon CATERPIE with CP 163 and IV 44% 26 Jul 12:35:59: Using ITEM_ULTRA_BALL; Using Razz Berry; Using curve 26 Jul 12:35:59: Caught a CATERPIE with CP 163 and IV 44% Stamina: 12 | Attack: 0 | Defense: 8 | IV: 20 (44%): [210x XP, 3x Candy, 100x Stardust]

Ultraball + razz berry for a caterpie :P

Letrico avatar Jul 26 '16 02:07 Letrico

I have mine set to the default 0.8

Before the change I noticed it was around 60% ultra use, 30% great, 10% poke. Now it is 60% poke, 30% great, 10% ultra

Marrcroger avatar Jul 26 '16 04:07 Marrcroger

That fix you applied yourself is utterly wrong as it now correlates wrong catch probabilities to wrong balls.

Change the desired_catch_probability in the config to a lower value if you don't want to use ultra balls.

jabbink avatar Jul 26 '16 08:07 jabbink

Haha thanks!

Marrcroger avatar Jul 26 '16 13:07 Marrcroger