Skip to content
TORNLIFE More

[Script] Cracking Rig Layout Switcher

Started by Silmaril [2665762] on in Tools & Userscripts.

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

Posts archived: 32 / 32 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
32
Discussion span
→
Authority score
59 / 100
Historical score
42 / 100
Story score
56 / 100
Engagement score
77 / 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.

Most-liked replies

Mentioned in this thread

Bug [1455582] ×4 PurpleFire [2868362] ×2

Silmaril [2665762]

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


[image: greasyfork.org]

Mentions: Bug [1455582]

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:
  • 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}]}
Lazerpent [2112641]
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}]}
Silmaril [2665762]
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]
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.
Silmaril [2665762]
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
Silmaril [2665762]
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]
i can't quote you due to Torn's cache ballooning bug causing the forums to not work properly, but here:

[image: i.ibb.co]

(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.
Silmaril [2665762]
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] Committee Committee
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.
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.
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 Bug [1455582] though.
Adding last refresh click is actually a good idea!

Mentions: Bug [1455582]

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.
Silmaril [2665762]
Updated to v0.6
  • Added "Disable rig" button to strip off ALL the PSUs from all chassis (effectively taking the rig offline).