Ring and zone setup
Kivo Boxing has one arena. It is made of four things, all set in Config.lua:
| Part | Options | What it does |
|---|---|---|
| Ring area | BoxingArenaCoords, ArenaMinZ, ArenaMaxZ |
Fighters must stay inside it. Leaving it starts the forfeit countdown. |
| Spectator area | BoxingSpectate, SpectateMinZ, SpectateMaxZ |
Players inside it see the scoreboard while a match is running. |
| Fighter corners | Player1StartingLocation, Player2StartingLocation |
Where each fighter is placed at the start of every round. |
| Bouncer | NpcModel, NpcCoords |
The NPC players use to sign up. |
The script does not create a ring model or props. Build or install the ring in your map first, then point the config at it.
Moving the arena to your own ring
Section titled “Moving the arena to your own ring”Follow these steps in order. In the code examples, replace x, y, z, heading, min_z, max_z and the numbered points with your own numbers.
-
Turn on debug mode while you work:
Config.Debug = trueThe ring and spectator areas are drawn as outlines in the world, so you can see your changes.
-
Stand in your ring and note your coordinates. Use any coordinate tool you already have on your server. PolyZone also ships with its own zone creator tool, see the PolyZone documentation for how to use it.
-
Set the fighter corners. Stand at the spot where each fighter should start and copy your coordinates and heading:
Player1StartingLocation = vector4(x, y, z, heading),Player2StartingLocation = vector4(x, y, z, heading),Use opposite headings so the fighters face each other. The headings should differ by about 180 degrees. The defaults are
169.3889and349.2167. -
Set the ring area. Walk around the ring and note the x and y of each corner, in order. Write them as
vector2points:BoxingArenaCoords = {vector2(x1, y1),vector2(x2, y2),vector2(x3, y3),vector2(x4, y4),},ArenaMinZ = min_z,ArenaMaxZ = max_z,Make the area slightly larger than the ring floor so a fighter who is pushed against the ropes is still inside.
-
Set the spectator area the same way. Draw it around the area where people stand to watch. It is allowed to cover the ring too.
BoxingSpectate = {vector2(x1, y1),vector2(x2, y2),vector2(x3, y3),vector2(x4, y4),},SpectateMinZ = min_z,SpectateMaxZ = max_z, -
Place the bouncer. Stand where he should stand, facing the way he should face, and copy your coordinates:
NpcCoords = vector4(x, y, z, heading),The script places him 1.0 unit lower than the Z you enter, which matches a standing player’s coordinate height.
-
Restart
kivo-boxingand test with two players, or with one player in debug mode. -
When it works, set
Config.Debug = false.
Rules for good zones
Section titled “Rules for good zones”- Use at least 3 points. Four points are enough for a rectangular ring.
- List the points in order around the edge. Do not jump from one corner to the opposite corner, or the shape will fold over itself.
- Both fighter corners must be inside the ring area, and their Z values must be between
ArenaMinZandArenaMaxZ. If a corner is outside the area, the forfeit countdown may not work as expected. - The ring floor, the fighters’ feet and a knocked-down fighter must all fall between the Min and Max Z values. If your ring is on an upper floor of a building, raise both values.
- Keep the spectator area clear of other places where players hang around. Anyone inside it sees the scoreboard during a match.
- Keep the bouncer outside the ring area. In the defaults he stands just outside both the ring area and the spectator area.
Z values
Section titled “Z values”The Z options are heights in game units.
| Option | Default | Notes |
|---|---|---|
ArenaMinZ |
0.0 |
Fighters standing below this height count as outside the ring. |
ArenaMaxZ |
10.0 |
Fighters above this height count as outside the ring. |
SpectateMinZ |
0.0 |
Players below this height do not see the scoreboard. |
SpectateMaxZ |
12.0 |
Players above this height do not see the scoreboard. |
The default fighter corners are at Z 4.3083, so the defaults leave room above and below. For a ring at a very different height, shift all four values.
Sounds
Section titled “Sounds”The round bell and the knockout sound are played only for players close to the default ring location (about 35 meters from -1242.8, -1597.1). They are not tied to your config values. If you move the arena far from the default, players at the new ring will not hear these two sounds. The victory and defeat sounds still play for the fighters.
One arena only
Section titled “One arena only”You cannot add a second ring through Config.lua. BoxingArenaCoords and BoxingSpectate each hold one polygon, and one match runs at a time. While a match is running, anyone else who signs up sees an “Arena Busy” notification and is not queued.
