Skip to content

ExplosiveCharges ​

Description ​

Mounts an improvised explosive device on compatible walls or gates, including supported base-building pieces and watchtower walls. Intact charges contribute to a demolition threshold per panel. Several devices can contribute to the same panel, and the accumulated progress survives a server restart.

Configuration ​

Default configuration ​

ExplosiveCharges.json
json
{
    "m_Enable": 0,
    "m_FuseTime": 60,
    "m_MountTime": 10,
    "m_DisarmTime": 5,
    "m_DefaultRequiredCharges": 2,
    "m_LockGateWhileArmed": 0,
    "m_DisableItemDamage": 1,
    "m_DisablePlayerDamage": 0,
    "m_DisableExplosionParticles": 0,
    "m_DisableExplosionSound": 0,
    "m_Walls": [
        {
            "m_ConstructionType": "Fence",
            "m_UseDirectDestruction": 0,
            "m_RequiredCharges": 2,
            "m_Panel": "",
            "m_TargetKind": "Wall",
            "m_Parts": [
                "wall_wood_down",
                "wall_wood_up"
            ]
        },
        {
            "m_ConstructionType": "Fence",
            "m_UseDirectDestruction": 0,
            "m_RequiredCharges": 4,
            "m_Panel": "",
            "m_TargetKind": "Gate",
            "m_Parts": [
                "wall_wood_down",
                "wall_wood_up"
            ]
        },
        {
            "m_ConstructionType": "Fence",
            "m_UseDirectDestruction": 0,
            "m_RequiredCharges": 4,
            "m_Panel": "",
            "m_TargetKind": "Wall",
            "m_Parts": [
                "wall_metal_down",
                "wall_metal_up"
            ]
        },
        {
            "m_ConstructionType": "Fence",
            "m_UseDirectDestruction": 0,
            "m_RequiredCharges": 6,
            "m_Panel": "",
            "m_TargetKind": "Gate",
            "m_Parts": [
                "wall_metal_down",
                "wall_metal_up"
            ]
        },
        {
            "m_ConstructionType": "Watchtower",
            "m_UseDirectDestruction": 0,
            "m_RequiredCharges": 4,
            "m_Panel": "",
            "m_TargetKind": "Wall",
            "m_Parts": [
                "level_1_wall_1_wood_down",
                "level_1_wall_1_wood_up",
                "level_1_wall_2_wood_down",
                "level_1_wall_2_wood_up",
                "level_1_wall_3_wood_down",
                "level_1_wall_3_wood_up",
                "level_2_wall_1_wood_down",
                "level_2_wall_1_wood_up",
                "level_2_wall_2_wood_down",
                "level_2_wall_2_wood_up",
                "level_2_wall_3_wood_down",
                "level_2_wall_3_wood_up",
                "level_3_wall_1_wood_down",
                "level_3_wall_1_wood_up",
                "level_3_wall_2_wood_down",
                "level_3_wall_2_wood_up",
                "level_3_wall_3_wood_down",
                "level_3_wall_3_wood_up"
            ]
        },
        {
            "m_ConstructionType": "Watchtower",
            "m_UseDirectDestruction": 0,
            "m_RequiredCharges": 6,
            "m_Panel": "",
            "m_TargetKind": "Wall",
            "m_Parts": [
                "level_1_wall_1_metal_down",
                "level_1_wall_1_metal_up",
                "level_1_wall_2_metal_down",
                "level_1_wall_2_metal_up",
                "level_1_wall_3_metal_down",
                "level_1_wall_3_metal_up",
                "level_2_wall_1_metal_down",
                "level_2_wall_1_metal_up",
                "level_2_wall_2_metal_down",
                "level_2_wall_2_metal_up",
                "level_2_wall_3_metal_down",
                "level_2_wall_3_metal_up",
                "level_3_wall_1_metal_down",
                "level_3_wall_1_metal_up",
                "level_3_wall_2_metal_down",
                "level_3_wall_2_metal_up",
                "level_3_wall_3_metal_down",
                "level_3_wall_3_metal_up"
            ]
        }
    ]
}

Options ​

OptionTypeDescription
m_EnableboolEnables the module with 1 and disables it with 0.
m_FuseTimeintCountdown after successful mounting, from 10 to 3600 seconds.
m_MountTimeintTime to hold the mounting action, from 1 to 60 seconds.
m_DisarmTimeintTime to disarm with pliers, from 1 to 3600 seconds. 0 disables disarming.
m_DefaultRequiredChargesintNumber required for eligible vanilla panels without a match, from 0 to 1000. 0 blocks installation without a positive rule.
m_LockGateWhileArmedboolWith 1, any armed device prevents gate opening. With 0, gate opening follows its usual rules.
m_DisableItemDamageboolWith 1, protects ordinary items from this device’s charge blast. With 0, applies normal blast damage to items.
m_DisablePlayerDamageboolWith 1, protects players from this device’s charge blast. With 0, applies normal blast damage to players.
m_DisableExplosionParticlesboolWith 1, suppresses charge explosion particles. With 0, keeps this behavior disabled.
m_DisableExplosionSoundboolWith 1, suppresses the charge blast sound. Countdown beeps still play. With 0, keeps this behavior disabled.
m_Wallsarray<object>Up to 128 demolition rules by class and panel.

m_Walls[] ​

OptionTypeDescription
m_ConstructionTypestringExact class of a supported construction or * for any compatible class.
m_UseDirectDestructionboolWith 1, destroys matching construction parts directly once the threshold is met. With 0, goes through the native damage zones.
m_RequiredChargesintRequired total from 1 to 1000. 0 blocks new installations on matching panels.
m_PanelstringOptional group ID for parts that share progress. With an ID, list exact part names in m_Parts.
m_TargetKindstringWall for walls, Gate for gates, or Any or empty for both.
m_Partsarray<string>Exact, case-sensitive construction part names. Use * for all eligible parts only when m_Panel is empty.

AC_BaseBuilding_Wall, AC_BaseBuilding_GateL, AC_BaseBuilding_GateR and AC_BaseBuilding_DoubleGate use Fence rules by default and can be targeted by class. Rules for other mods apply to compatible BaseBuildingBase constructions with native construction parts. If several rules match the same panel, 0 takes priority. Otherwise the highest charge count wins. Changes to the panel’s construction reset its accumulated progress.

To include the BaseBuilding floor, configure a rule for AC_BaseBuilding_Floor with the floor part, a positive charge count, and m_UseDirectDestruction=1.

Types ​

types.xml
xml
<type name="AC_ExplosiveCharges_IED">
    <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_ExplosiveCharges_ChargeA">
    <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_ExplosiveCharges_ChargeB">
    <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_ExplosiveCharges_ChargeC">
    <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>

Controls ​

ControlAction
Mount and arm explosive chargeWith the IED in hand, hold the action while aiming at a compatible built panel within 2 m. Gates must be closed. Fit at least one intact dedicated charge before mounting. Charge A fits slots 1–2, B fits slots 3–4, and C fits slot 5.
Disarm explosive chargeHold the action with intact Pliers while aiming at the mounted IED from within 2 m. Finish before detonation to recover the device and its charges.

Commands ​

/reload explosivecharges ​

Reload the module through Commands. Mounted devices keep their captured fuse and demolition requirement. Gate opening and the blast damage and effect switches use the current settings.

  • Syntax /reload explosivecharges.
  • Permission command.reload or root.
  • Example /reload explosivecharges.

Permissions ​

Add command.reload to the group's m_Permissions in Permissions to reload the settings through chat. The root permission also grants access.

Released under the MIT License.