- Reaction score
- 627
- Author
- RedAlert
- Contributors
- N/A
- Quickbar Entry
-
javascript:var HC_AMOUNT=4;$.getScript('https://twscripts.dev/scripts/frontlineStacks.js');
- Public?
- Public
This script needs to be run from the map screen, if you are not already on the map screen, the script will redirect you there and you will need to run the script again so the script initializes.
The idea behind this script is to help tribe leaders to check which frontline villages need more defenses so defenses are sent before they are actually needed.
The distance field requires no explanation, if you set the field value to 5 (which is the default value) it means that frontline villages will be considered every tribe member village within a 5 field radius from an enemy village.
The stack limit field helps to eliminate from the list of possible villages that need support, villages which have more troops than this field's value. So if you already have 100k pop on a village, it does not matter to the script if you have fulfilled the unit amount requirements specified or not, the village will be considered safe and will not be shown on the list of villages that need support. So if you want to make sure that all villages will always be shown, then you need to enter a really high number on this field, example, 500 (for 500k).
The scale down per field field helps to calculate troop amounts that are needed on the frontline villages.
The idea is to have a system like this.
Example, if we want to have on the villages that are 1 field away from enemy villages, 40k spears and 40k swords, we might want to have on the villages that are 2 fields away from the enemy village, 35k spears and 35k swords. So in this case, the scale down factor is 5k.
The required stack amount fields are unit amounts that show what kind of stack you want to have on villages which are 1 field away from enemy villages, and the script will calculate the rest based on these values.
Here is a demo of the script in action:
For any bugs, suggestions or if you need help with the script, let me know by replying on the thread.
Upvote
1