Skip to content

Templates and Export Flow

Template folder rules, preview generation, slot YTD layout, and addon export behavior for 0r-clothing_designer

Template folder rules, preview generation, slot YTD layout, and addon export behavior for 0r-clothing_designer

This page explains how templates are discovered and what happens when users export.

Adding a New YDD or YTD

Template Discovery Rules#

Templates must be placed under:

text
templates/cloth_templates/
  male/
  female/

Supported component folders:

  • accs
  • berd
  • decl
  • feet
  • hair
  • hand
  • head
  • jbib
  • lowr
  • task
  • teef
  • uppr

Examples:

text
templates/cloth_templates/male/jbib/jbib_000_u.ydd
templates/cloth_templates/female/lowr/lowr_000_r.ydd

Naming Rules#

The resource derives template identity from the folder and file name.

Check these rules:

  • top folder must be male or female
  • second folder must be a supported component key
  • the file prefix should match that component key

If folder and file naming do not agree, the template can be skipped.

Optional Preview Images#

You can ship your own preview images under:

text
templates/template_previews/<gender>/<component>/<file>.(png|webp|jpg|jpeg)

If no preview exists, the resource can generate one during startup and mirror the generated .png into templates/template_previews.

If preview files are generated or changed while the server is already running, use:

text
refresh
restart 0r-clothing_designer

Optional Default Slot YTD Files#

Default slot .ytd files live under:

text
templates/template_slots/<template_key>/

Examples:

text
templates/template_slots/male_jbib_jbib_000/
templates/template_slots/female_accs_accs_000/

These files become template-specific slot options inside the editor.

Startup Sync Behavior#

On resource start the runtime can:

  • create missing workspace directories
  • scan all .ydd templates
  • generate missing previews
  • update changed managed previews
  • clean temporary preview cache files

Export Flow#

Current shipped behavior:

  • the UI export flow is addon-first
  • replace export is not shown in the shipped UI
  • successful addon exports create both zip output and mirrored addon resource output

Output locations:

  • 0r-clothing_designer/exports/
  • 0r-clothing_exports/
  • 0r-clothing_designer/data/workspace/

After a successful addon export, restart:

text
restart 0r-clothing_exports

so FiveM reloads the new addon files.