Well, it's working for me up to the situation described above. What I changed was in BattlePetSwapper (Ringerx2 and true for all setting with favorites - and added all the pets including ringer and low level ones to favorites). Used the oneclick option for autoleveling and only capturing rares. Using GB2 as a botbase paired with guadah profiles. This works for me, except when encountering grounding pets.
Yep.
The swapping function while in combat is rudimentary. It's very neat, but it isn't designed for boosting or levelling.
A boosting function would rely on altering the combat rating system slightly or entirely.
Which is doable, but it will be relatively as complex to convert pokehbuddy to a coroutine plugin, which is a fairly extensive refactoring. On the plus side, it would help integration with the pet swapper which is not compatible with the pokehbuddy code. On the negative, there's a lot of functionality to recreate.
Like, all of it.
The current loop/logic relies on pets being relatively equal, the combat ratings are used to choose which pet is suitable when each round is completed.
This doesn't mean that it has to become schizophrenic about combat swapping, but it can become an issue.
Tweaking the initial advanced settings in combat ratings helps when the level difference is larger than 10 levels,
the defaults are usually fine with pets within 5 to 10 levels, but the math isn't great.
Earlier posts have discussed possible scale values, or factors applied to the default values ie creating a custom combat rating value mid battle when the lowbie takes damage.
but in essence, every time the lowbie pet takes damage, it has to rate lower than the ringer or higher level pet(s) . And conversely, it has to rate higher when it has full health so it goes first.
TLDR is, you can use smaller multipliers in the combat ratings.
While HB is stopped, Go into the PB settings, advanced tab and look at the current combat ratings for the current pet loadout. Keep these values in mind and where the lowbie pet is, compared to the ringer 25s.
go into a pet battle manually, let the lowbie take 1 hit, then go into the advanced tab, adjust the slide values so that the level difference is lower, ie, -5 or so, and the health multiplier is lower. Then check the relative combat rating from full health, to low health.
What you want is a rough setting where it should want to swap once it takes that amount of damage.
Go back to the game, swap to a ringer pet that will take damage, bring it to about 50 % or lower.
Go back to PB, and compare the 3 combat ratings. Adjust the sliders if the injured ringer pet has a lower value than the lowbie, and, go back to the game, and check the combat ratings again.
That's it. You have customised your combat ratings.
See how it goes on actual pet battles. Tweak as necessary while the bot is stopped, or it won't apply the changes.
If you have a strong sense of math or logic, enable the debug logging which will display the combat ratings during each battle to see when and how it is swapping out.
The other approach,
Well, when levelling, the combat logic actually needs not to use the combat rating, but calculated health values, which is an entirely different schism.
For example, at level 3, 25% is something like 70 to 100 health, and at 25, it's 350 to 400 health. Attack strength is about 10 to 15%, and it uses pet stats(speed, power, levels, family bonus, weather, crit, auras) , so a level 3 will hit for <100 or so, a level 25 will hit for <250. Roughly.
an overall battle logic needs to know about, and decide whether that pet will survive a relative attack given the scale of damage.
This way, it can work out how many rounds are left and make complex decisions. Eg, same 3 pets, a 5,25,25 vs 21,21,21 would each have a rough 15% damage per move. (and you could average this out with recorded stats).
If the last enemy pet has 45% hp, and your pet has 25%, it could judge survival rates and choose to forfeit or risk losing based on the survival odds of each pet by id.
The other way is to set up a few default logic options for pets,
a custom PvE engine to handle swapping and ringer pets, keeping the pet logic around for custom usage,
easy bulk import and export of the database,
Etc.
Significantly changing pokehbuddy leads to a lot more difficult decisions about what to replace and how. So, while its fun to speculate, it's sort of okay as it is. For now.
If you read this far, the quickest patch is to choose pets by id and not slot position,
add a flag into the combat rating so that the logic can find, track, then 'kill' the lowbie pet once it has taken damage and stop using it (eg if the level difference is > 6)
and stop the pet swap pulse from working while the bot is in a pet battle, then resume after it has finished.
Oh, and move the pet swap options into the GUI so there's not duplicate pet swap values to edit.
Short list.