Resource balancer


New Member
Reaction score

Looking for a script that I used back in the day (10+ years ago) that balanced resources between villages. It balanced all the available resources based on % of warehouse capacity. For example (not exact values, just making a point):

Village 1 WH: 400.000
Village 2 WH: 100.000
Village 3 WH: 35.000

Total wood: 267.500 Average wood: 89.167
Total clay: 187.250 Average clay: 62.417
Total iron: 428.000 Average iron: 142.667

Res in each village after script has been run:
Village 1: 200.000 wood (50% of capacity), 140.000 clay (35% of capacity), 320.000 iron (80% of capacity)
Village 2: 50.000 wood (50% of capacity), 35.000 clay (35% of capacity), 80.000 iron (80% of capacity)
Village 3: 17.500 wood (50% of capacity), 12.250 clay (35% of capacity), 28.000 iron (80% of capacity)

As you can see, it doesn't balance based in actual number of resources, but it balances based on the warehouse capacity.

Does anyone have a script like this, or knows how to make it? I've never worked with Java so I really don't know where to even start...

Thanks in advance!