Shinko to Kuma

Still Going Strong
Reaction score
776
Author
Shinko to Kuma
Contributors
Sass
Quickbar Entry
javascript: $.getScript("https://shinko-to-kuma.com/scripts/WHBalancerShinkoToKuma.js");
Public?
Public
Approved ticket nr. #T13701675 at 2020-02-21 19:56:29

Hey everyone

This is the one a lot of you have been waiting for, a new and efficient warehouse balancer script ^^

What it does:
1) will attempt to balance your res across your current group of villages. Just make dynamic or manual groups if you deal with large gaps in between clusters to make the script even more efficient. Prioritises the smallest villages in points first. Really helps to build out those newly capped villages fast!
2) Adjustable priorities: Set which villages (till a certain point range) should receive extra resources, and from which point a village is considered 'finished', and should keep less resources in reserve. Completely adjustable how much % should be left behind, or should be stocked extra.
3) Accounts for already incoming resources to each village. This way you have an actual idea how much total res is going around between all villages, so the averages are way more accurate, the balancing will be more accurate, and it will also prevent overflowing warehouses. Even if there are more resources incoming to a village than its warehouse can handle, the script will attempt to offload as much res as necessary to keep you from overflowing.
4) IT ISNT IRRITATING TO USE, NO LONGER NEED A MILLION TABS! Just click the individual launches, or hold down ENTER!
5) Works on mobile

Screenshots:
PC:
AyZRUTw.png

iOS:

iMMNtS9.png


Video:


Script:
(Instructions: The settings can be adjusted before or during it is inside your quickbar.
Settings:

highFarm = from which village population usage a village is considered 'finished', and will try to offload resources to villages that need it more.
lowPoints = anything below this point value is considered a small village, and the script will prioritize filling these up.
builtOutPercentage = percentage of WH capacity (in the example 25%) should be only kept in fully built villages.
needsMorePercentage = percentage of WH capacity (in the example 85%) should be stored in villages that need help growing still. This same percentage will be used if the average of all your resources is higher than your current WH capacity in that village to prevent an overflow. Don't put this percentage too high, you got to account for runtime of the merchants and the natural resource gain for pits as well. 85% is a pretty good spot.


Code:
javascript:

$.getScript("https://shinko-to-kuma.com/scripts/WHBalancerShinkoToKuma.js");


feedback always welcome in the comments :) or on my skype/discord, in my signature

- Sophie

KNOWN BUGS:
- Problems with university villages, since they don't have merchants and the warehouse capacity is insane. If you have a university village, you can fix this by making a group excluding it for now.
 
Changelog
16/4/2021 - Changed host
Last edited:
Upvote 27

Deleted User - 10090318

Guest
Ha, I was!
Thank you!

I was running the script from phone and it's not obvious on mobile that I was in a group with no villages.
 

Deleted User - 11134637

Guest
All the scripts stopped working, i think it has to do with something about dropbox because thats the ones that don't work, do you have any idea how to fix it?
 

Shinko to Kuma

Still Going Strong
Reaction score
776
All the scripts stopped working, i think it has to do with something about dropbox because thats the ones that don't work, do you have any idea how to fix it?
the scripts work just fine, if you use a vpn you might have some issues cause you’re loading js files
 

Snorlax

Non-stop Poster
Reaction score
469
Stopped working on the app for me. :-( Whenever I run the script the app just crashes.
 

Snowbrand

Non-stop Poster
Reaction score
52
I'm not sure what's wrong with the script. Seems like it's not sending from a lot of the villages that got full warehouses and I'm not sure why. Even on the scipt itself it shows a lot of those as excess. Not sure what the problem is, because my settings are similar to those suggested here.
 

Shinko to Kuma

Still Going Strong
Reaction score
776
I'm not sure what's wrong with the script. Seems like it's not sending from a lot of the villages that got full warehouses and I'm not sure why. Even on the scipt itself it shows a lot of those as excess. Not sure what the problem is, because my settings are similar to those suggested here.

I need to add some extra code. This tends to happen when you have very high average res, and a bunch of villages with WH capacity lower than the average. Since it sends less than the average to those villages, there is actually MORE excess resources than it accounts for, which is why, when it balances the other villages out to the average, there are still extra excess resources not being moved, from the villages longest distance away. I only recently figured this one out, so when I find some time I'll try and fix that.
 

Snowbrand

Non-stop Poster
Reaction score
52
I need to add some extra code. This tends to happen when you have very high average res, and a bunch of villages with WH capacity lower than the average. Since it sends less than the average to those villages, there is actually MORE excess resources than it accounts for, which is why, when it balances the other villages out to the average, there are still extra excess resources not being moved, from the villages longest distance away. I only recently figured this one out, so when I find some time I'll try and fix that.

Yep, that perfectly describes my situation. High average res, but quite a few villas with low WH capacity. I figured it could have something to do with high average res.
 

Shinko to Kuma

Still Going Strong
Reaction score
776

Can you give a specific model? I'll try and debug emulating that particular device. I only had 3 people total who seemed to have iOS problems so it's got to be something very particular, since for most people there are no problems
 

Shinko to Kuma

Still Going Strong
Reaction score
776
UPDATED: Added additional math to recalculate the available resources that need to get evenly balanced over all non-priority/built out villages.
Added alerts that give you feedback incase your settings aren't correct and would cause issues.
 

Shinko to Kuma

Still Going Strong
Reaction score
776
I did another update to the res balancer
2 new settings:

Code:
var settings = {
"isMinting": false,
"highPoints": 10000,
"highFarm": 23000,
"lowPoints": 3000,
"builtOutPercentage": 0.25,
"needsMorePercentage": 0.85
};

you can turn isMinting to true to have the script behave better when you have tribe members sending you res. Since you have so much res incoming, the updated script was giving alerts that it had too much res to balance it properly.

as for highPoints, it's the same as highFarm, if either of the two values is surpassed by the village, it will start offloading res to other villages

if you don't want to use one of them, you can just set them to 99999, or delete them
 

Shinko to Kuma

Still Going Strong
Reaction score
776
I don't like new update warehouse balance script might be broken ? seen when use new one setting not balance much i like old one better old one seen not working
javascript:
var settings = {
"highFarm": 23000,
"lowPoints": 2000,
"builtOutPercentage": 0.25,
"needsMorePercentage": 0.85
};
$.getScript("https://dl.dropboxusercontent.com/s/j31tifgbn6jn7ul/WHBalancerShinkoToKuma.js");

The settings are still the same, except instead of the ones in the quickbar, you have to use the settings on the script itself now, it will save those and use those
 

Deleted User - 848883863

Guest
Is there an option to limit the distance merchants can trave
 

DPROKZ

New Member
Reaction score
2
Overall a fantastic script! Thank you very much. Question for you though: Is there any way to add an option to prioritize population count rather than just point count?

Is that what the "high population" slider is? If so, what should the other settings be at such that is prioritizes the population count only?

Rationale being that on worlds where all of your villages are already fully built out the feature to prioritize sending resources by points isn't useful anymore. What would be useful is if after I lose a ton of troops, there is an option to shift my resources to the villages that have to rebuild all of it's troops. Not sure how best that would look in the interface.
 

Deleted User - 848929386

Guest
good night, the script is not working, will it be ofline?
 
Top