Skip to content

Configuration

Worker, AI, and saved design configuration reference for 0r-clothing_designer

Worker, AI, and saved design configuration reference for 0r-clothing_designer

All editable runtime settings are in:

text
config/init.lua

Read this page after the setup guide and before first production use.

1. Worker Config#

The worker config is the most important part of the current runtime model.

Current keys:

  • Config.Worker.Mode
  • Config.Worker.NodePath
  • Config.Worker.PowerShellPath

Default block:

lua
Config.Worker = Config.Worker or {
    Mode = "external",
    NodePath = "",
    PowerShellPath = ""
}

Config.Worker.Mode#

Supported values:

  • external
  • inprocess

Use:

  • external default and recommended starts a separate local daemon process for heavy worker actions
  • inprocess fallback mode keeps worker execution inside the FiveM JS runtime

If external fails to start, the resource does not auto-fallback. Switch to inprocess manually and restart the resource.

Config.Worker.NodePath#

Leave this empty unless you need to force a specific Node executable.

Use it only when:

  • automatic Node resolution fails
  • you want a fixed Node path for your host

Examples:

lua
Config.Worker.NodePath = "C:/Program Files/nodejs/node.exe"
lua
Config.Worker.NodePath = "/usr/bin/node"

Config.Worker.PowerShellPath#

Leave this empty unless you need to force a specific PowerShell executable.

Use it when:

  • your host does not resolve the default PowerShell command correctly
  • you want to pin pwsh
  • you want to pin a known Windows PowerShell or PowerShell 7 path

Examples:

lua
Config.Worker.PowerShellPath = "C:/Program Files/PowerShell/7/pwsh.exe"
lua
Config.Worker.PowerShellPath = "/usr/bin/pwsh"

Changing worker mode or worker paths requires a resource restart.

2. AI Config#

Top-level keys:

  • Config.AI.Enabled
  • Config.AI.Provider
  • Config.AI.Google
  • Config.AI.OpenAI

Supported providers:

  • google
  • openai

If you do not want AI generation:

lua
Config.AI.Enabled = false

Google AI settings#

Google fields:

  • ApiKey
  • Model
  • AspectRatio
  • ImageSize

Current default provider is:

lua
Config.AI.Provider = "google"

Official pages:

How to configure Google:

  1. sign in to Google AI Studio
  2. create an API key
  3. copy the key
  4. paste it into Config.AI.Google.ApiKey
  5. keep the default model unless you have a reason to change it

OpenAI settings#

OpenAI fields:

  • ApiKey
  • Model
  • Size
  • Quality
  • OutputFormat

To switch to OpenAI:

lua
Config.AI.Provider = "openai"

Official pages:

How to configure OpenAI:

  1. sign in to the OpenAI platform
  2. create an API key
  3. copy the key
  4. paste it into Config.AI.OpenAI.ApiKey
  5. verify your billing and model access if requests fail

3. Saved Designs Config#

Top-level keys:

  • Config.SavedDesigns.Enabled
  • Config.SavedDesigns.Storage.Provider
  • Config.SavedDesigns.Storage.FallbackProviders
  • Config.SavedDesigns.Storage.DeleteRemoteOnDesignDelete
  • Config.SavedDesigns.Storage.RequestTimeoutMs

If you do not want saved designs:

lua
Config.SavedDesigns.Enabled = false

Storage providers#

Supported providers:

  • discord_webhook
  • fivemanage

Discord webhook#

Fields:

  • Url
  • BotName

Use this when you want the generated preview asset to upload to a Discord webhook.

FiveManage#

Fields:

  • ApiKey
  • BasePath

Official pages:

How to configure FiveManage:

  1. sign in to FiveManage
  2. create or copy an API token
  3. place it into Config.SavedDesigns.Storage.FiveManage.ApiKey
  4. keep the default BasePath unless you need a different remote folder structure

Example provider switch#

lua
Config.SavedDesigns.Storage.Provider = "fivemanage"
Config.SavedDesigns.Storage.FallbackProviders = {
    "discord_webhook"
}

Before your first production start, confirm:

  1. Config.Worker.Mode = "external"
  2. NodePath is empty unless you really need it
  3. PowerShellPath is empty unless you really need it
  4. AI is either configured fully or disabled
  5. saved designs are either configured fully or disabled

5. No Extra Env File Is Required#

This resource does not require you to create a .env file for normal installation.

The supported customer-facing config surface is config/init.lua.

Do not leave live API keys or webhook URLs in public repositories.