Customization
Almost everything is in one file, config.lua. The two bridge files and the locales are open too.
Which file decides what
Section titled “Which file decides what”| File | What it decides | Open? |
|---|---|---|
config.lua | Language, currency, interaction, placement limit, and every fixed machine with its price | Yes |
locales/*.lua | The prompts, notifications and target labels | Yes |
bridge/client_bridge.lua | Framework detection, reading money, notifications, help text, and the ox-target / qb-target / drawtext zones | Yes |
bridge/server_bridge.lua | Taking and paying money or coins, character names and ids, notifications, and the usable cabinet items | Yes |
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.lua | Camera and screen position for each cabinet model | Escrowed |
mic_arcade_props/ | The cabinet models and the screen renderer | Assets only |
General — config.lua
Section titled “General — config.lua”| Option | What it does | Default |
|---|---|---|
Config.Locale | Which file in locales/ is used | 'en' |
Config.PaymentType | What a game costs: cash, bank, both or item | 'item' |
Config.PaymentItem | The item used as currency when PaymentType is item | 'arcade_coin' |
Config.Interaction | ox-target (with a dash), qb-target or drawtext | 'ox-target' |
Config.MaxArcadesPerPlayer | How many placed machines one character can have out at once | 3 |
Payment types
Section titled “Payment types”| Value | What happens |
|---|---|
cash | Paid from cash (on ESX, the money account) |
bank | Paid from the bank account |
both | Cash first; if there is not enough, the rest comes from the bank |
item | Paid in Config.PaymentItem, one item per unit of price |
The same currency is used for DuoFight stakes and winnings.
Machines and prices — Config.Arcades
Section titled “Machines and prices — Config.Arcades”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.
| Cabinet | Model | Game | Price | Fixed out of the box |
|---|---|---|---|---|
| DuoFight | mic_arcade_duofight | Two-player fighter, or against the computer | 0 | No (commented out) |
| Alien | mic_arcade_alien | Alien | 100 | No (commented out) |
| Breakout | mic_arcade_brick | Breakout | 100 | No (commented out) |
| Pixel | mic_arcade_pixel | Pixel | 100 | Yes |
| Race | mic_arcade_race | Race | 100 | Yes |
| Tower | mic_arcade_tower | Tower | 100 | Yes |
| Road | mic_arcade_road | Road | 100 | Yes |
- 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
Pricestill applies to placed machines of that model. - A price of
0makes 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.
Placed machines
Section titled “Placed machines”A cabinet item (arcade_alien, arcade_race…) starts placement:
| Key | What it does |
|---|---|
| Look around | Moves the preview to where you are looking |
| Scroll wheel | Rotates it |
| E | Places it and takes the item |
| ESC / Backspace | Cancels; 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.
DuoFight stakes
Section titled “DuoFight stakes”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.
| Result | What happens |
|---|---|
| Win | The winner receives both stakes |
| Draw | Each player gets their stake back |
| A player walks away mid-match | They forfeit: the other player wins both stakes |
| The host walks away before anyone joins | The match is cancelled; the host’s stake is not returned |
| A player disconnects | The match is cancelled, with no payout |
Leaderboards
Section titled “Leaderboards”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.
Languages
Section titled “Languages”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/.
The bridge
Section titled “The bridge”| File | What it covers |
|---|---|
bridge/client_bridge.lua | Framework 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.lua | Framework 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.