Jump to content

Mod Loader/Reference/Fabric fields

From WikiName

A fabric pack is a folder with a mod.json and the images it uses. The Mod Loader adds each entry as a new fabric; it does not replace the fabric it uses as a starting point.

For most recolors, use Make fabrics in Mod Manager. The in-game editor can copy a fabric's material, keep or replace its image, and adjust tint, pattern size, and gloss. The Advanced editor exposes the shader properties listed below.

Pack manifest

This example includes the supported pack and fabric fields. Optional material properties can be left out.

{
  "id": "yourname.fabricpack",
  "name": "My Fabric Pack",
  "author": "Your name",
  "version": "1.0.0",
  "icon": "pack-icon.png",
  "fabricTypes": [{ "id": "Leather", "name": "Leather" }],
  "fabricTags": [{ "id": "Leather", "name": "Leather" }],
  "fabrics": [{
    "id": "sage-weave",
    "name": "Sage Weave",
    "baseFabric": "Cotton Black",
    "fabricType": "Linen",
    "colors": ["Green"],
    "texture": "sage-weave.png",
    "material": {
      "shader": "$defaultFabricShader",
      "color": "#FFFFFFFF",
      "mainTextureScale": [1, 1],
      "mainTextureOffset": [0, 0],
      "renderQueue": 2000,
      "keywords": [],
      "floats": { "_Smoothness": 0.28 },
      "ints": {},
      "colors": { "_SpecularColor": "#A8B8A7FF" },
      "vectors": {},
      "textures": {},
      "textureScales": {},
      "textureOffsets": {}
    },
    "cost": 18,
    "unlockLevel": 0,
    "tagWeights": [{ "tag": "Casual", "weight": 70 }],
    "notes": "Optional internal note"
  }]
}

Here baseFabric supplies the material and lets the pack omit the shader. The texture is optional when a base is set; without one, the base fabric's image is kept. To build a fabric from scratch, leave out baseFabric and provide the required material, type, colors, cost, and tag weights.

Pack fields

Field Meaning and rules
id Required pack namespace. Use 1–64 letters, digits, dots, underscores, or hyphens. Keep it stable after release; it forms part of saved fabric IDs.
name Name shown in Mod Manager. Defaults to the pack ID.
author Optional for older packs; 1–80 characters. Shown with the pack.
version Optional for older packs. Use a version such as 1.0.0 or 1.1.0-beta; increase it for an update while keeping IDs unchanged.
icon Optional PNG or JPEG beside mod.json. Maximum 4 MB and 2048 × 2048 pixels.
fabrics Array of fabrics. Each fabric ID must be unique within the pack.
fabricTypes, fabricTags Optional arrays of {"id":"Leather","name":"Leather"} entries. These add filter choices without editing game files. Runtime IDs are <modId>.<id>. Keep IDs stable; a fabric may refer to an ID from its own pack or another loaded pack.

Fabric fields

Field Meaning and rules
id Required stable key, local to the pack. Uses the same character rules as the pack ID. The loader uses it in the fabric name and save GUID; do not change it after release.
name Required non-empty display name.
baseFabric Optional internal ID of a native fabric or a custom fabric loaded earlier. Custom IDs use <modId>.<fabricId>. The base must have a material. Its shader, tint, detail textures, and other material settings are copied, while this entry's texture, name, type, color categories, and cost are retained.
fabricType Main category. Use one of the built-in values below or a custom type ID. Required when baseFabric is omitted.
colors Array of color categories below. Required without baseFabric.
texture Relative path to a PNG or JPEG in the pack folder. Optional with baseFabric; omitting it keeps the base fabric's image.
material Shader and rendering settings. shader is required without baseFabric; other properties may be omitted.
cost Required integer shop price without baseFabric; range 0–2,149,633.
unlockLevel Prestige level to unlock the fabric. Range 0–50; defaults to 0.
tagWeights Array of {"tag":"Casual","weight":70}. Use built-in or custom tag IDs. Required without baseFabric; duplicate tags are invalid. Weights must be finite numbers, and only positive weights count for HasTag.
notes Optional internal note copied to the fabric asset. It is not the display name.

The loader assigns an internal GUID. Native fabrics may use unlock levels from −1 to 51 and tag weights from −25 to 2525; those are native data ranges, not custom pack limits.

Built-in categories

Fabric type: Burlap, Cotton, Lace, Linen, Sequin, Silk, Velvet, Wool. Define another value in fabricTypes when your pack needs a category such as Leather.

Colors: Blue, Green, Pink, Purple, Red, Yellow, Orange, Black, White, Grey, Brown.

Tags: Casual, Cool, Cute, Daywear, Eclectic, Elaborate, Elegant, Eveningwear, Flowers, Formal, Glamour, Goth, Patterned, Playful, Professional, Risque, Romantic, Shimmering, Simple, Uncomfortable, Warm, Workwear. Add pack-specific choices through fabricTags.

Mods load in alphabetical folder order. Fabrics in a pack load in the order of the fabrics array, so a custom base must be defined by a pack that loads first. Each custom fabric automatically receives the Modded tag at weight 1; native fabrics keep their original tags. Fabric type does not choose a shader.

Material fields

Field Value
shader Exact name of a loaded shader, or $defaultFabricShader for the game's MannequinFabric shader. New materials start with that shader's defaults.
color Overall tint as #RRGGBB or #RRGGBBAA.
mainTextureScale, mainTextureOffset Two finite numbers, [x, y], for repeat and offset of the main image.
renderQueue Integer from −1 to 5000.
keywords Array of shader keyword strings. A keyword only works when the shader implements it.
floats Map of shader property names to finite numbers. Supports Float and Range properties.
ints Map of property names to integers. Supports Int, Float, and Range properties.
colors Map of property names to hex colors.
vectors Map of property names to four finite numbers.
textures Map of texture property names to PNG or JPEG paths inside the pack. The fabric's texture field supplies the main texture.
textureScales, textureOffsets Maps of texture property names to two finite numbers.

The loader checks property types against the selected shader. It does not clamp values to Unity Range limits. The ints and vectors maps are supported even though the game's default fabric shader exposes neither type.

Properties on the game's fabric shader

The runtime dump covers 472 native fabrics with a material; another 92 native fabrics have no material and cannot be used as baseFabric. All 472 use MannequinFabric and render queue 2000. The ranges below are values found in native fabrics, not validation limits. “Cotton Black” is the sample native value.

Property Type and native values What it does
_EmissionColor Color; 1 distinct value. Cotton Black: #000000FF Emitted light; black disables visible emission.
_Color Color; 323 distinct values. Cotton Black: #2E2E2EFF Base tint; also set by material.color.
_Albedo Texture; assigned on 229/472. Cotton Black: none Main image; set with fabric-level texture.
_Detail Texture; assigned on 321/472. Cotton Black: cottonDetail Fine weave or detail color image.
_AmbientOcclusion Texture; 1/472. Cotton Black: none Darkens recessed areas.
_OcclusionStrength Range 0–1; native 0.176–0.613. Cotton Black: 0.5 Ambient occlusion strength.
_Normal Texture; 0/472. Cotton Black: none Main normal map.
_DetailNormal Texture; 353/472. Cotton Black: cottonDetailNormal Fine normal detail; also read by the fabric preview.
_NormalStrength Range 0–1; native 0.0001–1. Cotton Black: 1 Main normal map strength.
_DetailNormalStrength Range 0–1; native 0–1. Cotton Black: 0 Detail normal strength; also read by the preview.
_Smoothness Range 0–1; native 0.043–0.969. Cotton Black: 0.1 Surface gloss; also read by the preview.
_ReflectionStrength Range 0–1; native 0.073–1. Cotton Black: 1 Reflected light strength.
_AlphaGloss Float; native 0–1. Cotton Black: 0 Shader gloss control associated with alpha.
_SpecularColor Color; 272 distinct values. Cotton Black: #FFD6A5FF Sharp highlight color; also read by the preview.
_SpecularTint Range 0–1; native 0–1. Cotton Black: 0 How much highlights inherit a tint; also read by the preview.
_SpecularLightStrength Float; native 0.1–9.4. Cotton Black: 0.6 Highlight strength; also read by the preview.
_SpecularLightStrengthMax Float; native 0–4. Cotton Black: 1 Maximum highlight strength; also read by the preview.
_ExtraSpecularTightness Float; native 0–15.51. Cotton Black: 1 Tightness of extra highlights; also read by the preview.
_WrapValue Range 0–1; native 0.057–0.96. Cotton Black: 0.413 How far light wraps around the surface; also read by the preview.
_FresPower Range 0.0001–16; native 0.76–8.94. Cotton Black: 4 Fresnel edge-response power.
_FresnelBrightness Float; native 0.1–4.04. Cotton Black: 1 Fresnel edge brightness.
_IndirectStrength Range 0–1; native 0.049–0.84. Cotton Black: 0.1 Indirect lighting strength.
_BackFaceBrightness Float; native 0.3–5. Cotton Black: 0.8 Brightness of the reverse-facing surface.
_BackfaceBias Float; 0.15 on every native fabric. Lighting bias on the reverse-facing surface.
_DiffuseReducesSpecular Float; native 0–1. Cotton Black: 1 Controls specular reduction under diffuse light.
_Anisotropic Float; native 0–1. Cotton Black: 0 Direction-dependent highlight control.
_AnisoAngle Float; native 88–140. Cotton Black: 105 Anisotropic highlight direction.
_AnisoDrift Float; native −13.07–25. Cotton Black: 0 Anisotropic highlight offset or drift.
_texcoord, _texcoord2 Texture; neither assigned on native fabrics. Shader or Unity coordinate slots; usually leave unset.
_QueueOffset, _QueueControl Float; both 0 on all native fabrics. Advanced render queue controls.
unity_Lightmaps, unity_LightmapsInd, unity_ShadowMasks Texture; none assigned on native fabrics. Unity-managed lighting slots; leave unset for ordinary fabric packs.
_ReceiveShadows Float; 1 on every native fabric. Whether the shader receives shadows.

Native keywords are _ALPHAGLOSS_ON (86 fabrics), _ANISOTROPIC_ON (242), and _DIFFUSEREDUCESSPECULAR_ON (293). The in-game fabric preview reads _DetailNormal, _DetailNormalStrength, _WrapValue, _Smoothness, _ExtraSpecularTightness, _SpecularTint, _SpecularLightStrength, _SpecularLightStrengthMax, _SpecularColor, main texture scale, and _ANISOTROPIC_ON. Other properties may affect only the 3D garment.

The meanings of internal shader controls are inferred from their names; the compiled game shader has no written documentation. A custom shader can expose different properties.

Reference files and examples

  • BepInEx/config/DressmakerMods/fabric-reference.json is generated when the plugin starts. It contains native fabric IDs, material values, tags, and keywords. It is written before custom packs load, so it lists native fabrics only.
  • fabric-values.json lists field names and built-in type, color, and tag values.
  • The Textile Field Guide example ZIP in the release has working material examples.

For a quick recolor, open Make fabrics, add a fabric, and choose a native fabric under Mimic material properties of. Leaving the texture empty uses its image. The editor's basic controls set tint, pattern size, and gloss; Advanced edits the same material values shown above.

Back to the Mod Loader guide