Skip to content
TORNLIFE More

[v4.0] API connected crime tracking spreadsheet

Started by VanilaNightmare [2310825] on in Tutorials & Guides.

281 replies · 21.2k views · thread synced · 3 days ago · View on torn.com

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

VanilaNightmare [2310825]
That is as intended. The pivot table expands depending on the types of entries. If someone used the spreadsheet that didn’t have, for instance, a jail fail, it messed up the ordering of columns. The entries on line 5 are simply placeholders so your column headers are guaranteed to match the data shown in the columns
Ata [2507441]
This is amazing. Watching the sheet update itself with each crime while loading history... priceless!

Really great effort, kudos.
VanilaNightmare [2310825]
Did you use a "Full Access" API key and have you verified the API key was entered correctly? This error is normally caused by an erroneous API call and the most likely explanation for that is some sort of issue with the API Key
PowderdToastMan [2644668]
Doesn't work. There's no save as copy button anywhere. I downloaded it onto both Google drive and Google sheets cant make anything work on either no matter how many times I re save the file. Please fix
EDIT: Looks like you'll need to re-upload the file and add "&newcopy" at the end of the document name to allow others to save as a copy.
booby [2245352]
this is neat as h*ck thank u

questions: is the value column just the average value per crime completed? what does the grand total really mean there
DanLong [2715381]
Just discovered this and this is neat! Got a couple of questions.

The first row has an entry with blank label and value of 1 across. Probably not of concern though?

How do I translate the CE to what my NNB should be? So I can estimate how far I am from the next level.
VanilaNightmare [2310825]
The first row are placeholders so the pivot table aligns with the table headers. It shouldn’t really impact any of the stats since they break down by crime.

NNB milestones are roughly as follows:
60 - 15k Arsons
55 - 10k
50 - 6.6k
45 - 5k
40 - 3.5k
VanilaNightmare [2310825]
The value is either the average money earned or the average item value received. It factors in all results so it shows the average value you receive per attempt.

the only grand total value that really means anything is the “CE” column. The rest of them don’t help much
booby [2245352]
gotcha, thank you. i ran it for an hour or two and it pulled up more crimes than i have recorded in my statistics lol. gonna make a new copy and try it again.

said i did something like 13k arsons when i dont have the 10k arson merit yet xd
xedx [2100735]
One small suggestion, that I always use so that I can track what is using my API calls - add a comment to the call. For example:

var url = "https://api.torn.com/user/?comment=MyCrimesLog&selections=log..." will cause the key log associated with this to display "MyCrimesLog" in the comment column.

Since I write a lot of scripts, I find this useful to see what is using what when :-) Just noticed, in fact, that I gave one of my own scripts perms it didn't need...
booby [2245352]
ok i ran it all again and it worked this time, pretty cool to see my newbie history laid out like this lol. thanks for making it :)
VanilaNightmare [2310825]
The script has just undergone some drastic improvements, thanks in large part to xedx!

Improvements Include:
  • The past crime logging script will now run until all retrievable crime logs are tabulated. No more clicking the button every 5 minutes
  • At the conclusion of the past crime logging function, a trigger will be created to automatically add in recent crimes on an hourly basis
  • General improvements in reliability, error catching, and logging

Mentions: xedx [2100735]

DeKleineKobini [2114440] Committee Committee
small reminder, it's 2022, here I thought I missed an update of over a year ago lol

To get the new update, should we just update the script or are there also edits to the actual sheet?
VanilaNightmare [2310825]
Haha, very true. I’ll probably be making that mistake for another month before I figure it out.

The changes are only to the script, nothing has changed as far as the sheet is concerned.