System Shock

System Shock

Not enough ratings
How To "Vaporize" With A Single Button
By LUCASG0LD
An easy solution I've found to vaporize a junk item quick with the press of a singular button.
2
   
Award
Favorite
Favorited
Unfavorite
What do you need?
I use AutoHotkey [www.autohotkey.com]as the most important part of this solution to vaporize a junk item quickly.


AutoHotkey is a simple yet useful program that allows you to create and run scripts related to keyboard shortcuts and automation. When there is a lack of a certain keyboard customization (or you just want to do certain things faster), it can be pretty handy - as it is in our case.

AutoHotkey stores its scripts in .ahk files, which can be edited with almost any Text Editing software.

Once you have AutoHotkey installed, you can just open a text editor, copy and paste the script into it, and save the text with the .ahk file extension instead of the .txt file extension.

Once the script is saved, you can just launch the saved .ahk file and the script should work fine under the circumstances listed in the next chapter of this guide.
What does the script do?
  • The script only works while System Shock is running on your machine and it is in focus, meaning the script makes sure you are in the game and you don't use the script while being outside of it.
  • The script instantly shuts down if it does not detect System Shock to be running, meaning you can't launch it without the game nor will the script keep running in the background once you quit the game.

Normally you need to Right Click on a junk item, then select "Vaporize" to turn it into junk, which then can be recycled into Tri-Credits with which you can buy all sorts of goods at certain vending machines.

With the simple script below, while having the cursor on a junk item:
  • You can press a button of your choice (in my case, it is "X"),
  • which then presses the Right Mouse Button,
  • waits a bit for the context menu to appear
  • moves your cursor to the right and then down (certain amounts that correspond to the cursor landing on the word "Vaporize" on your screen - might be different for everyone, but it can be customized),
  • presses the Left Mouse Button to vaporize the junk,
  • then moves your cursor back to its original location.
The Script
#Persistent

ProcessExist(name) {
Process, Exist, %name%
return ErrorLevel
}

Loop {
If (!WinExist("ahk_exe SystemReShock-Win64-Shipping.exe")) {
ExitApp
}

WinWaitNotActive, ahk_exe SystemReShock-Win64-Shipping.exe
If (!ProcessExist("SystemReShock-Win64-Shipping.exe")) {
ExitApp
}

Sleep 1000 ; Adjust the sleep time as needed (in milliseconds)
}

#IfWinActive ahk_exe SystemReShock-Win64-Shipping.exe

$X::
; Simulate a right mouse button click
Click right

; Wait for a brief moment to allow the context menu to appear
Sleep 50

; Define the offset values for cursor movement
OffsetX := 50
OffsetY := 95

; Get the current mouse cursor position
MouseGetPos, currentX, currentY

; Calculate the new cursor position
newX := currentX + OffsetX
newY := currentY + OffsetY

; Move the cursor to the new position
MouseMove, newX, newY

; Simulate a left mouse button click
Click left

; Move the cursor to the new position
MouseMove, currentX, currentY
return

#IfWinActive
Notes
  • Running the script, AutoHotkey tells me about some outdated formats?

Indeed, the script uses some older methods of code, however AutoHotkey should recognize that and it should let you get some addon that allows you to run the script without any problems.

  • It doesn't work! The cursor does not land on the word "Vaporize"!

Worry not! The lines "OffsetX" and "OffsetY" are responsible for the movement of the cursor.
Different resolutions require different values, however with some testing, changing these values should work fine.

  • Can I customize the button I press to vaporize items?

Sure you can! The line "$X::" is responsible for adjusting the desired keyboard shortcut you press to execute the script.

AutoHotkey's documentation site[www.autohotkey.com] has a good explanation and list of all the different keys you can use, including keyboard, mouse and even gamepad inputs.

Bonus: I believe as of right now you cannot bind any action to the mouse 4 and 5 buttons in the settings.

Fear not, as AutoHotkey can replace that lack of a feature - I, for one, am a save scummer and I added these lines before the "$X::" line so that I can save and load with the mouse 4 and 5 buttons as well:

~XButton1::
SendInput {F5}
return

~XButton2::
SendInput {F9}
return

Thanks a lot for checking out my guide and I hope I could help!
Also:
11 Comments
Stone Knight 11 May @ 3:39am 
Yeah it did that, but it has some problems downloading specific version so i just downloaded from the official site manualy
LUCASG0LD  [author] 10 May @ 3:11am 
Indeed it needs it! Though in my experience, when you try to run an older script format, AutoHotkey will let you know and give you the option to install the required components to run the script just fine.
Stone Knight 10 May @ 1:58am 
doesn't work with new autohotkey, need to use older version
LUCASG0LD  [author] 29 Mar @ 7:19am 
It's my pleasure! 😊 I use it for each play session as well, the itch to collect everything movable keeps winning lmao
CriticalCore 29 Mar @ 6:14am 
Thanks for makin this, makes the game a lot less tedious!
LUCASG0LD  [author] 22 Jun, 2023 @ 10:10am 
Thank you for the feedback, as well, it's good to read! 😄
Tarnish 22 Jun, 2023 @ 8:42am 
This really helped me out. Thank you.
LUCASG0LD  [author] 19 Jun, 2023 @ 5:07am 
That's great to read, I'm glad it works! :ss1serv:
Showtime, Synergy! 18 Jun, 2023 @ 7:42pm 
Thanks for this! I brute-force AHK myself sometimes but it's no fun having to re-figure it out each time, hehe.

I found an OffsetY value of 60 worked well for me at 2560x1440. (I increased OffsetX to 60 too just because I liked how that made the cursor more centered in the menu horizontally.)
LUCASG0LD  [author] 16 Jun, 2023 @ 1:12am 
My pleasure! And I see your point, yeah... I guess since there's a lot of junk laying around, the idea is that it's up to the player if they are actually willing to collect and vaporize so that they get Tri-Credits, as it is chore but it is completely optional and it's up to you how much junk you want to collect. I mean, just the first level you could get hundreds of coins if I am not mistaken, that is if you collect and vaporize every single junk on your way, however most vending machines sell stuff for 5-25 credits (albeit, that requires quite a lot of junk as well)...

Let's hope they will add something to make it less of a chore in a future update, until then, AutoHotkey it is I guess.