Are you tired of saving targa files in order to be able to view your skin in the iRacing client? Did you come from making skins in AC and got super frustrated by the process to view skins in iRacing? This is a script for you!
For now I've only written this for Photoshop and it's only been tested in Photoshop 2023, though I'm sure it would work in older versions as well. If I get enough requests I'll modify for gimp as well
Two files are included as a part of this repo:
iracing_skins_script_config.json
: The configuration file for the script.Export iRacing Targa.jsx
: The script itself.
The script relies on a file structure in order to prevent it from running every time you save a psd in Photoshop. The file structure is as follows:
└── <parent_folder>
├── iracing_skins_script_config.json
└── <iracing_car_specific_folder_name>
└── any_skin.psd
└── dallarap217
├── epic_skin.psd
├── epic_skin_spec.psd
└── epic_skin_decal.psd
└── ferrari488gt3
└── coolest_ever.psd
└── ...
└── ....psd
The script will not run if there is not an iracing_skins_script_config.json
in the folder above the folder that the PSD file is in. This prevents the script from running for every photoshop file you're working on, even if it has nothing to do with iRacing skins.
Firstly, set up your file structure. Place the iracing_skins_script_config.json
file in a folder, then create a new folder in that same directory with the name of the car that iRacing uses. You can find a list of those names on Trading Paints or in your own Documents/iRacing/paints folder:
You will create the photoshop file in this car specific folder.
Secondly, modify the config file (iracing_skins_script_config.json
). You can do this using any file editor, I usually use notepad. It only has two values:
iRacingId
: this is your iRacing customer ID that trading paints and iRacing use to ID all the skins. You can find the customer ID using this guide from trading paints, or going to trading paints, clicking the avatar in the top right, selectingView profile
, then checking the URL. The number that appears before your name should be your iRacing customer ID.
overwriteDialog
: this can either betrue
orfalse
and directs whether or not photoshop will prompt you to overwrite an existing tga file if one exists. If it'strue
, photoshop will ask you if you want to overwrite. If it'sfalse
, it will overwrite without prompting.
Thirdly, set up the script. You can actually run the script in an ad-hoc fashion by, in Photoshop, going to File > Scripts... > Browse
and selecting the script, but I highly recommend adding to the Event Manager. To do this
- In photoshop, go to
File > Scripts > Scripts Event Manager...
- In the
Photoshop Event
dropdown selectSave document
- In the
Script
dropdown selectBrowse...
, find wherever you downloadedExport iRacing Targa.jsx
, select it - Click Add, then Done
And that's it! The script should run and export a tga file every time you save.
- As noted above, the script will only run if a document is open and there is an
iracing_skins_script_config.json
in the folder above the folder the psd resides in - It will save a 32 bit tga if there is any alpha channels, otherwise a 24 bit tga
- If the file name contains
spec
,decal
, ornum
, the script will save the tga with the correct file name forspec
,decal
, ornum
files - If the file name contains
team
, it will save the file withteam
in the name as is the correct file name for team skins. Note: it will still use theiRacingId
specified in the config, and your team ID will be different than your own iRacing customer ID. - Whatever is the last psd saved in a given folder will be the tga that's in the iRacing folder. In other words, you can have multiple skins, multiple psds in a given folder, but only the latest one saved will exist as a real skin.