Misc resources balancer

lllll llll

Non-stop Poster
Reaction score
95
Author
lllll llll
Contributors
N/A
Quickbar Entry
javascript: $.getScript('https://dl.dropboxusercontent.com/s/bytvle86lj6230c/resBalancer.js?dl=0');void(0)
Public?
Public
Hello, I created a resources balancer script which calculates the average value for each resource and then using the average value, every resource above the average will be distributed to villages with resources below average. Resources will be balanced only for the current group selected and is taking in consideration incoming transports so if recaptcha is triggered you can continue from where you left. It works even if you have more than 1000 villages and it doesn't work on mobile app, but it works on mobile browser.

Total amount of surplus and deficit are calculated, ideally the value of deficit and surplus are equal. In practice these 2 variables have different values.
If surplus > deficit means warehouse's capacity is lower than the average value and there is not enough space to move the surplus. In this case after balancing resources each village will have resources equal or greater than average value. If a village has warehouse's capacity lower than the average value, this village will have after balancing 95% from warehouse's capacity.

The other case when deficit > surplus is because there are not enough merchants available to move a high quantity of resources. In this case the surplus will be distributed uniform to each village with deficit of resources.

You can either click on each button or just keep pressing key enter. If you press on "distance" table will be sorted by distance.

Screenshot_25.png

results.png
 

Attachments

  • Screenshot_24.png
    Screenshot_24.png
    68 KB · Views: 954
Last edited:
Upvote 6
Modifying the script and running it without approval is bannable, we have to wait for the proper approval.

I'm aware of that — I just ran the original script and had a quick look at the code and noticed it’s using .png instead of .webp. That’s why I shared the code snippet — to point out that it might need updating.
 
On some accounts and browsers works on other not. On Mobile Phone stopped showing final table! Any advice please....after this screen..thank you for help.1000013913.jpg
 
Last edited:
Thank you!

Will evaluate it asap. Hopefully today.

Sorry to everyone affected but we have to follow the procedures and make sure that nobody is affected negatively by unchecked updates.
6 days later…

Having this script down for a week now and no response from @RedAlert since Monday is extremely frustrating.
 
script is still not working on cas 17 even after the game was updated earlier today thought it may of been sorted by now it is a right pain.
 
script is still not working on cas 17 even after the game was updated earlier today thought it may of been sorted by now it is a right pain.
the script working or not isnt depending on game updates. the script has been updated but awaiting approval (last i read about it). cant really push the approval process. hopefully it works soon.
 
the script working or not isnt depending on game updates. the script has been updated but awaiting approval (last i read about it). cant really push the approval process. hopefully it works soon.
seems odd it was working fine on cas 16 yesterday
 
Back
Top