War Zones: Domination

This is a team territory game. Join a team, capture zones around the map, and defend them to earn points. The HUD shows your team, capture progress, announcements, and a scorecard with team scores, players, and territory ownership.

{:links-list}

REQUIREMENTS

  • FiveM with OneSync enabled.
  • PolyZone, using that exact resource name, started before CTF.

PolyZone is a required manifest dependency even if usePolyZone=false. CTF does not require a framework, inventory, or database.

INSTALLATION

  1. Open the downloaded ZIP and place the BigDaddy-CTF resource folder in your server's resources directory.
  2. Add your product key from your Big Daddy Scripts account to settings.ini under [licensing]:

    ini key1=YOUR_PRODUCT_KEY

  3. Configure settings.ini, Teams.json, and CaptureZones.json inside the resource folder.

  4. Start PolyZone before CTF in server.cfg:

    cfg ensure PolyZone ensure BigDaddy-CTF

  5. Configure the administrator ACE permission if you want to restrict score resets.

DO NOT RENAME THE FOLDER. Keep the resource name BigDaddy-CTF so configuration loading, licensing, and integrations work correctly.

{:is-danger}

Restart the resource after changing configuration. Keep the supplied DLLs, licensing helper, Lua, JSON, and NUI files together.

CONFIGURATION

Settings are in settings.ini. The defaults below match the supplied configuration.

SETTING DEFAULT DESCRIPTION
[licensing]
key1 none Your product key.
[settings]
usePolyZone true Loads polygon territories from CaptureZones.json. Leave as true because it is the only option at this time
defaultTimeToCapture 20 Seconds required to capture a polygon zone. Minimum effective value is 1.
useAcePermissions true Requires the configured ACE permission to use /resetscore.
acePermission command ACE permission checked by the server on each score-reset request. Use a nonempty permission name to restrict resets.
allowSeeMyTeam true Enables /seemyteam to temporarily mark nearby living teammates.
debug false Enables diagnostic output. Zone debug drawing is configured separately in CaptureZones.json.
[scoring]
capturePoints 10 Points awarded for an eligible capture. Minimum effective value is 0.
lossPenalty 3 Points deducted from the previous owner on an eligible enemy capture. Minimum effective value is 0. Scores can become negative.
holdingIntervalMinutes 15 Minutes of eligible holding time between payouts for each owned zone. Minimum effective value is 1.
holdingPoints 1 Points per completed holding interval before the boosted rate applies. Minimum effective value is 0.
boostAfterMinutes 60 Holding-time threshold for boosted payouts. With the defaults, the payout at 60 minutes still uses the normal rate; the first boosted payout is at 75 minutes. Minimum effective value is 0.
boostedHoldingPoints 3 Points per holding interval after the boost threshold. Minimum effective value is 0.
captureCooldownMinutes 5 Capture-reward cooldown for each team in each zone. Does not prevent capturing or changing ownership. Minimum effective value is 0.
[balancing]
enabled true Checks team populations before allowing a join or transfer.
maxImbalancePercent 20 Allowed percentage above an equal population share, clamped to 0-100. With two teams, 20 allows a projected share of up to 60%; with three teams, up to 40%.

Leave the supplied DesyncKey unchanged.

Administrator permission

The supplied configuration uses acePermission=command. To use a dedicated permission, change the existing values under [settings]:

useAcePermissions=true
acePermission=bigdaddy.ctf.admin

Then grant that ACE to your administrator group in server.cfg:

add_ace group.admin bigdaddy.ctf.admin allow

Players must belong to that group through your server's principal assignments. Setting useAcePermissions=false, or leaving acePermission empty, allows any connected player to reset scores.

Teams.json

The supplied teams are CIVS (Civilian Resistance) and MILITARY. Edit Teams.json to change team IDs, names, or descriptions:

[
    { "id": 1, "name": "CIVS", "description": "Civilian Resistance" },
    { "id": 2, "name": "MILITARY", "description": "Military" }
]

Use unique positive integer IDs and unique names. Keep names to a single command argument, such as RED_TEAM; /jointeam reads only the first argument and matches names without regard to capitalization. Descriptions may contain spaces.

Team order determines map-marker colors. The first six teams use red, blue, green, yellow, pink, and purple, respectively. Set up teams in the order you want those colors assigned. Join availability is calculated from player populations; it is not a fixed open/closed setting in this file.

CaptureZones.json

The supplied file contains nine territories: Wind Farm, La Fuenta, Kortz Pacific Bluffs, Baytree Farm, Observatory, Refinery, Buen Vino, Casino, and NOOSE.

Each entry defines a unique zone name, polygon vertices in boundary order, lower and upper height limits, and optional debug drawing. The client and server both use this file. Edit it rather than adding zones directly to polyzones.lua.

The following illustrates one zone entry; replace the coordinates and heights with your intended location:

[
    {
        "name": "Example Territory",
        "points": [
            { "x": 100.0, "y": 100.0 },
            { "x": 150.0, "y": 100.0 },
            { "x": 150.0, "y": 150.0 },
            { "x": 100.0, "y": 150.0 }
        ],
        "minZ": 20.0,
        "maxZ": 60.0,
        "debugGrid": false
    }
]

Keep at least one zone, give every zone a nonempty unique name, and supply at least three vertices. minZ must not exceed maxZ. Players must be inside both the polygon and its height limits to count toward capture. Each polygon uses defaultTimeToCapture; the supplied polygon format does not provide individual capture durations.

Use valid JSON with double quotes, no comments, and no trailing commas. Set a zone's debugGrid=true when checking its boundary in game, then turn it off when finished.

HOW TO PLAY

  1. Join a team with /jointeam CIVS or /jointeam MILITARY.
  2. Enter an unowned or enemy territory. Capture starts automatically when your team has more living registered players inside than any other team. There is no interaction key to press.
  3. Keep the player who started the capture alive and inside the zone for the full capture duration, and maintain your team's lead. Teammates in the zone receive the progress display.
  4. When the server confirms completion, the zone changes owner, its map marker updates, and a capture announcement appears.
  5. Defend owned zones to earn holding points. Use /scorecard to check scores and ownership.

A tie for the largest team count prevents capture. If a capture is already running, a tie or loss of the lead cancels it. The attempt also cancels if its initiating player leaves, dies, disconnects, or switches teams. A later valid attempt starts a new timer. Players without a registered team do not count toward occupation.

Scoring and holding territory

With the default settings, a rewarded capture gives the capturing team 10 points and deducts 3 points from the previous owner, if there was one.

The five-minute reward cooldown is tracked separately for each team in each zone. Recapturing during that team's cooldown still transfers ownership and resets the holding streak, but awards neither the capture points nor the previous owner's loss penalty. An unrewarded recapture does not extend the cooldown.

Each owned zone earns 1 point every 15 minutes of eligible holding time, including the payout at 60 minutes. It then earns 3 points at 75 minutes and every 15 minutes thereafter. These rewards accumulate separately for each zone, and defenders do not need to remain inside it.

Holding time pauses when the owning team has no connected registered members. Ownership and existing scores remain, and the streak resumes when a member returns if the team still owns the zone. Other teams can capture that territory while its owner is offline. Losing a zone resets its holding streak.

Scores can become negative. /resetscore sets scores to zero while retaining territory ownership, holding progress, and capture-reward cooldowns. Scores, ownership, cooldowns, and memberships are session state and are not saved across resource or server restarts. Players who disconnect must join a team again after reconnecting.

Team balancing

Balancing counts connected registered team members. Transfers are evaluated after removing the joining player's old membership. Smallest teams remain available, and a one-player population difference is permitted so small or odd player counts do not block joining.

The scorecard shows OPEN TO JOIN or CLOSED TO JOIN for the player requesting it, along with paused holding status for teams with no connected members. A rejected join displays a message and available alternative teams. Disconnects do not force other players to switch teams or remove territory ownership. Set [balancing] enabled=false to allow unrestricted joins.

COMMANDS

COMMAND ARGUMENTS DESCRIPTION
/jointeam Team name Joins or switches to the named team if balancing permits it. Example: /jointeam CIVS.
/scorecard none Requests current scores, player counts, territory ownership, and join availability. The panel hides after 13 seconds; run the command again to refresh it.
/resetscore none Sets all team scores to zero. Requires the configured ACE when permissions are enabled. Retains ownership, holding progress, and cooldowns.
/seemyteam none Displays markers above nearby living teammates within 300 units for 10 seconds. Requires allowSeeMyTeam=true.