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/setVillageNotes.js');
Public?
Public
Set/Get Village Note

Approved:
#t14272680

set-get-village-notes.png


This script is run on a single report view and it saves that report data as a note on the enemy's village notebook.

Then if said enemy sends an attack from that village and you run the script on single command view, that report will show up letting you know about the possible incoming enemy force.

This script requires Premium Account to be active.

Here is how it looks in practice:
(this is a poor demo video since I did not wanted to show spoil info from active world)

For any bug, suggestion, or if you need help with this script, feel free to reply on this thread.
 
Last edited:
Upvote 4

subliminal9999

New Member
Reaction score
11
Very nice. I was looking for something like that from long time.
It is possibile to add notes in bulk, and not a single one at a time?

Geat job! Thanks!

(Tested in .it servers, and work)
 

Bobah

Well-Known Member
Reaction score
14
Does the script work with reports of attacks against barbs? Because when I try to do so, it just puts out an error message saying that the note can not be added for this report.
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
Does the script work with reports of attacks against barbs? Because when I try to do so, it just puts out an error message saying that the note can not be added for this report.
No. The script does not save reports of attacks against barbarian villages.
 

Easy-Eastside

New Member
Reaction score
1
When using on newer reports and an old report is already added in the notes, the time on top of the report spoiler doesnt get updated to the newer report date. Also when using on a defensive report, the note is added to my villages instead of the enemy village (german server)
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
When using on newer reports and an old report is already added in the notes, the time on top of the report spoiler doesnt get updated to the newer report date. Also when using on a defensive report, the note is added to my villages instead of the enemy village (german server)
Thank you for bringing up these issues.

Regarding the first issue, time is not being updated.

1710776551015.png

If you mean the "today at" part of the note, that is being handled by the game, not by the script and from what I have seen that is updated correctly.
If you mean the "Mar 17 ..." which represents the battle time basically, that got updated too in the tests that I have done and I have had no other reports like this that say that the battle time does not get updated.

Regarding the second issue you mentioned. I have noticed that to happen in two scenarios, with forwarded reports and when adding as a note reports of battles happening on your own villages. In both cases the root cause is the same.

The script checks if the defender's name is equal to the player's name (the player that's running the script), if yes than the script saves the report on the attacking village, otherwise it saves the report as a note on the defender's village ID.

If you add as a note a report where both defender and attacker are your own villages, then this messes up the script.
If you add a note a forwarded report then this also messes up the scripts logic.

As far as I know, this is the only logical flaw the script has, the issue with the forwarded reports and I will work to fix this, when I have more time.

I have never run the script on the DE server so haven't personally tested the script on that server, however have ran the script personally for more than 10k times and the issue with the forwarded reports is the only issue I have found on the script. This script has also been run more than 400k times in total so far and I have had really few reports of the script not working correctly, except this reported case of forwarded reports (which I already knew about).
 

Easy-Eastside

New Member
Reaction score
1
Thank you for bringing up these issues.

Regarding the first issue, time is not being updated.

View attachment 12700

If you mean the "today at" part of the note, that is being handled by the game, not by the script and from what I have seen that is updated correctly.
If you mean the "Mar 17 ..." which represents the battle time basically, that got updated too in the tests that I have done and I have had no other reports like this that say that the battle time does not get updated.

Regarding the second issue you mentioned. I have noticed that to happen in two scenarios, with forwarded reports and when adding as a note reports of battles happening on your own villages. In both cases the root cause is the same.

The script checks if the defender's name is equal to the player's name (the player that's running the script), if yes than the script saves the report on the attacking village, otherwise it saves the report as a note on the defender's village ID.

If you add as a note a report where both defender and attacker are your own villages, then this messes up the script.
If you add a note a forwarded report then this also messes up the scripts logic.

As far as I know, this is the only logical flaw the script has, the issue with the forwarded reports and I will work to fix this, when I have more time.

I have never run the script on the DE server so haven't personally tested the script on that server, however have ran the script personally for more than 10k times and the issue with the forwarded reports is the only issue I have found on the script. This script has also been run more than 400k times in total so far and I have had really few reports of the script not working correctly, except this reported case of forwarded reports (which I already knew about).


For the first issue:

gHaBKmH.png


As you can see, the report in the spoiler is updated correctly as it is newer than the note. But the date above the spoiler is from the first report from which the note initially was created.





Second issue:

R8MWllu.png



Im the defender here (easy) but when i create note with the script, it saves it on my village:


TdMCZkl.png
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
622
For the first issue:

gHaBKmH.png


As you can see, the report in the spoiler is updated correctly as it is newer than the note. But the date above the spoiler is from the first report from which the note initially was created.





Second issue:

R8MWllu.png



Im the defender here (easy) but when i create note with the script, it saves it on my village:


TdMCZkl.png
Try running the script without loading other scripts into the reports screen.

If you have userscripts loaded (which as far as I know are legal on DE, but not legal here), try not loading them, then run the script.

1710790599855.png

Here is how it looks like on my end.
 
Top