Minefield
Description
Minefield creates minefields in circular areas defined by the server and warns players when entering, remaining in and leaving those areas. Mines are randomly distributed on the terrain and begin the game’s native activation sequence after creation.
The configured quantity is a target: water, obstacles, map boundaries and minimum spacing between mines may prevent all mines from being created. Detonated or removed mines are not automatically replaced.
Configuration
Default configuration
Minefield.json
{
"m_Enable": 0,
"m_Zones": [
{
"m_Name": "",
"m_Position": {
"m_X": 8228.21,
"m_Y": 519.3,
"m_Z": 9033.19,
"m_R": 300.0
},
"m_Quantity": 10
}
],
"m_Messages": {
"m_Enter": "You are in a minefield.",
"m_Exit": "You just left a minefield."
},
"m_NotificationTime": 10,
"m_NotificationDelay": 60,
"m_NotificationInChat": 0
}Options
| Option | Type | Description |
|---|---|---|
m_Enable | bool | With 1, creates minefields and enables warnings; with 0, creates neither mines nor warnings. Initialization clears the module’s previous mines before checking this option. |
m_Zones | array<object> | List of up to 64 circular areas. With [], creates no minefields. The sum of m_Quantity across all areas must not exceed 2000 mines. |
m_Messages | object | Warning text for entering, remaining in and leaving a minefield. |
m_NotificationTime | int | Visual notification duration in seconds, from 1 to 300. Does not control chat message duration. |
m_NotificationDelay | int | Interval in seconds between reminders inside the minefield, from 0 to 86400. With 0, disables reminders; entry and exit warnings remain immediate. |
m_NotificationInChat | bool | With 1, sends warnings through Chat’s game-message channel; with 0, uses visual notifications from Notification. |
An invalid configuration prevents all minefields from being created and produces a log entry. Limits are validated; out-of-range values are not automatically adjusted.
m_Zones[]
| Option | Type | Description |
|---|---|---|
m_Name | string | Area name used in creation logs. It is not automatically included in messages to players. |
m_Position | object | Area center and radius, in meters. Adjust the coordinates to the server’s map. |
m_Quantity | int | Desired number of mines in the area, from 1 to 500. The log reports how many were created compared with the requested quantity. |
Positions are randomly selected within the circle, at terrain height. Water, obstacles and positions less than 2 meters from another mine created by the module are rejected. Creation takes place gradually, with a limited number of attempts per area; unsuitable terrain may result in fewer mines than requested.
Warnings treat overlapping areas as a single minefield: moving between them without leaving their union does not repeat the entry warning or produce an intermediate exit warning. Player detection extends 500 meters vertically, centered on the terrain height at the area’s center.
m_Zones[].m_Position
| Option | Type | Description |
|---|---|---|
m_X | float | Horizontal X coordinate of the center, greater than or equal to 0 and less than the map size. |
m_Y | float | Vertical coordinate retained in the configuration. Mine placement and the height of the area’s center use the terrain surface. |
m_Z | float | Horizontal Z coordinate of the center, greater than or equal to 0 and less than the map size. |
m_R | float | Minefield radius in meters, greater than 0 and less than or equal to 10000. |
m_Messages
| Option | Type | Description |
|---|---|---|
m_Enter | string | Text sent on entry and repeated for reminders while inside the minefield. With "", disables these warnings. |
m_Exit | string | Text sent on leaving the minefield. With "", disables this warning. |
With m_NotificationInChat set to 1, Chat must be enabled and the player’s preferences must allow game messages. With 0, warnings use the title MINEFIELD. Reminders stop on exit, death or disconnection.
Commands
/reload minefield
Recreates minefields using the current configuration through the Commands module.
- Syntax:
/reload minefield - Arguments:
minefieldidentifies the module to reload. - Permission:
command.reloadorrootwhen run through chat. - Example:
/reload minefield
Reloading removes the triggers and all existing mines belonging to the module, including mines disarmed, moved or picked up by players. It then creates a new population if the module is enabled and the configuration is valid. Ordinary game mines are not removed by this cleanup. Disabling the module and reloading it also removes its existing mines.
