KingOfTheHill
Description
KingOfTheHill creates capture events. The server chooses a configured location, creates a flagpole and creatures, and awards loot to the player who completes capture.
Players participate by entering the event area on foot and remaining inside the smaller capture radius. The HUD appears automatically and shows individual progress and the number of players in the event area. Each player accumulates their own progress; other players in the area do not pause capture. Leaving the area or entering a vehicle pauses progress without resetting it. A new event location resets progress.
Configuration
Default configuration
KingOfTheHill.json
{
"m_Enable": 0,
"m_Logging": 1,
"m_ShowOnMap": 1,
"m_TimeStartMin": 300,
"m_TimeStartMax": 600,
"m_CaptureTime": 1600,
"m_EventTimeout": 1600,
"m_TimeInterval": 600,
"m_MinPlayerCount": 10,
"m_Locations": [
{
"m_Position": {
"m_N": "Nort-West Airfield",
"m_X": 4497.51,
"m_Y": 10351.19
},
"m_EventRadius": 100,
"m_CaptureRadius": 20,
"m_RewardPools": [
"supplies",
"weapons"
],
"m_Infecteds": [
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Red",
"ZmbM_CitizenASkinny_Red",
"ZmbM_CitizenASkinny_Red",
"Animal_UrsusArctos",
"Animal_CanisLupus_White",
"Animal_CanisLupus_White",
"Animal_CanisLupus_Grey",
"Animal_CanisLupus_Grey",
"Animal_CanisLupus_Grey"
]
},
{
"m_Position": {
"m_N": "Tisy Military",
"m_X": 1564.15,
"m_Y": 14064.82
},
"m_EventRadius": 100,
"m_CaptureRadius": 10,
"m_RewardPools": [
"weapons"
],
"m_Infecteds": [
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Red",
"ZmbM_CitizenASkinny_Red",
"ZmbM_CitizenASkinny_Red",
"Animal_UrsusArctos",
"Animal_CanisLupus_White",
"Animal_CanisLupus_White",
"Animal_CanisLupus_Grey",
"Animal_CanisLupus_Grey",
"Animal_CanisLupus_Grey"
]
},
{
"m_Position": {
"m_N": "Krasno Airfield",
"m_X": 12166.42,
"m_Y": 12644.65
},
"m_EventRadius": 150,
"m_CaptureRadius": 30,
"m_RewardPools": [
"weapons"
],
"m_Infecteds": [
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Red",
"ZmbM_CitizenASkinny_Red",
"ZmbM_CitizenASkinny_Red",
"Animal_UrsusArctos",
"Animal_CanisLupus_White",
"Animal_CanisLupus_White",
"Animal_CanisLupus_Grey",
"Animal_CanisLupus_Grey",
"Animal_CanisLupus_Grey"
]
},
{
"m_Position": {
"m_N": "Chernogorsk",
"m_X": 7196.87,
"m_Y": 3548.71
},
"m_EventRadius": 150,
"m_CaptureRadius": 30,
"m_RewardPools": [
"supplies"
],
"m_Infecteds": [
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Blue",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Brown",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Grey",
"ZmbM_CitizenASkinny_Red",
"ZmbM_CitizenASkinny_Red",
"ZmbM_CitizenASkinny_Red",
"Animal_UrsusArctos",
"Animal_CanisLupus_White",
"Animal_CanisLupus_White",
"Animal_CanisLupus_Grey",
"Animal_CanisLupus_Grey",
"Animal_CanisLupus_Grey"
]
}
],
"m_RewardPools": [
{
"m_Name": "supplies",
"m_Container": "AC_KingOfTheHill_SeaChest",
"m_QuantityMax": 20,
"m_Items": [
{
"m_Class": "Apple",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 2,
"m_Attachments": []
},
{
"m_Class": "BandageDressing",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 2,
"m_Attachments": []
},
{
"m_Class": "WaterBottle",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 3,
"m_Attachments": []
},
{
"m_Class": "VitaminBottle",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 3,
"m_Attachments": []
},
{
"m_Class": "Tomato",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 2,
"m_Attachments": []
},
{
"m_Class": "PainkillerTablets",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 2,
"m_Attachments": []
},
{
"m_Class": "FirstAidKit",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 2,
"m_Attachments": []
},
{
"m_Class": "Rice",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 3,
"m_Attachments": []
},
{
"m_Class": "CharcoalTablets",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 2,
"m_Attachments": []
},
{
"m_Class": "SpaghettiCan",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 2,
"m_Attachments": []
},
{
"m_Class": "Canteen",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 4,
"m_Attachments": []
},
{
"m_Class": "TetracyclineAntibiotics",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 2,
"m_Attachments": []
},
{
"m_Class": "BakedBeansCan",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 2,
"m_Attachments": []
},
{
"m_Class": "Heatpack",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 2,
"m_Attachments": []
},
{
"m_Class": "TacticalBaconCan",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 1,
"m_Attachments": []
}
]
},
{
"m_Name": "weapons",
"m_Container": "AC_KingOfTheHill_SeaChest",
"m_QuantityMax": 20,
"m_Items": [
{
"m_Class": "Battery9V",
"m_Chance": 90,
"m_StackMin": 75,
"m_StackMax": 100,
"m_QuantityMax": 1,
"m_Attachments": []
},
{
"m_Class": "M68Optic",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 1,
"m_Attachments": []
},
{
"m_Class": "M68Optic",
"m_Chance": 25,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 1,
"m_Attachments": [
"Battery9V"
]
},
{
"m_Class": "Mag_STANAG_30Rnd",
"m_Chance": 75,
"m_StackMin": 50,
"m_StackMax": 100,
"m_QuantityMax": 3,
"m_Attachments": []
},
{
"m_Class": "Mag_AKM_30Rnd",
"m_Chance": 75,
"m_StackMin": 50,
"m_StackMax": 100,
"m_QuantityMax": 3,
"m_Attachments": []
},
{
"m_Class": "Mag_FAL_20Rnd",
"m_Chance": 75,
"m_StackMin": 50,
"m_StackMax": 100,
"m_QuantityMax": 3,
"m_Attachments": []
},
{
"m_Class": "M4_RISHndgrd",
"m_Chance": 75,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 5,
"m_Attachments": []
},
{
"m_Class": "AK_WoodHndgrd",
"m_Chance": 75,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 5,
"m_Attachments": []
},
{
"m_Class": "M4_OEBttstck",
"m_Chance": 75,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 5,
"m_Attachments": []
},
{
"m_Class": "AK_WoodBttstck",
"m_Chance": 75,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 5,
"m_Attachments": []
},
{
"m_Class": "Fal_FoldingBttstck",
"m_Chance": 75,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 5,
"m_Attachments": []
},
{
"m_Class": "M4_Suppressor",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 5,
"m_Attachments": []
},
{
"m_Class": "AK_Suppressor",
"m_Chance": 50,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 5,
"m_Attachments": []
},
{
"m_Class": "M4A1",
"m_Chance": 40,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 1,
"m_Attachments": []
},
{
"m_Class": "AKM",
"m_Chance": 30,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 1,
"m_Attachments": []
},
{
"m_Class": "FAL",
"m_Chance": 20,
"m_StackMin": 0,
"m_StackMax": 100,
"m_QuantityMax": 1,
"m_Attachments": []
}
]
}
],
"m_Messages": {
"m_Before": "New event will start in %TimeMinutes% minutes.",
"m_After": "Event has been started at %LocationName%.",
"m_Count": "Event not started due to lack of players.",
"m_Claimed": "The event is at more than %PercentProgress%% of progress.",
"m_Winner": "Player %PlayerName% completed the %LocationName% event.",
"m_Failed": "Event ended with no player victorious."
},
"m_NotificationTime": 10,
"m_NotificationInterval": 300,
"m_NotificationClaimedInChat": 0,
"m_Webhook": ""
}Options
Times are expressed in seconds and radii in metres. Review the Chernarus coordinates for the server map. Use positive capture, timeout and interval values, a start maximum greater than the minimum, and nonempty location and reward-pool lists.
| Option | Type | Description |
|---|---|---|
m_Enable | bool | With 1, enables events, the HUD and module commands. With 0, disables them. |
m_Logging | bool | With 1, logs event starts and reward claims. With 0, disables these module records. |
m_ShowOnMap | bool | With 1, publishes the event area under Events in AC Map. With 0, does not publish it. The marker is removed when the active event ends. |
m_TimeStartMin | int | Inclusive minimum random delay between the pre-event announcement and the automatic population check. |
m_TimeStartMax | int | Exclusive maximum for that random delay. |
m_CaptureTime | int | Base time to reach full individual progress while remaining inside the capture radius. Must be positive for progress to increase. |
m_EventTimeout | int | Timeout without player-presence updates from the event area. Those updates reset the timer; this is not a fixed maximum event duration. |
m_TimeInterval | int | Wait before scheduling the first automatic announcement and before the next cycle after completion, failure or an insufficient player count. The random start delay follows this wait. |
m_MinPlayerCount | int | Minimum connected-player count checked after the automatic start delay. If met, the event is initialized about 2 seconds later; otherwise, another cycle is scheduled. The manual set action bypasses this check. |
m_Locations | array<object> | Locations available to events. One is selected at random when an event is initialized. |
m_RewardPools | array<object> | Reward pools stored in this module's configuration, including their containers and item lists. |
m_Messages | object | Public announcement templates, described below. |
m_NotificationTime | int | On-screen notification display duration. Requires the Notification module for display. |
m_NotificationInterval | int | Interval between progress announcements after presence has been detected in the event area. With 0, disables these periodic announcements. |
m_NotificationClaimedInChat | bool | With 1, sends progress announcements through Chat; with 0, displays them as notifications. Other event announcements remain notifications. |
m_Webhook | string | Discord webhook URL for nonempty public announcements. Leave empty to disable external delivery. |
AC Map is used when m_ShowOnMap=1, and Chat is used for administrative commands and progress announcements configured for chat. Configure the webhook only when external delivery is needed.
m_Locations[]
| Option | Type | Description |
|---|---|---|
m_Position | object | Name and horizontal coordinates of the event centre. |
m_EventRadius | int | Radius used for the HUD, player count, presence updates and creature spawning. |
m_CaptureRadius | int | Radius around the centre where individual capture progress increases. Keep it within the event radius. |
m_RewardPools | array<string> | Names of this module's reward pools. One name is selected at random; if the list is empty or that name is not found, the module selects from all configured pools. |
m_Infecteds | array<string> | Creature classes created for the event, including infected or animals. Each entry creates one creature at a random position in the event radius; repeated names create additional creatures. |
The location centre determines the flagpole position on the ground. Presence inside the larger event radius can keep the event active even when no player is capturing. The progress announcement uses the highest individual percentage reported to the server during the event.
m_Locations[].m_Position
| Option | Type | Description |
|---|---|---|
m_N | string | Location name used in event announcements. |
m_X | float | Horizontal X coordinate. |
m_Y | float | Second horizontal coordinate, corresponding to the DayZ Z axis. Height is obtained from the terrain. |
m_RewardPools[]
| Option | Type | Description |
|---|---|---|
m_Name | string | Pool identifier referenced by m_Locations[].m_RewardPools. Use unique names. |
m_Container | string | Item class created to hold the reward. The distributed configuration uses AC_KingOfTheHill_SeaChest, with a 10 × 100 inventory. |
m_QuantityMax | int | Positive total limit of item selections for one reward. A selected entry consumes quota even if item creation fails. |
m_Items | array<object> | Items, chances, individual limits, stack contents and attachments for this pool. |
Rewards are defined here rather than by names from the separate Rewards catalog. The container is created near the location centre, and the player must collect its contents. Starting the next automatic event deletes the previous tracked container and any remaining contents. Reloading the module also deletes the currently tracked flagpole and container.
m_RewardPools[].m_Items[]
| Option | Type | Description |
|---|---|---|
m_Class | string | Existing item, weapon, ammunition or magazine class to create. |
m_Chance | int | Percentage chance for each attempt, from 0 to 100. |
m_StackMin | int | Minimum contents as a percentage of the item's maximum quantity. Use 0 to 100 and do not exceed m_StackMax. |
m_StackMax | int | Maximum contents percentage, between m_StackMin and 100. Applied to ammunition or item quantity, not item health. |
m_QuantityMax | int | Maximum number of selections of this entry per reward; 0 excludes it from selection. |
m_Attachments | array<string> | Attachment classes to create on the selected item, subject to compatible slots. Use [] for none. |
The helper works on a copy of the item list, so quotas renew for each reward. Entries are attempted in list order over multiple passes; low chances and creation failures can result in fewer items than the total limit. Items with a maximum quantity of one receive no stack adjustment.
m_Messages
An empty template suppresses that announcement and its webhook delivery.
| Option | Type | Description |
|---|---|---|
m_Before | string | Announcement of the random wait before the automatic population check. |
m_After | string | Event initialized at the chosen location. |
m_Count | string | Automatic start refused because the connected-player count was too low. |
m_Claimed | string | Periodic progress announcement controlled by m_NotificationInterval. |
m_Winner | string | Player who completed the event. |
m_Failed | string | Event ended after the presence-update timeout. |
| Placeholder | Value |
|---|---|
%LocationName% | Location name while a location is active, such as in start, progress and winner messages. |
%PlayerName% | Winner's name in m_Winner. |
%TimeMinutes% | Wait expressed in minutes in m_Before. |
%PercentProgress% | Highest reported individual percentage in m_Claimed; keep the following % in the template to display the percent sign. |
Configuration classes
The event creates the following objects automatically. They are not selectable fields in the JSON and should not be added to ordinary loot spawning.
| Class | Purpose |
|---|---|
AC_KingOfTheHill_Pole | Event flagpole and smoke indicator. |
AC_KingOfTheHill_Flag | Flag created automatically on the event flagpole. |
Types
The reward chest is created by the event. Outside that flow, a chest not associated with the mission is automatically deleted after about 10 seconds; an economy entry alone does not make it persist.
types.xml
<type name="AC_KingOfTheHill_SeaChest">
<lifetime>3888000</lifetime>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0" />
</type>Commands
The module registers /kingofthehill, /king and /koth when enabled. All three accept the same actions. Chat checks the permission matching the alias used: command.kingofthehill, command.king or command.koth; root grants all three.
/kingofthehill start
Ends an active event and schedules another cycle after m_TimeInterval, followed by the random start delay and population check. If no event is active, this action does not create a new schedule or restart an event previously stopped with stop; use set for an immediate event or reload the module.
- Syntax:
/kingofthehill start - Arguments: required
startaction. - Permission:
command.kingofthehillorroot. With/king startor/koth start, use the matching alias permission. - Example:
/kingofthehill start
/kingofthehill set
Cancels pending automatic callbacks and initializes an event immediately at a random configured location, bypassing the minimum player count and start delay. The optional name shown in the command's error message is not used by the implementation; it does not select a location.
- Syntax:
/kingofthehill set - Arguments: required
setaction; no location argument is supported for selection. - Permission:
command.kingofthehillorroot. With/king setor/koth set, use the matching alias permission. - Example:
/kingofthehill set
This action does not delete previously created flagpoles or reward containers before creating the new event. Avoid repeated use while objects from a previous event remain.
/kingofthehill stop
Stops the active capture and cancels pending automatic callbacks. The event marker is removed and the current flagpole's smoke is stopped. This action leaves the created flagpole, reward container and creatures in the world; it does not schedule the next event.
- Syntax:
/kingofthehill stop - Arguments: required
stopaction. - Permission:
command.kingofthehillorroot. With/king stopor/koth stop, use the matching alias permission. - Example:
/kingofthehill stop
/reload kingofthehill
Reloads configuration through Commands, removes the currently tracked flagpole and reward container with their remaining contents, and resets the event cycle. Previously spawned creatures are not removed by this reload routine.
- Syntax:
/reload kingofthehill - Arguments:
kingofthehillidentifies the module to reload. - Permission:
command.reloadorroot. - Example:
/reload kingofthehill
Permissions
Configure administrative groups as described in Permissions. Each alias has its own chat permission, and each of those permissions grants all three actions for that alias.
| Permission | Action |
|---|---|
command.kingofthehill | Use start, set and stop through /kingofthehill. |
command.king | Use the same actions through /king. |
command.koth | Use the same actions through /koth. |
command.reload | Reload the module through /reload kingofthehill. |
root | Satisfy every permission check above. |
