Skip to content
TORNLIFE More

[Userscript] Torn Treemap

Started by selwyn [2093198] on in Tools & Userscripts.

21 replies · 1.02k views · thread synced · 4 days ago · View on torn.com
About this thread

Posts archived: 22 / 22 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
22
Discussion span
→
Authority score
52 / 100
Historical score
35 / 100
Story score
48 / 100
Engagement score
68 / 100

People posting, likes and official posts are not counted for this thread yet: on threads longer than one page they come from a periodic pass over the archive, which has not covered it.

selwyn [2093198]
Torn Treemap is out now!


[image: usercontent.irccloud-cdn.com]

What is Torn Treemap?
Torn Treemap adds a graph (called a treemap lol) to your items page that breaks down your inventory by total value of items used, as shown above.

Why should I use it?
Good question! I developed Torn Treemap to help me figure out which items were most valuable in my crowded inventory, to sell off for funds. It will be useful to you as well for that reason.

Isn't it very big?
Torn Treemap resizes with the width of your items page, and can be hidden from view when you don't need it. Simple!

How do I use it?
  • Ensure that you have Greasemonkey installed.
[image: usercontent.irccloud-cdn.com]
  • A dialog to install the script should appear.
  • After you install the script using Greasemonkey, Torn Treemap will be ready to use.
  • On first use, you will be prompted for your API key - make sure you have this handy.
Why isn't Torn Treemap available on Greasy Fork?
Good question! Torn Treemap relies on a graph plotting library, called D3, that Greasy Fork does not allow their uploaded scripts to use. For this reason, Torn Treemap is hosted on Github for the moment. In general, you should not install scripts without knowing what they do. Torn Treemap's source code is available for inspection so you know what you are getting.

Is Torn Treemap compatible with Tampermonkey or other userscript managers?
Torn Treemap should be compatible with other userscript managers, but it has not been tested yet. It is possible that some issues exist with different managers. If you can, use Greasemonkey for best results since this is what Torn Treemap has been developed for.

Enjoy! Comments, suggestions and feedback welcome.
R4NG3R85 [2572604]
the scrripts showing errors and are still blaank...

https://prnt.sc/1003zjs

Tried manuel

https://prnt.sc/100404p

https://prnt.sc/10040w9
selwyn [2093198]
Hi R4NG3R85, thanks for your patience.

We think that the graph is blank because Torn Treemap has not stored your API key correctly, either because it wasn't entered correctly or because of some other issue.

At the moment, Torn Treemap can't tell whether it has a working API key, so it gives a blank graph if it doesn't have one. We are planning an update to solve this.

But for the moment, you can fix the problem by doing one of the following things:
  • Uninstall Torn Treemap using Tampermonkey and then reinstall it, making sure you put the correct API key when prompted.
  • If you don't mind editing the script, then replace line 305
    let apiKey = await GM.getValue('apiKey', 0);
with
let apiKey = "your-api-key-here"
substituting your API key as appropriate.

Either of these things should work, if there is still a problem please post here and we will sort out the issue.

Thanks for trying out Torn Treemap
Sl3uthT3ch [2613307]
I found an error in your script. for your names. you have "Cars" instead of "Car"

names = ["Book", "Energy Drink", "Booster", "Alcohol", "Artifact", "Melee", "Flower",
"Enhancer", "Medical", "Jewelry", "Virus", "Temporary", "Special", "Clothing",
"Secondary", "Drug", "Supply Pack", "Plushie", "Defensive", "Electronic", "Primary",
"Candy", "Other", "Cars", "Collectibles"
]
R4NG3R85 [2572604]
DA DA DA DAAAAAA :D That did the trick guys..

Thanks alot for the super troubleshooting you have provided

https://prnt.sc/108phjp