RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
627
Author
RedAlert
Contributors
N/A
Quickbar Entry
javascript:var HC_AMOUNT=4;$.getScript('https://twscripts.dev/scripts/frontlineStacks.js');
Public?
Public
1697398243486.png

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

terminator

Member
Reaction score
1
I have 2 questions:
- To what villages applies Find Backline Stack
- What is variable HC_AMOUNT
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
627
I have 2 questions:
- To what villages applies Find Backline Stack
- What is variable HC_AMOUNT
The Find Backline Stacks feature, check all villages which are not considered as frontline villages, so checks all backline villages basically, if they have stationed troops as support and if any of them has more than 30k pop as support, it lists such village on a table of villages which are stacked but MIGHT not need to be stacked. I emphasized the might here, because the script does not know why a player has stacked a village, so there might be a reason for that, example you might have a player you don't trust in your backline and this player is not on an enemy tribe, the script does not know this tho. So before sending back supports from these villages double check so you don't send back defenses from a village which actually need defenses stationed there.

The HC_AMOUNT is a setting to allow the player to custom define a pop amount for heavy cavalry. The default pop amount defined in the game for HC is 6. However, a lot of players prefer to use HC pop amount as 4. So thanks to this setting you can do that.
 
Last edited:

valtheran88

Non-stop Poster
Reaction score
91
I am posting for someone else but a buddy of mine is having an issue that I presume is a loading issue as this is occurring on a late game world, and he was requesting that this could have an option to be set to pull data from your own account and not as a tribe leadership pulling info for the whole tribe tool.
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
627
I am posting for someone else but a buddy of mine is having an issue that I presume is a loading issue as this is occurring on a late game world, and he was requesting that this could have an option to be set to pull data from your own account and not as a tribe leadership pulling info for the whole tribe tool.
That's a good suggestion and one that I wanted to add on the script, just haven't found much time to work on this.
 

valtheran88

Non-stop Poster
Reaction score
91
I think the guys main issue is the size of the world and his account and not being patient, I know for some of these more broad use scripts I run into that issue where I just have to sit and wait, and wait, and wait lol.
 
Top