For the complete documentation index, see llms.txt. This page is also available as Markdown.

Setup and Database

Full installation, Windows and Linux host setup, server.cfg permissions, and database steps for 0r-clothing_designer

This page is the full first-time install guide.

If you follow the steps in order, the resource should be ready to use when you finish.

1. What You Need Before You Start

Prepare these items first:

  • a FiveM server

  • 0r_lib

  • ox_lib

  • oxmysql

  • the full [clothing_designer] package

  • permission to edit server.cfg

  • permission to import SQL if saved designs will be enabled

The package should include:

[clothing_designer]/
  0r-clothing_designer/
  0r-clothing_exports/

2. Official Downloads and Sources

Use these sources:

3. Understand the Worker Requirement

The resource already runs inside FiveM JS because the resource includes:

You do not usually need to install system Node just to make the resource start.

Current default:

That means:

  • heavy worker actions run in a separate local daemon process

  • this reduces pressure on the FiveM JS runtime

  • if external start fails, you can switch to inprocess manually

4. Place the Resource Package

Copy the full package into your resources folder.

Recommended layout:

Important folders inside 0r-clothing_designer:

  • ui/

  • templates/cloth_templates/

  • templates/template_previews/

  • templates/template_slots/

  • exports/

  • [installation]/database.sql

  • config/init.lua

5. Host Setup for Windows

Use this section if your server host OS is Windows.

Step 1: verify Windows PowerShell

Run this command on the host:

If this returns a version string, the default PowerShell requirement is ready.

If powershell.exe from PATH gives Access is denied, use the full System32 path shown above instead of the shorter powershell.exe form.

Step 2: optional PowerShell 7 install

You do not need this if the built-in Windows PowerShell works.

If you want PowerShell 7:

  1. open the official Microsoft page

  2. download the installer for your host

  3. install it

  4. verify it with:

If you want to force that exact executable later, use:

Step 3: optional Node install

Install system Node only if one of these is true:

  • external worker Node resolution fails

  • you want to force a specific executable path

If needed:

  1. install the current LTS release

  2. verify with:

If you want to force that exact executable later, use:

6. Host Setup for Linux

Use this section if your server host OS is Linux.

PowerShell is required on Linux because the worker uses pwsh.

Step 1: install PowerShell on Ubuntu

Run:

Step 2: verify PowerShell

Run:

If this returns a version string, the Linux PowerShell requirement is ready.

If you want to force that path later, use:

Step 3: optional Node install

Install system Node only if external Node resolution fails or you want an explicit path.

If needed:

  1. install the current LTS release for your Linux host

  2. verify with:

If you want to force that path later, use:

7. Add Required server.cfg Lines

Add the dependency start order first:

Then add the required permissions:

Optional compatibility permission:

What they do:

  • add_unsafe_child_process_permission lets the resource start child processes for worker and PowerShell-backed actions

  • add_filesystem_permission lets the resource write synchronized addon export files into 0r-clothing_exports

  • add_unsafe_worker_permission not required by the current code path, but safe to keep if you already use a standard permission block

8. Import the SQL If You Want Saved Designs

If players should be able to save designs, import:

Database SQL

The SQL file inside the package is:

Recommended order:

  1. start oxmysql

  2. import the SQL

  3. restart 0r-clothing_designer

If you do not want saved designs, set:

9. Review the Main Config

Open:

Check these sections before first start:

  • Config.Worker

  • Config.AI

  • Config.SavedDesigns

The full config guide is here:

Configuration

10. Add Templates

Place template .ydd files under:

Example:

If you need the full file-placement guide, read:

Adding a New YDD or YTD

11. Start the Resource

Start the package:

If template files changed while the server was already running, use:

After exporting new addon clothing, use:

12. Validate Startup Logs

When Config.Worker.Mode = "external", look for logs like these:

If the worker cannot start and you need a fast fallback, switch to:

Then restart the resource.

13. Validate In Game

Check these in order:

  1. the UI opens for an authorized admin

  2. templates appear in the template list

  3. opening a template creates a working editor session

  4. preview and slot preview load

  5. export completes

  6. output appears in 0r-clothing_designer/exports

  7. mirrored addon files appear in 0r-clothing_exports

  8. saved designs work if enabled

  9. AI generation works if enabled

14. When Installation Is Finished

At this point the setup is complete.

If something still fails, continue with:

Troubleshooting

Last updated