Garment Recommendations & Compatibility
kartik-clothing features an in-game Garment Recommendation & Compatibility Engine. It solves two major challenges with GTA V clothing & addon packs:
- Mismatched Sleeves & Arms: GTA V stores which arms (component 3) a jacket or shirt was designed to be worn with. Put a long-sleeved jacket on over short-sleeve arms and clipping occurs, unless an engine applies arm recommendations automatically.
- "GOES WITH" In-Shop Recommendation Panel: The GOES WITH (n) tab, next to VARIATIONS in the shop's right-hand panel, recommends undershirts, gloves, vests, chains, and accessories that pair with the selected garment. The number in brackets is how many recommendations it has.
Base game clothing has built-in metadata, but addon clothing has none. Addon items return a component hash of 0, leaving them without arm recommendations or matching accessory suggestions. kartik-clothing allows admins to author arm and accessory recommendations in-game and persist them in kc_item_compat.
⚙️ Configuration Switches
-- Read the arms GTA ships with base-game garments and apply them automatically.
Config.SmartArms = false
-- Apply arms deliberately authored by an admin for base-game and addon garments.
Config.AuthoredArms = true
-- Display the GOES WITH recommendation side panel in clothing stores.
Config.CompatPanel = true
-- Allow admins to author compatibility & recommendations in-game.
Config.CompatEditor = true✍️ Authoring Recommendations In-Game
Admins can author garment recommendations in two seamless ways:
1. In-Shop Recommendation Editor
When opening any clothing store as an administrator (group.admin), a COMPAT EDITOR button sits at the top of the garment grid, beside LOCK EDITOR. Press it (it reads COMPAT EDITOR ON while armed) and every garment tile shows its numeric id. Selecting matching arms or accessories while wearing them captures and saves the recommendation directly into the database.
2. In-Game Admin Slash Commands
Admins can also pair arms and recommend accessories directly using chat commands without entering a shop:
Pair Arms with a Top/Jacket
Equip the target top and the desired arms (component 3) on your ped, then run:
/setarmsTo limit the arm recommendation to the exact texture variation worn:
/setarms exactRecommend an Accessory ("GOES WITH" Suggestion)
Equip the target top and the matching accessory (hat, glasses, chain, undershirt, armor), then name its slot ID:
/addcompat prop 0 11 allThis registers the accessory into the GOES WITH panel whenever players view or select that top in any shop.
Inspect & Remove Authoring
/clearcompat component 11 84 male
/compatlist🎯 Scoping & Precedence
Recommendations support multi-level scoping:
| Scope | Description |
|---|---|
all (texture omitted) | Applies recommendation to all color variations of the drawable. |
exact (texture given) | Applies recommendation to that single color variation only. |
gender = male / female / any | Targets specific ped body types. |
Authored recommendations are merged into existing metadata rather than overwriting unrelated slots, ensuring sleeve pairings and multiple accessory suggestions coexist cleanly.
🔌 Developer Exports
Client Exports:
fixArms: Re-apply recommended arms after component 3 changes.getRecommendedArms: Query recommended arms without equipping.getForcedComponents: Query forced components for a garment.
Server Exports:
getItemCompat: Retrieve all authored compatibility rules.recommendedArmsFor: Retrieve authored arms for a garment variation.
🛠️ Diagnostics
/compatdebug prints GTA metadata for the currently worn garment (component hash, forced component count, variant count). A hash of 0 indicates an addon garment where authoring a recommendation rule is required.
🗄️ Database Storage
| Table | Description |
|---|---|
kc_item_compat | Stores garment recommendation rules (kind, item ID, drawable, texture, gender, recommended arms). |
kc_item_compat_entries | Stores paired "GOES WITH" accessories associated with each recommendation rule. |