[Script] Cracking Rig Layout Switcher | Tools & Userscripts | …

[Script] Cracking Rig Layout Switcher

    • Silmaril [2665762]
    • Role: Civilian
    • Level: 90
    • Posts: 369
    • Karma: 1,017
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Thread created on 12:11:15 - 29/12/23 (2 years ago)
    |
    Last replied 07:57:31 - 25/06/26 (6 hours ago)

    Adds "Save current rig layout" & "Empty rig layout" quick actions to a Cracking crime.

    • If you want to empty one of the three chassis, first select "Chassis #N" button u want to clear, then click "Empty" button.
    • If you want to save current chassis layout, first select "Chassis #N" button u want to save, then click "Save current layout" button and give it a name.
    • If you want to delete one of the saved chassis layouts, first click "Delete layout" button, then enter a name of a layout you want to delete.
    • Clicking "Disable rig" will strip off ALL PSUs from all the chassis.
    • Clicking "Export all layouts" will show up a textbox with a string to copy & share.
    • Clicking "Export layout" will show up a prompt to enter a name of a specific layout to share, after entering you will get a textbox with a string to copy & share.
    • Clicking "Import layouts" will show up a prompt where you can copy-paste the shared string (not a link!).

    Script will only change the components that differ between old/new layouts.

    After you apply any layout, fast click "Spam click X more times!" button to apply the changes (this is required to make script legit), then refresh the page to see the changes.

    Changes are immediate, but visually components will appear either after a page refresh or 5-15 seconds.

    You can also import layouts from the Rig Simulator made by Bug [1455582] here:
    https://sliw.co/rig/

    Works for ALL Desktops, Mobiles & TornPDA (Set injection time to END)!
    Download (Needs Tampermonkey/Greasemonkey):
    https://greasyfork.org/en/scripts/483183-torn-rigs-layout-switcher


    Last edited by Silmaril on 09:41:34 - 26/10/25 (7 months ago)
    • Lazerpent [2112641]
    • Role: Civilian
    • Level: 100
    • Posts: 913
    • Karma: 4,283
    • Last Action: 1 day
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 13:09:47 - 29/12/23 (2 years ago)
    Post link copied to clipboard Copy post link
    This looks really useful!

    One improvement request: Can it make the spam button only update the squares needed? For example if I have two rigs that are similar and have HPCPUs in the same spot

    • Silmaril [2665762]
    • Role: Civilian
    • Level: 90
    • Posts: 369
    • Karma: 1,017
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 13:32:01 - 29/12/23 (2 years ago)
    Post link copied to clipboard Copy post link

    Lazerpent [2112641]

    This looks really useful! One improvement request: Can it make the spam button only update the squares needed? For example if I have two rigs that are similar and have HPCPUs in the same spot
    That's one nice feature to add after export/import!
    By the way:

    Updated to v0.3:
    • Added import/export features to share layouts with others!
    You can test import feature by using this code snippet to import my 2 layouts!

    {"low 3.37":[{"x":0,"y":3,"item":1},{"x":0,"y":1,"item":1},{"x":0,"y":2,"item":1},{"x":0,"y":4,"item":2},{"x":0,"y":0,"item":1},{"x":1,"y":1,"item":1},{"x":1,"y":0,"item":1},{"x":1,"y":4,"item":1},{"x":1,"y":2,"item":1},{"x":1,"y":3,"item":1},{"x":2,"y":0,"item":1},{"x":2,"y":1,"item":1},{"x":2,"y":2,"item":1},{"x":2,"y":4,"item":1},{"x":2,"y":3,"item":1},{"x":3,"y":0,"item":1},{"x":3,"y":4,"item":7,"x2":4,"y2":4},{"x":3,"y":3,"item":1},{"x":3,"y":1,"item":1},{"x":3,"y":2,"item":1},{"x":4,"y":0,"item":1},{"x":4,"y":2,"item":1},{"x":4,"y":1,"item":1},{"x":4,"y":3,"item":1}],"high 3.94":[{"x":2,"y":2,"item":5},{"x":2,"y":1,"item":7,"x2":2,"y2":0},{"x":2,"y":3,"item":7,"x2":2,"y2":4},{"x":3,"y":3,"item":5},{"x":3,"y":1,"item":5},{"x":3,"y":2,"item":7,"x2":4,"y2":2},{"x":3,"y":0,"item":3},{"x":3,"y":4,"item":3},{"x":4,"y":0,"item":3},{"x":4,"y":1,"item":3},{"x":4,"y":3,"item":3},{"x":4,"y":4,"item":3},{"x":1,"y":3,"item":5},{"x":1,"y":1,"item":5},{"x":1,"y":0,"item":3},{"x":1,"y":4,"item":3},{"x":0,"y":2,"item":7,"x2":1,"y2":2},{"x":0,"y":0,"item":3},{"x":0,"y":1,"item":3},{"x":0,"y":3,"item":3},{"x":0,"y":4,"item":3}]}
    Last edited by Silmaril on 19:12:23 - 29/12/23 (2 years ago)
    • Lazerpent [2112641]
    • Role: Civilian
    • Level: 100
    • Posts: 913
    • Karma: 4,283
    • Last Action: 1 day
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 18:32:36 - 29/12/23 (2 years ago)
    Post link copied to clipboard Copy post link

    Lazerpent [2112641]

    This looks really useful! One improvement request: Can it make the spam button only update the squares needed? For example if I have two rigs that are similar and have HPCPUs in the same spot

    Silmaril [2665762]

    That's one nice feature to add after export/import! By the way: Updated to v0.3: [ul][li]Added import/export features to share layouts with others![/li] [/ul]You can test import feature by using this code snippet to import my 2 layouts! [code] {"low 3.37":[{"x":0,"y":3,"item":1},{"x":0,"y":1,"item":1},{"x":0,"y":2,"item":1},{"x":0,"y":4,"item":2},{"x":0,"y":0,"item":1},{"x":1,"y":1,"item":1},{"x":1,"y":0,"item":1},{"x":1,"y":4,"item":1},{"x":1,"y":2,"item":1},{"x":1,"y":3,"item":1},{"x":2,"y":0,"item":1},{"x":2,"y":1,"item":1},{"x":2,"y":2,"item":1},{"x":2,"y":4,"item":1},{"x":2,"y":3,"item":1},{"x":3,"y":0,"item":1},{"x":3,"y":4,"item":7,"x2":4,"y2":4},{"x":3,"y":3,"item":1},{"x":3,"y":1,"item":1},{"x":3,"y":2,"item":1},{"x":4,"y":0,"item":1},{"x":4,"y":2,"item":1},{"x":4,"y":1,"item":1},{"x":4,"y":3,"item":1}],"high 3.94":[{"x":2,"y":2,"item":5},{"x":2,"y":1,"item":7,"x2":2,"y2":0},{"x":2,"y":3,"item":7,"x2":2,"y2":4},{"x":3,"y":3,"item":5},{"x":3,"y":1,"item":5},{"x":3,"y":2,"item":7,"x2":4,"y2":2},{"x":3,"y":0,"item":3},{"x":3,"y":4,"item":3},{"x":4,"y":0,"item":3},{"x":4,"y":1,"item":3},{"x":4,"y":3,"item":3},{"x":4,"y":4,"item":3},{"x":1,"y":3,"item":5},{"x":1,"y":1,"item":5},{"x":1,"y":0,"item":3},{"x":1,"y":4,"item":3},{"x":0,"y":2,"item":7,"x2":1,"y2":2},{"x":0,"y":0,"item":3},{"x":0,"y":1,"item":3},{"x":0,"y":3,"item":3},{"x":0,"y":4,"item":3}]} [/code]
    Awesome! Heres mine:

    {"530 zero heat":[{"x":0,"y":4,"item":3},{"x":0,"y":3,"item":3},{"x":0,"y":1,"item":3},{"x":0,"y":2,"item":1},{"x":0,"y":0,"item":3},{"x":1,"y":4,"item":5},{"x":1,"y":1,"item":5},{"x":1,"y":0,"item":5},{"x":1,"y":3,"item":5},{"x":1,"y":2,"item":3},{"x":2,"y":3,"item":7,"x2":2,"y2":4},{"x":2,"y":0,"item":7,"x2":2,"y2":1},{"x":2,"y":2,"item":5},{"x":3,"y":4,"item":5},{"x":3,"y":0,"item":5},{"x":3,"y":1,"item":5},{"x":3,"y":3,"item":5},{"x":3,"y":2,"item":2},{"x":4,"y":4,"item":3},{"x":4,"y":1,"item":3},{"x":4,"y":3,"item":3},{"x":4,"y":0,"item":3},{"x":4,"y":2,"item":1}]}
    Last edited by Lazerpent on 22:02:36 - 29/12/23 (2 years ago)

    • Silmaril [2665762]
    • Role: Civilian
    • Level: 90
    • Posts: 369
    • Karma: 1,017
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 13:39:23 - 03/01/24 (2 years ago)
    Post link copied to clipboard Copy post link

    Lazerpent [2112641]

    This looks really useful! One improvement request: Can it make the spam button only update the squares needed? For example if I have two rigs that are similar and have HPCPUs in the same spot
    Your feature has been added!

    Update v0.4:
    • Drastically changed the script to only include requests on components that actually differ between old/new layouts.
    • BigManBilly [2636589]
    • Role: Civilian
    • Level: 100
    • Posts: 312
    • Karma: 195
    • Last Action: 48 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 17:34:55 - 04/01/24 (2 years ago)
    Post link copied to clipboard Copy post link
    Can I request that the script functions if you navigate directly to the Cracking page (or Reload from the cracking page)? https://www.torn.com/loader.php?sid=crimes#/cracking

    Right now, the @match statement correctly fires, but the MutationObserver doesn’t see any change in crime-root cracking-root as this panel has already been rendered by the time the script initialises, at least on TornPDA?

    Cheers.

    Still buying museum plushies and flowers. Price list https://tornexchange.com/prices/BigManBilly/

     

    • Silmaril [2665762]
    • Role: Civilian
    • Level: 90
    • Posts: 369
    • Karma: 1,017
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 20:39:48 - 04/01/24 (2 years ago)
    Post link copied to clipboard Copy post link

    BigManBilly [2636589]

    Can I request that the script functions if you navigate directly to the Cracking page (or Reload from the cracking page)? [url]https://www.torn.com/loader.php?sid=crimes#/cracking[/url] Right now, the @match statement correctly fires, but the MutationObserver doesn’t see any change in crime-root cracking-root as this panel has already been rendered by the time the script initialises, at least on TornPDA? Cheers.
    Did you set "Injection Time" as "Start" in TornPDA?
    Cause it works for me in PDA.
    Also make sure to use latest version v0.4
    Last edited by Silmaril on 20:44:14 - 04/01/24 (2 years ago)
    • Bug [1455582]
    • Role: Committee
    • Level: 100
    • Posts: 3,256
    • Karma: 6,680
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 07:26:13 - 05/01/24 (2 years ago)
    Post link copied to clipboard Copy post link
    I have added the ability to export from my Rig Simulator directly to this script (request from Lazerpent).



    It will create 1-3 layouts (rig-case.0-2) and copy the "import text" to clipboard.

    • Lenin [2199004]
    • Role: Civilian
    • Level: 100
    • Posts: 8,824
    • Karma: 22,335
    • Last Action: 1 year
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 23:57:24 - 06/01/24 (2 years ago)
    Post link copied to clipboard Copy post link
    not seeing anyone mention this, but this is preventing my crimes page from loading





    am I missing some step or something?

    Firefox 121.0
    1710f7f8-1b8a-14b0-2199004.png
    • Silmaril [2665762]
    • Role: Civilian
    • Level: 90
    • Posts: 369
    • Karma: 1,017
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 00:19:14 - 07/01/24 (2 years ago)
    Post link copied to clipboard Copy post link
    Just tested with Firefox 121.0 & Tampermonkey 5.0.1 - Works
    May need more info from you. Try enabling debug logs (change line: const IS_DEBUG = false; to const IS_DEBUG = true;).
    Then screenshot or copy the errors from dev console (F12 -> then click "Console" tab).
    • Lenin [2199004]
    • Role: Civilian
    • Level: 100
    • Posts: 8,824
    • Karma: 22,335
    • Last Action: 1 year
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 04:25:45 - 07/01/24 (2 years ago)
    Post link copied to clipboard Copy post link
    i can't quote you due to Torn's cache ballooning bug causing the forums to not work properly, but here:



    (no other scripts are enabled)

    I don't really know what I'm looking at here but the "quota exceeded" sounds like it's another casualty of Torn's cache issue. I've had to clear Torn's cache 5-6 times on my computer this week, and the problems just keep coming back, so this might be a complication of that issue

    EDIT: this is 100% due to the wider Torn storage issue, my apologies for taking your time.
    Last edited by Lenin on 05:20:03 - 07/01/24 (2 years ago)
    1710f7f8-1b8a-14b0-2199004.png
    • Silmaril [2665762]
    • Role: Civilian
    • Level: 90
    • Posts: 369
    • Karma: 1,017
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 06:17:26 - 07/01/24 (2 years ago)
    Post link copied to clipboard Copy post link

    Lenin [2199004]

    i can't quote you due to Torn's cache ballooning bug causing the forums to not work properly, but here: [img]https://i.ibb.co/9qKKbnF/rigswitchererror.png[/img] (no other scripts are enabled) I don't really know what I'm looking at here but the "quota exceeded" sounds like it's another casualty of Torn's cache issue. I've had to clear Torn's cache 5-6 times on my computer this week, and the problems just keep coming back, so this might be a complication of that issue EDIT: this is 100% due to the wider Torn storage issue, my apologies for taking your time.
    Yeah, you're right: either Torn or some scripts before reached a storage limit for your browser.
    You can try clearing cache/cookies or increase the storage quota.
    • PurpleFire [2868362]
    • Role: Committee
    • Level: 100
    • Posts: 1,732
    • Karma: 1,378
    • Last Action: 4 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 15:50:02 - 10/01/24 (2 years ago)
    Post link copied to clipboard Copy post link
    Edit:

    Did not work until I cleared cache.

    Works well with screen readers. :)

    Thank you.
    Last edited by PurpleFire on 20:30:14 - 10/01/24 (2 years ago)
    • PurpleFire [2868362]
    • Role: Committee
    • Level: 100
    • Posts: 1,732
    • Karma: 1,378
    • Last Action: 4 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:20:46 - 10/01/24 (2 years ago)
    Post link copied to clipboard Copy post link
    One thing, the tabs to switch between rigs doesn't seem to work for me.

    Not sure if this is something you can address, if not, it is not a huge deal.

    Just currently, using NVDA + keyboard, I'm only able to select the 1st rig for clearing.
    • Silmaril [2665762]
    • Role: Civilian
    • Level: 90
    • Posts: 369
    • Karma: 1,017
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 23:09:10 - 10/01/24 (2 years ago)
    Post link copied to clipboard Copy post link

    PurpleFire [2868362]

    One thing, the tabs to switch between rigs doesn't seem to work for me. Not sure if this is something you can address, if not, it is not a huge deal. Just currently, using NVDA + keyboard, I'm only able to select the 1st rig for clearing.
    Thanks to Rhiannone [2868362] Updated to 0.5.1:
    • Fixed Chassis tab buttons not being clickable for NVDA accessibility tools.
    Last edited by Silmaril on 23:09:50 - 10/01/24 (2 years ago)
    • Ahab [1735214]
    • Role: Civilian
    • Level: 100
    • Posts: 5,741
    • Karma: 10,973
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 00:59:40 - 22/01/24 (2 years ago)
    Post link copied to clipboard Copy post link
    You overwrite the previous import on a new import

    Could we get a way to rename the layouts as well, either in script, on the site (so we can import them having any name we want) or both

    also could their be another spam click that just refreshes the page.
    Last edited by Ahab on 01:15:36 - 22/01/24 (2 years ago)
    • Silmaril [2665762]
    • Role: Civilian
    • Level: 90
    • Posts: 369
    • Karma: 1,017
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 08:38:52 - 22/01/24 (2 years ago)
    Post link copied to clipboard Copy post link

    Ahab [1735214]

    You overwrite the previous import on a new import Could we get a way to rename the layouts as well, either in script, on the site (so we can import them having any name we want) or both also could their be another spam click that just refreshes the page.
    Yea, that's intended.
    I can add rename layouts feature in script, the site one will have to be done by the site owner Bug [1455582] though.
    Adding last refresh click is actually a good idea!
    • kontamusse [2408039]
    • Role: Civilian
    • Level: 100
    • Posts: 642
    • Karma: 979
    • Last Action: Now
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 11:03:11 - 23/01/24 (2 years ago)
    Post link copied to clipboard Copy post link

    Silmaril [2665762]

    Yea, that's intended. I can add rename layouts feature in script, the site one will have to be done by the site owner [url=https://www.torn.com/profiles.php?XID=1455582]Bug [1455582][/url] though. Adding last refresh click is actually a good idea!
    Yes, a RENAME RIG button would be great, especially considering that Bug's simulator does not let us choose a name.
    I understand that, with the latest update, the EMPTY button is no more useful.
    • Silmaril [2665762]
    • Role: Civilian
    • Level: 90
    • Posts: 369
    • Karma: 1,017
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 12:31:58 - 23/01/24 (2 years ago)
    Post link copied to clipboard Copy post link

    kontamusse [2408039]

    Yes, a RENAME RIG button would be great, especially considering that Bug's simulator does not let us choose a name. I understand that, with the latest update, the EMPTY button is no more useful.
    Yea, I updated it to use 1 click (request) same as Clear rig button, in case people didnt notice the update.
    • Silmaril [2665762]
    • Role: Civilian
    • Level: 90
    • Posts: 369
    • Karma: 1,017
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 12:00:14 - 28/01/24 (2 years ago)
    Post link copied to clipboard Copy post link
    Updated to v0.6
    • Added "Disable rig" button to strip off ALL the PSUs from all chassis (effectively taking the rig offline).
Reply
Thread Title: