Skip to content

Prison ​

Description ​

Allows administrators to imprison players with a sentence measured in delivered stones. Prisoners wait in a cell, collect a pickaxe, mine and deposit their own stones to earn release. Sentences persist by Steam ID through disconnects, death and server restarts, and can be assigned to offline players.

Configuration ​

Default configuration ​

Prison.json
json
{
    "m_Enable": 0,
    "m_Logging": 1,
    "m_CellWaitSeconds": 60,
    "m_ToolCooldownSeconds": 1200,
    "m_MaxSentenceStones": 10000,
    "m_PreserveInventory": 1,
    "m_ReturnPosition": {
        "m_X": 2811.787354,
        "m_Y": 26.012426,
        "m_Z": 1216.994995
    },
    "m_ReleasePosition": {
        "m_X": 2735.96,
        "m_Y": 24.46,
        "m_Z": 1284.2
    },
    "m_Boundary": [
        {
            "m_X": 2834.36,
            "m_Y": 0,
            "m_Z": 1218.03
        },
        {
            "m_X": 2827.1,
            "m_Y": 0,
            "m_Z": 1233.74
        },
        {
            "m_X": 2782.55,
            "m_Y": 0,
            "m_Z": 1308.54
        },
        {
            "m_X": 2740.74,
            "m_Y": 0,
            "m_Z": 1313.14
        },
        {
            "m_X": 2739.1,
            "m_Y": 0,
            "m_Z": 1280.78
        },
        {
            "m_X": 2754.73,
            "m_Y": 0,
            "m_Z": 1262.03
        },
        {
            "m_X": 2777.18,
            "m_Y": 0,
            "m_Z": 1251.04
        },
        {
            "m_X": 2748.31,
            "m_Y": 0,
            "m_Z": 1216.52
        },
        {
            "m_X": 2747.88,
            "m_Y": 0,
            "m_Z": 1198.68
        },
        {
            "m_X": 2787.62,
            "m_Y": 0,
            "m_Z": 1162.79
        }
    ],
    "m_Cells": [
        {
            "m_Name": "Cell 1",
            "m_Position": {
                "m_X": 2775.48,
                "m_Y": 33.643,
                "m_Z": 1301.92
            }
        },
        {
            "m_Name": "Cell 2",
            "m_Position": {
                "m_X": 2767.25,
                "m_Y": 33.657,
                "m_Z": 1271.29
            }
        },
        {
            "m_Name": "Cell 3",
            "m_Position": {
                "m_X": 2765.3,
                "m_Y": 33.658,
                "m_Z": 1273.46
            }
        },
        {
            "m_Name": "Cell 4",
            "m_Position": {
                "m_X": 2756.41,
                "m_Y": 33.748,
                "m_Z": 1268.39
            }
        },
        {
            "m_Name": "Cell 5",
            "m_Position": {
                "m_X": 2752.53,
                "m_Y": 33.751,
                "m_Z": 1271.14
            }
        },
        {
            "m_Name": "Cell 6",
            "m_Position": {
                "m_X": 2761.45,
                "m_Y": 33.661,
                "m_Z": 1276.06
            }
        },
        {
            "m_Name": "Cell 7",
            "m_Position": {
                "m_X": 2757.03,
                "m_Y": 33.664,
                "m_Z": 1277.77
            }
        },
        {
            "m_Name": "Cell 8",
            "m_Position": {
                "m_X": 2751.19,
                "m_Y": 33.752,
                "m_Z": 1274.23
            }
        },
        {
            "m_Name": "Cell 9",
            "m_Position": {
                "m_X": 2747.3,
                "m_Y": 33.755,
                "m_Z": 1276.41
            }
        },
        {
            "m_Name": "Cell 10",
            "m_Position": {
                "m_X": 2746.08,
                "m_Y": 33.666,
                "m_Z": 1307.88
            }
        },
        {
            "m_Name": "Cell 11",
            "m_Position": {
                "m_X": 2750.92,
                "m_Y": 33.662,
                "m_Z": 1306.36
            }
        },
        {
            "m_Name": "Cell 12",
            "m_Position": {
                "m_X": 2758.32,
                "m_Y": 33.656,
                "m_Z": 1305.93
            }
        },
        {
            "m_Name": "Cell 13",
            "m_Position": {
                "m_X": 2775.47,
                "m_Y": 33.643,
                "m_Z": 1301.99
            }
        },
        {
            "m_Name": "Cell 14",
            "m_Position": {
                "m_X": 2762.98,
                "m_Y": 33.653,
                "m_Z": 1306.25
            }
        },
        {
            "m_Name": "Cell 15",
            "m_Position": {
                "m_X": 2768,
                "m_Y": 33.649,
                "m_Z": 1305.1
            }
        },
        {
            "m_Name": "Cell 16",
            "m_Position": {
                "m_X": 2771.7,
                "m_Y": 33.646,
                "m_Z": 1304.3
            }
        },
        {
            "m_Name": "Cell 17",
            "m_Position": {
                "m_X": 2772.09,
                "m_Y": 30.089,
                "m_Z": 1304.1
            }
        },
        {
            "m_Name": "Cell 18",
            "m_Position": {
                "m_X": 2768.11,
                "m_Y": 30.092,
                "m_Z": 1304.47
            }
        },
        {
            "m_Name": "Cell 19",
            "m_Position": {
                "m_X": 2762.8,
                "m_Y": 30.096,
                "m_Z": 1304.92
            }
        },
        {
            "m_Name": "Cell 20",
            "m_Position": {
                "m_X": 2758.18,
                "m_Y": 30.099,
                "m_Z": 1306.14
            }
        },
        {
            "m_Name": "Cell 21",
            "m_Position": {
                "m_X": 2751.26,
                "m_Y": 30.105,
                "m_Z": 1307.05
            }
        },
        {
            "m_Name": "Cell 22",
            "m_Position": {
                "m_X": 2746.22,
                "m_Y": 30.109,
                "m_Z": 1307.01
            }
        },
        {
            "m_Name": "Cell 23",
            "m_Position": {
                "m_X": 2748.76,
                "m_Y": 30.110,
                "m_Z": 1276.52
            }
        },
        {
            "m_Name": "Cell 24",
            "m_Position": {
                "m_X": 2751.36,
                "m_Y": 30.108,
                "m_Z": 1274.17
            }
        },
        {
            "m_Name": "Cell 25",
            "m_Position": {
                "m_X": 2753.07,
                "m_Y": 30.107,
                "m_Z": 1271.48
            }
        },
        {
            "m_Name": "Cell 26",
            "m_Position": {
                "m_X": 2761.13,
                "m_Y": 30.100,
                "m_Z": 1275.77
            }
        },
        {
            "m_Name": "Cell 27",
            "m_Position": {
                "m_X": 2755.98,
                "m_Y": 30.104,
                "m_Z": 1268.65
            }
        },
        {
            "m_Name": "Cell 28",
            "m_Position": {
                "m_X": 2765.55,
                "m_Y": 30.097,
                "m_Z": 1273.52
            }
        },
        {
            "m_Name": "Cell 29",
            "m_Position": {
                "m_X": 2767.69,
                "m_Y": 30.095,
                "m_Z": 1270.19
            }
        },
        {
            "m_Name": "Cell 30",
            "m_Position": {
                "m_X": 2746.17,
                "m_Y": 26.469,
                "m_Z": 1307.47
            }
        },
        {
            "m_Name": "Cell 31",
            "m_Position": {
                "m_X": 2751.19,
                "m_Y": 26.465,
                "m_Z": 1307.18
            }
        },
        {
            "m_Name": "Cell 32",
            "m_Position": {
                "m_X": 2757.97,
                "m_Y": 26.460,
                "m_Z": 1306.64
            }
        },
        {
            "m_Name": "Cell 33",
            "m_Position": {
                "m_X": 2762.77,
                "m_Y": 26.456,
                "m_Z": 1306.3
            }
        },
        {
            "m_Name": "Cell 34",
            "m_Position": {
                "m_X": 2767.92,
                "m_Y": 26.452,
                "m_Z": 1305.18
            }
        },
        {
            "m_Name": "Cell 35",
            "m_Position": {
                "m_X": 2771.5,
                "m_Y": 26.449,
                "m_Z": 1304.26
            }
        },
        {
            "m_Name": "Cell 36",
            "m_Position": {
                "m_X": 2745.31,
                "m_Y": 26.470,
                "m_Z": 1278.62
            }
        },
        {
            "m_Name": "Cell 37",
            "m_Position": {
                "m_X": 2747.45,
                "m_Y": 26.468,
                "m_Z": 1276.45
            }
        },
        {
            "m_Name": "Cell 38",
            "m_Position": {
                "m_X": 2750.61,
                "m_Y": 26.466,
                "m_Z": 1274.26
            }
        },
        {
            "m_Name": "Cell 39",
            "m_Position": {
                "m_X": 2753.18,
                "m_Y": 26.464,
                "m_Z": 1271.5
            }
        },
        {
            "m_Name": "Cell 40",
            "m_Position": {
                "m_X": 2755.62,
                "m_Y": 26.462,
                "m_Z": 1268.29
            }
        }
    ],
    "m_Objects": [
        {
            "m_Class": "AC_Prison_Rock",
            "m_Position": {
                "m_X": 2791.986083984375,
                "m_Y": 25.894990921020509,
                "m_Z": 1195.3968505859376
            },
            "m_Orientation": {
                "m_Yaw": -5.000141620635986,
                "m_Pitch": 0.0,
                "m_Roll": 2.976440906524658
            }
        },
        {
            "m_Class": "AC_Prison_Rock2",
            "m_Position": {
                "m_X": 2777.048828125,
                "m_Y": 25.960769653320314,
                "m_Z": 1205.070556640625
            },
            "m_Orientation": {
                "m_Yaw": 0.0,
                "m_Pitch": 0.0,
                "m_Roll": -0.0
            }
        },
        {
            "m_Class": "AC_Prison_Rock3",
            "m_Position": {
                "m_X": 2786.968017578125,
                "m_Y": 26.154996871948243,
                "m_Z": 1180.245361328125
            },
            "m_Orientation": {
                "m_Yaw": -104.99633026123047,
                "m_Pitch": 0.0,
                "m_Roll": -30.998838424682618
            }
        },
        {
            "m_Class": "AC_Prison_Rock4",
            "m_Position": {
                "m_X": 2764.366455078125,
                "m_Y": 26.60500717163086,
                "m_Z": 1204.3165283203126
            },
            "m_Orientation": {
                "m_Yaw": -94.00448608398438,
                "m_Pitch": 0.0,
                "m_Roll": -0.0
            }
        },
        {
            "m_Class": "AC_Prison_Rock5",
            "m_Position": {
                "m_X": 2773.72509765625,
                "m_Y": 26.06499481201172,
                "m_Z": 1191.7481689453126
            },
            "m_Orientation": {
                "m_Yaw": 0.0,
                "m_Pitch": 0.0,
                "m_Roll": -0.0
            }
        },
        {
            "m_Class": "AC_Prison_ToolStation",
            "m_Position": {
                "m_X": 2797.890380859375,
                "m_Y": 25.84744644165039,
                "m_Z": 1209.7716064453126
            },
            "m_Orientation": {
                "m_Yaw": 151.02099609375,
                "m_Pitch": 2.9983460903167726,
                "m_Roll": 90.00167083740235
            }
        },
        {
            "m_Class": "AC_Prison_ToolStation",
            "m_Position": {
                "m_X": 2797.74365234375,
                "m_Y": 26.03000259399414,
                "m_Z": 1209.458251953125
            },
            "m_Orientation": {
                "m_Yaw": 43.998626708984378,
                "m_Pitch": 0.0,
                "m_Roll": 14.004695892333985
            }
        },
        {
            "m_Class": "AC_Prison_Deposit",
            "m_Position": {
                "m_X": 2800.326904296875,
                "m_Y": 25.888769149780275,
                "m_Z": 1210.575927734375
            },
            "m_Orientation": {
                "m_Yaw": -101.99998474121094,
                "m_Pitch": -4.000000476837158,
                "m_Roll": 0.999997615814209
            }
        }
    ],
    "m_Uniform": [
        "PrisonerCap",
        "PrisonUniformPants",
        "PrisonUniformJacket",
        "Sneakers_Black"
    ],
    "m_Messages": {
        "m_Release": "You have served your sentence. You are free.",
        "m_Escape": "Stay within the prison grounds until you have served your sentence.",
        "m_Detention": "You have been imprisoned. Deliver %RequiredStones% stones to be released.",
        "m_Work": "Your time in the cell is over. Collect a pickaxe, mine stones and deliver them to the deposit.",
        "m_Progress": "Stones delivered: %DeliveredStones%/%RequiredStones%."
    }
}

Options ​

OptionTypeDescription
m_Enablebool0: disables sentence enforcement; 1: enables the module.
m_Loggingbool0: disables audit logs; 1: enables them. Persistence errors are still logged.
m_CellWaitSecondsintInitial cell wait in seconds, from 0 to 86400.
m_ToolCooldownSecondsintInterval between pickaxe requests in seconds, from 0 to 86400.
m_MaxSentenceStonesintMaximum stones required by a new sentence, from 1 to 1000000.
m_PreserveInventorybool1: stores the original inventory and restores it upon release; 0: removes it without storing or restoring it.
m_ReturnPositionobjectWork starting point and escape return destination, inside the boundary.
m_ReleasePositionobjectRelease destination, outside the boundary.
m_Boundaryarray<object>Ordered polygon vertices; at least three points. Containment uses X and Z.
m_Cellsarray<object>Cells; their list order defines the command cell number, starting at 1.
m_Objectsarray<object>Mining rocks, tool stations and deposits created by the module.
m_Uniformarray<string>Item classes given when the prisoner character is processed.
m_MessagesobjectNonempty player notification strings.

The supplied positions target the Chernarus prison and include 40 cells. Adjust all positions and the polygon for your map before enabling the module. Cells, return position and stations must be inside the boundary; the release position must be outside. At least one mining rock, one tool station and one deposit are required. Invalid configuration or failure to create a station prevents activation.

With m_PreserveInventory set to 0, imprisonment discards the original inventory permanently. With 1, test inventory restoration with items from other mods before production use. Inventory snapshots use the existing AC inventory serializer.

Wait and tool cooldown counters advance only while the prisoner is online, alive, conscious and outside a vehicle. Leaving the cell during the initial wait returns the player to it; leaving the work perimeter returns the player to m_ReturnPosition. Prisoners cannot enter vehicles. Death or respawn recreates the prison kit without replacing the original inventory snapshot.

m_ReturnPosition ​

OptionTypeDescription
m_XfloatX coordinate in meters.
m_YfloatHeight in meters; ignored by the boundary containment check.
m_ZfloatZ coordinate in meters.

m_ReleasePosition ​

OptionTypeDescription
m_XfloatX coordinate in meters.
m_YfloatHeight in meters; ignored by the boundary containment check.
m_ZfloatZ coordinate in meters.

m_Boundary[] ​

OptionTypeDescription
m_XfloatX coordinate in meters.
m_YfloatHeight in meters; ignored by the boundary containment check.
m_ZfloatZ coordinate in meters.

m_Cells[].m_Position ​

OptionTypeDescription
m_XfloatX coordinate in meters.
m_YfloatHeight in meters; ignored by the boundary containment check.
m_ZfloatZ coordinate in meters.

m_Objects[].m_Position ​

OptionTypeDescription
m_XfloatX coordinate in meters.
m_YfloatHeight in meters; ignored by the boundary containment check.
m_ZfloatZ coordinate in meters.

m_Cells[] ​

OptionTypeDescription
m_NamestringCell name used by message placeholders.
m_PositionobjectCell coordinates, inside the boundary.

m_Objects[] ​

OptionTypeDescription
m_ClassstringStation class from the table below.
m_PositionobjectStation coordinates, inside the boundary.
m_OrientationobjectStation rotation in degrees.

m_Objects[].m_Orientation ​

OptionTypeDescription
m_YawfloatHorizontal rotation in degrees.
m_PitchfloatPitch in degrees.
m_RollfloatRoll in degrees.

m_Messages ​

OptionTypeDescription
m_ReleasestringRelease notification.
m_EscapestringEscape containment notification.
m_DetentionstringNotification when processing imprisonment.
m_WorkstringNotification when the cell wait ends.
m_ProgressstringProgress notification after each deposit.

All messages accept %RequiredStones%, %DeliveredStones% and %CellName%.

Configuration classes ​

Use these classes in m_Objects[].m_Class; the module creates them at the configured position and rotation.

ClassPurpose
AC_Prison_RockMining rock.
AC_Prison_Rock2Mining rock.
AC_Prison_Rock3Mining rock.
AC_Prison_Rock4Mining rock.
AC_Prison_Rock5Mining rock.
AC_Prison_ToolStationPickaxe collection point.
AC_Prison_DepositStone delivery point.

Types ​

types.xml
xml
<type name="AC_Prison_Pickaxe">
    <lifetime>7200</lifetime>
    <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0" />
</type>
<type name="AC_Prison_Stone">
    <lifetime>7200</lifetime>
    <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0" />
</type>

The tool station supplies AC_Prison_Pickaxe. Mining creates AC_Prison_Stone linked to the prisoner’s Steam ID; stones spawned separately do not count as that player’s mined stones. Each stone has one unit and cannot be split.

Controls ​

ControlAction
Take tool actionAfter the cell wait, interact with a tool station with empty hands. Requires available inventory space and an expired tool cooldown.
Mine actionHold the action for 8 seconds at a mining rock, standing with a usable prison pickaxe in hand. Produces one stone if there is room.
Deposit actionInteract with the deposit while holding your own non-ruined prison stone. Consumes it and advances the sentence; the final delivery triggers release.

Actions require an active sentence in its work phase, proximity to a station created by the module and presence within the work perimeter.

Commands ​

Chat administration requires the Chat module to be enabled. Steam IDs must contain exactly 17 digits. Each command below requires command.prison.

/prison jail ​

Assigns a sentence. The stone count is required, positive and limited by m_MaxSentenceStones. The optional cell is numbered from 1; omitting it randomly selects and saves a configured cell. An active sentence cannot be overwritten. Offline sentences are processed on a later connection; an online target must be alive and outside a vehicle. Processing replaces the current inventory with the prison uniform; preservation follows m_PreserveInventory.

  • Syntax: /prison jail <SteamID> <stones> [cell]
  • Permission: command.prison
  • Example: /prison jail 76561198000000000 25 1

/prison status ​

Shows the cell, delivered and required stones, remaining wait and pending release status.

  • Syntax: /prison status <SteamID>
  • Permission: command.prison
  • Example: /prison status 76561198000000000

/prison release ​

Marks an active sentence for release, including offline players and sentences not yet processed. Release is applied when the player is connected, alive, conscious and outside a vehicle. The player moves to m_ReleasePosition and the stored original inventory is restored when available.

  • Syntax: /prison release <SteamID>
  • Permission: command.prison
  • Example: /prison release 76561198000000000

The local administrative channel $profile:AC/commands.txt also accepts these commands without the initial /; replies are written to logs. For example: prison status 76561198000000000.

Persistence or restoration failures block operations for the affected player. Keep a backup and inspect the record and logs with the server stopped before attempting recovery. Character saves and sentence records are not a single transaction.

Permissions ​

Grant command.prison to the administrator’s group in Permissions to allow jail, status and release. The global root permission also grants access. Prison work actions use sentence state rather than an administrative permission.

Released under the MIT License.