Getting started Runtime Editor Tutorial Asset Studio Custom Config Tutorial Json Creator

Adding custom texture configs

To add a new config will need to add a new TextureConfigItem to the TextureConfigList.
This can be done by editing the Json file in the BepInEx/Configs/TextureReplacer folder, or creating a new Json file.
If you want to create a new file it's recommended to use Visual Studio or some other code editor to make sure you don't mess up the syntax.
To generate the config folder you have to run the game first.

To add a new item it will need to be formatted in a specific way. Here is an example of an item that could be added to the list:

{
    "configName": "Example name",
    "materialIndex": 0,
    "fileName": "Intentionally blank",
    "prefabClassID": "Intentionally blank",
    "rendererHierarchyPath": "Intentionally blank",
    "textureName": "_MainTex",
    "isVariation": false,
    "variationChance": -1.0,
    "linkedConfigNames": [
      "Example name 1"
    ]
}
    
Explanation of these items:
configName - This is used in the linkedConfigNames list.
It can be whatever value you want and doesn't need to relate to the texture.

materialIndex - Relates to the list of materials on the renderer of the prefab you're replacing.
Is uses 0 based indexing, so the first item would be index 0, 2nd would be index 1, etc.

fileName - The name of the image you're replacing the texture with.
The file will need to be in the Assets folder of the mod, and include the file extension.

prefabClassID - The classID of the prefab that's the parent of the texture you're trying to replace.
You can find these in a list on the nautilus github. You can also use the runtime editor to find it

textureName - The name of the texture on the material.
The default texture is "_MainTex" which replaces the albedo texture. To see a list you can go into Unity and right click on a material and click edit shader.

rendererHierarchyPath - The path to the child containing the renderer for the prefab.
Like the classID this is easiest to find with the runtime editor. As with the classID you can use the runtime editor tutorial.

isVariation - Use this if you want there to be a chance for your texture to be replaced.
By default all textures are always loaded. This value is only useful if variationChance is greater than 0.

variationChance - The chance from 0 to 1 that the texture will be loaded.
This is only useful if isVariation is true

linkedConfigNames - This is deprecated as of Texture Replacer version 1.1.1. It used to allow different variation configs to be linked together by their config names.
This is now done automatically but checks similar classIDs.
    
All parts of the config follow Json formatting, so when adding new items to a list you must add a comma at the end of the previous item
An example of this is:

"linkedConfigNames": [
  "Example name 1", <-- Comma
  "Example name 2"
]

Or

{
    *Texture config here*
}, <-- Comma
{
    *Texture config 2 here*
}

Texture Names

Here are some texture names that are commonly used and/or have special functionality:

Prefab Class IDs

Special PrefabClassIDs - CASE SENSITIVE!

IMPORTANT:

One thing you have to keep in mind when adding the custom texture/image files is that you have to put them inside of the Assets folder in the mod folder.
Screenshot highlighting the Assets fodler inside the mod folder