Kartik Scripts

bcs_character Setup

This guide details how to integrate kartik-clothing with bcs_character (by BCS).

🛠️ Official File Edits

Only two files in bcs_character need changing. Both live in modules/appearance/, which is not escrowed. In each, kartik-clothing is added as one more elseif branch, the same way bcs_character already supports rcore_clothing and bl_appearance.

1. bcs_character/modules/appearance/client.lua

In the SetAppearance function, add the kartik-clothing branch at the end of the if data then chain:

SetAppearance = function(data, model)
    -- ... [existing ped model loading logic, unchanged] ...

    if data then
        if GetResourceState('illenium-appearance') == 'started' then
            exports['illenium-appearance']:setPedAppearance(cache.ped, data)
        elseif GetResourceState('rcore_clothing') == 'started' then
            exports['rcore_clothing']:setPlayerSkin(data)
        elseif GetResourceState('skinchanger') == 'started' then
            TriggerEvent("skinchanger:loadSkin", data)
        elseif GetResourceState('qb-clothing') == 'started' then
            TriggerEvent('qb-clothing:client:loadPlayerClothing', data, cache.ped)
        elseif GetResourceState('bl_appearance') == 'started' then
            if type(data) == 'table' and next(data) then
                exports.bl_appearance:SetPedAppearance(cache.ped, data)
            end
        elseif GetResourceState('kartik-clothing') == 'started' then
            exports['kartik-clothing']:setPedAppearance(cache.ped, data)
        end
    end
end

2. bcs_character/modules/appearance/server.lua

Add a kartik-clothing branch to the UseFrameworkAppearance check at the top of the file:

UseFrameworkAppearance = true

if GetResourceState('rcore_clothing') == 'started' then
    UseFrameworkAppearance = false
elseif GetResourceState('bl_appearance') == 'started' then
    UseFrameworkAppearance = false
elseif GetResourceState('kartik-clothing') == 'started' then
    UseFrameworkAppearance = false
end

Then add the kartik-clothing branch to GetPlayerAppearance in the same file:

GetPlayerAppearance = function(identifier)
    if GetResourceState('rcore_clothing') == 'started' then
        -- ... [unchanged] ...
    elseif GetResourceState('bl_appearance') == 'started' then
        -- ... [unchanged] ...
    elseif GetResourceState('kartik-clothing') == 'started' then
        local skin = exports['kartik-clothing']:getPlayerAppearance(identifier)
        if skin then
            return {
                skin = type(skin) == 'table' and json.encode(skin) or skin,
                model = skin.model or 'mp_m_freemode_01'
            }
        end
    end

    return {}
end

No bridge edits needed. Don't change modules/bridge/qb/client.lua or modules/bridge/qbx/client.lua. For a new character, bcs_character fires qb-clothes:client:CreateFirstCharacter, and kartik-clothing listens for it: the character creator opens on the male or female body matching the gender picked in bcs_character.

If you previously replaced that event with exports['kartik-clothing']:openCharacterCreator(), revert it. That call passes no gender, so female characters open on the male body.

The gender picked in bcs_character is final: the creator does not offer the male/female choice again, and a new character can't switch to the other body. To let players change it in the creator, set Config.CreatorKeepCharacterGender = false in shared/config.lua (see Configuration).


⚙️ Setup Instructions

  1. Start kartik-clothing before bcs_character in your server.cfg. bcs_character only checks for it once, when it starts:

    ensure ox_lib
    ensure kartik-clothing
    ensure bcs_character
  2. Do not run illenium-appearance alongside kartik-clothing. bcs_character checks for it first on the client and would use it instead.

  3. Restart your server. bcs_character loads character previews from kartik-clothing, and new characters go through its character creator.

Existing skins saved by illenium-appearance (including tattoos, face features and head overlays) load correctly. They are converted to the kartik-clothing format the next time the character is saved.

On this page