RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
623
Author
RedAlert
Contributors
DaWolf85
Quickbar Entry
javascript:var NOBLE_GAP=100;var FORMAT='%unit% %player% %sent%';$.getScript('https://twscripts.dev/scripts/incomingsOverview.js');
Public?
Public
Incomings Overview

Approved: t14466468

incomings-overview.png

This is how the script looks in action:


User Variables:
NOBLE_GAP defines the attack gap in milliseconds. From world to world this changes and there is no automatic way to get this from the world config (a call here for Inno devs to add such info somewhere, either on world config files or even better on game_data global object)
FORMAT defines the mass tagger format. Possible format variables that can be used are:

%unit% - type of unit sent, example Spy, LCav, etc
%sent% - time when attack was sent as calculated from the unit type, example Jan 13, 15:38
%duration% - duration in formatted time, example 0:09:02 (so 9 minutes and 2 seconds)
%distance% - how many fields away is the attacker from defender, example 1
%origin% - origin village info, example A001 (430|516) K54
%arrival% - time of arrival of incoming, example Jan 13, 15:56
%player% - attacking player, example RedAlert
%coords% - attacking village coordinate, example 430|516
%return% - shows the return time of the incoming, example Jan 13, 15:38
%destination% - destination village info, example A001 (430|516) K54 (posted this only for reference, DO NOT add this on the script format since it will break the script loading even though it is a valid tag)


Notes:
- When you click the Mass Tag Incomings button the incs screen will reload so you will have to re-run the script to continue doing whatever you where doing.

Feel free to suggest features, ideas and/or report any issues/bugs or let me know if you need any help with this script by replying on this thread.
 
Last edited:
Upvote 7

terminator

Member
Reaction score
1
Could you also modify the script that would mark duplicates in ascending order so it would be easier to track how many attacks from specific village still have to land?
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
623
Could you also modify the script that would mark duplicates in ascending order so it would be easier to track how many attacks from specific village still have to land?
What do you mean in ascending order?

Whenever you use the mark duplicates feature, the script if it finds duplicates will add the tags, example 1/5, 2/5, ..., 5/5.

Whenever one of these 5 incomings lands though you will have 2/5, 3/5, 4/5 and 5/5, even though there are only 4 now. You will need to click again Mark Duplicates, to re-tag them with the current duplicates amount.
 

terminator

Member
Reaction score
1
What do you mean in ascending order?

Whenever you use the mark duplicates feature, the script if it finds duplicates will add the tags, example 1/5, 2/5, ..., 5/5.

Whenever one of these 5 incomings lands though you will have 2/5, 3/5, 4/5 and 5/5, even though there are only 4 now. You will need to click again Mark Duplicates, to re-tag them with the current duplicates amount.
Yes I get it but they are randomly numbered.
Let's say that an enemy sends multiple attacks from the same village. Then I click on "Mark Duplicates" button and script renames incomings with notation AS:x/n . But the problem is that these notations are not sorted in any way and I would like them to be named in ascending order based on the time they land. For example incoming number 1 lands at 10:10:10:123, incoming number 2 at 12:10:10:719 and incoming number 3 at 11:10:10:842 assuming all incomings are from the same village. I would like for incoming 1 to be renamed to ...AS:1/3 incoming 2 to AS:3/3 and incoming 3 to AS:2/3. Hopefully makes sense now.
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
623
Yes I get it but they are randomly numbered.
Let's say that an enemy sends multiple attacks from the same village. Then I click on "Mark Duplicates" button and script renames incomings with notation AS:x/n . But the problem is that these notations are not sorted in any way and I would like them to be named in ascending order based on the time they land. For example incoming number 1 lands at 10:10:10:123, incoming number 2 at 12:10:10:719 and incoming number 3 at 11:10:10:842 assuming all incomings are from the same village. I would like for incoming 1 to be renamed to ...AS:1/3 incoming 2 to AS:3/3 and incoming 3 to AS:2/3. Hopefully makes sense now.
Yeah too much work for that. Don't think I will implement that.

Becuase of the new features that were added into this script, there are now many calculations that happen when the script loads, like many. This sometimes makes the browser hang a bit, especially if you have like 10k+ incomings.

So at the moment, before adding any new logic into the script I want to focus on improving the current code to be more performant before adding more logic, which at the end would make the code less performant.

So right now, I'm not looking into adding any more logic, even if it's a sorting logic (unless it's something big like the OP spotter chart sort which was needed).
 
Last edited:

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
623
Can you explain how Fake Finder works? I couldn't find it in description. Thanks
Fair question.

So, lets say you have a red incoming from me from the village 123|456 and from this same village I have sent 10 more attacks at other tribe mates of yours and 5 more unknown attacks at you.

So you know that the other 5 attacks at you from this same village will be fakes or fangs at most, since they cant all be nukes after all.

So the fake finder helps exactly with that.

You share to your tribe mates that you have a red inc from that village so they know that all incs from that same village will be fakes.

So when you run the fake finder feature you insert on the textarea field a list of known red inc vills, and the script will find if you have incs from them and if you do have the script will automatically select these incs, so you can then ignore them, or label them (thats up to you).

Hope this helps to understand how that feature works.
 

terminator

Member
Reaction score
1
Fair question.

So, lets say you have a red incoming from me from the village 123|456 and from this same village I have sent 10 more attacks at other tribe mates of yours and 5 more unknown attacks at you.

So you know that the other 5 attacks at you from this same village will be fakes or fangs at most, since they cant all be nukes after all.

So the fake finder helps exactly with that.

You share to your tribe mates that you have a red inc from that village so they know that all incs from that same village will be fakes.

So when you run the fake finder feature you insert on the textarea field a list of known red inc vills, and the script will find if you have incs from them and if you do have the script will automatically select these incs, so you can then ignore them, or label them (thats up to you).

Hope this helps to understand how that feature works.
But when I insert coordinates it always says "No fakes have been found" even if I put coordinate of village that is attacking me. Did I miss something?
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
623
But when I insert coordinates it always says "No fakes have been found" even if I put coordinate of village that is attacking me. Did I miss something?
The fake finder feature does not select red incs and noble incs. Please try again and le me know if it still works in weird way, if yes, pls provide some more info so I can investigate what could be happening.
 

terminator

Member
Reaction score
1
The fake finder feature does not select red incs and noble incs. Please try again and le me know if it still works in weird way, if yes, pls provide some more info so I can investigate what could be happening.
It works now. Could you also implement ability to rename all selected incomings at the same time? Thanks.
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
623
It works now. Could you also implement ability to rename all selected incomings at the same time? Thanks.
There are 2 different kinds of renamings that can be done when it comes to renaming incomings, frontend side renaming done via scripts and server side renaming done via the game's label function.

Most of the taggers utilize the game's built-in label function. The taggers included on incomings overview script utilize both methods.

So if you want to mark duplicate incomings from same village, the backend can not do that. So it has to be done from the script with custom logic.

Because of scripting rules we can not do more than 5 requests/second so a script can't rename all incomings at same time, to mark them all at once with duplicates for example.

As for the other kind of taggings the script does, they utilize the game's Label feature, so they do happen all the incomings renamed at once.
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
623
This is a notification regarding a small script update, which was forced because of a game update that happened.

So the game update is this one:

More specifically the part of the update that affected this script (and not just this one but all incoming taggers who did tagging server side got affected) is the incoming tagger configurator.

With the configurator UI introduced, the hidden FORMAT field is removed. These tagger scripts used that hidden field to pass to the game the format how the game's backend should tag the incs.

So all the scripts that utilized this method of tagging will not work like that anymore, unfortunately even a very used return time calculator script.

So I had to remove one feature from script. I had to remove the Custom Tag Incoming feature since basically would not work anymore after the update.

I also had to remove the return time tagger feature from the script since that also got broken from the update.

So yeah, that's it. This is the notification and the reason why these features aren't anymore part of the script even though they were recently added.
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
623
How does the Fake Finder work? How does it determine that something is a fake?
Read here:
 

Kyomaku

Active Member
Reaction score
4
Read here:
Oh my god xd. I went through 3 pages with control+f for fakefinder, then ran out of time and asked my question, I feel like an idiot now. Thank you!
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
623
Alright, that sounds like it would be mostly useless on a non-WT world?
Not 100% correct because even there you might still know enemy villages which have no nukes, example dead nukes. If you know that an enemy village had it's nuke killed yesterday for example and you have 20 incomings from this village, that means that these 20 incs are not nukes. The fake finder can select as possible fake even unknown attacks.

However yes, the "power" of this feature decreases on non-WT worlds.
 

Kyomaku

Active Member
Reaction score
4
How does the script know that the nuke of that village is dead? Does it utilize some kind of report-reading function?
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
623
How does the script know that the nuke of that village is dead? Does it utilize some kind of report-reading function?
The script does not know that, the player does. You provide the script the coords of dead red nukes for example and the script checks if there are incs from these coords or not, if there are, the script selects them, if there arent, a notification is shown to notify the player that no fakes have been found.

Of course, the script saying no fakes have been found does not mean that all of your incs are nukes. It means that as far as the script can "guess" based on the logic explained above, the script cant find any fake.
 
Top