Skip to content
TORNLIFE More

Simple budget tracker

Started by Szanti [2965724] on in Tools & Userscripts.

9 replies · 707 views · thread synced · 6 days ago · View on torn.com
About this thread

Posts archived: 10 / 10 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
10
Discussion span
→
People posting
3
Likes on archived posts
13
Authority score
37 / 100
Historical score
25 / 100
Story score
37 / 100
Engagement score
60 / 100
Szanti [2965724]
In a nutshell: Track your flying + crime income vs xanax, e-refill and rehab costs.

After quitting my cushy candy shop job to pursue the city job careers I want to rely on flying and crimes only as the income source to balance out my routine costs so I can use the rest to build capital. For this reason I built this tracker to see how well I'm doing, if I can slack a bit or if I need to offset some lazy days. All values are in thousands of torn dollars.

[image: snipboard.io]

https://docs.google.com/spreadsheets/d/1RD9ltptnAPHWLIZ7sFgjm1onCRNkXSNqpqqxCOfIn_M/edit?usp=sharing

Top left you can set your cost of living, for instance I import my own xanax so I set that at 750k. In cell L8 you can input your API key and with the cells O3, O4 you can set if you want imported xanax to count as income (I don't because I don't sell it) and if you want to count faction xanax in the xanax used column, which would then be added to your costs. The settings do not apply retroactively. Indeed no logs are saved, it's all summed up and logged in the sheet. Also you need a full access API key since the script needs to be able to look at your logs.

For the initial setup create a copy of the sheet in your own google drive. Then you can set a starting value in H10 if you don't want your balance to start at 0 and list whatever starting date you want in L6 and logs will be collected as far back as that day. I wouldn't recommend going too far back however, google scripts simply kills itself after 6 minutes of runtime and there is a 1 second delay between calls to remain below the 100 calls/minute limit.

The script uses the average market value at update time to calculate the value of items and then adds or subtracts accordingly. So it's not terribly accurate, especially the further back in time logs are collected. The point here isn't a dollar-accurate accounting software but a general overview of how good or how bad you're doing maintaining your accumulated capital.

The cost values in B3-B5 are used in spreadsheet formulae in the profit column, so changes there do apply retroactively. I found it useful to see how much of an impact importing vs buying xanax would have, or whether renting at 800k/day vs 850k/day would have made a big difference.

If you want changes to living costs to _not_ be applied retroactively, or offset any other errors made, then you can change any value in the log area and nothing will break. Or you can use the "correction amount" column I if you want to offset any values explicitly. For example the big income spike in the picture on 7/1 was a unique outcome giving me an office chair. Since I didn't sell it I can correct the income reported on that day by changing the crimes value in column C for that day manually or by giving a -10m or whatever in the correction amount column I of that day.

The only fields a bit tricky are the topmost date value A10 if you intend to run an update on the day listed, and the last update value in L6. A10 is used if the update is run on the day listed so new incoming values are added to the existing ones and L6 obviously to see how far back logs should be collected from, so setting it back risks logs already counted being counted again and setting it ahead logs being missed. But if that's an intention of yours, for example to recollect all logs to reset some values, it works perfectly well. Delete all the rows from the topmost log line as far back as you want and set the last update time to 00:00 of the last day deleted.

If you intend to personalize the sheet you can move cells around and change the constants in the app script listed at the very top accordingly. So for instance if you want to add more data above the big log you can move the log down and then set the topLogLine constant accordingly. I think the script is pretty straightforward if you want to get real creative with it, or you can reach out if you want personalizations.

Known issues

The following log types aren't handled
  • 9051: Crime success bootlegging online store
  • 9053: Crime success bootlegging online store money paid
  • 9065: Crime success unlock
  • 9190: Crime critical fail lose card details
  • 9191: Crime critical fail lose online store
  • 9308: Crime bootlegging online store toggle
Since I don't have entries of these types on my account. If you have them I'd be grateful if you sent me the data object returned when calling the API, or if you message me, so I can get a sample of what they look like. I crash the script if they are encountered, delete line 179 if you don't care if they are ignored.
Szanti [2965724]
Thank you. As far as my needs go it's feature complete (at least for the time being). But I do love tinkering and expanding on this, so I'm absolutely open to requests

The reason I made this was so I can have an overview of my performance over the last couple days, so that I don't eat into my savings in order to fund my basic needs, with flying and crimes only. Everything else goes into savings which just passively grow and I can take out of or add to at will, as long as the balance on my sheet is somewhere positive I'm good.

So passive income doesn't really fit into what I intended but if you could get a bit more specific I am sure it won't be hard to add what you want. Do you want bank balance + stock value measured on every update and then saved for that day? Do you want to see the delta between days, or just the total value of your assets on each day? Which columns would you like it on? Bank seperately from stocks? Stock benefits on another column? Bank interest spread out over each day?
Szanti [2965724]
Update on the sheet:

- Fixed overdoses not being counted as used xanax
- Added some more calculations at the top as well as a rudimentary xanax/points stock tracker.
- The cost for restocking xanax also includes half a day's worth of income, since no income is generated when flying for xanax. Change the formula if this doesn't apply to you.
- Unkown log types are silently ignored from now on. Really the only logtypes missing are the ones listed under "Known issues" in the OP.
Vring10 [3147476]

I've been using the spreadsheet for the last couple of months and have to say is great. It doesn't have complications or variants, but covers the basic needs (flights + crimes income) and basic expenses (points, xans, upkeep).

An area I got interested is for crimes income. Usually the amount is not so great, but from time to time there are some uniques. I though the "log" sheet was going to include the extract from the Torn log, but it's empty.

If at any time you plan to do an update of the spreadsheet, would you think possible to add an option to get the Torn log added to the log sheet?

Thanks! 

Vring10 [3147476]

Exactly. In fact, there is already a sheet in the file (at least in my local copy) named as "log". Initialy I though the log was going to be there, but it's empty. 

This is going to be useful for a detailed analysis, like xans chart, or plushies price variation, or crimes finidings ....

I don't want to over complicate or ask for extra effort, just thought that because your scripts pulls the log, it was fesible to add to a sheet tab for future analysis.

Szanti [2965724]

Done. I believe everything to recreate the data in the main sheet is there, although not everything the API provides. As with the main sheet, the value of an item is the market value as reported by the API at the time the log is written to the sheet.

 

Also xanax taken from the faction is not written to the sheet but discarded. Lmk if you would like that logged as well.

 

Crimes returning multiple items are logged multiple times, once for each item.