Content Compiler Parameters
Extra functions of the content compiler can be accessed by starting the compiler from a terminal and adding
certain launch parameters, e.g. ContentCompiler.exe --highres
. These parameters are documented below.
--ugc
ContentCompiler.exe --ugc="C:/path/to/Your Mod"
By default, the content compiler generates icons from the game's own files.
Using this parameter, the compiler can be directed to a mod instead (the mod tool does this when generating icons).
The given file path points to the root folder of the target mod.
--cache
ContentCompiler.exe --cache
Regenerates the texture cache files in the Cache/Textures
folder.
This parameter is used by the mod tool when the Upload to Steam
button is clicked.
--voxelmesh
ContentCompiler.exe --voxelmesh
Currently this parameter seems to do nothing.
It is a valid parameter though, as the compiler recognizes it and behaves different.
This parameter is probably related to Chapter 2's Voxel Terrain.
--prefab
ContentCompiler.exe --prefab
ContentCompiler.exe --prefab --ugc="C:/path/to/Your Mod"
Generates prefab icons.
The icons are saved to Gui/PrefabIcons/
.
This parameter can be combined with the --ugc parameter to generate prefab icons for mods.
When generating prefab icons for a mod, the icons are saved in the mod's Gui/PrefabIcons/
folder, not in the game files.
--blueprint
ContentCompiler.exe --blueprint
ContentCompiler.exe --blueprint --ugc="C:/path/to/Your Mod"
Generates blueprint icons, for blueprints in the Survival/LocalBlueprints/
folder.
The icons are saved to Gui/BlueprintIcons/
.
This parameter might be combine-able with the --ugc parameter to generate blueprint icons for mods, though this was not tested.
--create-atlas
ContentCompiler.exe --create-atlas --input="../...." --output="../...."
Generates an icon atlas.
This parameter requires the --input and --output parameters to be present.
Further details on what exactly this does are not available as the compiler kept crashing
while trying to test out the parameter and no proper result was generated.
During testing, pointing the --input parameter to --input="../Data/Gui/"
and the --output parameter
to --output="../test.png"
generated the most activity before crashing with an access violation error.
--highres
ContentCompiler.exe --highres
ContentCompiler.exe --highres --ugc="C:/path/to/Your Mod"
Generates a high-resolution icon image of each block, part and tool in the game's files.
Each icon is saved as a separate 1024x1024p image in the Scrap Mechanic/Cache/IconExport/
folder.
This parameter can be combined with the --ugc parameter to generate high-resolution icons for mods.
When generating high-resolution icons for a mod, the generated icons are still saved in the Scrap Mechanic/Cache/IconExport/
folder, not in the mod's folder.
--dont-overwrite-icons
ContentCompiler.exe --dont-overwrite-icons
Skips icons that were already generated.
It is not confirmed whether this actually works, though it did seem to speed up the process a bit when testing.
--input
ContentCompiler.exe --(other parameter) --input="../...."
The input file or folder parameter.
This parameter is required when using the --create-atlas parameter.
The file path is relative to the ContentCompiler.exe.
--output
ContentCompiler.exe --(other parameter) --output="../...."
The output file or folder parameter.
This parameter is required when using the --create-atlas or --customization parameter.
The file path is relative to the ContentCompiler.exe.
--customization
ContentCompiler.exe --customization --output="../...."
This parameter is likely used to create character customization (outfit) icons.
It requires a customization-icon-settings.json
file to be present in the Scrap Mechanic
folder and
the --output parameter to point to a folder relative to the ContentCompiler.exe.
The customization-icon-settings.json
may contain the following settings:
{
"options": {
//"Face" = the outfit category name in Data/Character/customization_options.json
"Face": {
//A cubemap, but for what? Also not sure if the path is correct.
"cubemap": "$SURVIVAL_DATA/Lighting/CubeMaps/Cubemap_outfits/cubemap_outfits_up.tga",
//The FOV used for the icon.
"fov": 50,
//The center of the icon(?)
"center": {
"x": 0,
"y": 0,
"z": 0
},
//Settings for a light source
"lightDir0": {
"x": 0,
"y": 0,
"z": 0
},
"lightIntensity0": 100,
"lightColor0": {
"r": 0.5,
"g": 0.5,
"b": 0.5
},
//Settings for a second light source
"lightDir1": {
"x": 0,
"y": 0,
"z": 0
},
"lightIntensity1": 100,
"lightColor1": {
"r": 0.5,
"g": 0.5,
"b": 0.5
},
//A preview for something, not sure what. Also not sure what this parameter is supposed to be.
"preview": "?",
//An effect for something? Not sure what this parameter is supposed to be.
"effect": "CustomizationRenderable",
//Maybe the camera position or direction
"eye": {
"x": 0,
"y": 0,
"z": 0
},
//Very likely a pose name from Data/Character/Char_Male/Animations/char_male_outfitposes.rend
"pose": "Facepose"
}
}
}
How exactly the settings work is currently not fully known.
When used as above or with various changes applies, the compiler only generates a completely
empty, fully transparent image with all pixels set to black (#00000000) for each outfit.
--asset
ContentCompiler.exe --asset
ContentCompiler.exe --asset --ugc="C:/path/to/Your Mod"
Generates terrain asset icons.
The icons are saved to Gui/AssetIcons/
.
This parameter can be combined with the --ugc parameter to generate asset icons for mods.
When generating asset icons for a mod, the icons are saved in the mod's Gui/AssetIcons/
folder, not in the game files.
--harvestable
ContentCompiler.exe --harvestable
ContentCompiler.exe --harvestable --ugc="C:/path/to/Your Mod"
Generates harvestable icons.
The icons are saved to Gui/HarvestableIcons/
.
This parameter can be combined with the --ugc parameter to generate harvestable icons for mods.
When generating harvestable icons for a mod, the icons are saved in the mod's Gui/HarvestableIcons/
folder, not in the game files.
--node
ContentCompiler.exe --node
ContentCompiler.exe --node --ugc="C:/path/to/Your Mod"
Generates node icons.
The icons are saved to Gui/NodeIcons/
.
This parameter can be combined with the --ugc parameter to generate node icons for mods.
When generating node icons for a mod, the icons are saved in the mod's Gui/NodeIcons/
folder, not in the game files.