Skip to content
TORNLIFE More

[Spreadsheet] to log Attacks

Started by mortalsoul [2818519] on in Tools & Userscripts.

5 replies · 298 views · thread synced · 5 days ago · View on torn.com
About this thread

Posts archived: 6 / 6 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
6
Discussion span
→
People posting
4
Likes on archived posts
15
Authority score
36 / 100
Historical score
27 / 100
Story score
41 / 100
Engagement score
53 / 100
mortalsoul [2818519]
For all the nerds out there:
This spreadsheet tool i put together calls Attack logs via API and creates a database with it to further analyze. It does all the dirty work for you, besides repeatedly clicking a button ( yes it is intended that way, since i tend to forget to stop scripts that run automaticly all the time -.- )

After very little setup ( put in your API key and setting the timeframe to call data from ) you start the script. It runs for about 5 minutes, in which it completes about 10 to 15 cycles of calling new data and processing it (i.e. 1000 to 1500 attack logs). Rinse and repeat until your data is complete ( it tells you when to stop ).


Feel free to check it out. Open the link, make a copy to your own account and watch the magic happen ;-p
Please let me know any Ideas/ critique you might have, or in what ways you processed the collected data to gather the information you wanted from it.


For factions (user needs faction perms on API) :
Attack logger Faction


For personal use:
Attack logger personal


Disclaimer:
This is my first scripted Spreadsheet that actually works as i intended^^ but im still a noob, so please bear with me

Also a big THANK YOU to all other tool creators out there! You have inspired me to learn something new!
AfroBoy [2822838]
Very good actually. R++ :) I used both the Personal and the Faction loggers since I have perms and your sheets delivered as promised. I am currently in a very small faction and we are trying to raise enough respect for Point Storage, so this told me exactly how much respect we gained (and lost) since the start of the Halloweek event.
Garrincha [539752]
this is great!
can you put energy used, number of attackers and attack log?
been looking for something like this for sometime!!

Edited the code and already have the link to the attack log. - easy var attack.code
trying to get the energy used and number of attackers now. - energy only on the attack log or in the event log and same with attackers i think
can we use the timestamps or the codes just to get that info from an attack with another api call?
mortalsoul [2818519]
Thanks! Nice that it works for you too
That was the idea behind it, to make collecting the data easy and have it in a (somewhat) easy format to work with.
I guess two pivot tables (filtering incoming and outgoing hits) did give you a fast answer? Or did you use QUERY functions? (Those are very powerful, but i dont understand them good enough to provide a decent example sadly)
mortalsoul [2818519]
Appreciate the xanax! THX!

Very good! I didnt think the links to the logs would help me, so i left them out^^

Maybe play around with pivot tables created from the whole datasheet. They work best for me when only using attacker or defender as rows. Try applying filter to attacker / defender faction and filter results by positive and negative outcome ( attacked/mugged/hosp and lost/stalemate/timeout/interrupted ). I would then calculate energy spent by multiplying those numbers by 25 since i dont think you can API call energy on a faction level?
Keep in touch for further questions, i would also love to improve this^^