Skip to content

Customization

Almost everything is in one file, config.lua. The two bridge files and the locales are open too.


FileWhat it decidesOpen?
config.luaLanguage, currency, interaction, placement limit, and every fixed machine with its priceYes
locales/*.luaThe prompts, notifications and target labelsYes
bridge/client_bridge.luaFramework detection, reading money, notifications, help text, and the ox-target / qb-target / drawtext zonesYes
bridge/server_bridge.luaTaking and paying money or coins, character names and ids, notifications, and the usable cabinet itemsYes
items/Item definitions for ox, qb and ESX, and the icons in items/images/Yes
ui/The cabinet menu and the seven games, one folder each in ui/games/Not escrowed
client/data.luaCamera and screen position for each cabinet modelEscrowed
mic_arcade_props/The cabinet models and the screen rendererAssets only

OptionWhat it doesDefault
Config.LocaleWhich file in locales/ is used'en'
Config.PaymentTypeWhat a game costs: cash, bank, both or item'item'
Config.PaymentItemThe item used as currency when PaymentType is item'arcade_coin'
Config.Interactionox-target (with a dash), qb-target or drawtext'ox-target'
Config.MaxArcadesPerPlayerHow many placed machines one character can have out at once3
ValueWhat happens
cashPaid from cash (on ESX, the money account)
bankPaid from the bank account
bothCash first; if there is not enough, the rest comes from the bank
itemPaid in Config.PaymentItem, one item per unit of price

The same currency is used for DuoFight stakes and winnings.


One entry per cabinet model. Each entry has a Price and, optionally, any number of fixed positions (vec4 with x, y, z and heading) — one machine is spawned at each.

CabinetModelGamePriceFixed out of the box
DuoFightmic_arcade_duofightTwo-player fighter, or against the computer0No (commented out)
Alienmic_arcade_alienAlien100No (commented out)
Breakoutmic_arcade_brickBreakout100No (commented out)
Pixelmic_arcade_pixelPixel100Yes
Racemic_arcade_raceRace100Yes
Towermic_arcade_towerTower100Yes
Roadmic_arcade_roadRoad100Yes
  • To add a fixed machine, add a position to the list under that model. Stand where you want it, take your coordinates and heading, and write them in.
  • To remove one, delete or comment out its position. The Price still applies to placed machines of that model.
  • A price of 0 makes the cabinet free.
  • The Breakout cabinet’s origin sits lower than the others — the shipped Breakout position is about 0.7 lower on the z axis than its neighbours. Do the same when you add one.

The Price is also what a placed cabinet of that model charges.


A cabinet item (arcade_alien, arcade_race…) starts placement:

KeyWhat it does
Look aroundMoves the preview to where you are looking
Scroll wheelRotates it
EPlaces it and takes the item
ESC / BackspaceCancels; you keep the item

The owner — and only the owner — gets Pick Up Arcade on it (with drawtext, the second key shown on the prompt). Picking up gives the item back. A machine that somebody is using cannot be picked up.

Config.MaxArcadesPerPlayer counts the machines a character currently has placed.


Choosing two players on DuoFight asks for a stake: 1, 5, 25, 50 or 100, in your currency. The host pays it and waits at the machine; the next player to use the machine is offered the match and pays the same to join.

ResultWhat happens
WinThe winner receives both stakes
DrawEach player gets their stake back
A player walks away mid-matchThey forfeit: the other player wins both stakes
The host walks away before anyone joinsThe match is cancelled; the host’s stake is not returned
A player disconnectsThe match is cancelled, with no payout

Every game except DuoFight saves each character’s best score to mic_arcade_leaderboard and shows the top ten on the machine. Names are the character’s name from your framework. To reset a leaderboard, empty that table (or the rows for one game) while the server is stopped.


Ten ship in locales/: en, es, fr, de, it, pt, nl, ja, ru, zh. Set Config.Locale to the code.

To add one, copy locales/en.lua to a new file named after your code, change Locales['en'] to your code, translate the right-hand side of each line, and set Config.Locale. A missing key shows as Translation [xx][key] does not exist — there is no fallback to English.

The locale files cover what the game world shows: the target labels, the help prompts and the notifications. The text inside the games is part of ui/games/.


FileWhat it covers
bridge/client_bridge.luaFramework detection, the money or coin count shown to the player, Bridge.Notify, the help text, and the interaction zone on every machine for ox-target, qb-target or drawtext
bridge/server_bridge.luaFramework detection, taking and paying money or items (Bridge.RemoveMoney, Bridge.AddMoney), the cabinet items, character name and id, server notifications, and the list of usable cabinet items

A different notification resource: change Bridge.Notify in the client file and Bridge.ServerNotify in the server file. The not enough money messages are sent from Bridge.RemoveMoney.

A different target resource: Bridge.RegisterArcadeInteraction and Bridge.RemoveArcadeInteraction in the client file are the only places targets are touched.

Another inventory: coins and cabinet items are read and removed through the framework’s own player functions in server_bridge.lua. Point Bridge.RemoveMoney, Bridge.AddMoney, Bridge.RemoveSpecificItem, Bridge.AddSpecificItem and Bridge.GetMoney at your inventory if it does not answer to those.

A new usable item for a cabinet: the UsableArcades table at the bottom of server_bridge.lua maps each item to its cabinet model.