Koja Scripts

Capture panel

The admin Capture panel: green screen thumbnails for every clothing item and tattoo, Folder or Fivemanage storage, names and prices.

Capture panel

The Capture panel photographs every clothing item, prop, hair style, beard and tattoo on a green screen, removes the background and stores one image per item. Those images are the tiles players see in the editor and the shop. It is also where you give items a name and a price.

Auto capture animation

Auto capture: green screen, ghost cut-out, then the tile.

Access

  1. Turn it on

    Config.Koja.Capture.Enabled = true and screenshot-basic started. If the resource has another name, set it in Config.Koja.Capture.ScreenshotResource.
  2. Be an admin

    You need the ace in Config.Koja.Capture.AdminGroup (default group.admin) or a framework group from Config.Koja.Capture.FrameworkGroups:
    server.cfg
    add_principal identifier.license:YOUR_LICENSE group.admin
    add_ace resource.illenium-appearance command.add_ace allow
    Every capture callback checks the permission again on the server.
  3. Open it

    Open the editor (/pedmenu, or any shop) and click Admin Panel in the top toolbar. The button appears only for admins. Capture needs a freemode ped (male or female) or a ped from Config.Koja.Capture.Models.

Choose where images are stored

On the first run a dialog asks where to store the images. Decide later is allowed.

Storage dialog

The first-run storage dialog.

You can change it any time on the Storage tab; the setting only affects new shots — images already captured stay where they are.

Folder shots/Fivemanage (recommended)
Whereshots/<gender>/<category>/<drawable>[_<texture>].webp inside the resourceYour Fivemanage account. The database stores only the URL
SetupNoneA free account and an API key
After capturingRestart the resource so FiveM registers the new filesNothing, images show at once
SizeThe resource grows with every imageThe resource stays small; players load images from the CDN

Setting up Fivemanage

  1. Create a key

    Create a free account at fivemanage.com, open the Media product and create an API key with upload access.
  2. Save it

    Paste it into Fivemanage API key and press Save and verify. The key is checked with a test upload, saved in the database and shown masked.
  3. Manage it

    Test key checks it again. Remove key deletes it and switches storage back to the folder.

The server must be able to reach api.fivemanage.com.

Storage tab

The Storage tab with a verified key.

The panel

The panel has four tabs: Camera, Item, Batch and Storage. Pick the gender (Male / Female), the ped (Select ped) and the category on the left; browse items with the asset and texture steppers. The preview shows the Saved image next to the New shot.

Capture panel

The Capture panel on the Camera tab.

Camera

  • FOV, zPos (height), rot (rotation) and Distance move the camera. The preview is live.
  • Hide ped parts: parts hidden while shooting this category (for example hats when shooting masks).
  • Save preset keeps the camera and the hide list for this category and gender. Reset goes back to the defaults.
  • Ghost shots (clothes only): every item is shot twice, dressed and with the slot empty, and only the pixels that changed are kept — no body, head or hands in the image. Hair and beard are shot with the head.

Item

Capture item tab

Item tab: With textures, name and price.
  • Retake shoots the current item and overwrites its image at once.
  • Name and price: the name shown on the tile and the price (0 = FREE). Save meta stores them in the database; the menu and the shop update immediately.
  • With textures: one image per texture variant (4_0, 4_1, ...) instead of one per drawable. The editor then shows a tile per variant. A dialog asks first, because capture time and disk use multiply by the number of textures. Turning it off goes back to one image per drawable; the texture shots stay on disk.
  • Hair look: hair colour, highlight and beard density, so hair and beard shots look right.

Batch

Capture batch tab

Batch tab: auto runs and Capture everything.
ButtonWhat it does
Auto from hereShoots every item from the current one to the end of the category
Restart to endStarts again from the first item
StopFinishes the current item, then stops
Capture everythingShoots every ticked category from the first item in one run. Uploads run in the background while the next items are shot
Only missing imagesSkips items that already have an image
Both gendersRuns for male and female

Identical images in a row (duplicates) are skipped. Progress (current / total) is shown while it runs.

Capturing tattoos

The category list has a Tattoos group with one category per tattoo zone: torso, head, left / right arm, left / right leg, and any custom zone in Config.Tattoos. Hair fades are not captured. The group checkbox ticks every zone at once.

Captured tattoo images

Tattoo shots with InkOnly: only the ink, no body.
  • Every tattoo is shot on a naked, bald body (Config.Koja.TattooCapture.Naked, BaldHead) with a mid skin tone (SkinTone), with only that one tattoo on.
  • Each zone is shot from several views and the views are put side by side in one image: torso front + back, head from 4 sides, arm outer side + front, leg front + side + back. Change them with Config.Koja.TattooCapture.Views.
  • With InkOnly = true the images show only the ink, without the body.
  • The camera sliders and Save preset work as for clothes; the rotation is added to every view.
  • Retake, Auto from here, Capture everything, Only missing images and Both genders include the ticked tattoo zones.
  • Files: shots/<gender>/tattoo_<zone>/<tattoo name>.webp (the name is reduced to A-Z a-z 0-9 _ -), or Fivemanage.
  • Tattoo name sets the name shown on the tile. Tattoo prices still come from Config.TattooCost (or cost in shared/tattoos.lua) when Config.ChargePerTattoo is on.

The player's own skin, clothes and tattoos come back when you leave the panel.

Tips for clean shots

  • Images blurry or half loaded: raise Config.Koja.Capture.SettleMs and TextureSettleMs.
  • Body still visible in ghost shots: raise Ghost.Threshold a little, or set Ghost.Debug = true to save the raw frames to capture_debug/ and look at them. Turn it off afterwards.
  • A perfect ghost shot without any cut-out: add a freemode clone with an invisible body to Config.Koja.Capture.Models.