Configuration

Shop and cases

Phone shops, the shop business, the case market, the 3D accessory store and the migration welcome gift.

Files: configs/config_shop.lua, configs/config_cases.lua and configs/config_migration.lua. What players see is on Shop and Cases.

#Config.PhoneShop

Phone shops are NPC counters with a talk screen. The shops in PhoneShop.Shops are only added on the first start, by key. From then on they live in the database and are edited in the admin tablet's Shops section.

Setting Type Default What it does
PhoneShop.Enabled boolean true Phone shops on or off
PhoneShop.Payment string 'both' 'cash', 'bank' or 'both' (cash first, then bank)
PhoneShop.Hours string 'always' 'always': every shop is open round the clock; its opening hours are kept and apply again when this is changed. 'game': opening hours follow the clock a time sync resource publishes (GlobalState.currentTime), or the server's real time without one. 'real': the server's real time
PhoneShop.CasesChangeVariation boolean true Cases change the phone colour instead of handing out an item
PhoneShop.Interaction string 'auto' 'auto' uses ox_target when it runs, otherwise a prompt and E. 'prompt' always uses the prompt
PhoneShop.SpawnDistance number 60.0 Distance at which the counter NPC is created
PhoneShop.DespawnDistance number 80.0 Distance at which it is removed

The server decides whether a shop is open, and the blips on every player's map show the same.

#Showroom

The 3D showroom at the counter needs fx-phone-assets: the clerk sets a phone down, the player turns it and tries every colour, case and accessory on it.

Setting Type Default What it does
Showroom.Enabled boolean true Showroom on or off
Showroom.Offset vector3 0.0, 0.55, 0.32 Where the phone stands, from the clerk: right, forward, up
Showroom.CamDistance number 0.42 Camera distance from the phone
Showroom.OnCounter boolean true The phone stands on whatever surface is under that spot instead of at the offset's fixed height
Showroom.Lift number 0.0 Raises the phone from the surface, in metres
Showroom.Fov number 40.0 How wide the lens opens (12 is a close-up, 58 is far). The mouse wheel zooms from there
Showroom.Light.Enabled boolean true Studio lights on the phone while it is looked at
Showroom.Light.Intensity number 1.0 Scales the lights

#HUD

PhoneShop.Hud.OnOpen and PhoneShop.Hud.OnClose are functions that run when the shop's talk screen opens and closes, so your HUD can step aside. The shipped functions hide and show wais-hudv6 and fx-hud; a HUD that is not running is skipped. Add your own in the same way.

#Business

The shops as a player business: one job runs them. Sales go to the job's bank account, physical goods need stock the managers order at wholesale, and an on-duty employee at the counter serves customers for a commission. With nobody on duty the clerk NPC sells. Staff, ranks and funds are managed in Company. If the job does not exist on the server, the business stays off (NPC sales, no stock) and the console says so once.

Setting Type Default What it does
Business.Enabled boolean true The shop business on or off
Business.Job string 'phoneshop' The job that runs the shops
Business.ManagerGrade number 3 This grade and up: prices, stock orders, commission, the books
Business.PriceRange { min, max } { 0.8, 1.6 } Managers price each product between these factors of its Products price
Business.Wholesale number 0.55 Stock costs this factor of the Products price
Business.Stocked table phone, sim, sim_prepaid Product kinds that are goods on a shelf
Business.StartStock number 20 Per stocked product, the first time a shop is used
Business.MaxStock number 250 Largest stock per product
Business.Commission table { Default = 10, Max = 30 } Percent of a sale paid to the employee who served it
Business.MaxDiscount number 20 The most a manager may let staff take off at the counter, in percent
Business.DutyRange number 35.0 Staff are on duty only while within this distance of the shop
Business.AnswerSeconds number 30 A customer's request waits this long for staff, then the NPC sells

#NPC and talk screen

PhoneShop.NpcModels is a list of { model, label } offered on the tablet; four models ship. PhoneShop.NpcScenarios is a list of { key, scenario }; stand, phone and clip ship.

Setting Type Default What it does
Talk.CamDistance number 1.9 Camera distance from the clerk
Talk.CamMinDistance number 0.95 Closest the camera comes
Talk.CamFov number 42.0 Field of view
Talk.CamMaxFov number 68.0 Widest field of view
Talk.CamHeight number 0.45 Camera height
Talk.CamLookHeight number 0.3 Height of the point the camera looks at
Talk.CamShift number 0.3 Sideways shift of the shot
Talk.CamEase number 900 Camera move time in milliseconds
Talk.TypeMs number 1000 Milliseconds a line takes to type out. The NPC's mouth moves for as long
Talk.BackgroundBlur boolean true Blurs the background of the talk screen
Talk.HidePlayer boolean false Standing so close that the player would block the shot, the player is not drawn on their own screen. false: never hidden
Talk.Bubble.Enabled boolean true The clerk's line is written beside their chest. false puts the line at the bottom of the screen
Talk.Bubble.Height number 0.28 Metres above the clerk's middle
Talk.Bubble.Side number 0.07 How far to the right of the clerk on the screen, as a share of its width. Negative is left

HidePlayer hides the player's own character locally. The config file notes that anticheats with an "invisible player" check can take this for a cheat, which is why it ships off.

#Products

PhoneShop.Products is a list of { kind, item?, variation?, label, price, enabled }. label is a locale key.

kind What it sells
phone A phone item. One entry per phone item
sim A registered SIM
sim_prepaid A prepaid SIM
esim eSIM activation
reissue Replacement for a lost SIM
number_change A new number
case A case in one of the 14 phone colours (variation)

Every product has its own price and enabled switch. Managers and the admin tablet can change prices at runtime.

#Shops

One shop ships, keyed legion. Fields of a shop:

Field What it does
name Shop name
coords { x, y, z, heading } of the counter NPC
npcModel, npcScenario The clerk's model and scenario
blip, blipSprite, blipColor Map blip
openFrom, openTo Opening hours
prepaid true: the shop sells prepaid SIMs

Check the positions in game. The tablet's "Here" button moves a shop to where you stand.

#Config.Cases

The player market for case designs. The buyer pays from the bank, the designer is paid the price less the fee. The fee leaves the economy.

Setting Type Default What it does
Cases.Enabled boolean true false switches the player market off for every request. Copies players own stay theirs. The official store below is separate
Cases.MaxPrice number 5000 The most a creator may ask for a design or a style kit
Cases.Fee number 10 Percent kept from every sale at the first level, and at any level without a fee of its own
Cases.PerDay number 10 Designs and kits one character may publish in 24 hours
Cases.MaxStickers number 12 Stickers on one design
Cases.MaxStock number 500 Largest limited edition
Cases.ResaleFee number 8 Percent kept when a numbered copy is resold
Cases.Royalty number 5 Percent of every resale paid to the creator
Cases.MaxResalePrice number 50000 Highest resale price
Cases.Levels list 4 levels Total copies sold decides the level; a higher level keeps less of each sale

Shipped levels: 0 sales (uses Fee), 25 sales (8 %), 100 sales (6 %), 400 sales (4 %).

#Config.Accessories

The official 3D store in the Cases app: cases, accessories and name letters from fx-phone-assets. Bought once, kept, and shown on the phone in the player's hand.

Setting Type Default What it does
Accessories.Enabled boolean true The official store on or off
Accessories.CasePrices table per family Price per case family: solid, clear, rugged, wallet, battery, bear, alien, job
Accessories.ItemPrices table per group Price per accessory group: charm, couple, strap, wriststrap, ring, magsafe, hug, sticker, deco, flag
Accessories.LetterSetPrice number 450 One letter style (all letters, digits and symbols) for names on the back
Accessories.MaxLetters number 10 Longest name
Accessories.Overrides table {} Price of one model, for example ['fx_case_rugged_black'] = 500
Accessories.JobCases table 7 entries Job cases are free for the job and cannot be bought by others. types match a job's type, jobs its name
Accessories.Slots table 5 each How many of each slot a kit may hold, at most 5. 0 turns a slot off. Slots: charm, strap, grip, hug, sticker, deco, flag
Accessories.DressRange number 40.0 Other players' phones are dressed within this distance

Placement settings:

Setting What it does
Accessories.LetterMove How far a player may move their name on the back, in metres: Up, Down, Side, and Width, the room the back offers across. Turn: players may turn the name on its side. GapMin, GapMax: how much closer or further apart the letters may be set, as a share of the normal gap. TurnSign: set to -1 if a turned name reads backwards
Accessories.PartMove The same per slot (grip, hug, sticker, deco, flag, charm, strap): { Up, Down, Side } in metres. A slot left out stays put. Cases never move
Accessories.Spread Where the second and later parts of a slot go: { x, z, inward? } in metres per step. inward = true steps towards the middle of the phone
Accessories.Mounts Where each slot sits on the phone: { pos, rot } in metres from the phone's centre and degrees. sticker and deco hold several spots. letters also takes spacing, and optionally gap in metres

The mount values are starting values. Check them on a phone in game and adjust.

#Config.Migration

Players moved over with fxphone:migrate are greeted once with a notice on the lock screen and get a one-time welcome gift at the phone shop. See Migration.

Setting Type Default What it does
Migration.Gift.Enabled boolean true The welcome gift on or off
Migration.Gift.Percent number 50 Percent off one purchase at a phone shop counter. Applied at the checkout, after any discount staff give, never below 0
Migration.Gift.Days number 14 Days the gift stays valid, counted from the first time the player opens the phone after the move
Migration.Gift.MaxAmount number 0 Most the gift may take off, in money. 0: no limit

The sale is booked at the price paid: with the shop business on, the shop takes the discount.