Jump to content

Mod Loader/Fabrics

From Threadbox

You can make fabrics in Dressmaker using your own images, or recolour a fabric from the game. Save them together as a pack to use in your game or share with other players.

Make one in the game

  1. Open Options > Mod Manager > Make fabrics. Enter a pack name, ID, author, and version. The pack icon, banner, and description are optional.
  2. Click Add fabric. Choose a PNG or JPEG image, or keep the image from a game fabric. Give the fabric a name and set its price, textile type, colour category, and tags.
  3. Choose a fabric under Mimic material properties of. New fabrics start with White Cotton and a white tint. Open Advanced fabric properties if you want to change the finish.
  4. Click Add fabric to pack, then Make, install and ZIP pack. Restart Dressmaker and look for it in the shop.

To change a pack you already made, open it under My mod packs and choose Edit fabrics. The editor makes a new ZIP when you save the pack. Keep the pack ID and each fabric ID if players may already own them.

What the fabric shader does

The texture is your fabric image. The shader makes it look like cloth by adding shine, shading, and surface detail. To borrow the finish of a fabric you like, choose it under Mimic material properties of.

Textile type, Color, and Fabric tags tell the shop and commissions how to classify your fabric. They do not change its appearance.

Mimic material properties of copies a game fabric's material, including its shader and detail maps. You can then change just a few settings. If you choose Plain material, the loader uses the game's default fabric shader and its own starting values. That can look different from copying White Cotton, even when both use the same shader. The game's fabric shader is called MannequinFabric in the property reference.

Change the fabric finish

From Advanced fabric properties, click Edit simple finish to adjust these settings:

  • Tint changes the material color. You can pick a color or enter a hex value such as #D9E8FFFF. Keep original tint uses the copied material's color. Tint is easiest to see on pale fabrics; a dark source image can still look dark.
  • Pattern size changes how large the image appears on the cloth. 100% keeps the original size, 40% makes the print smaller, and 250% makes it larger. This works only when the fabric has a texture. Very large prints may look blurry.
  • Gloss moves the surface from matte to shiny. It changes the shader's _Smoothness value. Keep original gloss uses the value from the copied material.
  • Highlight changes the colour and strength of the reflection. Depending on the copied fabric, you can adjust its size or how much of the fabric colour shows in the sheen. If it is hard to see, raise Gloss.

Click Done to keep these changes in the fabric editor. You still need to save the fabric and make the pack before they appear in the game.

Advanced fabric properties

Click Advanced fabric properties on the fabric editor screen. Changes apply to the fabric you are editing. Watch the cloth preview on the right as you adjust them. Open a save first if the Emporium cloth preview says it is unavailable. The Texture preview on the fabric editor shows the flat image; Rendered shows the material on cloth.

Tab What you can change
Surface Number settings exposed by the selected shader. On the game's fabric shader, these include surface smoothness, reflection strength, texture depth, highlights, and edge sheen. Use a slider or type a number beside it. Each shader can expose a different set of controls.
Colours Red, green, blue, and opacity for each shader color property. _Color is the main tint; _SpecularColor colors the highlights. The ordinary Color field on the fabric editor is still the shop's color category.
Textures Choose an image for each texture slot. _Albedo is the main print. _Detail adds fine surface detail, and _DetailNormal adds fine raised-looking detail. Reset returns a slot to the main texture or copied material's map.
Tiling Repeat X and Y set how often a texture repeats; Offset X and Y move it. More repeats make a pattern look smaller. These controls are available separately for the shader's texture slots.
Rendering Render queue changes draw order; -1 uses the shader default. Keywords enable optional shader features only if that shader supports them. For a first fabric, leave both as copied.

For a matte cotton, start by lowering Surface smoothness. For a shiny finish, raise it and try Highlight strength. Texture depth and detail normal strength need a normal map to show a raised weave. Edge sheen affects glancing angles; Shadow in folds needs an ambient-occlusion map. These controls are drawn from the shader you selected, so a different shader may show different names. A fixed-range setting will pull an out-of-range typed number back into range.

Apply to fabric keeps the advanced changes in your draft. Cancel leaves them out. Reset to material defaults clears the material overrides but keeps the fabric texture you chose: a copied fabric gets its source material settings back, while Plain material uses the default shader values. Then save the fabric and choose Make, install and ZIP pack. The editor copies chosen texture maps into the pack ZIP.

Try the fabric on a dress too. Some effects look different on the shop bolt, the cutting table, and the mannequin.

Pack files

MyFabricPack/
├── mod.json
└── textures/
    └── blue-cotton.png

Add fabrics to the fabrics list in mod.json. baseFabric copies the source material and any fabric fields you leave out. material contains only the settings you want to change. Native fabric IDs are in BepInEx/config/DressmakerMods/fabric-reference.json; the loader writes this file when it starts.

This example copies White Cotton's material, uses a new print, makes it glossier, and repeats the print twice on each axis:

{
  "id": "yourname.blue-cotton",
  "name": "Blue Cotton Pack",
  "author": "Your name",
  "version": "1.0.0",
  "fabrics": [{
    "id": "blue-cotton",
    "name": "Blue Cotton",
    "baseFabric": "CottonWhite",
    "fabricType": "Cotton",
    "colors": ["Blue"],
    "texture": "textures/blue-cotton.png",
    "material": {
      "color": "#FFFFFFFF",
      "floats": { "_Smoothness": 0.28 },
      "mainTextureScale": [2, 2]
    },
    "cost": 18,
    "unlockLevel": 0,
    "tagWeights": [{ "tag": "Casual", "weight": 70 }]
  }]
}

Put blue-cotton.png in the pack's textures folder. The value [2, 2] is two repeats, not 200% pattern size. For a fabric made without baseFabric, set "shader": "$defaultFabricShader" inside material. That name selects the game's fabric shader; a JSON pack cannot supply a new shader by itself. A DLL plugin can load one from a Unity AssetBundle through FabricModApi.

Give a fabric more than one colour tag

A striped or patterned fabric can belong to several colour categories. Add each colour to the fabric's colors list in mod.json. For a red-and-black fabric, use:

"colors": ["Red", "Black"]

Put this inside the fabric entry in fabrics, replacing its existing colors line. For example:

{
  "id": "red-black-check",
  "name": "Red and Black Check",
  "baseFabric": "CottonWhite",
  "colors": ["Red", "Black"],
  "texture": "textures/red-black-check.png",
  "cost": 18,
  "unlockLevel": 0
}

Put your check image at textures/red-black-check.png. The fabric will count as both Red and Black in filters and commissions. Colour tags do not recolour the image.

Use any combination of White, Black, Grey, Brown, Red, Orange, Yellow, Green, Blue, Purple, and Pink. This list takes colour names, without percentages.

If you made the pack in Fabric Creator, save it first, then close Dressmaker and open the installed pack's mod.json under Dressmaker/Mods. Edit the fabric's colors list, save the file, and restart the game. Update the copy in your ZIP too before sharing it.

The creator's Color picker shows only the first colour. It keeps an existing multiple-colour list when you edit other settings and leave that first colour unchanged. Choosing a different colour in the picker replaces the list with that single colour, so check the JSON afterward.

Add a fabric type or tag

Define them in your pack's mod.json. You don't need to edit the game's files. For example, this gives the pack a Leather type and a Leather tag:

{
  "id": "yourname.leathers",
  "fabricTypes": [{ "id": "Leather", "name": "Leather" }],
  "fabricTags": [{ "id": "Leather", "name": "Leather" }],
  "fabrics": [{
    "id": "brown-leather",
    "name": "Brown Leather",
    "fabricType": "Leather",
    "colors": ["Brown"],
    "texture": "textures/brown-leather.png",
    "material": { "shader": "$defaultFabricShader" },
    "cost": 18,
    "unlockLevel": 0,
    "tagWeights": [{ "tag": "Leather", "weight": 50 }]
  }]
}

The loader gives those entries the internal IDs yourname.leathers.Leather. You can use the short ID within the same pack; another pack must use the full ID. The type appears under fabric types in the game's filter, and the tag appears under tags. Keep the IDs the same in later versions of your pack.

Try it in the game

  1. Put the folder directly under Dressmaker/Mods, or install its ZIP through Mod Manager.
  2. Restart and check the fabric shop.
  3. Buy the fabric, use it on a dress, save, and reopen the dress.
  4. Read BepInEx/LogOutput.log if the fabric is missing or looks wrong.

To use your own shader on fabrics and dresses, follow Add a custom fabric shader. The Fabric Render API lets your plugin apply it in the different dress views.

Field reference

See Fabric pack fields for every manifest field and every property on the game's fabric shader. For DLL registration and shader AssetBundles, see FabricModApi.

Back to the Mod Loader guide