Misc Import/Export Village Builds

tcamps

Non-stop Poster
Reaction score
109
Author
tcamps
Contributors
N/A
Quickbar Entry
javascript:$.getScript('https://tylercamp.me/tw/villa-build-export.js')
Public?
Public
A quick little script I wrote. This requires Premium and Account Manager.

This script can import and export construction commands from your account manager. This script only works on English servers.


Here's a build I've been using for fast troops:
Headquarters+1;Rally point+1;Statue+1;Timber camp+1;Clay pit+1;Iron mine+1;Timber camp+1;Clay pit+1;Timber camp+1;Farm+1;Clay pit+1;Iron mine+1;Farm+1;Timber camp+1;Clay pit+1;Headquarters+1;Warehouse+1;Headquarters+1;Barracks+1;Warehouse+1;Farm+1;Timber camp+1;Clay pit+1;Iron mine+1;Farm+1;Barracks+2;Warehouse+2;Headquarters+1;Farm+1;Headquarters+1;Smithy+3;Headquarters+1;Warehouse+2;Iron mine+2;Farm+1;Headquarters+1;Farm+1;Headquarters+1;Barracks+1;Farm+1;Headquarters+1;Barracks+1;Iron mine+1;Smithy+1;Farm+1;Smithy+1;Farm+1;Warehouse+2;Headquarters+1;Stable+1;Farm+1;Stable+2;Iron mine+1;Stable+2;Farm+1;Warehouse+3;Timber camp+5;Clay pit+5;Iron mine+3;Iron mine+5;Headquarters+5;Farm+2;Timber camp+1;Clay pit+1;Barracks+2;Timber camp+1;Clay pit+1;Farm+1;Timber camp+1;Farm+1;Warehouse+2;Stable+1;Wall+2;Barracks+2;Clay pit+1;Barracks+1;Timber camp+1;Barracks+2;Warehouse+2;Clay pit+1;Farm+1;Stable+2;Smithy+2;Farm+1;Timber camp+1;Wall+3;Clay pit+1;Warehouse+1;Stable+2;Farm+1;Timber camp+1;Smithy+2;Clay pit+1;Wall+2;Warehouse+2;Iron mine+2;Wall+2;Timber camp+1;Headquarters+2;Timber camp+2;Wall+2;Farm+1;Iron mine+3;Warehouse+1;Clay pit+1;Wall+2;Iron mine+1;Farm+1;Wall+3;Barracks+2;Warehouse+2;Timber camp+2;Wall+2;Market+2;Barracks+1;Wall+2;Smithy+2;Farm+2;Stable+1;Warehouse+2;Market+3;Iron mine+1;Iron mine+2;Farm+1;Smithy+3;Market+2;Farm+1;Clay pit+2;Barracks+1;Timber camp+2;Warehouse+1;Clay pit+2;Smithy+1;Headquarters+2;Farm+1;Clay pit+2;Warehouse+2;Stable+2;Market+2;Clay pit+1;Barracks+2;Smithy+1;Iron mine+1;Timber camp+2;Headquarters+1;Barracks+2;Market+2;Iron mine+1;Warehouse+1;Farm+1;Stable+3;Smithy+1;Market+3;Clay pit+1;Warehouse+1;Iron mine+1;Barracks+1;Smithy+1;Barracks+2;Farm+1;Market+2;Smithy+1;Barracks+2;Timber camp+2;Warehouse+1;Stable+1;Warehouse+1;Market+1;Clay pit+1;Market+1;Stable+3;Farm+1;Timber camp+1;Smithy+1;Clay pit+1;Timber camp+1;Academy+1;Iron mine+1;Clay pit+2;Iron mine+1;Farm+1;Clay pit+1;Timber camp+1;Iron mine+1

Use the script to import and try it out.

Translation instructions are in a post below.
 
Last edited:
Upvote 5

tcamps

Non-stop Poster
Reaction score
109
I don't see any "script approval form" or anything like that so I thought I'd post here to get approval.

At the same time, I can't imagine a simple script like this being problematic. The only concern I may have is the use of the 'Accountmanager' API.
 

Ibra Gonza II

Non-stop Poster
Reaction score
140
I don't see any "script approval form" or anything like that so I thought I'd post here to get approval.

At the same time, I can't imagine a simple script like this being problematic. The only concern I may have is the use of the 'Accountmanager' API.

https://forum.tribalwars.net/index.php?threads/script-approval-process.218843/
This is what you have to do.

Note to everyone else:
Every script that hasn't been specifically approved is still illegal. So beware when using it before Morthy approves this topic ;)
 

tcamps

Non-stop Poster
Reaction score
109
Thank you, I've submitted it and will post when I hear back at the end of the week.
 

Ibra Gonza II

Non-stop Poster
Reaction score
140
Perfect! Nice script too :)

//edit
I took liberty of checking your site. You got some pretty nice stuff there!
 

Gafiam

Guest
Thank you very much for this, always hoped for something who did this on TW
 

tcamps

Non-stop Poster
Reaction score
109
Whoops, apparently I accidentally renamed the script on my server and broke it, should be working fine now.
 

Gafiam

Guest
Whoops, apparently I accidentally renamed the script on my server and broke it, should be working fine now.

When I'm trying to Import its opening a message "Couldn't understand the imported text"

I just Ctrl+C and Ctrl+V the exported text =s
 

Mintyfresh

Skilled Soldier 18 & Master Commander 21 & 22
Reaction score
4,382
A quick little script I wrote. This requires Premium and Account Manager.

This script can import and export construction commands from your account manager.


Here's a build I've been using for fast troops:
Headquarters+1;Rally point+1;Statue+1;Timber camp+1;Clay pit+1;Iron mine+1;Timber camp+1;Clay pit+1;Timber camp+1;Farm+1;Clay pit+1;Iron mine+1;Farm+1;Timber camp+1;Clay pit+1;Headquarters+1;Warehouse+1;Headquarters+1;Barracks+1;Warehouse+1;Farm+1;Timber camp+1;Clay pit+1;Iron mine+1;Farm+1;Barracks+2;Warehouse+2;Headquarters+1;Farm+1;Headquarters+1;Smithy+3;Headquarters+1;Warehouse+2;Iron mine+2;Farm+1;Headquarters+1;Farm+1;Headquarters+1;Barracks+1;Farm+1;Headquarters+1;Barracks+1;Iron mine+1;Smithy+1;Farm+1;Smithy+1;Farm+1;Warehouse+2;Headquarters+1;Stable+1;Farm+1;Stable+2;Iron mine+1;Stable+2;Farm+1;Warehouse+3;Timber camp+5;Clay pit+5;Iron mine+3;Iron mine+5;Headquarters+5;Farm+2;Timber camp+1;Clay pit+1;Barracks+2;Timber camp+1;Clay pit+1;Farm+1;Timber camp+1;Farm+1;Warehouse+2;Stable+1;Wall+2;Barracks+2;Clay pit+1;Barracks+1;Timber camp+1;Barracks+2;Warehouse+2;Clay pit+1;Farm+1;Stable+2;Smithy+2;Farm+1;Timber camp+1;Wall+3;Clay pit+1;Warehouse+1;Stable+2;Farm+1;Timber camp+1;Smithy+2;Clay pit+1;Wall+2;Warehouse+2;Iron mine+2;Wall+2;Timber camp+1;Headquarters+2;Timber camp+2;Wall+2;Farm+1;Iron mine+3;Warehouse+1;Clay pit+1;Wall+2;Iron mine+1;Farm+1;Wall+3;Barracks+2;Warehouse+2;Timber camp+2;Wall+2;Market+2;Barracks+1;Wall+2;Smithy+2;Farm+2;Stable+1;Warehouse+2;Market+3;Iron mine+1;Iron mine+2;Farm+1;Smithy+3;Market+2;Farm+1;Clay pit+2;Barracks+1;Timber camp+2;Warehouse+1;Clay pit+2;Smithy+1;Headquarters+2;Farm+1;Clay pit+2;Warehouse+2;Stable+2;Market+2;Clay pit+1;Barracks+2;Smithy+1;Iron mine+1;Timber camp+2;Headquarters+1;Barracks+2;Market+2;Iron mine+1;Warehouse+1;Farm+1;Stable+3;Smithy+1;Market+3;Clay pit+1;Warehouse+1;Iron mine+1;Barracks+1;Smithy+1;Barracks+2;Farm+1;Market+2;Smithy+1;Barracks+2;Timber camp+2;Warehouse+1;Stable+1;Warehouse+1;Market+1;Clay pit+1;Market+1;Stable+3;Farm+1;Timber camp+1;Smithy+1;Clay pit+1;Timber camp+1;Academy+1;Iron mine+1;Clay pit+2;Iron mine+1;Farm+1;Clay pit+1;Timber camp+1;Iron mine+1

Use the script to import and try it out.

Cant try it out yet but will when im at home. I play a lot of worlds so a script like this is a life saver!
 

tcamps

Non-stop Poster
Reaction score
109
This has only been tested on w96, which doesn’t have churches and might be missing some other buildings

If the world has churches enabled it might break

Message me if this is the case
 

Gafiam

Guest
This has only been tested on w96, which doesn’t have churches and might be missing some other buildings

If the world has churches enabled it might break

Message me if this is the case

Yeah, this is the case, thanks anyway kkkk

Will save it for my next world then, I will play without church, already tired of it kkkk
 

DeletedUser121615

Guest
This script works on another server's? Because I tried and gives me the error "Couldn't understand the imported text". If I translated it, it might work?
 

tcamps

Non-stop Poster
Reaction score
109
This script will only work on English servers, I'll update the main post. Translating the imported text should fix it.
 

DeletedUser121019

Guest
Hi, i tried this on .se servers and it used to work with server language. Not anymore though, any changes made?
 

tcamps

Non-stop Poster
Reaction score
109
I'm surprised it worked on .se servers in the first place, it requires either an english server or a manually translated version of the script

A change had been made about a week ago to support translation for languages with accented characters, but that shouldn't have affected anything else

What error are you seeing in the JavaScript console? (If you're using Chrome, run the script then press Ctrl+Shift+J)
 

tcamps

Non-stop Poster
Reaction score
109
Yeah it needs translation for your server, you'll need to do it manually. Not too difficult - copy the script text here: https://tylercamp.me/tw/villa-build-export.js

Paste it into a text editor, and translate this section, leaving everything else untouched:

var labelToCanonicalNameMap = {
'Headquarters': 'main',
'Barracks': 'barracks',
'Stable': 'stable',
'Workshop': 'garage',
'Watchtower': 'watchtower',
'Church': 'church',
'Academy': 'snob',
'Smithy': 'smith',
'Rally point': 'place',
'Statue': 'statue',
'Market': 'market',
'Timber camp': 'wood',
'Clay pit': 'stone',
'Iron mine': 'iron',
'Farm': 'farm',
'Warehouse': 'storage',
'Hiding place': 'hide',
'Wall': 'wall'
};

Only translate the left side of each line and make sure that the quotes are still there.
For example, the first line is 'Headquarters': 'main'. Only translate 'Headquarters' and replace that text. Don't change 'main':
var labelToCanonicalNameMap = {
'Högkvarter': 'main',
...
};


Copy and paste your edited version of the script as a bookmark in your browser. When you want to run your translated version of the script, click the bookmark instead of the Quick Bar link. You can also just copy/paste the whole edited script into your quickbar if you put "javascript:" before everything. There's no difference really.

Feel free to post your translated version here for others to use. If you still have issues, check the JavaScript console again and it'll tell you if you made a mistake or need more translating.
 
Top