Configuration
Every oxide-dice setting — how settings are stored, the in-game /dice settings menu, street games, tables, side bets, timers, the throw, animations, the camera, sounds, the pot, tips, the seller, police alerts and the config-file settings.
oxide-dice is configured in game, from a settings menu. You don't edit script files on a running server. This guide explains how that works, then lists every setting so you know what each one does.
How Configuration Is Stored
oxide-dice keeps its live configuration in your database, in a shared table called oxide_settings. ("The database" is the MySQL storage your whole server already uses for characters, money and so on.) The table is created automatically; you don't run any SQL by hand.
The config files (shared/config.lua and the files in shared/config/) are the factory defaults: the starting values the resource ships with.
How it works:
- The first time the resource starts, the values from the config files are copied into
oxide_settings. If you edited those files before that first start, your edits are what gets copied. - From then on, the database is what the resource reads. Settings you save in the menu are stored there and win over the files. Editing a config file on a server that has already started once will not change a setting that's stored in the database.
What this means for you:
- Setting up for the very first time? You can edit the config files before the first start, and your values will be imported. The easier path is to start with the defaults and adjust everything in game.
- Changing a setting on a server that has already run the resource? Use the in-game settings menu (below).
- A resource update adds new settings? Those aren't in your database yet, so they come from the updated config file automatically on the next start. Your existing settings are untouched.
- A list you saved stays as you saved it, even empty. If you clear the seller's item list in the menu, an update won't put the default items back.
The In-Game Settings Menu
As an admin, type /dice settings in the chat box. It opens an editor for every setting below. Changes apply live and are saved to the database right away, with no restart.
- Settings are grouped into a sidebar of four categories: Games, Players, World and Advanced.
- A Basic / Advanced switch at the top picks which settings you see. Some settings only show on Advanced (they're marked (Advanced) below), and two sections, Animations and Dispatch, only appear in the sidebar once you switch to Advanced.
- The search box finds a setting by name.
- A setting you've edited but not saved yet is marked changed. Save Changes saves everything you've edited. If a value isn't allowed (a number out of range, or a minimum bet above the maximum), that setting is refused with a short message and keeps its old value.
- Reset to default puts a whole setting back to its factory value from the config files and saves it straight away. It resets the whole card: resetting Dice tables, for example, also removes your fixed tables and the zones you drew.
- Zones (where players may or may not place tables) are drawn in the world: press Draw new zone, the menu hides, you place the corners of the area, then the menu comes back. Each zone also has a Teleport to zone button.
- Coordinates (seller locations, fixed tables) have a Place in world button to pick the spot, and a Teleport here button.
- Item fields have a picker that lists the items your inventory knows about.
Almost every change takes effect the moment you save. The exceptions:
- Bet limits, side bet limits, players per circle and circle size apply to games that start after the change. A game already running keeps the limits it started with.
- The table minimum and maximum bet apply to tables placed after the change. Tables already placed keep theirs.
- Renaming an item makes the new name work straight away and the old name stop working. Add the new name to your inventory first (see Installation).
Saving Dice seller re-creates the sellers straight away, and saving Dice tables puts fixed tables in their new places straight away.
Only admins can open the menu, and every save is checked again on the server. Drawing zones and picking spots in the world need an up-to-date o-link (it provides the drawing tool). If yours is out of date, the menu tells you: "In-world placement needs an updated o-link. Update o-link to use this."
Developers can also read and write settings from another resource. See API Reference.
The setting names below (like Config.Street.minBet) are the names in the config files. In the menu each one has a plain label instead (like "Minimum bet"). The tables list both.
Settings That Stay In The Config Files
Four settings are never stored in the database and never appear in the menu, so the config file always wins for them:
| Setting | File | Default | What it does |
|---|---|---|---|
Config.UseHudAccent | shared/config.lua | true | With Oxide HUD installed, the dice cards, prompts and world tags use your server's accent colour from Oxide HUD. false keeps the dice red. Without Oxide HUD, or with no accent set there, nothing changes. |
Config.TableModels | shared/config/tables.lua | two kinds, standard and folding | The kinds of dice table: each one's model, play surface, chairs and where players stand or sit. See Table models. |
Config.DiceTypes | shared/config/dice.lua | one type, street | The dice model, its size, which way up each number shows, and how the dice sit in the shooter's hand. See Dice types. |
Config.ModelHints | shared/config.lua | the die, the casino table and the crate, bundled | Only changes the wording of the missing-model warning, for models that ship with a resource or come from an add-on. Leave it as it is. |
To change one:
- Open the file in a text editor (Notepad, Notepad++ or VS Code all work).
- Change the value and save the file.
- Restart the server (or type
restart oxide-dicein the server console).
The Config Files
| File | What's in it | Menu location |
|---|---|---|
shared/config.lua | Street games, distances, timers, side bets, the throw, the camera, dice tables, police alerts, the pot, animations, sounds, tips, model replacements, debug output, and the file-only UseHudAccent and ModelHints | Games, Players, World → Dispatch, Advanced |
shared/config/store.lua | The dice seller | World → Store |
shared/config/tables.lua | Table models | File only |
shared/config/dice.lua | Dice types | File only |
Games
Street games
Config.Street (menu: Games → Street → Street games). Games started with the dice item.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.Street.enabled | Street games on | boolean | true | Off: using the dice item only says "Street games are switched off here." Games already running finish. |
Config.Street.item | Item | string | 'dice' | The inventory item that starts a street game. A new name must exist in your inventory. |
Config.Street.minBet | Minimum bet | number | 50 | The least a shooter may bet in a street game, in dollars. 1 to 10,000,000, and not above the maximum. Also the smallest side bet stake. |
Config.Street.maxBet | Maximum bet | number | 50000 | The most a shooter may bet in a street game, and the most any side bet may put at stake (for a number bet, the taker's side). 1 to 10,000,000. |
Config.Street.maxPlayers | Players per circle | number | 8 | How many players fit round one circle, shooter included. 2 to 8. |
Config.Street.radius | Circle size | number | 1.4 | Metres from the middle to where the players sit. Every player sits on a crate this far out, facing the middle, and the dice keep 0.75 metres inside that, short of the seated players' toes. 1.4 fits eight; 1.0 to 2.0. |
Config.Street.maxSlope | Steepest ground | number | 15.0 | Degrees. Ground steeper than this refuses a game ("The ground is too steep here."). 0 to 45. |
Config.Street.spacing | Spacing | number | 6.0 | Metres a new street game must keep from another game and from a dice table. 0 to 50. |
Config.Street.crate | Crate | table | see below | The upturned milk crate each player sits on. A prop that appears under a seat while it's taken, not an item. Model (model): the crate prop. Turn (rotation): degrees about x, y and z that put the model upside down. Seat height (seatHeight, 0.28): the top of the upturned crate above the ground, 0.1 to 0.6 m. Footprint (footprint, 0.33): the side of its square base, 0.2 to 0.6 m. |
Config.Street = {
enabled = true,
item = 'dice',
minBet = 50,
maxBet = 50000,
maxPlayers = 8, -- 2 to 8 around one circle
radius = 1.4, -- metres from the centre to where each player sits (1.4 fits eight)
maxSlope = 15.0, -- degrees; steeper ground refuses a game
spacing = 6.0, -- metres between two games
crate = {
model = 'oxide_dice_crate',
rotation = vec3(180.0, 0.0, 0.0),
seatHeight = 0.28,
footprint = 0.33,
},
}Distances
Config.Play (menu: Games → Street → Distances, (Advanced)). These apply to every game, street or table.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.Play.leaveDistance | Leave distance | number | 6.0 | A player farther than this many metres from the middle of their game has left it, and their money settles by the rules (see Features). 2 to 50. |
Config.Play.sightRange | Sight range | number | 45.0 | Players within this many metres see the throws, the pot, the tag and the roll pop-ups. 10 to 200. |
Config.Play.joinDistance | Join distance | number | 2.5 | How close (metres) a player must be for Join the dice game to show. Play dice on a table shows from 1 metre further. 1 to 10. |
Config.Play = {
leaveDistance = 6.0, -- a player farther than this from the game has left it
sightRange = 45.0, -- players this close see the throws, the pot and the tag
joinDistance = 2.5, -- how close the join prompt shows
}Dice tables
Config.Tables (menu: Games → Tables → Dice tables). The two table items, the limits a new table starts with, who may place one, and tables that always stand. Everything except the items applies to both kinds of table.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.Tables.item | Casino table | string | 'dice_table' | The inventory item that places a casino table (Config.TableModels.standard). A new name must exist in your inventory. |
Config.Tables.foldingItem | Folding table | string | 'dice_folding_table' | The inventory item that places a folding table with its four chairs (Config.TableModels.folding). A new name must exist in your inventory. Saving refuses an item name the street dice or the other table already use. |
Config.Tables.model | Fallback kind | string | 'standard' | The kind a fixed table stands as when its row names none, and the kind a stored table falls back to if its own kind is ever removed from shared/config/tables.lua. Casino table (standard) or Folding table (folding). |
Config.Tables.minBet | Minimum bet | number | 50 | The least a shooter may bet at a newly placed table. 1 to 10,000,000, and not above the maximum. |
Config.Tables.maxBet | Maximum bet | number | 50000 | The most a shooter may bet at a newly placed table. 1 to 10,000,000. |
Config.Tables.placement | Who may place | table | see below | Who may place tables, and where. |
Config.Tables.spots | Fixed tables | table | {} (empty) | Tables that always stand at a spot, with no item and no owner. See below. |
A placed table keeps the limits it was placed with. Fixed tables use their own limits, or these two when theirs are left empty.
Who may place
Config.Tables.placement. Admins can always place tables, whatever the mode, and skip the zones, the road and water checks and the per-player limit.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
mode | Mode | string | 'admin' | 'admin' (Admins only), 'zones' (Players in allowed zones) or 'anywhere' (Players anywhere, outside the blocked zones). |
zones | Allowed zones | table | {} (empty) | In the Players in allowed zones mode, where players may place tables. Drawn in the world. With none drawn, no player can place a table ("No player can place a table while no allowed areas are drawn."). |
blockedZones | Blocked zones | table | {} (empty) | Where players never place tables, in either player mode. A blocked zone inside an allowed one wins. Drawn in the world. |
maxDistance | Reach | number | 10.0 | How far (metres) from where they stand players may place a table. 2 to 50. |
minSpacing | Spacing | number | 3.0 | Metres a table must keep from any other table and from a street game. 0 to 50. Applies to admins too. |
maxPerPlayer | Tables per player | number | 2 | How many tables one character may have placed at once. 0 means players can't place any. 0 to 50. |
avoidRoads | Keep off roads | boolean | true | Refuse player tables on roads. |
avoidWater | Keep out of water | boolean | true | Refuse player tables in water. |
Players can only place tables in the main world, not inside an instance.
Fixed tables
Config.Tables.spots. Press Add to add one. Each fixed table has:
| Field | Menu label | What it does |
|---|---|---|
label | Name | A name for your own reference, for example 'Back room' |
kind | Kind | Casino table (standard) or Folding table (folding). Left empty, the table stands as the fallback kind above. |
coords | Where | The spot: x, y and z (the floor under the table), and w, the way the table faces (0 to 360). Use Place in world to pick the spot, then type the heading in W. Required: saving refuses a fixed table with no place. |
minBet | Minimum bet | This table's minimum. Leave empty to use the table minimum above. |
maxBet | Maximum bet | This table's maximum. Leave empty to use the table maximum above. Not below the minimum. |
Fixed tables can't be packed up by anyone. To remove one, delete its row and save.
Config.Tables = {
item = 'dice_table', -- places a casino table (Config.TableModels.standard)
foldingItem = 'dice_folding_table', -- places a folding table with its chairs (Config.TableModels.folding)
model = 'standard', -- the kind a fixed table, or a stored one whose kind is gone, falls back to
minBet = 50,
maxBet = 50000,
placement = {
mode = 'admin', -- 'admin', 'zones' or 'anywhere'
zones = {},
blockedZones = {},
maxDistance = 10.0, -- how far from where the player stands they may place
minSpacing = 3.0, -- metres from another table or street game
maxPerPlayer = 2,
avoidRoads = true,
avoidWater = true,
},
-- { label = 'Back room', kind = 'folding', coords = vec4(x, y, z, heading), minBet = 100, maxBet = 25000 }
spots = {},
}Side bets
Config.SideBets (menu: Games → Bets → Side bets). Bets between players beside the main bet, while a point is set. See Features.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.SideBets.enabled | Side bets on | boolean | true | Off: the Q Side bets key doesn't show and no side bets can be made ("Side bets are switched off here."). |
Config.SideBets.maxPerPlayer | Per player | number | 4 | How many side bets one player may have at once, offered or taken. 1 to 20. |
Config.SideBets.maxOdds | Highest odds | number | 30 | The most a number bet may offer, N to 1. 1 to 100. |
Per player and Highest odds apply to games that start after the change. Side bets on applies straight away.
Config.SideBets = {
enabled = true,
maxPerPlayer = 4, -- open or taken side bets one player may have at once
maxOdds = 30, -- the most a number bet may offer, N to 1
}Timers
Config.Timing (menu: Games → Timing → Timers). The server's timers decide these, whatever any player does.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.Timing.idleSeconds | Quiet game ends | number | 60 | Seconds. While nothing of the shooter's bet is covered, a game where nobody fades for this long ends, and every bet comes back. 10 to 600. |
Config.Timing.turnSeconds | Shooter wait | number | 60 | Seconds. A shooter who neither bets nor throws for this long has left: with a point set, they lose to the faders. 10 to 600. |
Config.Timing.settleMs | Money moves after | number | 4500 | Milliseconds (1000 = 1 second) from the throw to the money moving, so everyone sees the dice land first. 2500 to 10000. |
Config.Timing = {
idleSeconds = 60, -- a game where nobody covers anything for this long ends
turnSeconds = 60, -- a shooter who neither bets nor throws for this long has left
settleMs = 4500, -- from the throw to the money moving (the dice land first)
}Players
The throw
Config.Throw (menu: Players → Throw → The throw). The camera aims the throw and holding the button charges it. The server keeps every throw inside these numbers. None of them change what the dice show: the server rolls the result.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.Throw.chargeMs | Full charge | number | 900 | Milliseconds of holding the left mouse button that gives the hardest throw. 100 to 5000. |
Config.Throw.minReach | Softest throw | number | 0.35 | Where a tap first lands, as a share of the room in front of the dice: the distance to the circle's edge on the street, to the wall the throw is aimed at on a casino table, or across the middle of a folding table's top (counted from where the throw comes inside it, and kept short, since the top has no walls). 0.1 to 0.95. Not above the hardest throw. |
Config.Throw.maxReach | Hardest throw | number | 0.85 | Where a full charge first lands, as a share of the same room. After landing the dice bounce and roll on, so hard throws at a table carry into the back wall. 0.1 to 0.95. |
Config.Throw.maxAim | Aim | number | 25.0 | Degrees either side of the middle a throw may go, following where the shooter looks. 0 to 60. |
Config.Throw.streetPitch | Street lift | number | 31.0 | Degrees above level the dice leave the hand on the street, where the seated shooter lobs them underhand at the middle. More lift is a higher, slower arc. 0 to 60. |
Config.Throw.tablePitch | Table lift | number | 10.0 | Degrees above level the dice leave the hand at a casino table. Less lift is a flatter, faster throw. 0 to 60. |
Config.Throw.foldingPitch | Folding table lift | number | 30.0 | Degrees above level the dice leave the hand at a folding table. The default matches the seated toss in the chair animation. Less lift is a faster toss that rolls further, and no longer follows the hand. 0 to 60. |
The dice always come down inside the circle or on the table: the speed of each throw is worked out from where it should land and the lift. On a folding table they land just inside the middle of the top, roll on and stop there, clear of the seated players' hands.
Config.Throw = {
chargeMs = 900, -- holding this long gives the hardest throw
minReach = 0.35, -- where a tap first lands: this share of the room in front of the dice
maxReach = 0.85, -- and a full charge (to the circle's edge or the table's wall)
maxAim = 25.0, -- degrees either side of the circle or table centre
streetPitch = 31.0, -- degrees above level the dice leave the hand (the street throw is an underhand lob)
tablePitch = 10.0,
foldingPitch = 30.0, -- the seated toss onto a folding table; the chair clip's hand swings at this lift
}Animations
Config.Anims (menu: Players → Animations → Animations, (Advanced)). The clips players play. They're the resource's own animations, shipped in stream/. You don't need to change these.
Each clip has a Dictionary (dict), a Clip name (clip), a Flag (flag: 1 loops, 2 plays once and holds the last frame) and Heels twin (heels: when on, a character in high heels plays the same clip with _heels added to its name). A clip the game can't find is skipped with a warning in the F8 console, so the player just stands still for it.
On the street (Config.Anims.street):
| Clip | Menu label | Default | Extra |
|---|---|---|---|
idle | Shooter waiting | oxide_dice@street / shooter_idle, flag 1, heels twin on | |
shake | Shaking the dice | oxide_dice@street / shooter_shake, flag 1, heels twin on | |
throw | Throwing | oxide_dice@street / shooter_throw, flag 2, heels twin on | Release 500 ms: when the dice leave the hand. Release point vec3(0.295, 0.701, -0.675): where they leave it, in metres from the player (x right, y forward, z up). Release point in heels vec3(0.295, 0.701, -0.675): the heels twin lets go at the same point. |
pickup | Picking the dice up | oxide_dice@street / shooter_pickup, flag 2, heels twin on | Grab 720 ms: when the fingers close on the dice. Dice at the grab: empty, so the dice are picked up where they lie. With two points (one per die, in metres from the player: x right, y forward; z isn't used), the landed dice are put there as the shooter reaches for them. |
wait | Others waiting | oxide_dice@street / fader_idle_a, flag 1, heels twin on | |
waitAlt | Others waiting, second clip | oxide_dice@street / fader_idle_b, flag 1, heels twin on | |
win | A win | oxide_dice@street / react_win, flag 2, heels twin on | |
lose | A loss | oxide_dice@street / react_lose, flag 2, heels twin on |
Every street clip is drawn seated on the crate. A character in high heels sits 8.65 cm higher, so every street clip has a heels twin; without it they would hover above the crate.
At a folding table (Config.Anims.chair): the same rows as the street, with the same menu labels, from the oxide_dice@chair dictionary and seated on the table's chair, the forearms on the table's edge. The throw lets the dice go just over the near edge of the top. The pickup reaches into the middle of the top, so the landed dice are put just in front of the shooter there as the hand reaches out.
| Clip | Default | Extra |
|---|---|---|
idle, shake, throw, pickup, wait, waitAlt, win, lose | oxide_dice@chair / the street clip names (shooter_idle to react_lose), the same flags, heels twins on | throw: Release 500 ms, Release point and Release point in heels vec3(0.149, 0.242, -0.103). pickup: Grab 720 ms, Dice at the grab vec3(0.084, 0.568, 0.0) and vec3(0.109, 0.569, 0.0). |
At a casino table (Config.Anims.table):
| Clip | Menu label | Default | Extra |
|---|---|---|---|
idle | Waiting at the rail | oxide_dice@table / table_idle, flag 1, heels twin on | |
shake | Shaking the dice | oxide_dice@table / table_shake, flag 1, heels twin on | |
throw | Throwing | oxide_dice@table / table_throw, flag 2, heels twin on | Release 520 ms, Release point vec3(0.127, 0.633, 0.097), Release point in heels vec3(0.127, 0.683, 0.109): where the heels twin lets the dice go, for a shooter in high heels. |
Throw camera
Config.Camera (menu: Players → Feel → Throw camera). For players in the game: come up over the shooter's shoulder as they throw, follow the dice, look closely at the faces, then return. On the street it steps to one side of the throw when the shooter would be in the way, rises only when nothing beside them is clear, and narrows its view as the dice roll away so they stay easy to see; at a dice table it is raised as far as it takes to see the dice past the players. Players who aren't in the game never get it.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.Camera.enabled | Camera on | boolean | true | Off: players in the game keep their normal view during a throw. |
Config.Camera.pushInMs | Close look | number | 1500 | Milliseconds the camera holds on the settled dice. 0 to 5000. |
Config.Camera.height | Close look height | number | 0.45 | Metres above the dice for the close look. 0.15 to 2.0. |
Config.Camera.fov | Field of view | number | 45.0 | How wide the close look is, in degrees. Lower is more zoomed in. The camera that follows the dice is never wider than this plus 10. 20 to 90. |
Config.Camera = {
enabled = true,
pushInMs = 1500, -- how long it holds on the settled dice
height = 0.45, -- metres above the dice for the close look
fov = 45.0,
}Sounds
Config.Sounds (menu: Players → Feel → Sounds). The rattle, the throw and the landing, heard by everyone nearby.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.Sounds.range | Range | number | 15.0 | Metres the dice are heard. They get quieter with distance. 2 to 60. |
Config.Sounds.volume | Volume | number | 0.7 | How loud they are up close. 0 (silent) to 1. |
Config.Sounds = {
range = 15.0, -- metres anyone hears the rattle, the throw and the landing
volume = 0.7, -- 0 to 1
}The pot
Config.Pot (menu: Players → Feel → The pot, (Advanced)). The cash props that show the pot: at the edge of where the dice roll on the street, on the ledge of a casino table, and in a corner of a folding table. The largest tier the money in play reaches is shown.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.Pot.tiers | Tiers | table | 5 tiers, below | Each tier has From (amount, the money in play it starts at) and Prop (model). Press Add for more. |
Config.Pot = {
tiers = {
{ amount = 1, model = 'prop_cash_note_01' },
{ amount = 500, model = 'prop_anim_cash_pile_01' },
{ amount = 2500, model = 'prop_cash_pile_01' },
{ amount = 10000, model = 'prop_anim_cash_pile_02' },
{ amount = 40000, model = 'prop_cash_pile_02' },
},
}First-game tips
Config.Tips (menu: Players → Feel → First-game tips). A line on the controls card explaining what the roll means, for new players.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.Tips.enabled | Tips on | boolean | true | Off: nobody sees the tips. |
Config.Tips.games | For the first | number | 3 | How many games each player sees the tips for. The count is kept on each player's own computer. 1 to 50. |
Config.Tips = {
enabled = true,
games = 3, -- shown for a player's first this many games
}World
Dice seller
Config.Store in shared/config/store.lua (menu: World → Store → Dice seller). The seller NPCs, their blips and what they sell. Saving re-creates the sellers straight away.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.Store.enabled | Enabled | boolean | true | Turns the whole seller (NPCs, blips, store) on or off. |
Config.Store.locations | Sellers | table | one seller | One seller stands at each location. Each has a Location (coords; use Place in world, which also captures the heading), Heading, Ped model (model, default 'g_m_y_famca_01') and Scenario (the idle the seller plays, default 'WORLD_HUMAN_SMOKING'). |
Config.Store.interactDistance | Interact distance | number | 2.5 | How close (metres) a player must be for Buy dice to show. 0.5 to 10. |
Config.Store.targetRadius | Target radius | number | 1.5 | The size (metres) of the area round the seller players aim at. 0.5 to 10. |
Config.Store.blip | Map blip | table | see below | Enabled (true), Sprite (682), Colour (2), Scale (0.6) and Label ('store.blip'). The label is a key from locales/en.json, not the text itself: store.blip shows "Dice Seller". |
Config.Store.items | Store items | table | dice and both tables | The rows the store sells, each with Item (the inventory item name), Label, Price (cash per item, 0 to 1,000,000) and Category (which heading it's listed under). |
Config.Store.customItems | Custom items | table | {} (empty) | Your own extra rows, sold alongside the default ones. Same fields as Store items. |
Config.Store.categories | Category tabs | table | Dice, Tables, Other | The headings the store groups items under: ID (what an item's Category points at) and Label. A heading with no items doesn't show. |
Players pay in cash, up to 100 of an item at a time, and must be standing at a seller. If an item isn't in your inventory, or doesn't fit, the purchase is refunded ("You cannot carry that").
Config.Store = {
enabled = true,
locations = {
{ coords = vec3(-55.27, -1751.25, 29.42), heading = 50.0, model = 'g_m_y_famca_01', scenario = 'WORLD_HUMAN_SMOKING' },
},
interactDistance = 2.5,
targetRadius = 1.5,
blip = { enabled = true, sprite = 682, color = 2, scale = 0.6, label = 'store.blip' },
items = {
{ item = 'dice', label = 'Street Dice', price = 25, category = 'dice' },
{ item = 'dice_table', label = 'Dice Table', price = 2500, category = 'tables' },
{ item = 'dice_folding_table', label = 'Folding Dice Table', price = 750, category = 'tables' },
},
customItems = {},
categories = {
{ id = 'dice', label = 'Dice' },
{ id = 'tables', label = 'Tables' },
{ id = 'custom', label = 'Other' },
},
}Police alerts
Config.Dispatch (menu: World → Dispatch → Police alerts, (Advanced)). A chance of a police alert when a street game starts. Off by default. Dice tables never alert.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.Dispatch.chance | Alert chance (0 to 1) | number | 0.0 | The chance, from 0 to 1, that a street game raises an alert when it starts. 0 turns alerts off; 0.25 is one game in four; 1 is every game. |
Config.Dispatch.cooldown | Area cooldown | number | 300 | Seconds after an alert before games within 50 metres of it can alert again. 0 to 3600. |
Config.Dispatch.jobs | Alert jobs | table | { 'police' } | The jobs the alert is sent to. |
Config.Dispatch.code | Call code | string | '10-31' | The call code shown with the alert. |
Config.Dispatch.title | Title | string | 'Illegal Gambling' | The alert's title. |
Config.Dispatch.message | Message | string | 'A caller reports a group shooting dice for money in the street.' | The alert's text. |
Config.Dispatch.priority | Priority | number | 3 | 1 to 5. |
Config.Dispatch.icon | Icon | string | 'fas fa-dice' | A Font Awesome icon name, for dispatch resources that show one. |
Config.Dispatch.blipData | Blip | table | see below | The map blip: Sprite (489), Colour (1), Scale (0.9) and Radius (60 metres). |
Which of these fields show, and how, depends on your dispatch resource. Without one, officers get a notification with the call code and message, and a 30-second blip using the sprite, colour and scale.
Config.Dispatch = {
chance = 0.0, -- 0 to 1 per street game; 0 turns alerts off
cooldown = 300, -- seconds before the same area can alert again
jobs = { 'police' },
code = '10-31',
title = 'Illegal Gambling',
message = 'A caller reports a group shooting dice for money in the street.',
priority = 3,
icon = 'fas fa-dice',
blipData = { sprite = 489, color = 1, scale = 0.9, radius = 60 },
}What you need installed
Alerts go into any dispatch resource o-link supports (ps-dispatch, cd_dispatch, qs_dispatch, lb-tablet and others). With none installed, o-link sends officers a short notification and a 30-second blip on the game.
Advanced
Compatibility
Menu: Advanced → Compatibility.
| Setting | Menu label | Type | Default | What it does |
|---|---|---|---|---|
Config.ModelSwaps | Model replacements | table | {} (empty) | If a model is missing on your game build, the resource warns admins and skips it. Add a row with Replace (from, the model exactly as the warning names it) and With (to, a model your game build has) to use a different one. |
Config.Debug | Debug output | boolean | false | (Advanced) Draws the target areas round the dice seller and street circles (with targeting resources that draw them), so you can see where players need to aim. The server console logs every game whether this is on or not. Leave it off on a live server. |
-- Replace a model the server's game build does not have, without editing any file:
-- { from = 'prop_cash_pile_02', to = 'your_model' }
Config.ModelSwaps = {}
Config.Debug = falseKey bindings
The rules panel opens on H by default. It is not a setting: each player can rebind it in the game's key bindings (FiveM section, "Dice: show or hide the rules"). Several Oxide job resources use H for their waypoints; the dice key does nothing unless the player is sitting in a dice game. All other dice keys (E, Q, left mouse button, BACKSPACE) are fixed game controls.
The die (oxide_dice_street), the casino table (oxide_dice_table) and the street crate (oxide_dice_crate) ship with the resource in stream/models/, so they don't need replacements: a warning about any of them means that folder is missing or damaged (see Troubleshooting). If you do swap the die for another model, it should be a standard die of about the same size. The resource turns each die so the server's number faces up, using the layout in Dice types; a die with its numbers laid out differently would come to rest showing the wrong faces. The folding table (prop_table_03b) and its chairs (prop_chair_08) are base-game props in every current game build. A replacement table or chair of a different shape needs matching numbers in Table models.
Config-File Settings in Detail
These describe the models themselves, so they live only in the files (see Settings That Stay In The Config Files). Most servers never touch them. Edit, save and restart.
Table models
Config.TableModels in shared/config/tables.lua. Each entry is one kind of table. Two ship: standard, the long casino table, and folding, a small folding card table with four chairs. Each kind is placed with its own item (see Dice tables); the round is the same at every kind, and a kind only sets where things are.
| Field | What it does |
|---|---|
label | The name players and admins see for the kind. title and tagLabel are the locales/en.json keys for the controls card's title and the tag over the game. |
model | The table prop. The casino table, oxide_dice_table, comes with the resource; the folding table is the base-game prop_table_03b. lift: how far above the floor the prop stands when its origin isn't on the floor (0.3994 for prop_table_03b). |
item | Which Config.Tables setting names the item that places this kind: item for the casino table, foldingItem for the folding table. |
anims | Which clip set of Animations its players play: table (standing at the rail) or chair (seated). |
holdsDice | true when the shooter's waiting clip holds the dice (the seated sets); at the casino table the hands rest on the rail until the shake. |
surface | The play surface, measured from the floor under the middle of the table: z is its height, hx and hy half its width and length. A walled table (the casino table, y running toward the back wall) adds rail, the height of the lip, wall, how high above the felt the sides and the front stop dice, and backWall, how high the back wall does; a die above a wall's height passes over it. A top without walls (the folding table) adds ax and ay, half the size of the area in the middle where the dice stop, and grip, how quickly a rolling die slows on it compared with felt. Metres. |
pot | Where the cash props stand, in the same measurements: the casino table's ledge, the folding table's corner. |
tag | How high over the surface the tag floats, in metres. |
sound | What a die landing on the surface sounds like: felt, rail or ground. |
throw | pitch: which Config.Throw setting is the lift (tablePitch or foldingPitch). fromHand = true: throws go from the shooter's hand at the middle, as on the street; otherwise they run along the line the spot faces. reach: scales how far a charge carries the dice (the folding table's 0.1 lands them just inside the middle of its top, and they roll on from there). |
camera | The throw camera. back and up: behind the hand along the throw (the casino table). x, y and z: from the shooter's seat, x to their right, y ahead of them (negative is behind) and z over the surface (the folding table). Metres. |
chairs | The chair each seat comes with, placed and packed up with the table: model, lift as the table's, and seat, the height of its seat. Leave it out for a table players stand at. |
slots | Where players stand or sit, in clockwise order seen from above: name, x and y from the middle of the table (metres), and h, the way the player faces. Add shoot = false to a spot that watches and bets but never takes the dice. The dice pass round the spots in this order. chair: where that seat's chair stands (x, y) and the way it's turned (h); prop_chair_08 faces away from its own front, so it turns to the player's heading + 180. |
Config.TableModels = {
standard = {
label = 'Dice table',
title = 'card.title_table',
tagLabel = 'ui_tag_table',
model = 'oxide_dice_table',
item = 'item',
anims = 'table',
surface = { z = 0.800, hx = 0.55, hy = 1.10, rail = 0.105, wall = 0.20, backWall = 0.30 },
-- The pot sits on the felt-lined ledge along the right side.
pot = { x = 0.635, y = 0.0, z = 0.870 },
tag = 0.75,
sound = 'felt',
throw = { pitch = 'tablePitch' },
camera = { back = 1.4, up = 1.25 },
slots = {
{ name = 'S1', x = 0.0, y = -1.58, h = 0.0 },
{ name = 'L1', x = -1.03, y = -0.70, h = 270.0 },
{ name = 'L2', x = -1.03, y = 0.0, h = 270.0 },
{ name = 'L3', x = -1.03, y = 0.70, h = 270.0, shoot = false },
{ name = 'B1', x = 0.0, y = 1.58, h = 180.0, shoot = false },
{ name = 'R3', x = 1.03, y = 0.70, h = 90.0, shoot = false },
{ name = 'R2', x = 1.03, y = 0.0, h = 90.0 },
{ name = 'R1', x = 1.03, y = -0.70, h = 90.0 },
},
},
folding = {
label = 'Folding table',
title = 'card.title_folding',
tagLabel = 'ui_tag_folding',
model = 'prop_table_03b',
lift = 0.3994,
item = 'foldingItem',
anims = 'chair',
holdsDice = true,
surface = { z = 0.7954, hx = 0.535, hy = 0.585, ax = 0.25, ay = 0.30, grip = 0.7 },
pot = { x = 0.38, y = 0.43, z = 0.7954 },
tag = 0.75,
sound = 'felt',
throw = { pitch = 'foldingPitch', fromHand = true, reach = 0.1 },
camera = { x = 0.95, y = -0.7, z = 0.85 },
chairs = { model = 'prop_chair_08', lift = 0.5222, seat = 0.453 },
slots = {
{ name = 'S1', x = 0.0, y = -0.805, h = 0.0, chair = { x = 0.0, y = -0.805, h = 180.0 } },
{ name = 'L1', x = -0.75, y = 0.0, h = 270.0, chair = { x = -0.75, y = 0.0, h = 90.0 } },
{ name = 'B1', x = 0.0, y = 0.805, h = 180.0, chair = { x = 0.0, y = 0.805, h = 0.0 } },
{ name = 'R1', x = 0.75, y = 0.0, h = 90.0, chair = { x = 0.75, y = 0.0, h = 270.0 } },
},
},
}Keep both entries. Tables already placed as a kind you remove stand as the Fallback kind setting's kind on the next start. The folding table's numbers were measured from the two base-game props: change them only if you swap those props for others.
Dice types
Config.DiceTypes in shared/config/dice.lua. One type ships, street. A dice item with no extra information on it uses street.
| Field | What it does |
|---|---|
label | A name for your own reference |
mode | The game the dice start. streetcraps is the only one. |
model | The die prop. The shipped die, oxide_dice_street, comes with the resource. |
size | The die's edge length, in metres |
faces | For each number, which side of the model points up when that number shows |
hand | Where the dice sit in the shooter's hand while they shake: the hand bone (57005 is the right hand) and each die's position and rotation in it |
Config.DiceTypes = {
street = {
label = 'Street dice',
mode = 'streetcraps',
model = 'oxide_dice_street',
size = 0.024,
faces = {
[1] = { 0, 0, 1 },
[2] = { 1, 0, 0 },
[3] = { 0, 1, 0 },
[4] = { 0, -1, 0 },
[5] = { -1, 0, 0 },
[6] = { 0, 0, -1 },
},
hand = {
bone = 57005,
offsets = {
{ pos = { 0.062, 0.0125, -0.048 }, rot = { 0.0, 0.0, 0.0 } },
{ pos = { 0.062, -0.0125, -0.048 }, rot = { 0.0, 0.0, 20.0 } },
},
},
},
}Wiping Everything Back To Defaults
To throw away every change you've made and start over from the shipped defaults:
-
In your database tool (the program or web page you use to look at your server's database, for example HeidiSQL, phpMyAdmin or the database tab in your hosting panel), run this once:
DELETE FROM oxide_settings WHERE resource = 'oxide-dice'; -
Restart
oxide-dice(typerestart oxide-dicein the server console or txAdmin).
On the next start the resource copies every setting from the config files again, exactly like a fresh install. The WHERE resource = 'oxide-dice' part makes sure no other resource's settings are touched. Placed tables are not settings, so they stay. To reset just one setting, use Reset to default in /dice settings instead.
Next Steps
Installation Guide
Step-by-step setup for oxide-dice — required resources, the inventory you need, server.cfg load order, the database, the three items and their images, optional integrations and a check that it works.
Features
How oxide-dice plays and how each part works — the round, betting and fading, side bets, the money, street games, dice tables, the throw and the throw camera, controls, the seller and police alerts.