World & rooms

Clothes at home

The clothes people own, hung in their wardrobes and folded in their drawers and on their shelves, from .ulhomeclothes files.

What a person owns and is not wearing is in their home: coats, dresses, shirts and trousers hang on the wardrobe's rail, tees, underwear and socks lie folded in the drawers and on the shelves. The player's wardrobe shows the player's clothes (in the colour, pattern and cut they chose); an NPC's home shows the household's.

modder

Your mod's garments appear in the wardrobes of whoever owns them: nothing to add. A .ulhomeclothes file changes how clothes are kept: which garments hang or fold, the folded shapes and hangers, which furniture keeps clothes and how many, the hanging pose.

How it works

  1. Which garment is where. The home storage (Items/storage.json, its clothing table) puts the player's unworn clothes into the wardrobes and drawers when they come home, as cloth:<garment id> lots. When a home's containers hold no garments (an NPC home nobody stocked with clothes), the household's owned, unworn clothes are spread over its pieces in a fixed order instead; a resident nobody has dressed yet gets a wardrobe drawn from the catalogue, the same one on every visit.
  2. How it is kept. The first store rule that fits the garment (category, type, slot) says hang, fold (and which fold shape) or none (shoes, jewellery: kept elsewhere).
  3. Hanging. The real garment is put on a hidden morphless figure in the hanging pose (the shop mannequins' forms), baked into a static mesh, pressed flat (flatten) and hung on a hanger on the piece's rail. Each garment, colour and pattern is baked once and reused.
  4. Folding. A folded-cloth piece of the furniture catalogue (folds), in the garment's own colour (read from its texture, or the colour the owner picked), pattern and fabric finish, stacked on the piece's shelves or in its drawers.
  5. Doors and drawers. A wardrobe with clothes stands with its doors open (doors); one drawer with clothes is pulled out to show them (open_drawers), the folded clothes inside move with it.

Nothing happens in a home nobody looks at: a piece is filled once it has been on screen, and the garments are baked a few per frame.

A home clothes file

<mod>/HomeClothes/*.ulhomeclothes, JSON. Every mod's files are read in load order. store rules: a later mod's are tried first, and a rule whose id comes again replaces the earlier one in place. folds and hosts: an entry whose id comes again replaces the earlier one. Other fields: the last file that sets them wins.

json{
	"forms": { "female": "female", "male": "male" },
	"bakers": 1,
	"pose": { "lShldrBend": [0, 44, 0], "rShldrBend": [0, -44, 0], "lForearmBend": [-12, 0, 0], "rForearmBend": [-12, 0, 0] },
	"hang": { "spacing": 7, "margin": 5, "flatten": 0.35, "turn": 0, "jitter": 3,
	          "shoulder_below_rail": 12, "shoulder_no_hanger": 2, "max_width": 55, "max_depth": 12, "hanger_lift": 1.5,
	          "hangers": ["GenCore/Textile_Hanger_Wire*", "GenCore/Textile_Hanger_Wood*"] },
	"store": [
		{ "id": "tees", "types": ["tee", "tank"], "how": "fold", "fold": "top" },
		{ "id": "underwear", "categories": ["Underwear"], "how": "fold", "fold": "underwear" },
		{ "id": "hung", "categories": ["Top", "Outerwear", "Dress", "Bottom"], "how": "hang" },
		{ "id": "elsewhere", "categories": ["Shoes", "Headwear", "Accessory"], "how": "none" }
	],
	"folds": [
		{ "id": "top", "pieces": ["GenCore/Textile_Folded_Tee*",
		                          { "piece": "GenCore/Textile_Clothes_Folded_Stack", "scale": [1, 1, 0.17] }] }
	],
	"hosts": [
		{ "id": "wardrobe", "on": ["Storage/Wardrobe"], "hang": true, "fold": ["drawers", "inside"],
		  "doors": 0.9, "open_drawers": 1, "max_hung": 12, "max_folded": 8, "stack": 4 },
		{ "id": "dresser", "on": ["Storage/Dresser"], "fold": ["drawers", "top"], "open_drawers": 1, "max_folded": 10 }
	],
	"fallback_wardrobe": { "Top": 4, "Bottom": 3, "Dress": 2, "Outerwear": 2, "Underwear": 4, "Socks": 2 },
	"fold_material": "cloth"
}

Top level

Field Meaning
forms The mannequin form a garment is baked on, for female and male bodies. A whole figure: the garment must fit it.
bakers How many hidden figures bake at once (1-6). More fills a wardrobe faster; each bake costs a frame 30-60 ms, so more than one can land in the same frame.
pose The hanging pose: bone turns in degrees, as in a mannequin pose. Arms down so the sleeves fall along the body.
fallback_wardrobe For a resident with no wardrobe yet: how many garments of each category they are given (Top, Bottom, Dress, Outerwear, Underwear, Socks...).
fold_material cloth (default): the folded pieces wear the garments' own cloth material (colour, pattern, finish). tint: they keep the piece's material, tinted.

hang

Field Meaning
spacing cm between two hangers on a rail.
margin cm kept free at each end of the rail.
flatten How deep a hung garment stays, front to back (0.35 = pressed to a third: it hangs among others, not on a body).
turn Degrees the garments are turned from facing along the rail (0, as in a wardrobe; 90 to face out, as on a shop rail).
jitter Degrees of random turn per garment.
shoulder_below_rail cm from the rail's top to the garment's top (its shoulder line, or a waistband).
shoulder_no_hanger The same when no hanger piece exists: the garment's top rests on the bar.
max_width cm: a garment wider than this (a skirt modelled flaring round the legs) is gathered to it across, as it falls on a hanger.
max_depth cm: the deepest a pressed garment stays front to back (the flaring skirt again, seen from the side).
hanger_lift cm the hanger's hook stands above the rail's top.
hangers Catalogue pieces for the hanger, Set/Node with wildcards, the first that exists. None: the garments hang without one.

A garment longer than the space under the rail (the catalogue's drop) is kept but not shown.

store rules

Field Meaning
id Its name (a later file's rule with the same id replaces it).
categories Garment categories (Top, Bottom, Dress, Outerwear, Underwear, Shoes, Socks, Headwear, Accessory). Empty: any.
types Garment types (Type: in the .ulcloth, see Clothes/types.txt). Empty: any.
slots Clothing slots, any of them. Empty: any.
how hang, fold or none.
fold The folds id a folded garment takes.

folds

Field Meaning
id The fold shape's name, used by store rules.
pieces Catalogue pieces, the first that exists: a Set/Node string, or { "piece": ..., "scale": [x, y, z] } (a stack scaled to one garment's thickness). One piece is one garment; garments of a kind are stacked up to the host's stack.

hosts

The furniture that keeps clothes. The last entry that fits a piece is used.

Field Meaning
id Its name.
on Catalogue Category or Category/Type (Storage/Wardrobe, Storage/Dresser).
match, not_match Words of the piece's name, any of them.
rooms Words of the room's name (bedroom). Empty: any room.
hang It has a rail. The rail is the catalogue's rails ([z, x0, y0, x1, y1, drop], the bar's top and ends, the free height under it); a piece exported without rails gets one under its inside top, rail_below_top cm down.
fold Where folded garments go, in order: drawers (the drawers' own measured bottoms), inside (the shelves below the top), top, all.
doors Share of a hinged door's range it stands open at when it holds clothes (0 = shut).
open_drawers, drawer_open How many drawers with clothes are pulled out, and how far (share of their travel).
max_hung, max_folded How many garments it shows at most.
stack Folded garments on top of each other.

Notes

  • Garments hang at their base fit, as on the mannequins: not shaped to the owner's body.
  • A garment's colour on a folded piece is the mean of its texture, or the owner's chosen colour; a pattern is drawn as on the garment; a cutout pattern (fishnet, lace) folds to its first colour.
  • Children own nothing above the minors' limit, at home as on their body.