Skip to content

ZenRaidAlarm

Zenarchist edited this page May 6, 2026 · 5 revisions

Source: https://github.com/ZenarchistCode/ZenRaidAlarm

NOTE: This mod is included in my modpack and can be enabled/disabled via ZenRaidAlarm in ZenModPackConfig.json

raid_alarm

What Is This?

This mod adds a Discord webhook raid alarm to the game.

The raid alarm can be built and managed by players in-game to send Webhook messages to their own Discord channels when their base is under attack.

Click here to view a video guide of how to set the raid alarm up: https://youtu.be/fgJRFBte8SQ

It was obviously inspired by Daemonforge's Raid Alarm mod, but this mod was built from scratch and does not use any of his code or his Universal API - it's purely standalone.

Requirements

Note: this mod requires Zens Core Mod to run.

My core mod contains the Discord API code. You can adjust your server's name, Izurvive Map Link, and optional kill feed settings in the core mod's config - click here to read my core mod wiki guide.

Config

Config file: profiles/Zenarchist/ZenRaidAlarmConfig.json

{
    "CONFIG_VERSION": "1.29.1", // Don't touch
    "AdminWebhooks": [ // Admin discord channel webhooks go here (multiple allowed)
        "https://discord.com/api/webhooks/1263661792194728040/AEWqPnfHW8h8sIJuFBKsjW1mtHFANXtWQVh3oquwcevG0a2CyowmP4IQuKLqOFHJno"
    ],
    "TriggerAdminRaidAlert": 1, // Trigger a message to admin discord whenever a raid is detected
    "RaidAlarmRequiresTerritory": 1, // Setting up raid alarms requires a territory? 0/1
    "RaidStationInvincible": 1, // Raid stations are invulnerable? 0/1
    "RaidRadarDishInvincible": 0, // Radar dishes are invulnerable? 0/1
    "RaidRadarDishCheckRoofTimerMinutes": 30, // How often to check for a roof above the radar dish (set to 0 to only check on restarts, set to -1 to disable)
    "RaidDetectionDistance": 150, // How far from the raid station can a raid be detected
    "RaidAlarmResetInMinutes": 5.0, // How long it takes for a raid alarm sound effect to expire
    "RaidAlarmBatteryUsagePerSec": 1.0, // Station has max battery capacity of 604800, so 1 = ~1 week of energy from full
    "RaidPlaySound": 1, // Turn on/off raid sound (0/1)
    "RaidDiscordAlertRequiresRadar": 1, // If set to 0, then raid alarms are sent to player discord without a radar dish attached
    "RaidDiscordAlertCooldownSecs": 1, // This is the minimum time in seconds between player discord alerts (prevents spamming on/off etc)
    "RaidRemoveWebhookFailCount": 5, // If a webhook fails this many times to send, then delete the webhook URL from the alarm
    "RaidAlarmMessageTitle": "RAID ALARM", // This gets sent to player discord
    "RaidAlarmAttackMessage": "Your base is under attack!", // This gets sent to player discord
    "RaidAlarmWebhookUpdate": "Raid alarm configuration has been changed.", // This gets sent to player discord
    "RaidAlarmConnectionOnline": "Connection established - monitoring for raid activity.", // This gets sent to player discord
    "RaidAlarmConnectionOffline": "Connection lost - raid activity is no longer being monitored.", // This gets sent to player discord
    "RaidAlarmRequiresTerritoryText": "You need to be the member of a territory to set up this raid alarm!", // This gets sent to player discord
    "RaidAlarmTooClose": "This raid alarm is too close to an existing raid alarm!", // This gets sent to player discord
    "RaidAlarmBatteryWarning": "Battery Charge", // This gets sent to player discord
    "BaseDamageTriggersRaidAlert": 1, // Enable/disable BasebuildingBase object damage triggering raid alarm
    "BaseDismantleTriggersRaidAlert": 1, // Enable/disable non-territory members dismantling BasebuildingBase objects triggering raid alarm
    "ItemDamageTriggersRaidAlert": 1, // Enable/disable to detect ItemBase damage as well as BasebuildingBase damage (mod compatibility etc)
    "ItemsDamagedDetect": [ // Any item type here which gets damaged/destroyed will trigger alarm (exact type match or IsKindOf inheritance)
        "BaseBuilding" // RA Basebuilding example
    ],
    "RaidAlarmBuildTools": [ // List of items allowed to build a raid alarm with field transceiver (remove "hands" to force players to use a tool)
        "hands",
        "screwdriver"
    ],
    "RaidAlarmDismantleTools": [ // List of items allowed to unlock the field transceiver from the station
        "hands",
        "screwdriver"
    ],
    "ItemsDeployedTriggerRaidAlert": [ // If any of these items are deployed it will trigger the raid alarm (MUST match classname or base type, case doesn't matter)
        "HDSN_BreachingChargeBase",
        "expansionsatchel",
        "plastic_explosive"
    ],
    "RequireAnItemForIngameAlert": 0, // Turn on/off the requirement to have any of the following items in your inventory to receive in-game raid alerts (the number = 1/0 means whether or not the item should have a working battery or not)
    "ItemsRequiredForIngameAlert": {
        "itempda": 1,
        "baseradio": 1,
        "personalradio": 1,
        "zenwatchgps": 1
    }
}

Types.xml

    <!-- Discord raid alarm items -->
    <type name="Zen_RaidAlarmStation">
        <lifetime>1209600</lifetime>
        <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
    </type>
	<type name="Zen_RaidAlarmRadar">
        <lifetime>1209600</lifetime>
        <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
    </type>
	<type name="Zen_RaidAlarmStationKit">
        <lifetime>14400</lifetime>
        <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
    </type>
	<type name="Zen_RaidAlarmRadarKit">
        <nominal>2</nominal>
        <lifetime>14400</lifetime>
        <restock>3600</restock>
        <min>1</min>
        <quantmin>-1</quantmin>
        <quantmax>-1</quantmax>
        <cost>100</cost>
        <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="1"/>
        <category name="tools"/>
        <usage name="Military"/>
		<value name="Tier2"/>
        <value name="Tier3"/>
    </type>

ZEN'S MOD WIKI

Setup Guide

General Information


Utilities

My utility style mods for debugging etc.

Game Mechanics

Mods which affect game mechanics:

Gear / Objects

Mods which add gear to the game:

Server-Side Mods

Mods which run purely server-side:

Mods Not In Modpack

My standalone mods

Clone this wiki locally