Skip to content

CarKey ​

Description ​

This module adds key support for vehicles with raid systems.

Configuration ​

Default configuration ​

CarKey.json
json
{
    "m_Enable": 0,
    "m_Logging": 1,
    "m_LockAfterLink": 1,
    "m_LockPickTime": 0,
    "m_LockPickDamage": 25,
    "m_DisableLinkAfterPick": 0,
    "m_DuplicateKeyDamage": 50,
    "m_Grinders": [
        {
            "m_Name": "Green Mountain",
            "m_Class": "AC_CarKey_Grinder",
            "m_Position": {
                "m_X": 3712.930908203125,
                "m_Y": 402.8034362792969,
                "m_Z": 5961.35546875
            },
            "m_Orientation": {
                "m_Yaw": -16.0,
                "m_Pitch": 0.0,
                "m_Roll": 0.0
            }
        }
    ],
    "m_IgnoreVehicles": []
}

Options ​

OptionTypeDescription
m_Enablebool0: disables the module; 1: enables it.
m_Loggingbool0: disables module logs; 1: logs its actions.
m_LockAfterLinkbool0: keeps the lock state when linking a key; 1: locks the vehicle after linking.
m_LockPickTimeintLock-picking duration in seconds. Values of 0 or lower disable the action.
m_LockPickDamageintDamage to the lock-picking item after use, as a percentage of its maximum health.
m_DisableLinkAfterPickbool0: allows linking another key after lock picking; 1: prevents linking a new key to the picked vehicle.
m_DuplicateKeyDamageintDamage to the original key when duplicating it, as a percentage of its maximum health.
m_Grindersarray<object>Key duplication machines created by the module. Fields are described below. Reloading removes and recreates these machines.
m_IgnoreVehiclesarray<string>Exact vehicle classes excluded from key linking and lock picking for players without administrative access.

m_Grinders[] ​

OptionTypeDescription
m_NamestringIdentifying name of the entry.
m_ClassstringClass of the machine created at this position.
m_PositionobjectObject coordinates, detailed below.
m_OrientationobjectObject rotation, detailed below.

m_Grinders[].m_Position ​

OptionTypeDescription
m_XfloatX coordinate.
m_YfloatHeight.
m_ZfloatZ coordinate.

m_Grinders[].m_Orientation ​

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

Configuration classes ​

The class below is placed through m_Grinders[].m_Class in the module configuration. Do not include it in types.xml for regular spawning.

ClassPurpose
AC_CarKey_GrinderMachine used to duplicate keys.

Types ​

types.xml
xml
<type name="AC_CarKey_Key">
    <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_CarKey_KeyBlue">
    <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_CarKey_KeyGray">
    <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_CarKey_KeyGreen">
    <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_CarKey_KeyPink">
    <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_CarKey_KeyRed">
    <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_CarKey_KeyWhite">
    <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_CarKey_KeyYellow">
    <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_CarKey_PickLock">
    <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_CarKey_ResetKey">
    <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_CarKey_Tag">
    <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_CarKey_TagBlue">
    <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_CarKey_TagGray">
    <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_CarKey_TagGreen">
    <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_CarKey_TagPink">
    <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_CarKey_TagRed">
    <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_CarKey_TagWhite">
    <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_CarKey_TagYellow">
    <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>

Permissions ​

CarKey actions check whether the character’s administrative mode is active. This mode bypasses certain action conditions, such as the key requirement in lock and unlock checks; other vehicle conditions and items required when completing each action still apply.

To access administrative mode in the Admin module, add admin to the responsible group’s m_Permissions in Permissions.json; root also grants access. Having the permission does not mean the mode is active. See Permissions to configure groups.

Released under the MIT License.