Jump to content

Mod Loader/Replacing atlases

From Threadbox

A sprite atlas is one image containing several pictures. The game takes a different region from it for each sprite. An atlas replacement lets your pack change the whole sheet with one PNG.

Export the original sheet

  1. Visit the room you want to change.
  2. Open the debug console with Ctrl + backtick and run art-export.
  3. Open BepInEx/config/DressmakerMods/art-atlases/ in your game folder. Each export has its own dated folder.

The folder contains images/, atlas-reference.json, art-reference.json, Atlas-Objects.md and button-states.json. The Markdown file lists each texture's asset name, PNG filename, sprite regions and Unity scene/object paths. The JSON also records pivots, borders, UV coordinates and direct sprite fields used by game components.

The export covers loaded assets, including inactive objects. It does not load every scene or bundle. Visit other rooms and export again to find more art. A sprite with no listed object may be loaded but not currently displayed.

Edit the image

Copy the PNG into your pack. Keep its width and height, and leave the sprites in their original positions. Draw over each sprite's existing region. Don't resize the canvas or rearrange the sheet.

For example, the cats sheet is 2048 by 2048 pixels. It includes the desk cat's poses and the sneaky cat. Its Unity object paths include FrontDesk/Background/Cats and FrontDesk/Background/Cats/Sneaky in the PatternCutting scene.

Add it to your pack

{
  "id": "yourname.halloween-cats",
  "name": "Halloween Cats",
  "author": "Your name",
  "version": "1.0.0",
  "artReplacements": [
    {
      "id": "cats-sheet",
      "kind": "atlas",
      "assetName": "cats",
      "image": "images/halloween-cats.png"
    }
  ]
}

assetName is the texture name from the export. image is the path to your edited PNG inside the pack. For an existing pack, add the entry to its artReplacements array.

Omit scene and objectPath to replace the sheet wherever supported sprites use it. To limit it to the desk cat, add "scene": "PatternCutting" and "objectPath": "FrontDesk/Background/Cats". Object paths match exactly; this does not include the child Sneaky object.

Catalog entries marked serializedField show where the game stores a sprite before displaying it, such as a cat animation frame. They are reference information, not a replacement kind. Use the atlas rule above to cover those frames when they appear.

Front-desk buttons

The frontDeskButtons sheet is 2048 by 2048 pixels. It contains the bell, cutting table, fabric closet, mannequin, sewing table and sketchbook buttons. Use "kind": "atlas" with "assetName": "frontDeskButtons" and your edited sheet's path.

These six buttons use colour tinting for hover and press feedback, so the same pictures cover their states. Other buttons may use separate sprites: check button-states.json for their normal, highlighted, pressed, selected and disabled images. A button using a different sheet needs its own replacement.

Check it in game

Install the pack and restart Dressmaker. Check more than one sprite from the sheet, including animation frames and button states. Individual sprite, image, button and character replacements take priority over atlas rules; disable overlapping entries if you want the sheet replacement to show.

The replacement keeps each sprite's region, pivot, border and outline. Wrong-size images are skipped with a warning. Rotated and tightly packed Unity sprites still need individual replacements. The catalog marks whether each sprite supports atlas replacement.

If several loaded textures share an asset name, the catalog marks it as ambiguous. Check their dimensions and object paths before using a global rule. Atlas rules affect sprites, UI images, button states and character slots; use a material replacement for a texture on a 3D object.

See replacing art for individual replacements and the Art API for C# registration.

Back to the Mod Loader guide