Configuration
All settings live in Config.lua. It is shared by the client and the server, so restart kivo-boxing after you change it.
The file has three parts:
- General:
Config.Debug - Arena and NPC:
Config.Settings - Match and fight rules:
Config.FightSettings
General
Section titled “General”Config.Debug = true| Option | Type | Default | Description |
|---|---|---|---|
Config.Debug |
boolean | true |
Turns on debug mode. The comment in the file reads: “Set to true to enable debug commands (Npc vs Player/Bot)”. |
When Config.Debug is true:
- Signing up at the bouncer starts a match right away against an AI opponent. No second player is needed, and the sign-up search time does not apply.
- The bouncer’s target option is labelled
Debug: Start Bot Fightinstead ofSign up for Fight. - The ring and spectator zones are drawn as outlines in the world.
- The server and client consoles print extra lines that start with
[kivo-boxing].
Arena and NPC
Section titled “Arena and NPC”Config.Settings controls where the bouncer stands and where the ring and spectator areas are. For how to find the right numbers, see Ring and zone setup.
| Option | Type | Default | Description |
|---|---|---|---|
NpcModel |
model hash | `s_m_m_bouncer_01` |
Ped model of the bouncer. Write the model name between backticks. |
NpcCoords |
vector4 |
vector4(-1241.6947, -1582.5774, 4.0972, 338.9783) |
Position and heading (x, y, z, heading) of the bouncer. |
BoxingArenaCoords |
list of vector2 |
4 points, see below | Corner points of the ring area (polygon). |
ArenaMinZ |
number | 0.0 |
Lowest height that counts as inside the ring area. |
ArenaMaxZ |
number | 10.0 |
Highest height that counts as inside the ring area. |
BoxingSpectate |
list of vector2 |
4 points, see below | Corner points of the spectator area (polygon). |
SpectateMinZ |
number | 0.0 |
Lowest height that counts as inside the spectator area. |
SpectateMaxZ |
number | 12.0 |
Highest height that counts as inside the spectator area. |
Notes:
NpcModelmust be a valid ped model. An invalid name stops the client setup, and neither the bouncer nor the zones load. See Examples and troubleshooting.- The bouncer is placed 1.0 unit lower than the Z value you enter. Stand where the bouncer should stand, copy your own coordinates, and use them as they are.
BoxingArenaCoordsandBoxingSpectateusevector2points (x and y only). The height limits come from the Min and Max Z options.- Points must follow the outline of the area in order, either clockwise or counter-clockwise. At least 3 points are needed. Do not let the lines cross.
Default ring area:
BoxingArenaCoords = { vector2(-1243.4825439453, -1601.1756591797), vector2(-1239.0070800781, -1597.9293212891), vector2(-1242.2745361328, -1593.6085205078), vector2(-1246.7392578125, -1596.7514648438),},Default spectator area:
BoxingSpectate = { vector2(-1240.1257324219, -1582.3189697266), vector2(-1258.1187744141, -1594.9791259766), vector2(-1244.8070068359, -1614.8786621094), vector2(-1226.3631591797, -1600.2794189453),},Match and fight rules
Section titled “Match and fight rules”Config.FightSettings controls matchmaking, fighter positions and round rules.
| Option | Type | Default | Description |
|---|---|---|---|
MaxOponentSearchTime |
seconds | 10 |
How long a signed-up player waits for an opponent before the sign-up is cancelled. |
Player1StartingLocation |
vector4 |
vector4(-1242.5548, -1594.8619, 4.3083, 169.3889) |
Corner for the first player who signed up (x, y, z, heading). |
Player2StartingLocation |
vector4 |
vector4(-1243.3414, -1599.8231, 4.3083, 349.2167) |
Corner for the second player (x, y, z, heading). |
TotalRounds |
whole number | 2 |
Standard rounds per match. |
ProlongationRounds |
whole number | 2 |
Additional rounds if a draw occurs. |
RoundDuration |
minutes | 2 |
Length of each round. Use a whole number. |
OutSideZoneTimer |
seconds | 10 |
Seconds a fighter may stay outside the ring before the match is forfeited. |
Matchmaking
Section titled “Matchmaking”MaxOponentSearchTime starts when the first player signs up. If a second player signs up before the time runs out, the match starts. If not, the first player gets a “No opponent found” notification and has to sign up again. On a quiet server, raise this value.
The first player to sign up uses Player1StartingLocation. The second uses Player2StartingLocation. In debug mode the AI opponent uses Player2StartingLocation.
Round rules
Section titled “Round rules”- Every match plays at least
TotalRoundsrounds. - A round is won by a knockout. If the round timer reaches zero before anyone is knocked out, nobody scores that round.
- After round number
TotalRoundshas finished, a fighter wins the match if they have won at least half of the standard rounds (rounded up) and more rounds than their opponent. - If nobody has won yet, the match continues with extra rounds, one at a time, up to
ProlongationRoundsextra rounds. The same check runs after each one. - After the last extra round, the fighter with more round wins takes the match.
- Set
ProlongationRounds = 0to have no extra rounds.
TotalRounds |
Round wins needed | Example |
|---|---|---|
1 |
1 | One knockout decides the match. |
2 |
1 | After 2 rounds, 1 to 0 or 2 to 0 wins. A 1 to 1 result goes to extra rounds. |
3 |
2 | Three rounds are played. 2 to 1 or 3 to 0 wins. |
5 |
3 | Five rounds are played. A fighter needs at least 3 round wins and more than the opponent. |
Leaving the ring
Section titled “Leaving the ring”If a fighter leaves the ring area, a message on screen counts down OutSideZoneTimer seconds. If the fighter does not get back inside the ring area in time, the match is forfeited and the opponent wins. Walking back in stops the countdown.
Integration points
Section titled “Integration points”This version does not publish exports or events for other scripts. Everything an admin or developer can change is in Config.lua, and the script adapts to these external resources by itself:
| Integration point | How to adapt |
|---|---|
| Framework | Run es_extended, qb-core or qbx_core. The script detects it by resource name. |
| Target system | Run ox_target or qb-target. The bouncer gets the sign-up option from whichever one is running. |
| Notifications | Run ox_lib for ox_lib notifications. Without it, chat messages are used. |
| Ring location | BoxingArenaCoords, ArenaMinZ, ArenaMaxZ, Player1StartingLocation, Player2StartingLocation. |
| Spectator area | BoxingSpectate, SpectateMinZ, SpectateMaxZ. |
| Bouncer | NpcModel, NpcCoords. |
| Match rules | TotalRounds, ProlongationRounds, RoundDuration, OutSideZoneTimer, MaxOponentSearchTime. |
Betting, entry fees and rewards are not available through Config.lua.
Fixed behaviour
Section titled “Fixed behaviour”These are not configurable:
- Before each round, fighters are frozen and cannot be hurt during a 5 second countdown.
- Fighters start every round with full health and no armour.
- All on-screen texts and notifications are in English.
- The scoreboard design and position cannot be changed from
Config.lua. - There is one arena, and one match at a time.
