RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
Author
RedAlert
Contributors
N/A
Quickbar Entry
javascript:$.getScript('https://twscripts.dev/scripts/troopTemplatesManager.js');
Public?
Public
Troops Template Manager

Approved: t14103184

troops-template-manager.png

This script helps setting up AM Troop Templates.

The script has built-in at the moment 10 troops templates (feel free to contact me so I can add yours). You can chose from one of those pre-built templates and all the troops will be automatically filled. The template name field will also be automatically filled from the script.

Only thing that remains then is to click "Create new template".

The script requires PA and AM (running the script without either one of those would show up an error).

Here is how the script looks like in action (old video):


I would really like YOUR contribution here.
You can contribute by providing troop templates and information example:
  • 5.5k axe
  • 2.5k lc
  • 50 spy
  • ...
this template is good against x but weak against y,
another bad thing is this template takes too much time to build, etc

The idea is that I want to add these kind of information for every troop template and show them for example when you hover over a box.

This way it will be easier for everyone, including new players to chose the right template for the right time.

Script should work fine for non-archer worlds also (haven't tested it yet personally on a non-archer world though).

For any bugs, suggestions, troop templates or if you need help with this script feel free to reply on this thread.
 
Last edited:
Upvote 5

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
For people who want to add their own templates on the script. This is what they need to do:

JavaScript:
javascript:
var USER_TROOPS_TEMPLATES = {
    'Offense #10': {
        spear: 0,
        sword: 0,
        axe: 7500,
        archer: 0,
        spy: 50,
        light: 2000,
        marcher: 0,
        heavy: 0,
        ram: 300,
        catapult: 100,
        archerOnly: false,
        buildType: 'offense',
    },
};

$.getScript('https://twscripts.dev/scripts/troopTemplatesManager.js');

Change the USER_TROOPS_TEMPLATES with your own templates following the format specified above.
You can add as many templates as you want. Change accordingly the archerOnly and buildType fields to true/false or offense/defense respectively.
 

Petzy

Well-Known Member
Reaction score
22
Nice script. Could probably use some tooltips explaining each suggested build (why and such)
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
Script updated to v1.2.3

1689070355602.png


Nothing changes on the UI level.

Just added a new user parameter called DISABLE_DEFAULT_TEMPLATES (true/false, by default if unset is false). The idea is to allow players to disable the default troop templates built-in into the script and only show their custom troop templates.

JavaScript:
javascript:
var DISABLE_DEFAULT_TEMPLATES=true;
var USER_TROOPS_TEMPLATES = {
    'Offense #10': {
        spear: 0,
        sword: 0,
        axe: 7500,
        archer: 0,
        spy: 50,
        light: 2000,
        marcher: 0,
        heavy: 0,
        ram: 300,
        catapult: 100,
        archerOnly: false,
        buildType: 'offense',
    },
};

$.getScript('https://twscripts.dev/scripts/troopTemplatesManager.js');
 
Top