Skip to content
CXGdocs.GUIDES
cxg-tattoosConfiguration
CXG DOCUMENTATION

Configuration

The settings on this page are in config.lua. Modify fields in the existing tables and restart the resource to apply changes.

Initial values and saved settings

The shops and progression rules in the file serve as initial configuration. Once saved through the admin panel, their effective values persist across restarts. Changing them in the file does not automatically replace saved values: use the panel to update shops, rules, and system options that have already been initialized.

The language, providers, bridges, camera, and preview clothing are configured in the file. Sources and tattoos are described in catalog and packs.

Global language

Code
Config.Locale = 'es'
Config.LocaleFallback = 'en'

Locale sets the interface and message language for all players. Restart the resource after changing it; players cannot change it from the NUI. LocaleFallback is the fallback language.

Included languages: en, es, pt-BR, fr, de, it, pl, ru, tr, th, and ar. The Arabic interface uses right-to-left reading direction.

Identity system

Config.Identity configures integration with the server's identity system. It defines how to obtain the character or account identifier that the resource uses to save and retrieve tattoos, XP, and blueprints.

Code
Config.Identity.mode = 'auto'
Config.Identity.qbxResource = 'qbx_core'
ModePurpose
autoOn Qbox, uses the active character identifier (citizenid). On other servers, uses the stable FiveM identifier.
qbx_characterExplicitly uses the Qbox character identifier (citizenid).
licenseUses the FiveM license as the account identifier. Characters on that account share tattoos, XP, and blueprints.

Choose the mode before opening the resource to players. Changing it later changes the identity used to look up data; data is not automatically moved between modes. Do not select license if you want tattoos to be separate between characters on an account.

Interaction prompt

Code
Config.HelpText.enabled = true
Config.HelpText.provider = 'auto'
Config.HelpText.position = 'left-center'
FieldValues or effect
enabledShows or hides the interaction prompt for shops that use a marker.
providerauto, ox_lib, or native. auto uses TextUI if available and the native prompt otherwise.
positionleft-center, right-center, top-center, or bottom-center, for TextUI.
styleTextUI colors, border, shadow, typography, and padding.

Style example:

Code
Config.HelpText.style.backgroundColor = '#172328'
Config.HelpText.style.color = '#eef3f3'
Config.HelpText.style.fontSize = '15px'

Initial shops

Config.Shops includes six locations. To change an initial entry, preserve its structure:

Code
{
    label = 'Tattoo Studio',
    coords = vector3(322.62, 180.34, 103.59),
    heading = 156.2,
    drawDistance = 10.0,
    interactDistance = 1.5,
    shopRadius = 4.0,
    marker = {
        type = 1,
        scale = vector3(1.0, 1.0, 1.0),
        color = { r = 255, g = 100, b = 0, a = 100 },
    },
},
FieldPurpose
labelShop name.
coords, headingPosition and orientation.
drawDistanceMarker visibility distance.
interactDistanceInteraction distance.
shopRadiusRadius within which the shop operation is authorized.
marker.type, scale, colorMarker appearance.

Keep interactDistance within shopRadius. For shops that have already been created, use the shop section of the admin panel; do not expect a file edit to recreate or replace those shops.

Levels and XP

Config.Levels settingInitial valuePurpose
enabledtrueEnables progression, requirements, and discounts.
maxLevel10Level cap.
defaultXpPerTattoo10XP for a tattoo that does not specify Xp.
thresholdsLevels 1 to 10Cumulative XP required for each level.
formula.base, formula.exponent100, 1.5Parameters for the alternative threshold formula.
zoneRequirements1 for each zonePer-zone requirement when there is no individual requirement.
discountsEnabled, 3 per level, maximum 25Percentage discount.
blueprintSlotsBase 5, increment 3Blueprint slots based on level.

Thresholds must start at level 1 with 0 XP, continue without gaps, and increase the required XP:

Code
Config.Levels.thresholds = {
    { level = 1, xpRequired = 0 },
    { level = 2, xpRequired = 100 },
    { level = 3, xpRequired = 250 },
}
Config.Levels.maxLevel = 3

The discount is calculated as level × perLevel, capped at maxDiscount. With the initial values, level 5 gets a 15% discount and the maximum discount is 25%.

Slots are calculated as base + (level - 1) × perLevel. With the initial configuration, level 1 has 5 slots and level 5 has 17.

An individual RequiredLevel in the catalog takes priority over the zone requirement. See catalog fields.

When levels are disabled, level restrictions, XP, and discounts do not apply; the blueprint limit uses Config.Blueprints.maxPerPlayer. Disabling the system preserves saved XP. On installations that have already been initialized, also update the effective state through the panel.

Blueprints

Blueprints save groups of tattoos and let players share them using codes. Their initial limits are in Config.Blueprints:

FieldInitial valuePurpose
enabledtrueEnables the system.
codePrefixINKCode prefix, for example INK-A3X9.
codeLength4Number of characters after the prefix.
maxPerPlayer20Slots used when progression is inactive.
maxTattoosPerBlueprint50Maximum tattoos per group.
nameMaxLength60Maximum name length.

Redeeming a code prepares the tattoos in the purchase flow; it does not grant a free purchase. The economy is configured in integrations.

Camera

TableWhat it controls
CameraOffsetsTarget bone, distance, offsets, and field of view by zone.
CameraFramingOverall composition and focus-point offset.
CameraFramingBySideAdditional settings for front and back views.
CameraManualControlsManual controls, movement increments, rotation, zoom, and limits.

Configured zones are ZONE_HEAD, ZONE_TORSO, ZONE_LEFT_ARM, ZONE_RIGHT_ARM, ZONE_LEFT_LEG, and ZONE_RIGHT_LEG.

Examples of specific changes:

Code
Config.CameraOffsets['ZONE_TORSO'].fov = 50.0
Config.CameraFraming.screenOffset = 0.35
Config.CameraManualControls.enabled = true
Config.CameraManualControls.step = 0.035
Config.CameraManualControls.zoomStep = 0.08

A positive screenOffset places the character toward the left to make room for the menu on the right. lookAtOffsetX/Y/Z changes the focus point; camOffsetX/Y/Z in the per-side settings changes the camera position.

For manual controls, horizontalDegrees and rotationStepDegrees adjust rotation. ranges.y/z, radialClamp, and maxDistance limit movement. zoomCompositionMinBias adjusts centering while zooming in. Change one value at a time and test all six zones with male and female characters.

Preview clothing

Config.PreviewOutfit can clear tattooed areas while the interface is open:

Code
Config.PreviewOutfit.enabled = true
Config.PreviewOutfit.useDefaultVariation = false
Config.PreviewOutfit.presets['mp_m_freemode_01'].components[11] = {
    drawable = 15,
    texture = 0,
}

The included presets distinguish mp_m_freemode_01 and mp_f_freemode_01. Each component specifies drawable and texture; clearProps removes accessories during preview. Adjust the indices to the clothing installed on your server. Keep useDefaultVariation = false if you only want to apply the preset components without globally resetting the appearance.

Permissions, economy, and Qbox

Config.Permissions, Config.AdminCommand, Config.Purchases, and Config.QbxMulticharacterPreview are explained in integrations. Set the actual names of your resources when they differ from the defaults.

Diagnostics

Config.Debug enables general diagnostics. Config.Permissions.debug lets you inspect access decisions. Keep both disabled when finished.

Config.DebugCommands.clientTattooCommand is disabled initially. Enable that visual command only for testing: it does not save tattoos or replace a purchase.

Continue to the catalog.

CXG · DocumentationA good foundation. Endless possibilities.
Configuration · cxg-tattoos · CXG Docs