Kartik Scripts

Asset & Development Tools

Tools for the server owner, not for players. Everything here is meant to be run on a development server while you are preparing content, bulk-capturing shop thumbnails, checking what GTA's metadata actually says, and proving the design studio's live texture bind is working.

[!WARNING] These are unrestricted client commands. Do not leave a development build on a live server if you would rather players not run them.


๐Ÿ“ธ Preview Thumbnail Capture, /takeshots

Bulk-captures the thumbnail for every drawable in the game so the shop grid shows real garments instead of icon fallbacks.

/takeshots
/takeshots male tops force
/takeshots all all textures

Requirements

screenshot-basic or screencapture must be started. The command refuses to run without one and tells you so.

Arguments

Two positional values plus order-independent flags:

ArgumentDescription
1st positionalmale, female or all. Default male.
2nd positionalA category folder name, or all. Default all.
force / trueOverwrite thumbnails that already exist. Without it, existing files are skipped.
textures / varsCapture every texture variation, not just the drawable's default colour.
debugCapture the debug camera angles as well.

The capture runs across five parallel studio workers and reports progress by notification. Only one run may be in flight at a time.

Output

Images land in preview/<gender>/<folder>/ inside the resource, and the folder set is created for you on start:

  • 0 โ€“ 11, component slots.
  • prop_0, prop_1, prop_2, prop_6, prop_7, prop slots.
  • overlay_0 โ€“ overlay_11, head overlays.
  • tattoo_ZONE_TORSO, tattoo_ZONE_HEAD, tattoo_ZONE_LEFT_ARM, tattoo_ZONE_RIGHT_ARM, tattoo_ZONE_LEFT_LEG, tattoo_ZONE_RIGHT_LEG, tattoos.
  • parents, identity, heritage portraits.

Writes are path-validated server side and capped at 4 MB per image; a file is only accepted as .webp or .png.

Once captured, either serve them from the resource or upload the preview/ tree somewhere and point Config.MediaUrl at it.


๐Ÿ” Compatibility Debugging, /compatdebug

Prints, for the garment you are wearing, exactly what GTA's own metadata has to say:

  • the component id, drawable and texture,
  • the component hash from GetHashNameForComponent,
  • the forced component count and each forced entry,
  • the variant component count.

A hash of 0 means the game has no shop record for that garment, which is always the case for addon clothing, and confirms that authoring a row with /setarms or /addcompat is the only way to give it arms and suggestions.


๐Ÿงต Design Studio Bind Probes

The design studio paints its live preview onto a DUI surface and replaces the garment's texture with it. When the preview comes out blank there are two possible causes that look identical from the outside: the surface is empty, or the texture target name is wrong. These three commands split them apart.

/wearshirt

Equips the tee_m design base and reports how many drawables the kartikbase collection actually has on that component. The quickest check that your baked addon resource is started and streaming.

/kcsurface

Draws the live DUI surface directly onto the screen for 8 seconds, bypassing the clothing bind entirely.

  • Magenta square appears โ†’ the DUI and runtime texture are fine, and only the clothing txd/txn name is wrong.
  • Nothing appears โ†’ the surface itself is empty, and no name would ever have worked.

/kctexture

With no arguments, prints the worn torso drawable/texture and the current bind. With arguments, floods the surface magenta and rebinds it:

/kctexture
/kctexture mp_m_freemode_01^jbib_diff_000_a_uni jbib_diff_000_a_uni

If the shirt is not magenta within a second, that target is wrong.

/kcscan

Sweeps candidate texture dictionary and name pairs for the worn torso drawable, dwelling on each so you can watch for the garment turning magenta:

/kcscan
/kcscan 2500

The name the streaming system knows a ped texture by is not reliably its filename, a pack's file may be jbib_diff_017_a_uni while the texture inside it is jbib_diff_005_a_uni, and FiveM's model^asset prefix may or may not be part of the registered dictionary name. Since a wrong target is silent, sweeping is the cheapest way to find the right one.


๐Ÿ—ƒ๏ธ Design Storage Maintenance

Admin commands for keeping the design asset store tidy. See Commands & Keybinds.

CommandPurpose
/designinfo [id]Show what is actually stored per design, artwork reference and byte sizes. Answers "is there artwork to bake?" without a database client.
/designmigrateartMove artwork inlined in old design layers onto disk. Safe to run repeatedly.
/designgcReport asset files no design references.
/designgc applyDelete those orphans.

After /designmigrateart, run OPTIMIZE TABLE kartik_clothing_designs to actually reclaim the freed space.

On this page