Counter-Strike 2

Counter-Strike 2

Not enough ratings
Creating wear-gifs of your skins
By Hecent
Show how your skin looks across different wear values with ease (Windows Only)
2
4
   
Award
Favorite
Favorited
Unfavorite
Introduction
Lots of skin designers want to show off how their skin looks across a variety of wear levels, but until now that would take hours of repetitive screenshotting to do.

So I made a tool using AutoHotkey to automate this.

Allowing you to make gifs like this with ease
Installing Autohotkey
This script runs using AutoHotkey, to install it go to https://www.autohotkey.com/ and download the latest version.
The Script
Once you have Autohotkey installed, copy-paste the code into a txt file and rename it to "wearit.ahk"

If the script goes wrong at any point, press ESC to end the script prematurely
; wearit.ahk ; Author: Hecent ; Date: 2021-08-20 ; Version: 1.2 #NoEnv SendMode Input SetWorkingDir %A_ScriptDir% WearDelay = 750 ;Increase this value if the program is screenshotting the skin too early ScreenShotLocation = ;Paste the directory where steam stores your screenshots here FileLocation = ;Paste the directory you would like to store the photos in here ScreenShotWait = 500 ;Increase this if some of the images are just normal screenshots InputBox, MinWear, Min Wear, Enter min wear,, 200, 150 InputBox, MaxWear, Max Wear, Enter max wear,, 200, 150 MinWear := MinWear*100 MaxWear := MaxWear*100 TotalLoops := 1+(MaxWear-MinWear) MsgBox, Put your cursor over the min wear box and click "P" KeyWait, P, D MouseGetPos, LocationX, LocationY Loop, %TotalLoops% { Click, LocationX, LocationY, 2 Value := Round(((A_Index-1)+MinWear)/100,2) Send, %Value%{Enter} Sleep, WearDelay Newvalue := StrReplace(Value,".","_") TargetPath = %FileLocation%%Newvalue%.jpg Send, {F12} Sleep, ScreenShotWait OriginalPath := GetNewestFile(ScreenShotLocation, CreatedOrModified:="c") FileCopy, %OriginalPath%, %TargetPath% } GetNewestFile(path, CreatedOrModified:="c") { Loop, %path%\* { FileGetTime, Time, %A_LoopFileFullPath%, % CreatedOrModified If (Time > Time_Orig) { Time_Orig := Time file := A_LoopFileFullPath } } return file } Esc::ExitApp ; emergency stop
Setting parameters
There are a few things inside the script you must enter beforehand:
  • The directory steam stores screenshots in
  • The directory you want to save the images in

First, you must find the folder where your screenshots are kept
1 - Click the view button in the top left-hand corner of the steam window

2 - Click settings to access the steam settings window















3 - Go to the "in-game" tab

4 - Check your screenshot key is set to "F12"

5 - Click the "SCREENSHOT FOLDER" button




6 - Copy the address at the top of the page

Now you want to edit the
wearit.ahk
file you downloaded earlier


7 - Enter the screenshot folder address you copied earlier

8 - Enter the location that you'd like to store the images to (adding a "\" to the end)

For example, my file would look like this:

ScreenShotLocation = C:\Program Files (x86)\Steam\userdata\1029698048\760\remote\730\screenshots FileLocation = C:\CSGO\greatest_skin\
Now save the file
Running the script
This will not work in fullscreen mode, so make sure your display mode is set to either fullscreen windowed or windowed mode.

First, make sure that the wear values in the workbench are all correct:






And the wear slider is at the end:




To run the script, double click on the wearit.ahk file and follow the prompts

Once you've entered the wear values, you will be prompted to input the location of the wear_remap_min field:
Click OK, then position your cursor over said field and press "P"



The script will then begin incrementing the wear value, taking screenshots as it goes.

Once it has stopped taking screenshots/the wear value stops increasing you are free to open the previously specified folder and take a look at your pictures.
Making the gif
Now you have lots of separate images, but how do you put them all together?

As of right now, you will have to use an external program for this as Autohotkey lacks such capabilities.

I recommend using https://ezgif.com/maker to create the gif.
You can also use https://ezgif.com/crop to remove the workbench border.
And https://ezgif.com/optimize to compress your gif.

(I am in no way associated with ezgif, this is just a recommendation)

If you want to add the float values/condition to the gif, you will have to use a video editor. I might make a python script to do this as well at some point, but as of right now I don't know of any ways to automate it.


Another point to note is the limitation on gif size, steam only allows individual image uploads that are below 2 MB, so you will have to compress your gif quite heavily or opt for an alternative approach (eg. mp4s, youtube links, etc)

By the way you can do this with blender[www.graphicsandprogramming.net]
FAQ
Q: Will I get VAC-banned for using scripts?

A: No, the tool does not edit your game files. As far as CS:GO can tell, it is a person entering the values and taking the screenshots. Though, if you are still worried you can launch the game in offline/safe mode

Q: The images just have a blank gun in them?

A: Increase the WearDelay amount in the AHK file

Q: Why are there only two questions in the FAQ?

A: I'm lazy

Final Notes
Another potential application for this could be for previewing patterns:



Thanks for reading
If you have any questions feel free to ask me in the comments.
6 Comments
Scar Aug 31, 2022 @ 3:58am 
thanks
a chocolate choux Aug 2, 2022 @ 2:09am 
whoa a legend, faving this for future reference
iamjohn3d. Jul 31, 2022 @ 3:52pm 
rly useful !
EGO DEATH Sep 2, 2021 @ 7:05am 
Absolutely awesome, great addition to workshoppers toolbelt. Thanks a ton!
Kumarbaz Adnan Sep 2, 2021 @ 4:30am 
Holy smokes dude this looks awesome :story:
Porter Sep 1, 2021 @ 9:09am 
Thanks a lot really nice guide