Approved script Vault

tcamps

Non-stop Poster
The 'Vault' script hosted at https://v.tylercamp.me/script/main.js (and subsequently vault.js) has been approved as of:

03/09/2018 - Ticket #12638710 (Maeve, JawJaw) (.NET/.US)
13/12/2018 - Ticket #12834909 (Maeve, JawJaw) (.NET/.US)
05/22/2019 - Ticket #13202005 (Ekimilson R.) (.COM.PT)
06/25/2019 - Ticket #13235356 (Joris) (.NL)
00/00/0000 - Automatic due to .NET approval (.COM.BR) (Still needs translation)
10/12/2019 - Ticket #13456511 (2oceano) (.IT)
12/11/2019 - https://forum.fyletikesmaxes.gr/index.php?threads/26717/#post-464530 (.GR)

As per script guidelines from: https://forum.tribalwars.co.uk/index.php?threads/how-to-get-a-script-approved.14030/
- Scanning for incoming commands, is not allowed. (Annoying, but not a huge deal-breaker)
- Sending or requesting data from any server not managed by InnoGames, is not allowed. (The vault requires data to be sent to/from my own server - approval is therefore impossible.)
9/9/2019 - Ticket #13389170 (Kozmicz)
Kozmicz said:
This script is not allowed on our server.
Script was submitted but denied without any reason. They were having trouble getting it working (I still don't know why) and they were unable to give enough info to troubleshoot the problem.

Slightly-modified source code: https://github.com/tylercamp/twvault-trimmed

This previously private script is now open for general use. Each user must get their own script for each world - instructions below.

This script takes your reports, commands, incomings, and troops, and uses this to provide useful information. (See screenshot below.) Tribemates that upload will add to the pool of data that the vault has to use, and benefits everyone using the script in your tribe. (e.g. if you upload a report, scripts for other tribemates will take your report into account automatically.) There are 5 big features in this script (and many, many smaller ones):

- In-game map overlay
- Automatic backtime search and planning
- Tag incomings
- Tribe council easily sees troops and participation from all tribe members
- Action notifications, ie notification when an ally uploads an incoming train to the Vault, showing target village and landing time


Getting the Script
If someone in your tribe already has the vault, you should ask them to send you a script. (They should have done so already - that's how the script is meant to be used.) If you're starting on a new world or want to set up the vault for your tribe, you can register with your world and in-game name at:

>>> https://v.tylercamp.me/register <<<

If you have any issues with registration, you can contact me:
- By posting here
- By PMing me here
- On Skype (astpgmr)
- On Discord (tcamps#9882)
- On Discord (dedicated server: https://discord.gg/hNDgrta)

Skype is most reliable and will get the quickest response - don't need to wait for me to accept a friend request (like on Discord) and I *literally cannot close Skype on my computer* (thanks MS) so I'll always get the message and notification.

You'll get a script like:
Code:
javascript:window.vaultToken='00000000-0000-0000-0000-000000000000';$.getScript('https://v.tylercamp.me/script/main.js')
Requirements
You need Premium to use the Vault, and should use Google Chrome on desktop. The vault hasn't been tested on (or designed for use on) other browsers.

Instructions/Guide
There isn't a comprehensive guide for the vault. (It's too big and I'm too lazy to write everything.) The best way to learn it is to check the screenshot above for the general feel, and just try out the different features of the script.

Generally, uploading your data is the first thing that should be done. Upload frequently - the script skips data that it had already uploaded, so if you don't upload often you'll spend more time waiting.

An (incomplete) list of Vault features. (There's a lot and I can't remember everything or am too lazy to write everything.)

Run on the map to highlight villages based on data you've uploaded to the Vault:
- Nukes
- Stacks (color-coded stack size)
- Low wall
- Has Church/Watchtower
- Nobles
- Returning nukes

Hovering over villages after running the Vault will enhance the Tribal Wars popup showing various building levels, loyalty, troops, and an estimate of nukes required to clear any stacks. (Nuke estimate only reliable on non-archer worlds.)
Run while viewing the page for an enemy village to list all returning troops to that village, the troops associated with each command, and a button to automatically generate backtiming plans.
Open the main Vault interface and go to the Tools tab, then the "Find Backtimes" section. Tweak the options to your liking and click "Search" to get a BB-code table of launch plans for your nukes to backtime enemy nukes that are returning.
Open the main Vault interface and go to the Tools tab, then the "Fake Script" section. You can generate a dynamic fake script selecting players, tribes, and continents, and narrow down the selection by coordinate range or distance from a coordinate. From there you can get a fake script managed by the Vault, or you can get the current list of coords directly for use in your preferred fake script.
Spreadsheet Summary
Vault Admins can download a spreadsheet summary for others in their group that have uploaded to the vault. Go to the "Admin Options" tab in the main vault interface, under the "Tribe Stats" section. This spreadsheet contains nukes/DVs owned, at home, and traveling, DVs supporting others, DVs supporting self, number of outgoing attacks, number of incomings, DV support on a per-tribe basis, nobles, etc.
User Management
Vault admins can make scripts for new users, revoke scripts for users, and give or revoke admin privileges for users in their group.
Run this script on your Incomings page to open the tagger, which is an experimental feature, and can be used to tag incomings with various information stored in the Vault such as total # of attacks from that village, # of cats known in that village, # of troops from an enemy village that were traveling when an attack was sent, etc. The tagging format is customizable and an include things such as village name, player name, coordinates, etc. If you don't like the results of the tagging, there's a "Revert" button to undo the tagging and rename incomings to their original names.
Open the main Vault interface and go to the Stats tab to get info on the performance of your account and of others in your group over the last week, including # of fangs, fakes, and nukes sent.
Open the main Vault interface and go to the "Actions/Alerts" tab, which has various useful suggestions and tools. This includes Recap notifications (if an ally's village was recently taken and you have nobles nearby), Stack notifications (if a village has low defenses and there are possibly enough nukes currently incoming to clear it), Useless Stack notifications (stacks on villages that are too far from any enemy villages to be useful, or stacks to players outside of your group), Snipes notifications (list of villages that have a noble train incoming that you have enough defense nearby to snipe for), and Noble Targets (villages with low loyalty or low defenses that should be easy to take.)

This section also contains "Request Snipe", "Quick Support", and "Request Stack" sections, which can be used to get a list of player names that have troops available and nearby for a snipe/emergency support/long-term stack.
Open the main Vault interface and go to the "Support" tab, and then the "Translations" section. Here you can change your language and select a translation for the given language. This is useful for players that don't speak English well, or are playing Tribal Wars in a language other than English. You can make your own translations or create modified copies of existing translations to your liking, without needing to wait for me or another translator to build a translation for you.

Data Collection
All requests to the script are IP-logged for security. Data that you upload is visible to vault admins in your group (aka tribe) and nobody else. Information collected by this script will never be shared with any third parties or any unauthorized tribes/players. All requests through the script are logged with your IP, user ID, tribe ID, and various request information such as the endpoint.

Developer Disclosure
As the developer, I have access to various features and information not accessible to other players. I disclose these methods here for transparency and clarification.

1. I am able to but will never deliberately modify or expose data for the benefit of myself or my tribe. (This would quickly lead to banning of the vault script.)

2. As the developer, I have the following tools at my disposal but will not use them for the gain of myself or others, which are limited to debugging or development purposes:
- Script impersonation: I am able to use any player's Vault script and spoof the code to run as though I were the intended user (necessary to view problematic behavior without needing to record a user, connect to their machine, or sit their account; usually only used for problems with high scores or Admin spreadsheets)
- Manual privilege overrides: I am able to reassign any Vault user to a Standard, Admin, or System Admin token (necessary for permissions testing)
- Advanced data exports: I am able to directly connect to the Vault database and retrieve more detailed information than users have access to (necessary for cross-referencing incorrect data when troubleshooting an issue, usually only used for problems with incoming tagging or incorrect troop estimates)

3. As the developer, I may pull any data from the Vault database at my own discretion only for debugging, development, or analytics. I will not share this data with anyone other than player(s) that own the data.

Privacy/Security
The script was designed with various layers of protection to prevent spoofing/hacking. It is not perfect (no system is) but is more than sufficient to deter even experienced developers.

All features in the script were designed to provide features without leaking information. Privacy and security were major parts of the script's design. Features provide just enough information to be useful, without providing so much information that a single spy could compromise all of a tribe's data. Data is provided to Vault Admins in an aggregated form to promote accountability without leaking damaging information such as specific troop locations.

Integrity
I will never forcibly revoke scripts for the benefit of any person. Scripts may be revoked, and players may be banned from the Vault for inappropriate behavior – this includes hacking attempts, and general douchery. (ie, a council member sending troop spreadsheets to enemy tribes.) This gives the Vault a bad name and gives me a headache – I don’t want to deal with it.

If you're having issues with the Vault, you can message me. But first, try the following:

1. Make sure you've uploaded all of your data
2. Try using Google Chrome on Desktop
3. If getting a lot of errors whenever the script is ran, ask your vault admin if your script was disabled
4. If your language in-game isn't English, go to the Support tab then the Translations tab, and select your language/translation to use.
5. If the script isn't working at all despite using Chrome on desktop, check that the script looks like the example in the "Getting the Script" section above. Make sure that any quotation marks are regular and not the fancy-shmancy kind that are used by some messengers.

Q: Can others using the Vault on the same world see my info?
No - every time you make a new script through the Register page it's placed in a new "group" - any script can only see data from others in the same group. Whenever an admin makes a new script, it's automatically placed into their group. (So vault "admins" are really just "group admins".)

Q: I've got an Admin script and someone is sitting my account, should I delete my script/disable Admin?
No - If you have an admin script and someone sits your account, it will behave just like a regular non-admin script when they run it. No need to disable or revoke admin on a script during a sit.

Q: I've got a script from you, I can just share this with my tribemates right?
No - each script is tied to a single account on a single world. Vault Admins can make scripts for others by running the script and going to the "Admin" tab, under the "Manage Users" section. If I've given you a script, it will be set as an Admin script.

Q: Can I get another Vault script for our sister tribe, spies, etc.? / How do I share Vault info with my sister tribe, spies, etc.?
Each Vault script is limited to a "group", not to a tribe. You can make scripts for anyone on that server if you're an admin, including players in sister tribes/etc. They won't be able to see any of your tribe's information unless you set their script as an admin as well.

Q: Can you upgrade my script to Admin?
Probably not - If there are no other admins in your group that are actively playing, I'll upgrade your script to an Admin after doing some research. If there are any other active admins in your group I won't upgrade you to an admin - ask them instead.

Q: Can you add feature X?
No - I'm not actively working on this anymore. I'm only hosting, maintaining, and fixing (major) bugs for it.

Q: How much do I need to pay to use it?
Nothing, it's free to use. I do appreciate PP donations to this account (tcamps) so I can pay for premium to test and fix the script when necessary, or contributions on Patreon to support server hosting. But again, payment is not required or expected.

Q: Is this available on other servers?
The script is only approved for the servers listed at the beginning of this post. Other servers can be supported fairly easily, but the approval process is tough since I don't have a comprehensive guide yet (which is a requirement for approval. Here on .net it was incrementally approved, but a new complete description needs to be written for later submissions.) Some servers do automatically allow scripts approved for .net though - in this case, message me and we'll work something out.

Q: Why is the incoming tagger wrong?
The issue could be related to: missing data (everyone needs to upload their stuff), they might be using some movement speed buff, or daylight savings time might have recently passed. Those last two will break Vault's travel time estimations. I can't do anything about buffs, but plan to add a more permanent fix to DST transitions soon.

Q: Why are the "useless stacks"/"stacks needed" alerts always empty? / How do I register a tribe as an "enemy"?
For those alerts, enemy tribes need to be manually entered into the Vault by your vault admin. This can be done using the "Admin" tab, under the "Enemy Tribes" section. (Tribe names are case-sensitive.)

Q: How big is a "DV"?
20k pop of defensive units or 1.6m total defensive power (different parts of the script use different methods.)

Q: How big is a "nuke"?
18k pop of offensive units or 450k total offensive power (different parts of the script use different methods.) HC are counted as offensive if there are also over 100 axe owned by the village.

Q: What does the vault count as a "fang"?
An attack with at least 50 cats and less than 8k total population.

Q: How do we handle tribe changes when both sides are using the vault?
Data from different scripts can't be merged and a script can't change from one group to another. The tribe being joined should issue new scripts for new members, and the new members should stop using their old scripts and will need to re-upload all of their data.

Q: Can I host the script myself? / Can I look at the source code?
Sort of - the build I run is closed-source and obfuscated for security. Some work has been done for a Kubernetes helm chart to handle installation and hosting of the compiled/obfuscated script, but this hasn't been completed yet (and hosting will easily cost over $50 USD per month on a Linux VM.) A modified version of the vault (with encryption removed) is available below, but I don't recommend using it without adding your own encryption since it's easy to spoof and impersonate other players. https://github.com/tylercamp/twvault-trimmed

Q: I (or my co) don't speak english well, is there a translation?
Open the Support tab in the script and there will be a Translations section, where you can select a language and one of the translations available in that language. Here you can also create your own translation and customize it, which will also automatically be visible for others to use.

Q: Does this work on mobile?
No - or at least, it's not officially supported. The vault has only been tested on Chrome for the desktop. If it works on other platforms, that's a happy coincidence.

Nuke estimates are incorrect on worlds with archers enabled
Archer worlds use a different battle formula than non-archer worlds; there is code for handling this difference but it hasn't been tested well, and I can't be bothered to get it working right.

Incoming tagger may have poor accuracy
Usually this is from people not uploading their reports, but often there just isn't enough info to go on. The Vault bases its tagging off of "owned troops", which is an estimate of troops belonging to that village. Fakes to/from a village is usually what screws troop-tracking though we handle most cases automatically.

Generally, the incoming-tagging is an experimental feature which should be used to inform how to handle incomings rather than interpreted as "truth". The most reliable tagging feature is "returning troops" which is nearly always accurate. If an inc is tagged with >50% nuke returning, it's almost always a fake.

Script occasionally has errors when uploading
Usually this is a one-off thing - refresh your browser and re-running the script usually fixes it. If you have consistent errors, check that your script is enabled by your vault admin and that you are using a translation if your in-game language isn't English. Otherwise, send me a message so we can figure it out.

I'm not actively working on this script - minor/occasional errors/bugs probably won't get fixed. I will do my best to fix major script-breaking issues, e.g. incoming tagging is always incorrect, uploads always fail, admin troop spreadsheets are incorrect, etc. For major bugs you can contact me here or on Skype/Discord as mentioned above.

(Starting from 06/06/2019)

06/06/2019 - Fix bug causing some players to not appear in admin spreadsheet
15/06/2019 - Fix bug causing troop counts to be missing in admin spreadsheet, fix bug causing error in backtime calculator tool
16/06/2019 - A bug caused server to run slowly and break script for some users, bug is being investigated and server restarted
21/06/2019 - Added minimum-points filter to noble target suggestions notification
15/10/2019 - Fixed various usage of UTC time to use server time instead, fixes issues for non-UTC/BST servers

This section lists cases where I manually modified data in the Vault as part of administration. If you take issue with any of these actions, feel free to post here or PM me with questions/complaints.

20/11/2019 - Disabled all scripts on .NET HP/ENC1 for tribes "FULL" and "Contra" due to "a massive backstabbing and its getting abused" while vault was shared between those two tribes (players can still get new scripts and upload, but old data is no longer available)
 
Last edited:

tcamps

Non-stop Poster
I'm making the vault script available for public use - see the main post for details.

This thread is for questions and bug reports regarding the Vault.
 
Last edited:

Backen

Non-stop Poster
Just a thought about how the script categorizes fangs, I'm currently building lcs/cats in my fangs and the script doesn't seem to recognize them as fangs. So my question is do you have any plans on fixing this "problem"?
 

tcamps

Non-stop Poster
@Backen Let me know the account and world you're playing on so I can see what's happening

I've also heard of some reports of nuke counts being incorrect so there may be some larger underlying issue
 

tcamps

Non-stop Poster
As part of this fix I'll also be switching the Beta version of the Vault to be the default, public version - right now fixes need to be debugged and applied for both versions which is a pain. I haven't heard of any other bugs from the Beta users, so I'm considering it stable. Post any changes in behavior here and I'll take a look.
 

tcamps

Non-stop Poster
@Backen It looks like the LC in your fangs are throwing it off. Can you recommend a decent "check" for whether a command is a fang? Right now I'm thinking over 75 cats and less than 8k pop. Could also do cat count % of total troop count, or cat pop % of total troop pop.
 

Backen

Non-stop Poster
@Backen It looks like the LC in your fangs are throwing it off. Can you recommend a decent "check" for whether a command is a fang? Right now I'm thinking over 75 cats and less than 8k pop. Could also do cat count % of total troop count, or cat pop % of total troop pop.
Everything with 50 cats+ and less than 7-8K pop would be good.
 

hulkjohnsson

Chat Moderator
Any chance you could add in a tool for shaping barbs? Like a list of barbs that are in need of shaping down barracks/hq or something. Would be sick af
 

Shinko to Kuma

Non-stop Poster
Any chance you could add in a tool for shaping barbs? Like a list of barbs that are in need of shaping down barracks/hq or something. Would be sick af
I am indeed working on a script like that, but am waiting to finish it till support gives approval.
Don't mean to hijack the thread but since Tyler tagged me I figured I'd respond.

I halted all work on it till I get a response on my ticket about it tho.

It's nothing as insane as the vault, but it collects all loot assistant reports, filters on most recent ones per barb, then selects the closest unshaped barb near your current village.

This is the interface. Most of the hard work is done.

 
Last edited:

tcamps

Non-stop Poster
@Backen As in it's not loading at all? It's working for me on w107, though high scores aren't working right (which I'm aware of and will address later today.) Let's move this to PMs to avoid cluttering the thread. I need to know the browser you're running on, operating system, and will need you to send me your script.
 

Backen

Non-stop Poster
@Backen As in it's not loading at all? It's working for me on w107, though high scores aren't working right (which I'm aware of and will address later today.) Let's move this to PMs to avoid cluttering the thread. I need to know the browser you're running on, operating system, and will need you to send me your script.
Do you have discord? If you do add me Backen#9439.
 

tcamps

Non-stop Poster
The high scores issue is still being investigated, and there's a new issue where some players are unable to run the script. I'm hoping to resolve both of these tomorrow.
 

tcamps

Non-stop Poster
The bug preventing the script from working has been fixed, and high scores has mostly been fixed. Still waiting for some confirmation on the high scores change. Auto-backtime may not be working correctly (one report of issues), let me know if the Vault is auto-generating backtimes for you properly.

The first thing the Vault script does is synchronize the script's time with the server's time for security. If there was too big a time difference, requests would fail. One of the requests used when starting the script was being ran without waiting for that time synchronization. This didn't affect users that had similar time compared to the Vault, but users with a 1 minute difference would get errors.
 
Last edited:

tcamps

Non-stop Poster
A bug affecting backtime generation has been found and should be fixed. You should see many more backtime options as you upload reports for returning nukes. This may also improve the accuracy of the Stats and High Scores sections. Let me know if there are any regressions or further bugs, or even no change at all.

Whenever you upload a report, the vault tries to tie that report to an existing command that you uploaded before and associates the surviving troops with that returning command. If it can't find a matching command, it'll generate one internally so that it can track the returning troops. This last part worked fine, but if there was a pre-existing command it would unintentionally skip the troop association part.

Backtime calculation relied on returning commands having troops associated with them. High scores rely on reports and commands (and resolves overlaps between the two automatically.) Both of these features will be impacted by the fix.
 
Last edited: