NEXO DOCSv1 · ENES
docs / scripts / nexo-studio

Nexo Studio

A 3D phone case designer: cases, glitter, characters, charms and stickers, with a physical store, a phone app and a design market.

v1.0.0ESXQBCoreQBoxStandalone

What's included

Nexo Studio is a real-time 3D phone case designer. Players decorate their phone with cases, glitter, characters, huggers that grip the edge, charms on any corner, stickers (flat and raised), flags, grips, camera rings, engraving and a matching wallpaper.

  • Two ways to buy: a physical store with an assistant, run by a job, and an app inside the phone.
  • Design market: players publish their designs and, when someone buys one, the creator gets paid (online or not).
  • Store business: the boss sets the margin, creates discounted packs and withdraws the till to the society account.
  • Limited editions: seasonal items with numbered units (“yours: #65 of 100”).
  • Extras with NEXO PHONE: one design per phone, a matching wallpaper and a photo of the design on Glimpse.
  • 180+ items out of the box and 31 languages, following the phone's language.
CategoryItems out of the box
Cases (silicone, premium and glitter)33
3D characters20
Huggers14
Charms9
Stickers and flags75
Grips9
Camera rings9
Wallpapers14

Requirements

You needDetails
oxmysqlRequired. The tables are created automatically.
Frameworkqbx_core, qb-core, es_extended, ND_Core or none (standalone). Detected automatically.
Phone (optional)NEXO PHONE (full integration), lb-phone, qs-smartphone / pro, okokPhone or gksphone. Without a phone it works with the stores and a command.
Target (optional)ox_target or qb-target for the store. Without them the [E] prompt is used.

Installation

  1. Download the resource From keymaster.fivem.net → Granted Assets.
  2. Copy the folder into resources The folder is called nexo-studio. Don't rename it: exports are called with exports['nexo-studio'].
  3. Add it to server.cfg After oxmysql, your framework and your phone:
    ensure oxmysql
    ensure qbx_core      # o tu framework
    ensure nexo-phone    # o tu móvil
    ensure nexo-studio
  4. Start the server The tables are created automatically. If you'd rather import them by hand, there's sql/install.sql.
  5. Adjust the config config/config.lua, config/catalog.lua (items and prices) and config/stores.lua (stores).
  6. Create the store job See “Physical stores” below.

Configuration

Everything is in config/config.lua and explained inside the file. The most important options:

OptionWhat it does
Config.Framework'auto' detects qbx_core, qb-core, es_extended or ND_Core; with none, standalone.
Config.Locale'auto' uses the phone's language when it provides it (NEXO PHONE); otherwise Config.DefaultLocale.
Config.Phone'auto' or fixed: 'nexo', 'lb', 'qs', 'okok', 'gks' or 'none'.
Config.PhoneAppAdds the Studio app to the phone (name and description).
Config.CommandOptional command to open the studio in app mode (false = off).
Config.ModesWhere it can be used: Store (shops) and App (phone).
Config.PaymentAccounts used to pay, in order (bank, cash).
Config.LimitsStickers (16), huggers (3), charms (2), saved designs (12) and engraving length.
Config.MarketDesign market: creator's share (85%), min and max price, designs per character and offline payouts.
Config.BusinessStore business: share that goes to the till, min and max margin, packs and max discount.
Config.Wallpaper / Config.ShareMatching wallpaper and sharing a photo of the design (with NEXO PHONE).
Config.InHandDecorated phone in the player's hand. Off by default (see below).
Config.SecurityRequest limit per player and max distance to the counter.

Physical stores

Stores live in config/stores.lua. Each one is a counter with an optional assistant, a blip and optional opening hours. Players open the studio with ox_target, qb-target or the [E] prompt.

Config.Stores = {
    {
        id = 'fundas_co',
        label = 'Fundas & Co.',
        place = 'Shopping centre · ground floor',
        coords = vec4(-1121.36, -1440.24, 5.23, 302.0),
        ped = `a_f_y_hipster_02`,              -- false = sin dependienta
        blip = { sprite = 459, colour = 47, scale = 0.75 },
        job = 'phonestore',
        bossGrade = 3,
        hours = false,                         -- p. ej. { open = 9, close = 22 }
    },
}
  • In store, the price is the base price plus the margin set by the boss (rounded to $10).
  • The boss's packs are on sale, with a discount.
  • Items with storeOnly = true can only be bought here.
  • A share of every sale (TillShare) goes to the store till.

The job. Create it in your framework. For example, in qbx/qb (shared/jobs.lua):

phonestore = {
    label = 'Phone store', defaultDuty = true, offDutyPay = false,
    grades = {
        [0] = { name = 'Trainee', payment = 50 },
        [1] = { name = 'Seller', payment = 75 },
        [2] = { name = 'Senior seller', payment = 100 },
        [3] = { name = 'Manager', isboss = true, payment = 150 },
    },
},

On ESX, add the job and its grades to the jobs / job_grades tables and a society account (society_phonestore).

Who runs the storeAny employee sees the till and the sales in Manage store. Grades from bossGrade up change the margin, create and delete packs and withdraw the till to the society. With job = false nobody runs the store: base prices, no packs and no till.

Design market

Players publish their current design with a price. The buyer pays that price plus any item of the design they don't own yet.

  • The creator gets 85% of the price (CreatorCut); the rest leaves the economy.
  • If the creator is offline they're paid into the framework's bank; if that's not possible, they're paid the next time they open the studio.
  • The best sellers are shown first, with their likes.
  • On the first start a few example designs are published so the market isn't empty (SeedExamples).

Supported phones

With Config.Phone = 'auto' the first one that's started is used: nexo-phone, lb-phone, qs-smartphone(-pro), okokPhone and gksphone. Tapping the Studio app closes the phone and opens the studio full screen.

PhoneStudio appOne design per phonePhone languageMatching wallpaperShare
NEXO PHONEBuilt inYes (per serial)YesYesGlimpse post
lb-phoneAddCustomAppPer character———
qs-smartphone / proaddCustomAppPer number———
okokPhoneloadAppPer character———
gksphoneAddCustomAppPer character———
No phoneStores or commandPer character———
With NEXO PHONE you need 1.1.0The Studio app, the matching wallpaper and the Glimpse photo arrive in NEXO PHONE 1.1.0. Download the latest version from your Keymaster.

To add another phone, copy bridge/phones/lb into bridge/phones/<name>/, fill the functions in bridge/phones/server.lua and client.lua and add the detection line.

Case in hand (optional)

It's off by default (Config.InHand.Enabled = false). When on, other players see the case or character, the huggers and the charms on the phone in your hand.

  1. Open the studio in a browser Serve the web folder with a local web server (for example npx serve web) and open it in Chrome or Edge: it runs with sample data.
  2. Export the parts Build the design and press Ctrl + Shift + E: you get one .glb per part (nxs_<id>.glb), already in metres.
  3. Convert them to YDR Import them in Blender, check the orientation, simplify if heavy (under ~5k triangles per part) and export with Sollumz.
  4. Make a stream resource For example nxs_studio_models/stream/ with the YDR files, started before nexo-studio.
  5. Tune the phone Add your phone prop to Config.InHand.PhoneModels and tune Config.InHand.Scale if parts are offset.
What isn't shown in handStickers, glitter, grips, rings and engraving aren't shown in hand. Parts without a model are skipped, so you can add models little by little.

Exports and events

exports['nexo-studio']:GetDesign(phoneKey)               -- diseño equipado ('nexo:NX7K..', 'char:<identifier>')
exports['nexo-studio']:GiveItem(source, itemId)          -- regalar un artículo (eventos, premios). true | false
exports['nexo-studio']:OwnsItem(source, itemId)          -- true | false
exports['nexo-studio']:OpenStudio(source, mode, storeId) -- mode 'app' | 'store'
Safe on the serverStore mode always re-checks distance, opening hours and job on the server, so opening it by hand from the client gives nothing extra.

Troubleshooting

ProblemSolution
The Studio app doesn't show on the phoneWith NEXO PHONE you need 1.1.0. With other phones, check Config.PhoneApp and docs/phones.md.
“Get closer to the counter”In store mode the player must be within Config.Security.StoreDistance metres.
The store shows as closedCheck hours in config/stores.lua.
The wallpaper isn't set or the photo isn't sharedOnly with NEXO PHONE and with the phone's photo uploads set up.
The boss can't withdraw the tillCheck bossGrade and that the job's society account exists.

Editable files

FileWhat for
config/config.luaFramework, phone, language, modes, payments, limits, market, store business and security.
config/catalog.luaEvery item, price, season and the engraving price.
config/stores.luaPhysical stores: counter, assistant, blip, job and opening hours.
web/locales/Interface texts in 31 languages.
bridge/Integrations with frameworks, phones and society money, so you can adapt them.

FAQ

Do I need a phone?

No. Without a phone it works the same with the physical stores or a command. With NEXO PHONE you get the full integration: one design per phone, a matching wallpaper and a Glimpse photo.

Do others see the case on the phone in my hand?

It's optional and off by default. It needs the 3D models of each part exported from the studio and converted to YDR; the documentation explains how.

Is the code encrypted?

The core is protected with Cfx.re escrow. Config, translations and integration points stay open.

Do I get updates?

Yes, for free. New versions appear in your Keymaster and we announce them on Discord.

What if something doesn't work?

Open a ticket on our Discord with the console error and we'll help you.