🎭 Character Suite
Documentation relating to the spooni_charcreator & spooni_charselector.
1. Installation
spooni_charcreator works with VORP, RSG, RedEM:RP and RPX.
To install spooni_charcreator:
- Download the resource
- Ensure that all requirements are installed
- jo_libs (v2.13+, v2.17.1+ recommended for the current RedM client)
- spooni_libs (latest)
- oxmysql
- Drag and drop the resources into your resources folder
spooni_charcreatorspooni_charselector— optional, remove if you don't want the selection scene
- Add these ensures in your server.cfgbash
ensure oxmysql ensure jo_libs ensure spooni_libs ensure spooni_charcreator ensure spooni_charselector # optional — remove if you don't want the selection scene⚠️ Order is critical. Wrong order = character creation silently breaks. Full load order:
- Framework Core (
vorp_core/rsg-core/redem_roleplay/rpx-core) - Framework Character (
vorp_character/rsg-character(RSG v3) /rsg-multicharacter/ ...) - Framework Inventory (
vorp_inventory/rsg-inventory/ ...) oxmysqljo_libsspooni_libsspooni_charcreatorspooni_charselector(optional)
Why does order matter?
jo_libsmust start after Core + Inventory for the framework bridge.spooni_libsbuilds onjo_libs. Creator needs all three. Selector needs Creator for look previews. - Framework Core (
- Now you can configure the script as you like
config.luafor bothspooni_charcreatorandspooni_charselector— the shipped defaultsconfig_user.lua— put your own settings here (see below)
- At the end, restart the server
No SQL needed. Database tables are created automatically on first start.
Update-safe configuration (config_user.lua)
Both resources ship a config_user.lua. Everything you set there is merged over config.lua, so you never lose your settings on an update — replace every file except config_user.lua and you are done.
-- spooni_charcreator/config_user.lua — same keys as config.lua, without the `Config.` prefix
ConfigUser = {
Locale = 'de',
Debug = false,
-- Only the keys you name are overridden, the rest of EditorKeys stays default
EditorKeys = {
zoomIn = { rawKey = 107 }, -- numpad +
zoomOut = { rawKey = 109 }, -- numpad -
},
}- Tables are merged key by key — options added in a future update keep their new default.
- Lists/arrays are replaced as a whole — if you override
Config.Scenes, give the full list. - On start the console prints which overrides were applied, so you can verify the file is read.
Framework-Specific Guards
After copying the folders, add guards to prevent your native creator/selector from running alongside Spooni. Then run /spooni_check in the server console — every line must show PASS.
VORP
Copy these 5 patch files from spooni_charcreator/docs/patches/vorp_character/ (drag & drop, replace). They are written for an unmodified vorp_character:
| Copy this file | Over this file | What it does |
|---|---|---|
client/createCharacter.lua | vorp_character/client/createCharacter.lua | Creator guard |
client/commands.lua | vorp_character/client/commands.lua | /rc fix; pants get their legs back after chap / spats / boots |
client/client.lua | vorp_character/client/client.lua | Selector guard (already included, no extra line needed) |
server/server.lua | vorp_character/server/server.lua | Wearable states and character list fix |
client/creator_functions.lua | vorp_character/client/creator_functions.lua | Required since 2.0 — clothing hashes and streaming wait |
Optional: client/clothingstore.lua over vorp_character/client/clothingstore.lua — only if you want the Vanilla Store Takeover.
Modified
vorp_characteryourself? Follow the manual merge indocs/INSTALL-VORP.mdAppendix B.
After a full restart, /spooni_check checks every patch file (version marker, vanilla base confirmed or FORK DETECTED) and, with a player online, the line Patch runtime handshake — the proof that the patched client files are actually running.
RSG v3 (rsg-character)
RSG v3 (rsg-core 3.x) replaced rsg-multicharacter, rsg-appearance and rsg-spawn with one resource, rsg-character. jo_libs 2.17.1+ is required here.
ensure rsg-core
ensure rsg-character
ensure oxmysql
ensure jo_libs
ensure spooni_libs
ensure spooni_charcreator
ensure spooni_charselectorSelector guard (only with spooni_charselector) — pick one:
- Copy
spooni_charcreator/docs/patches/rsg-character/client/charselect.luaoverrsg-character/client/charselect.lua(written for an unmodified rsg-character 3.0.6). - Or add the line yourself directly below each of these three lines:
-- the guard line
if GetResourceState('spooni_charselector') == 'started' then return end
-- goes directly below each of these
RegisterNetEvent('rsg-character:client:ReceiveCharacterSlots', function(slots)
function OpenCharacterSelect()
local function StartCharSelect()/spooni_check must then show rsg-character selection guard: start, ... reopen and ... slot list as OK. An rsg-character update overwrites the file — apply the guard again after every update. Without the Selector skip this step: rsg-character keeps its own selection and creator, and the Spooni editor stays available through the items and the developer API.
Differences from RSG before v3:
- New characters are created by the Creator through rsg-core; starter items come from
RSGCore.Shared.StarterItems. - The Selector shows as many slots as
RSG.MaxCharacterSlots. - The clothing store takeover is not available on v3 (the rsg-barbers takeover still works).
jo_clothingstore: setopenStoreNewCharacter = falsein its config.
RSG before v3 (rsg-multicharacter + rsg-appearance)
Copy these patch files from spooni_charcreator/docs/patches/ (written for rsg-appearance 2.5.6, also safe on 2.5.4):
| Copy this file | Over this file | |
|---|---|---|
rsg-multicharacter/client/main.lua | rsg-multicharacter/client/main.lua | Required — includes the Selector guard |
rsg-appearance/client/creator.lua | rsg-appearance/client/creator.lua | Required — Creator guard |
rsg-appearance/data/features.lua | rsg-appearance/data/features.lua | Optional — fixes face features snapping back after a save |
rsg-appearance/client/clothes.lua | rsg-appearance/client/clothes.lua | Optional — only for the Vanilla Store Takeover |
Files in resource root instead of
client/? Copy there instead.
Updated rsg-appearance from GitHub? That replaces the patch files with the vanilla versions — copy them again afterwards.
Do not swap the guard resource names. Selector guard checks spooni_charselector, creator guard checks spooni_charcreator. Swapped = naked characters.
RedEM:RP
Single guard in redemrp_identity/client/cl_main.lua, handler redemrp_identity:openSelectionMenu (~line 72):
if GetResourceState('spooni_charselector') == 'started' then return endAlways run Creator + Selector together on RedEM:RP.
RPX
Single guard in rpx-multicharacter/client.lua, handler CLIENT:MultiCharacter:LoadCharacters (~line 177):
if GetResourceState('spooni_charselector') == 'started' then return endAlways run Creator + Selector together on RPX. RPX has no SecondChance item support — enable Config.SecondChanceCommand (off by default) or use exports.spooni_charcreator:OpenSecondChance().
Custom Framework
If your own code controls the character flow, trigger directly instead of patching:
-- Creator
TriggerClientEvent('spooni_charcreator:start', src)
-- Selector
TriggerClientEvent('spooni_charselector:open', src, chars, maxSlots, sceneIndex)Wire your core in framework.lua — see the Custom Framework Integration section under For developers.
Upgrading from 1.x to 2.0
2.0 is a full update for both resources. Read this once before you copy files.
- Copy both folders over the old ones —
spooni_charcreatorandspooni_charselector. Do not delete first, so your own files survive:config_user.lua(both resources),server/config_webhooks.luaand any locale file you edited. A partial update cannot work: 2.0 checks its own files at boot and refuses to open, load or save until every file is in place. The console names the missing file; players can still spawn through the framework meanwhile. - Update jo_libs to 2.13 or newer (2.17.1+ recommended). Below 2.13
/spooni_checkreports FAIL. - Copy the patch files again — they changed. On VORP,
client/creator_functions.luais new and required (without it the console showsnative d3a7b003ed343fd9: invalid table argument). Restart the patched resource. - Run
/spooni_checkin the server console: every patch line must be green and show the same version as the Creator. - One-time data repair (server console, run the
dryvariant first to see what would change):- VORP:
spooni_fixcomptables dry, thenspooni_fixcomptables - RSG:
spooni_rsgfixhashes dry, thenspooni_rsgfixhashes— a second run should report0 carried signed hashes
- VORP:
- Test: log in with an existing character, then edit, save, relog and check the look is unchanged.
Your config_user.lua stays valid. Worth knowing after the update:
- New options
Config.PlayerHeightandConfig.RestartHeal(both on by default) — see Other creator options. Config.ClothingBlocklisthides catalogue pieces the game does not keep on a multiplayer ped. A player who already wears one keeps it; it only disappears from the picker. To offer a group again, override it inconfig_user.lua(lists are replaced as a whole) — do not editconfig.lua.- Saving is server-confirmed: the editor closes only after the server has stored the look.
- Store saves need an editor session (
Config.EditorSession, default'refuse'). Addons that open the editor for paid changes callGrantEditorSession— see Developer API & Exports. - The starter outfit item is given by the server once, on the first confirmed save.
Config.SecondChanceCommandis nowfalseby default — use the item, or turn the command on deliberately.
If you have any problems, you can always open a ticket in the Spooni Discord.
2. Usage
A complete character creation and selection system for RedM. The Creator replaces your framework's native editor with live camera views, item-gated sections, NPC hairstyles & beards, body size tuning, skirts for female characters, and vanilla store takeover. The Selector adds an atmospheric in-world campfire scene where characters stand in their real look with ambient music and a spawn location picker.
3. For developers
Everything works through exports & hooks — no source access needed. Current version: Creator 2.0.17, Selector 1.4.45.
Creator Configuration (spooni_charcreator/config.lua)
Framework & Language
Config.Framework = 'auto' -- 'auto', 'vorp', 'rsg', 'rpx', 'redemrp'
Config.Locale = 'auto' -- 'auto' (follows spooni_libs) or en, de, es, fr, it, pt, pt-br, ro, pl, ru, tr, nl, cs, hu
Config.Debug = false -- true for testing onlyEditor Sections (Config.Categories)
Each section toggles individually. true = visible, false = hidden.
Config.Categories = {
-- Top-level
skintone = true, -- Skin tone
body = true, -- Body build + size
face = true, -- Face morphs (8 groups)
eyesteeth = true, -- Eyes & teeth
hairbeard = true, -- Hair & beard (master switch)
skindetails = true, -- Skin details (freckles, pores)
scars = true, -- Scars
makeup = true, -- Makeup
clothing = true, -- Clothing
identity = true, -- Name/age (creation only)
-- Hair & Beard sub-sections
hair = true, -- Hair styles
beard = true, -- Beard styles
hairColor = true, -- Hair color swatches
npcHair = true, -- 🏆 NPC hairstyles (drawable-based)
bonnet = true, -- Hat/bonnet hair (female)
npcBeard = true, -- 🏆 NPC full beards (drawable-based)
stubble = true, -- Beard stubble
eyebrows = true, -- Eyebrows
-- Body sub-sections
bodyBuild = true, -- Body build presets
bodyMorphs = true, -- Body shape sliders
bodySize = true, -- Character height
-- Eyes & Teeth sub-sections
eyeRedness = true, -- Bloodshot eyes
eyeColor = true, -- Eye color
teeth = true, -- Teeth model
-- Free color sliders
dye = true, -- Free color (beyond preset swatches)
}Inheritance: hairColor, npcHair, bonnet inherit from hair → hairbeard. npcBeard, stubble inherit from beard → hairbeard. eyebrows inherits from both hair and makeup (OR — visible if either parent is on).
NPC Hair & Beards
The editor includes NPC hairstyles (npcHair) and NPC full beards (npcBeard) - caution it can clip with certain hats/hair!
-- Enable NPC hair/beards (both on by default)
Config.Categories = {
npcHair = true, -- NPC hairstyles visible in Hair & Beard menu
npcBeard = true, -- NPC full beards visible in Hair & Beard menu
}NPC hair lives under Hair & Beard → inherits from hair. NPC beards inherit from beard. Turn either parent off and its NPC variant hides too.
Item-Gated Sections (Config.UseItems)
Items that open the editor when used. Perfect for barber kits, makeup kits, or paid re-customization.
Config.UseItems = {
-- Full editor, one-time use
{ item = 'secondchance', consumable = true, sections = nil },
-- Barber kit: hair & beard only, reusable
{ item = 'shaving_kit', consumable = false,
sections = { 'hair', 'hairColor', 'npcHair', 'bonnet',
'beard', 'stubble', 'npcBeard', 'dye' } },
-- Makeup kit: makeup only, reusable
{ item = 'makeup_kit', consumable = false,
sections = { 'makeup', 'dye' } },
}| Field | Description |
|---|---|
item | Item name — must exist in your database |
consumable | true = used up on use, false = stays in inventory |
sections | nil = full editor, list = only those sections |
After adding a new item: Full server restart (inventories cache items at boot).
SecondChance Command
Config.SecondChanceCommand = false -- default: off (the command is not gated — use the item for players)
-- true = enables /secondchance
-- 'lookedit' = enables the command under your own nameUp to 2.0.1 this shipped as
'secondchance'. If your server relied on the command, set it again inconfig_user.lua.
-- Where the full second-chance editor (item, command, OpenSecondChance export) runs (2.0.4+)
Config.SecondChanceScene = {
enter = false, -- false = Config.Scene, or vector4(x, y, z, heading) = edit at this spot
exit = false, -- false = back to where the item was used, or vector4 = put the player here after saving
}Cancelling always returns the player to where they used the item. Section-limited kits (shaving kit, makeup kit) open where the player stands and ignore this block. Addons can change both spots per call with the filter spooni:secondChanceScene.
Name Rules
Config.RequireName = true -- first + last name required
Config.NameBlacklist = {
'John Marston', 'Jack Marston', 'Arthur Morgan', 'Dutch van der Linde',
'Hosea Matthews', 'Micah Bell', 'Bill Williamson', 'Javier Escuella',
'Charles Smith', 'Sadie Adler', 'Abigail Roberts', 'Sean MacGuire',
'Lenny Summers', 'John Doe', 'Max Mustermann',
}The blacklist is not case-sensitive and also blocks names that contain an entry (e.g. "John Marston Jr.").
Editor Scene
Config.Scene = {
mode = 'simple', -- 'simple' | 'room' | 'cinematic'
coords = vector3(2546.3027, -1307.7715, 48.5166),
heading = 357.8737,
hour = false, -- false = leave the world clock alone (default), 0-23 = force that hour once on open
}'simple'— direct entry with camera movement'room'— Sheriff office interior'cinematic'— Full cinematic intro with gender selection
Config.SimpleGenderStep = trueGuides new players through gender → continue → identity → appearance instead of dropping them into the identity step right away. With this on, the gender switch is removed from the main menu (it would be the same choice twice); set it to false and the switch reappears there. Irrelevant in 'cinematic' mode — that one picks gender at the two intro peds.
Editor Keys
Rebind rotate / camera up-down / zoom. Two input types per action: a game control (can be shown as an on-screen prompt) or a rawKey (any keyboard key, no prompt).
Config.EditorKeys = {
rotateLeft = { control = 'INPUT_FRONTEND_LS' }, -- Z
rotateRight = { control = 'INPUT_CREATOR_RS' }, -- C
camUp = { control = 'INPUT_SHOP_SELL' }, -- R
camDown = { control = 'INPUT_GAME_MENU_EXTRA_OPTION' }, -- F
zoomIn = { control = 'INPUT_CREATOR_LT', rawKey = 33 }, -- Page Up
zoomOut = { control = 'INPUT_CREATOR_RT', rawKey = 34 }, -- Page Down
}Prefer the old B / N zoom? Put this in config_user.lua:
Config.EditorKeys = {
zoomIn = { control = 'INPUT_SHOP_BOUNTY' }, -- B
zoomOut = { control = 'INPUT_PUSH_TO_TALK' }, -- N
}zoomIn = { rawKey = 107 }, -- numpad +
camUp = { control = 'INPUT_CREATOR_LT', rawKey = 33 }, -- prompt + page up
camDown = 'INPUT_CREATOR_RT', -- short formCommon raw key codes: arrows 37/38/39/40, page up/down 33/34, letters A 65 … Z 90, numbers 0 48 … 9 57, numpad 0 96 … 9 105 (+ 107, - 109), space 32, F1–F12 112…123.
The mouse wheel is deliberately not used for zoom — the menu scrolls its lists with it.
Body Sizes
Config.Sizes = {
presets = {
{ labelKey = 'size_small', value = 0.95 },
{ labelKey = 'size_normal', value = 1.00 },
{ labelKey = 'size_large', value = 1.05 },
},
allowCustom = false, -- true = also offer customPresets (clamped to hardMin/hardMax)
customPresets = {
-- { label = 'Tiny', value = 0.85 },
},
recommendedMin = 0.92,
recommendedMax = 1.08,
hardMin = 0.70, hardMax = 1.40,
}Camera Views
Fine-tune camera per editor section:
Config.CameraViews = {
head = {
offset = vector3(0.0957, 1.6212, 0.5850),
rotation = vector3(1.03, 0.0, -89.24), -- x = pitch, y = roll (yaw follows the character)
fov = 20.01,
focus = 1.4,
minFov = 13.0, -- zoom limits for this view
maxFov = 35.0,
},
body = { offset = vector3(0.1057, 2.9811, 0.2037), rotation = vector3(-4.21, 0.0, -87.88),
fov = 35.0, focus = 1.0, minFov = 20.0, maxFov = 53.0 },
hair = { offset = vector3(0.0957, 1.6311, 0.5550), rotation = vector3(3.75, 0.0, -90.48),
fov = 25.0, focus = 1.6, minFov = 13.0, maxFov = 40.0 },
legs = { offset = vector3(0.1000, 2.2000, -0.6200), rotation = vector3(0.0, 0.0, -88.0),
fov = 30.0, focus = 1.2, minFov = 18.0, maxFov = 48.0 },
}
Config.DefaultCameraView = 'body'Starter Outfit
Config.StarterOutfit = {
enabled = true,
item = 'starter_outfit',
quantity = 1,
label = 'Starter outfit', -- description in the item metadata
}New characters get a re-equip item for their created outfit - good so they don't lose their first outfit. It is given once, on the character's first confirmed save. You can turn this off if you don't want to use this.
Intro Animation
Config.Intro = {
enabled = true,
title = 'Start your journey', -- name it whatever you want
subtitle = '', -- '' = no subtitle
duration = 5500,
distMult = 4.0, -- start distance of the camera move
height = 2.0,
font = 22, -- try fonts in-game with /spooniccfont <id>
}Murphy Compatibility
Only if you also run murphy_clothing / murphy_barber:
Config.Murphy = {
clothing = false, -- true if murphy_clothing runs
barber = false, -- true if murphy_barber runs
clothingResource = 'murphy_clothing',
barberResource = 'murphy_barber',
}Requires murphy_clothing 3.44.0+ / murphy_barber 1.21.0+
With clothing = true murphy owns clothing completely: the creator writes your picks into murphy's tables and murphy re-applies them. Only categories murphy manages make that round trip — run spooni_murphycats in the server console to see the split on your server. With barber = true murphy keeps make-up and scars.
Jo_clothingstore & hairdresser
Compatible out of the box just turn off the VanillaTakeover for shops.
Optional: send new characters shopping after they spawn
Config.OpenClothingStoreAfterCreate = {
enabled = false, -- true = open jo_clothingstore for new characters
delayMs = 1500, -- grace period after the spawn
options = { -- passed straight to jo_clothingstore's openStore export
useOutfitMenu = true,
useNPCClothesMenu = true,
useClassicClothesMenu = true,
},
}⚠️ When you enable this, set
Config.openStoreNewCharacter = falsein the jo_clothingstore config. We trigger the store ourselves — if their auto-open stays on, it fires as well and the store opens twice. The creator checks their config on start and prints a warning if it is stilltrue.
Why let us open it: we call jo's export with needInstance = true, so the player changes clothes alone instead of in front of everyone at the spawn point — and we wait for the real end of the entry flow (spawn carousel included) instead of firing during creation.
Other creator options
| Option | Default | What it does |
|---|---|---|
Config.MenuSubtitle | 'Charcreator' | Free text in the editor's menu header — your server name or a tagline |
Config.MenuItemFont | 'hapna' | Font for menu button labels. 'crock' = the game's western-style font |
Config.NotifyPlacement | 'middle-right' | Where notifications appear (top-left … bottom-right) |
Config.FemaleUnderwear | true | Keeps the female body covered. Set to false only if you stream a full female body replacement |
Config.SkinSwapMask | 'blur' | How the short flicker on a skin-tone change is hidden: 'blur', 'alpha' or 'off' |
Config.DyePalettes | table | Colour palettes for free dyeing (turned off globally by Config.Categories.dye) |
Config.Cinematic | table | Settings for Config.Scene.mode = 'cinematic' only |
Config.CleanupOrphanedExtras | false | On start, delete stored appearance data of characters that no longer exist in your framework database |
Config.VorpLegacyPersist | — | Deprecated and ignored. Since 1.2.0 the VORP save path is always one server-authoritative commit with read-back verification |
Config.SimpleGenderStep | true | Simple scene mode: new players go gender -> identity -> appearance, and the gender switch leaves the main menu. false = identity first, switch stays in the main menu |
Config.OrderedApply | true | Puts clothing on in the game's own layer order (bib overalls over a bare torso, skirt over pants). false = the old order, if a specific garment looks wrong for you |
Config.DyeSlots | eyes = { base = false, accent = true, shine = true } | Hide single tint sliders per dye section. Eye base tints the eyeball itself and is off by default; a hidden slot is applied as neutral, the saved value is kept |
Config.Light | follow = 'camera', 3 lights | Editor lighting. 'camera' keeps the side you look at lit when the player turns the character; 'character' turns the lights with the character |
Config.ClothingBlocklist | table | Items removed from the picker, per category (hashname or hash). The shipped entries are items the engine refuses to keep on a multiplayer ped. Lists are replaced as a whole in config_user.lua |
Config.RestartHeal | enabled = true | After a listed appearance resource restarts (e.g. restart vorp_character), online players' peds are checked and missing parts (NPC hair/beard, bonnet, scars, make-up) are restored. Add your own clothing resource to resources |
Config.PlayerHeight | enabled = true | Master switch for the player height. false = no size entry, no scale written, saves write the neutral 1.0; stored heights are kept. autoClaim lists your own resources that take height over completely while they run |
Config.Slots | default = nil | Character slots per player. nil keeps your core's default (on VORP users.char); a number becomes the base on every core. overrides per identifier, adminGroups for spooni_slots / spooni_section |
Config.EditorSession | enforce = 'refuse' | See Editor sessions |
Editor sessions
Since 2.0 every editor run has a server-side session: the server records what the character wore when the session started and computes the price of a store save against that — never against anything the client sends.
Config.EditorSession = {
enforce = 'refuse', -- 'refuse' (default) or 'log'
ttlMinutes = 30, -- lifetime of store/addon/admin sessions
seedEmptyBaseline = true,
}'refuse': a save that changes priced categories without a session is refused (the console names the reasonsession). A modified client cannot save paid clothing, hair or make-up for free.'log': such saves go through, and the console prints aWOULD-REFUSEline for each one. Use it while an addon of yours still saves without a session, then give that addon a session withexports.spooni_charcreator:GrantEditorSession(...).- After
ttlMinutesa save is refused withsession_expired; the store editor requests a new session and retries once on its own. Use items and Second Chance never expire — they end on save, cancel, character selection or disconnect. seedEmptyBaseline: a character whose clothing the server does not know yet may seed the store baseline once from the ped (checked against the catalogue and logged).false= such characters cannot open the clothing store.
Discord webhooks (spooni_charcreator/server/config_webhooks.lua)
Optional Discord messages for your server log channel. They live in their own file because it is the one part of the resource you enter your own data into:
Webhooks.charCreated = '' -- posted when a player finishes a new character
Webhooks.itemUsed = '' -- posted when a player uses one of this resource's itemsLeave a URL empty to keep that message off — that is the default. The file is server-side only, so the URLs are never sent to players, and it ships readable so you can edit it.
To get a URL: Discord → Server Settings → Integrations → Webhooks → New Webhook → pick a channel → Copy Webhook URL.
Webhooks are purely informational. A missing, wrong or expired URL never blocks character creation or item use.
Updating from 1.8.40 or older: the URLs used to sit in
server/sv_webhooks.lua, which is encrypted and could not be edited. They now live inserver/config_webhooks.lua. Enter them there once.
Selector Configuration (spooni_charselector/config.lua)
Framework & Slots
Config.Framework = 'auto'
Config.Locale = 'auto'
Config.MaxSlots = 6 -- max slots shown (must match scene positions) !!!!!!!!!!
Config.AllowDelete = true -- allow character deletion
Config.DefaultScene = 2 -- starting scene (index in Config.Scenes; 2 = Guarma, needs the add-on map)
Config.RandomScene = false -- random scene each time
Config.SkipSelectorUnderSlots = 2 -- If someone has 1 character he skips the scene to faster load in.
Config.FallbackSpawn = vector4(-274.53, 803.85, 119.38, 90.0) -- Valentine
Config.Debug = false -- true = extra diagnostic logs in the server consoleRSG and VORP:
Config.CoreSpawnReadyTimeout = 30000How long to wait for the core's "character fully loaded" signal after a character is picked before the selector releases the screen itself. Do not set it below ~15000 on RSG — rsg-spawn shows its card for 10 seconds, and rsg-character (RSG v3) can wait up to ~25 seconds for ground and streaming on a slow client. Too short and the character is revealed mid-load (double fade). The screen is never left black: if the signal never arrives, the selector fades in and prints the reason to the console.
RSG only:
Config.RSGCharListTimeout = 15000How long to wait for the RSG character-load callback chain before showing an empty list so the screen stays usable. This is not a cut-off — the characters keep loading in the background and appear as soon as they arrive, so nothing is ever lost by it being low. A single stuck character gets its own deadline (a third of this value) and never blocks the rest of the list. Only raise it for a genuinely slow database — a higher value means the player stares at a loading screen longer, and one bad character blocks the list longer.
Screen Corners
Where the control hints and the footer row (gear + logout button) sit. Any of the four corners; put both in the same corner and they stack automatically.
Config.ControlsCorner = 'top-right' -- 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
Config.FooterCorner = 'bottom-right'Other selector options
| Option | Default | What it does |
|---|---|---|
Config.SkipSelectorWhenEmpty | false | false = a brand new player sees the selector with an empty ghost slot first. true = jump straight into the creator on first join |
Config.UiFont | 'RDRLino' | Font for the whole selector UI. Custom fonts: add an @font-face block at the top of html/style.css and use that name here |
Config.PreferFavoriteScene | true | If the player favorited scenes (gear menu), open on a random one of those instead of Config.DefaultScene |
Config.Focus | table | Camera move/zoom when cycling between characters — purely visual |
Config.Hover | table | What the selected character does (look at camera, idle animation) |
Config.SceneLoad | table | How thoroughly the scene is loaded before it fades in, so characters never appear floating or half-loaded |
Config.PreviewBaseBodyCover | true | RSG: injects a gender-matching base garment for uncovered body parts, because rsg-appearance resolves its fallback against the local player's gender and would otherwise clip. Turn off only if you stream a full-body mesh replacement |
Discord webhook (spooni_charselector/server/config_webhooks.lua)
Optional Discord message when a player creates a new character. Its own file, because it is the one part you enter your own data into:
Webhook.onCreate = true -- post when a character is created
Webhook.url = '' -- Discord webhook URL, empty = off
Webhook.username = 'Char Selector'
Webhook.avatar = '' -- image URL for the sender avatar, empty = none
Webhook.color = 3447003 -- embed colour as a decimal numberServer-side only, so the URL is never sent to players, and it ships readable so you can edit it. Empty URL = off, which is the default.
To get a URL: Discord → Server Settings → Integrations → Webhooks → New Webhook → pick a channel → Copy Webhook URL.
Updating from 1.4.12 or older: the settings used to sit in
server/sv_webhooks.lua, which is encrypted and could not be edited. Enter them inserver/config_webhooks.luaonce.
Branding
Config.Brand = {
name = 'Your Server', -- just leave like '' this for no Branding
subtitle = 'Year 1899', -- '' = off
font = "'RDRLino', serif", -- put any font into html folder and use it
}Ghost Slots (empty places)
Config.Ghost = {
model = 'mp_male',
alpha = 100,
scenario = 'MP_LOBBY_SCENARIO_08',
outfit = {},
}Lighting
Config.FillLight = {
enabled = true, range = 4.0, intensity = 5.0,
color = { r = 255, g = 226, b = 190 },
}
Config.Spotlight = {
enabled = true, range = 6.5, intensity = 22.0,
color = { r = 255, g = 220, b = 170 },
}Music
Config.DefaultVolume = 0.10
Config.MaxVolume = 0.45
Config.AutoPlayFirstSong = true
Config.Songs = {
{ label = 'Blacktop Ember', file = 'sounds/blacktop_ember.mp3' },
{ label = 'Dust On The Fence', file = 'sounds/dust_on_the_fence.mp3' },
{ label = 'Welcome Theme', file = 'sounds/welcome_theme.mp3' },
}Adding your own music: Drop .mp3/.ogg into html/sounds/, add filenames to html/sounds/sounds.json, then restart spooni_charselector.
Idle Animations (Gear Menu)
Config.SelectableScenarios = {
{ key = 'scenario_stand_calm', name = 'MP_LOBBY_STANDING_B' },
{ key = 'scenario_stand_alt', name = 'MP_LOBBY_STANDING_G' },
{ key = 'scenario_fire_sit', name = 'world_human_fire_sit' },
{ key = 'scenario_drink', name = 'WORLD_HUMAN_DRINK' },
{ key = 'scenario_smoke_wall', name = 'WORLD_HUMAN_LEAN_BACK_WALL_SMOKING' },
{ key = 'scenario_lean_railing', name = 'WORLD_HUMAN_LEAN_BACK_RAILING' },
{ key = 'scenario_write_notebook', name = 'WORLD_HUMAN_WRITE_NOTEBOOK' },
{ key = 'scenario_clipboard', name = 'WORLD_HUMAN_CLIPBOARD' },
{ key = 'scenario_coffee_drink', name = 'WORLD_HUMAN_COFFEE_DRINK' },
{ key = 'scenario_lean_wall_drink', name = 'WORLD_HUMAN_LEAN_WALL_DRINKING' },
}Scenes
Three scenes ship pre-installed — Theater (Saint Denis), Guarma Beach (needs the Guarma add-on map) and Riverside. Without the Guarma map, set Config.DefaultScene to 1 or 3 and remove the Guarma scene. Add your own in Config.Scenes:
{
name = 'My Scene',
env = {
weather = { type = 'sunny', transition = 0.0, snow = false },
time = { hour = 12, minute = 0 },
playerSpawn = vector3(0.0, 0.0, 100.0), -- must be SOLID GROUND
campfire = { enabled = true, model = 'p_campfirecombined01x',
coords = vector3(0.0, 0.0, 100.0), heading = 0.0 },
},
masterCam = { x = 0.0, y = 10.0, z = 102.0, fov = 53.0 },
positions = {
{ spawn = vector4(2.0, 1.0, 100.0, 180.0), scenario = {
mp_male = { 'MP_LOBBY_STANDING_B' },
mp_female = { 'MP_LOBBY_STANDING_B' } } },
-- ... one position per slot (matches Config.MaxSlots) ...
},
}Two rules for custom scenes — break either and the peds float, sink or stay untextured:
env.playerSpawnmust be at the scene, on solid ground. That is where the player is parked while the scene runs, and the map is loaded around it. Copying a scene block and forgetting to move itsplayerSpawnis the single most common mistake — the peds then stand in terrain that was never streamed in.- Take the
zof every position from standing on that exact spot, not from a flying camera. Azmore than 1.5 m off the real ground is treated as a configuration error and used as-is, so the ped floats or sinks.
Both are checked at runtime — the console names the scene, the coordinates and how far off the z is, so you can fix it without guessing. Scenes on special/add-on maps (Guarma) also need Config.SceneLoad.cleanLoad = true.
Spawn Module (Config.Spawn)
Live-camera spawn location picker for new characters:
Config.Spawn = {
enabled = true,
fadeMs = 500, -- final spawn-in fade
previewFadeMs = 300, -- fade between locations in the preview
previewFreeze = true, -- hide the character during the preview
camOffset = { back = 4.0, up = 2.0, right = 0.0 }, -- default camera, per location `cam` overrides it
loadRadius = 100.0,
sceneTimeoutMs = 12000, -- max wait for loading before continuing anyway
minBlackMs = 3000, -- minimum black screen on the final spawn
locations = {
{ title = "Saint Denis", subtitle = "City of lights and lies",
coords = vector3(2731.63, -1442.33, 46.26), heading = 224.39,
cam = vector4(3073.86, -1326.31, 177.92, 85.33),
job = false }, -- false = everyone
{ title = "Valentine", subtitle = "A rowdy cattle town",
coords = vector3(-166.19, 633.43, 114.08), heading = 307.67,
cam = vector4(-420.58, 828.37, 156.65, 243.09),
job = false },
-- Job-gated example:
{ title = "Sheriff's Office", coords = vector3(...), heading = 0.0,
job = 'lawman' },
},
}Job-gated locations: job = false for everyone, job = 'lawman' or job = { 'bartender', 'dancer' } for specific jobs. jobGrade = 2 for minimum grade. Always keep at least one location with job = false.
Custom step before spawn menu:
Config.Spawn.beforeMenu = {
event = 'myjobs:openSelector',
doneEvent = 'myjobs:selectorDone',
timeoutMs = 120000,
}Can be used for own UIs to select Jobs and handover to spawnselect that can be jobgated. Your handler receives ctx = { charId, isNewCharacter = true }; if doneEvent never arrives, the spawn menu opens after timeoutMs anyway. Script developers can register steps from any resource with exports.spooni_charselector:RegisterPreSpawnStep(function(ctx, done) ... done() end).
The shipped list also has an extra location "The Island" (worldMode = 'guarma') — remove it if the Guarma map is not installed.
RSG conflict: disable rsg-spawn (Config.SelectLocations = false) or set Config.Spawn.enabled = false.
Admin Command
Config.AdminCommand = 'charselect' -- '' = disabled
Config.AdminGroups = { 'admin', 'superadmin' }Usage: /charselect <serverId> in server console.
Vanilla Store Takeover
Replaces the built-in clothing/barber/makeup stores of VORP/RSG with the Spooni editor — scoped to just that section, with server-side price calculation. TURN THIS OFF IF YOU HAVE ANOTHER BARBER/HAIRDRESSER/CLOTHINGSTORE
Configuration
Config.VanillaStoreTakeover = {
enabled = true,
currency = 0, -- 0 = dollars, 1 = gold, 2 = rol (RSG: keep 0, gold/rol are not supported there)
prices = {
clothing = {
hats = 3.0, masks = 3.0, eyewear = 3.0, neckwear = 3.0, neckties = 3.0,
shirts_full = 4.0, vests = 4.0, coats = 5.0, coats_closed = 5.0,
ponchos = 5.0, suspenders = 3.0, armor = 6.0, dresses = 5.0,
gloves = 3.0, gauntlets = 3.0,
pants = 4.0, chaps = 4.0, spats = 3.0, boots = 4.0, boot_accessories = 2.0,
belts = 3.0, belt_buckles = 2.0, satchels = 4.0, accessories = 3.0,
jewelry_bracelets = 3.0, jewelry_rings_left = 3.0, jewelry_rings_right = 3.0,
gunbelts = 4.0, gunbelt_accs = 3.0, holsters_left = 3.0, loadouts = 4.0,
},
barber = 5.0, -- flat fee, once per visit if anything changed
makeup = 3.0, -- flat fee, same rule
},
}How It Works
- Clothing: Price per changed category — swap only your hat, only hat price charged
- Barber/Makeup: Flat fee per visit, only if anything changed. Close without changes = free
- Server-side: The price is computed against the look the server recorded when the store visit started (see Editor sessions) — clients can't fake the price
- Confirmed saves: The look counts as bought only after the server confirmed the save. If a save fails, the menu comes back instead of closing
- RSG:
prices.clothingreplaces rsg-appearance's ownRSG.Priceonce the guard is in place - VORP and RSG before v3 only. On RSG v3 (
rsg-character) and the other cores the vanilla stores stay as they are
Required Guards
| Store | VORP | RSG |
|---|---|---|
| Clothing | Copy docs/patches/vorp_character/client/clothingstore.lua | Copy docs/patches/rsg-appearance/client/clothes.lua |
| Barber/Hair | Same file (vorp handles all shops in clothingstore.lua) | Already in creator.lua patch (Framework-Specific Guards) |
| rsg-barbers (standalone) | — | Copy docs/patches/rsg-barbers/client/barber-guard.lua |
Without these guards, VanillaStoreTakeover does nothing.
Developer API & Exports
Full Export Reference
spooni_charcreator — Client
| Export | Signature | Description |
|---|---|---|
OpenAppearanceEditor | (opts) -> bool | Start a scoped editor session |
CommitLook | (snapshot) -> bool | Persist + apply + close session |
AbortEditor | () | Close session, revert look |
GetCurrentLook | () -> table|nil | Deep copy {skin, clothes} |
RandomizeAppearance | (scope) | Randomize during active session |
SetEditorMenuVisible | (bool) | Show/hide menu |
IsEditorBusy | () -> bool | Check if editor is free |
ReapplyLook | () | Re-apply saved look |
OpenSecondChance | () | Open SecondChance editor |
OpenVanillaStore | (shopType, storeData?) -> bool | Store takeover: 'clothing'/'hair'/'makeup'/'secondchance' |
ApplyLookToPed | (ped, charId) | Apply saved look to any ped |
ApplyDefaultLookToPed | (ped, gender) | Apply default look — for ghost slots |
SetPedSize / ClearPedSize | (ped, scale) -> bool / (ped) -> bool | Hold a size on a non-player ped (within Config.Sizes.hardMin/hardMax) / release it |
GetPlayerHeight | () -> number, string|nil | Height currently held for the local player and its source ('user' / 'preview') |
SetPlayerHeight / ClearPlayerHeight | (scale) -> bool / () -> bool | Runtime height for the local player (clamped, server-verified) / back to the saved value. SetOwnSize is an alias |
SuspendOwnSize / ResumeOwnSize | () -> bool | Pause the suite's own size writes while an external tool owns the ped scale, then resync |
ClaimHeightControl / ReleaseHeightControl | (resourceName) -> bool | Your resource takes the player height over completely / gives it back (saved height returns without relog). See Config.PlayerHeight.autoClaim |
ApplyMurphyToPed | (ped, charId) | Apply Murphy overlays to ped |
IsMurphyEnabled | () -> bool | Murphy switch state |
GetMurphyConfig | () -> table|nil | Live Config.Murphy |
CleanupMurphyPed | (ped) | Required after deleting a Murphy ped |
CleanupMurphyAll | () | Free all Murphy handles |
registerAction | (name, fn, priority?) | Register hook action |
registerFilter | (name, fn, priority?) | Register hook filter |
spooni_charcreator — Server
| Export | Signature | Description |
|---|---|---|
GetMaxSlots | (src) -> number|nil | Resolved max slots for a player |
GrantEditorSession | (src, { scope?, categories?, ttlMinutes? }) -> sessionId|nil, why? | Free editor session for your own addon (see Editor sessions). Pass the sessionId to the client and on to OpenAppearanceEditor({ sessionId = ... }) |
GetCharacterSelectable | (src, charId) -> { selectable, reason? } | Runs the spooni:characterSelectable filters |
SetPlayerSize / ClearPlayerSize | (src, scale) -> bool / (src) -> bool | Server-side runtime size, free value clamped to 0.70-1.40 / restore the saved size |
registerAction | (name, fn, priority?) | Register hook action |
registerFilter | (name, fn, priority?) | Register hook filter |
spooni_charselector — Client
| Export | Signature | Description |
|---|---|---|
RegisterPreSpawnStep | (fn) -> bool | Step before spawn menu, call done() when finished |
HandlesNewCharSpawn | () -> bool | Internal (RSG): selector owns post-create spawn |
IsSelectionActive | () -> bool | Selection screen is open |
IsSpawnFlowActive | () -> bool | Selector spawn flow is running |
Hooks
-- Action
exports.spooni_charcreator:registerAction('spooni:afterSave', function(src, charId)
print(('Char %s saved by player %s'):format(charId, src))
end, 10)
-- Filter
exports.spooni_charcreator:registerFilter('spooni:sectionAllowed', function(value, token, sessionId)
if token == 'npcHair' and GetPlayerJob() ~= 'barber' then
return false -- NPC hair only for barbers
end
return value
end, 10)| Hook | Type | Side | When |
|---|---|---|---|
spooni:beforeEditorOpen | Action | Client | Before menu build |
spooni:afterEditorOpen | Action | Client | After successful menu build |
spooni:beforeSave | Action | Client | Before save (snapshot is read-only) |
spooni:editorClosed | Action | Client | On every editor close |
spooni:afterSave | Action | Server | After successful save |
spooni:afterCreate | Action | Server | First save of a character |
spooni:sectionAllowed | Filter | Client | Every section visibility check |
spooni:editorCategories | Filter | Client | Before applying session categories |
spooni:maxSlots | Filter | Server | Final step of slot resolution |
spooni:characterSelectable | Filter | Server | (verdict, src, charId) — return { selectable = false, reason = '...' } to lock a character (jail, death limit). The selector shows it dimmed, the patched core refuses it server-side |
spooni:canUseEditorItem | Filter | Server | (allowed, src, item, sections) — before an editor item is consumed; false refuses |
spooni:canOpenSecondChance | Filter | Client | (allowed, sessionId) — right before the Second Chance editor opens; false refuses |
spooni:secondChanceScene | Filter | Client | (spots, sessionId) — change { enter, exit } of Config.SecondChanceScene per player |
Practical Examples
Barber NPC:
exports.spooni_charcreator:OpenAppearanceEditor({
id = 'barber', categories = { hairbeard = true },
title = 'Barber', subtitle = 'Hair & Beard',
})Tailor NPC (clothing only):
exports.spooni_charcreator:OpenAppearanceEditor({
id = 'tailor', categories = { clothing = true, dye = true },
title = 'Tailor', subtitle = 'Pick your outfit',
})Eyebrow pencil item:
Config.UseItems = {
{ item = 'eyebrow_pencil', consumable = true,
sections = { 'eyebrows', 'dye' } },
}Dynamic slot bonus for supporters:
-- server-side
exports.spooni_charcreator:registerFilter('spooni:maxSlots', function(value, src, identifier)
if IsSupporter(identifier) then value = (value or 1) + 2 end
return value
end, 10)Custom Framework Integration
Wire a custom core in framework.lua. Use the existing VORP/RSG/RedEM:RP/RPX branches as a reference.
Creator (framework.lua in spooni_charcreator)
Client-side:
function Framework.CreateCharacter(data, onSelected)
-- data = { firstname, lastname, age, gender, model }
-- Create char, call onSelected(charid)
end
function Framework.OnCharacterSelected(cb) -- cb(isNew)
function Framework.OnRespawn(cb) -- cb(reason)
function Framework.IsSessionStarted() -- boolServer-side:
function Framework.GetLookForChar(charId, cb) -- cb(skin, clothes)
function Framework.CheckOwnership(src, id, cb) -- cb(owned: bool)Selector (framework.lua in spooni_charselector)
Client-side:
function Framework.OnCharactersReady(cb) -- cb(chars, maxSlots)
function Framework.GetMaxSlots() -- number
function Framework.PlayCharacter(char) -- select + spawn
function Framework.RequestDelete(char) -- server-authoritative delete
function Framework.StartCreator(opts) -- open creator for empty slot
function Framework.ApplyLookToPed(ped, char) -- preview look on slot pedCharacter object shape:
{
charIdentifier = id,
firstname = "John", lastname = "Doe",
skin = { sex = 'mp_male' },
coords = { x, y, z, heading },
isDead = false,
_raw = <core-native row>,
_look = { kind = 'yourcore', ... }
}Troubleshooting
General
| Symptom | Cause | Fix |
|---|---|---|
| Two creators open / duplicate peds | Guard missing or not first line | Re-check guard, restart |
| Look reverts after relog | Wrong core detected | Set Config.Framework to your core |
| "No supported core" | Core name/order wrong | Core must start BEFORE spooni, named vorp_core/rsg-core/etc. |
| Item not usable | Inventory caches at boot | Full server restart |
/spooni_check shows FAIL | Guard missing | Re-apply the named guard |
/spooni_check shows FORK DETECTED | The core file is not the vanilla version the patch was built for | Compare with the shipped patch and apply the guard lines by hand |
| Menu changes are skipped or land on the wrong row | jo_libs older than 2.13 | Update jo_libs (2.17.1+ recommended) |
| Menus and inputs of other resources ignore clicks | jo_libs older than 2.17.1 on the current RedM browser | Update jo_libs. The character editor itself is not affected |
| Editor shows "Loading the editor..." for a while | The game browser is still starting; the editor waits for its page (at most 120 s) and opens the moment it answers | Usually nothing to do. /spooni_nuidiag shows how long the last open waited |
| Hats, eyewear or masks vanish a moment after they were put on | Fixed in Creator 2.0.17 | Update. With Config.Debug = true the console shows put back after the wearable kick |
Store save refused, console names the reason session | A script of yours saves paid changes without an editor session | Give it a session with GrantEditorSession, or set Config.EditorSession.enforce = 'log' meanwhile |
Save refused with session_expired | The store visit lasted longer than Config.EditorSession.ttlMinutes | The store editor retries once on its own; raise ttlMinutes if it keeps happening |
Console shows setSolo REFUSED | A client asked for a private world without a reason the server accepts (no editor session, no selection) | Nothing to do for normal players — the request is refused on purpose and the player stays in the main world |
| Clothing looks wrong after apply | — | Enable Config.Debug, reproduce, and send the output of spooni_clothdiag with your support request |
VORP
| Symptom | Fix |
|---|---|
Naked after /rc | Re-copy patch from Framework-Specific Guards |
attempt to call nil (updateCompTints) | Outdated vorp_core — spooni auto-falls-back to DB direct write |
vorp_character SCRIPT ERROR: native d3a7b003ed343fd9: invalid table argument | Copy docs/patches/vorp_character/client/creator_functions.lua (required since 2.0) |
| Pants show without legs after chaps, spats or boots come off | Copy the commands.lua patch and add the jo_libs pants snippet (docs/patches/jo_libs/g_client.pants.snippet.lua); /spooni_check shows whether it is in place |
A player is stuck on a black loading screen and never reaches character selection, console shows client.lua:322: attempt to compare number with string | A value in that character's skinPlayer row is stored as text instead of a number, which kills vorp's own load routine. It is a deadlock: the player never reaches the editor, so nothing can repair it in-game. Creator 1.8.41+ fixes both ends — the value is repaired while loading, and the save path no longer writes it. Update, re-copy docs/patches/vorp_character/client/client.lua, and affected players can log in again |
RSG
| Symptom | Fix |
|---|---|
| Naked after selection | Guards swapped. Selector guard = spooni_charselector, Creator guard = spooni_charcreator |
| Clothing store opens vanilla RSG | clothes.lua guard missing or VanillaStoreTakeover.enabled = false |
| RSG's own creator opens again after an rsg-appearance update | The update overwrote the patched files — copy the patches again |
| RSG v3: rsg-character's own selection shows | Selector guard missing in client/charselect.lua. /spooni_check must show the three rsg-character selection guard lines |
| A new character is gone after relog | rsg-core writes the players row without waiting for the database, so a failed insert is never reported. Creator 1.8.23+ verifies the row after creation and prints a ready-to-run repair INSERT if it is missing |
| Character list slow / empty at first | Leave Config.RSGCharListTimeout at its default — see Selector Configuration. Raising it does not load anything faster |
Appearance jumps back to an older look after /loadskin or a relog | playerskins holds more than one row for that citizenid, and RSG reads the first one it finds — so the oldest keeps winning no matter how often the player saves. Creator 1.8.42+ updates the existing row instead of adding another, and prints a warning naming the affected citizenid. Existing duplicates have to be cleaned up once in the database; afterwards add UNIQUE KEY (citizenid) to playerskins so it cannot happen again |
Selector
| Symptom | Fix |
|---|---|
| Slot peds naked/blank | spooni_charcreator not running |
| Custom scene: peds float, sink or have no textures | env.playerSpawn is missing or points at another scene — the map is loaded around it, so the peds end up in unstreamed terrain. Selector 1.4.11+ loads around the character positions instead and names the broken scene in the console |
| One character missing from the carousel (back after a reconnect) | Its preview ped model did not stream in fast enough and the slot was skipped. Fixed in selector 1.4.10+ — it retries, keeps the slot selectable either way, and logs the model + character id if it still fails |
| Character invisible / slot looks empty on RSG | rsg-appearance hides the ped while dressing it and only makes it visible again at the very end, so any abort leaves it invisible. Selector 1.4.9+ forces our preview peds visible |
| Native selection still shows | Guard missing or not first line |
| Scene shows but no menu and no mouse cursor | The game browser is still busy. After 3 s the selection works from the keyboard: A/D or the arrow keys pick a character, Enter zooms in and then plays or creates. /spooni_selectordiag prints the page timings |
| Two spawn menus | RSG: Config.SelectLocations = false in rsg-spawn. RPX: don't start rpx-spawn |
| No music | Files must be in html/sounds/ AND listed in sounds.json |
