lllll llll
Well-Known Member
- Reaction score
- 73
- 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.
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.
Attachments
Last edited:
Upvote
7