Studios
Shot Makerhouse-3.jpg

Installation

SoonShot MakerStandalone
PAGE 02 OF 06  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

Requirements#

Server FiveM server on the cerulean manifest, with screenshot-basic, yarn and ox_lib.
Storage A Cloudflare R2 bucket with a public URL (a custom domain is best). Photos live only there; nothing is stored on the server or sent to players with the resource.
Framework Works standalone. With qbx_core running, photographers keep their hunger and thirst while in the studio.
Optional glitch-photos (cutscene previews), glitch-admin (cutscene browser, car menu studio), glitch-appearance or illenium-appearance (puts your own look back when you leave the studio). Each is only used when it is started.

Installation steps#

  1. Drop glitch-shotMaker into your resources and ensure it after screenshot-basic, yarn and ox_lib. The yarn resource installs the Node packages on first start.

  2. Give it your R2 bucket. Convars in server.cfg are the safest place, since they keep the keys out of the resource folder:

    set r2_account_id ""
    set r2_access_key_id ""
    set r2_secret_access_key ""
    set r2_bucket ""
    set r2_public_url "https://cdn.example.com"
    # optional, for cache purges on retakes: r2_purge_zone_id, r2_purge_token
    

    Or copy server/r2.json.example to server/r2.json and fill it in. Never list server/ in the manifest's files.

  3. Set Customize.CdnUrl in Customize.lua to the same public URL.

  4. Grant the commands to staff:

    add_ace group.admin command.shotmaker allow
    add_ace group.admin command.wardrobe allow
    add_ace group.admin command.shotmods allow
    

    Customize.AceRestricted is on by default, and the server refuses photos from anyone without command.shotmaker.

  5. Check Customize.RoutingBucket. Each photographer gets their own studio in bucket RoutingBucket + their server id, so pick a base no other resource uses.

Run shotmaker_r2status in the server console to check that uploads work and load back from the CDN.