[Userscript] Torn Treemap | Tools & Userscripts | TORN

[Userscript] Torn Treemap

    • selwyn [2093198]
    • Role: Civilian
    • Level: 25
    • Posts: 17
    • Karma: 18
    • Last Action: 9 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Thread created on 22:50:41 - 10/02/21 (4 years ago)
    |
    Last replied 20:56:12 - 18/03/25 (1 month ago)
    Torn Treemap is out now!




    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.


    • 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.
    Last edited by selwyn on 22:54:51 - 10/02/21 (4 years ago)
    • MikePence [2029670]
    • Role: Civilian
    • Level: 96
    • Posts: 4,966
    • Karma: 8,819
    • Last Action: 5 months
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:55:19 - 10/02/21 (4 years ago)
    Post link copied to clipboard Copy post link
    This is an absolute work of art R+

    • MrMickRi [482609]
    • Role: Civilian
    • Level: 95
    • Posts: 1,350
    • Karma: 758
    • Last Action: 12 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 23:02:53 - 10/02/21 (4 years ago)
    Post link copied to clipboard Copy post link
    The Pence has spoken ! upvotes needed.

    • MrMickRi [482609]
    • Role: Civilian
    • Level: 95
    • Posts: 1,350
    • Karma: 758
    • Last Action: 12 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 23:05:35 - 10/02/21 (4 years ago)
    Post link copied to clipboard Copy post link
    Tested and working in tampermonkey. Using direct code into "new script" on tamper monkey and works a charm.

    • csi21 [2348217]
    • Role: Civilian
    • Level: 19
    • Posts: 3
    • Karma: 2
    • Last Action: 1 year
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 06:26:58 - 11/02/21 (4 years ago)
    Post link copied to clipboard Copy post link
    excellent [ edited from very good]
    Last edited by csi21 on 06:27:48 - 11/02/21 (4 years ago)
    • Jibaou [2241021]
    • Role: Civilian
    • Level: 58
    • Posts: 63
    • Karma: 17
    • Last Action: 1 year
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:53:11 - 15/02/21 (4 years ago)
    Post link copied to clipboard Copy post link
    it doesn't work :((

    b751313d-80e1-5aba-2241021.png

    • MrMickRi [482609]
    • Role: Civilian
    • Level: 95
    • Posts: 1,350
    • Karma: 758
    • Last Action: 12 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 08:37:36 - 16/02/21 (4 years ago)
    Post link copied to clipboard Copy post link
    Whats the issue Tuna ? also where are you trying to use it

    • R4NG3R85 [2572604]
    • Role: Civilian
    • Level: 83
    • Posts: 158
    • Karma: 96
    • Last Action: 5 months
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 23:01:46 - 16/02/21 (4 years ago)
    Post link copied to clipboard Copy post link
    its not working for me either, the treemap dropdown shows, but nothing is visible
    • MrMickRi [482609]
    • Role: Civilian
    • Level: 95
    • Posts: 1,350
    • Karma: 758
    • Last Action: 12 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 08:37:16 - 17/02/21 (4 years ago)
    Post link copied to clipboard Copy post link

    R4NG3R85 [2572604]

    its not working for me either, the treemap dropdown shows, but nothing is visible
    What Browser are you using and what script manager ?

    • R4NG3R85 [2572604]
    • Role: Civilian
    • Level: 83
    • Posts: 158
    • Karma: 96
    • Last Action: 5 months
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 13:44:30 - 17/02/21 (4 years ago)
    Post link copied to clipboard Copy post link

    R4NG3R85 [2572604]

    its not working for me either, the treemap dropdown shows, but nothing is visible

    MrMickRi [482609]

    What Browser are you using and what script manager ?
    im using chrome on this pc were i tried the script using tampermonkey 4.11
    • MrMickRi [482609]
    • Role: Civilian
    • Level: 95
    • Posts: 1,350
    • Karma: 758
    • Last Action: 12 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 18:30:15 - 17/02/21 (4 years ago)
    Post link copied to clipboard Copy post link
    works for me but i used code direct into tamper monkey.

    what process did you use to install the script ?

    • R4NG3R85 [2572604]
    • Role: Civilian
    • Level: 83
    • Posts: 158
    • Karma: 96
    • Last Action: 5 months
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 19:01:08 - 18/02/21 (4 years ago)
    Post link copied to clipboard Copy post link
    the scrripts showing errors and are still blaank...

    https://prnt.sc/1003zjs

    Tried manuel

    https://prnt.sc/100404p

    https://prnt.sc/10040w9
    • MrMickRi [482609]
    • Role: Civilian
    • Level: 95
    • Posts: 1,350
    • Karma: 758
    • Last Action: 12 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 07:38:01 - 19/02/21 (4 years ago)
    Post link copied to clipboard Copy post link
    thanks for that ranger. ill go through it today with selwyn and take a look and try replicate any issues.

    • selwyn [2093198]
    • Role: Civilian
    • Level: 25
    • Posts: 17
    • Karma: 18
    • Last Action: 9 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 15:50:14 - 26/02/21 (4 years ago)
    Post link copied to clipboard Copy post link

    R4NG3R85 [2572604]

    its not working for me either, the treemap dropdown shows, but nothing is visible
    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]
    • Role: Civilian
    • Level: 80
    • Posts: 8
    • Karma: 1
    • Last Action: 3 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 17:23:51 - 26/02/21 (4 years ago)
    Post link copied to clipboard Copy post link
    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"
    ]
    • selwyn [2093198]
    • Role: Civilian
    • Level: 25
    • Posts: 17
    • Karma: 18
    • Last Action: 9 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 17:59:05 - 26/02/21 (4 years ago)
    Post link copied to clipboard Copy post link

    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"
    ]
    Good spot! Thanks for informing us. This will be fixed in an upcoming release.
    • R4NG3R85 [2572604]
    • Role: Civilian
    • Level: 83
    • Posts: 158
    • Karma: 96
    • Last Action: 5 months
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 19:30:11 - 27/02/21 (4 years ago)
    Post link copied to clipboard Copy post link

    R4NG3R85 [2572604]

    its not working for me either, the treemap dropdown shows, but nothing is visible

    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
    DA DA DA DAAAAAA :D That did the trick guys..

    Thanks alot for the super troubleshooting you have provided

    https://prnt.sc/108phjp
    • selwyn [2093198]
    • Role: Civilian
    • Level: 25
    • Posts: 17
    • Karma: 18
    • Last Action: 9 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 08:51:25 - 03/03/21 (4 years ago)
    Post link copied to clipboard Copy post link
    Happy to help R4NG3R85!
    • DemonCyborg [2154641]
    • Role: Civilian
    • Level: 99
    • Posts: 200
    • Karma: 326
    • Last Action: 35 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 19:34:50 - 30/03/21 (4 years ago)
    Post link copied to clipboard Copy post link
    Tried to generate random colors per page load, to help grasp the item categories.
    https://www.codepile.net/pile/Ov09RnX2

    This include the following as well:
    • fix for the car string issue
    • displaying market price alongside count of items
    • some minor code refactoring.
    Hope you like it.
    • MrMickRi [482609]
    • Role: Civilian
    • Level: 95
    • Posts: 1,350
    • Karma: 758
    • Last Action: 12 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 20:46:15 - 31/03/21 (4 years ago)
    Post link copied to clipboard Copy post link
    Thanks demon much appreicated !

Reply
Thread Title: