The Quacks
Nonstop Poster
 Reaction score
 66
 Author
 fmthemaster
 Contributors
 N/A
 Quickbar Entry

javascript:$.getScript('https://gistcdn.githack.com/filipemiguel97/ba2591b1ae081c1cfdbfc2323145e331/raw/scavenging_legal.js')
 Public?
 Public
Approved t14493425 (.net)
Approved t14513816 (.nl)
This script goes back to basics, optimizing resource scavenging on a single village. Fundamentally, it is based on a script by @Shinko to Kuma, but the inner math is such that the resources scavenged per hour are maximal (see plots below). The code, will test all possible splittings of troops amongst the available scavenging options and choose the most optimal splitting of troops per scavenge. While using this script, the scavenging times will be different for each scavenging option, so this requires more active time. Nevertheless, the additional time spent will be rewarded with an average of 10 to 30% more resources per hour. (The difference is more drastic if you have a low amount of spears). The script is to be run on the scavenging screen:
Tick the boxes of the units you wish to scavenge with, set the maximal run time as the maximum time you wish the troops to stay away from home. You may also fill in the boxes below with the maximum amount of troops you wish to have scavenging (total from all scavenging options). If you wish to impose no limit, leave the value at the default 1, and all troops will be used. Press "Accept configs" so that your options are saved in the cache. Every time you call the script, the appropriate amount of troops to use in the rightmost scavenging option will be automatically filled in. Then simply press enter and run the script again.
Regarding the math, I produced below several plots comparing "standard scavenging" (scavenging with equal times in all options), with "optimal scavenging" (the output of my script). There are a total of 6 plots, considering how many scavenging options you have unlocked (2,3, or all 4).
Any questions / issues / requests, feel free to contact me via discord: fmthemaster#7485
Approved t14513816 (.nl)
JavaScript:
javascript:$.getScript('https://gistcdn.githack.com/filipemiguel97/ba2591b1ae081c1cfdbfc2323145e331/raw/scavenging_legal.js')
This script goes back to basics, optimizing resource scavenging on a single village. Fundamentally, it is based on a script by @Shinko to Kuma, but the inner math is such that the resources scavenged per hour are maximal (see plots below). The code, will test all possible splittings of troops amongst the available scavenging options and choose the most optimal splitting of troops per scavenge. While using this script, the scavenging times will be different for each scavenging option, so this requires more active time. Nevertheless, the additional time spent will be rewarded with an average of 10 to 30% more resources per hour. (The difference is more drastic if you have a low amount of spears). The script is to be run on the scavenging screen:
Tick the boxes of the units you wish to scavenge with, set the maximal run time as the maximum time you wish the troops to stay away from home. You may also fill in the boxes below with the maximum amount of troops you wish to have scavenging (total from all scavenging options). If you wish to impose no limit, leave the value at the default 1, and all troops will be used. Press "Accept configs" so that your options are saved in the cache. Every time you call the script, the appropriate amount of troops to use in the rightmost scavenging option will be automatically filled in. Then simply press enter and run the script again.
Regarding the math, I produced below several plots comparing "standard scavenging" (scavenging with equal times in all options), with "optimal scavenging" (the output of my script). There are a total of 6 plots, considering how many scavenging options you have unlocked (2,3, or all 4).
Any questions / issues / requests, feel free to contact me via discord: fmthemaster#7485
 Changelog

9/3/2021: Changed the link, it was not pointing at the most recent version, now it should auto update
13/3/2021: Changed the host
Last edited: