-
Notifications
You must be signed in to change notification settings - Fork 6
ZenRaidAlarm
Source: https://github.com/ZenarchistCode/ZenRaidAlarm
NOTE: This mod is included in my modpack and can be enabled/disabled via ZenRaidAlarm in ZenModPackConfig.json

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.
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 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
}
} <!-- 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>All my mods are open-source and published under the Mozilla Public License Version 2.0. Any mods based on my code must be open-source - no obfuscation!
You can modify/reupload/repack my mods if you like, but please credit any original authors/3D model/3rd-party asset creators, and keep in mind any future updates I make will not be automatically applied to repacked mods so make sure to check back from time to time for bugfixes and improvements.
If you find my mods useful, please consider buying me a coffee - it's not expected but very much appreciated: https://buymeacoffee.com/zenarchist
- General Setup Guide
- Core Mod Setup Guide
- ZenModPack Master Config
- Various Info
- Known Bugs & Issues
- Report Bug
My utility style mods for debugging etc.
Mods which affect game mechanics:
- ZenAlcohol
- ZenAllowMapBagSlot
- ZenAntiCombatLogout
- ZenAutoConvertStash
- ZenAutoStackItems
- ZenAutoWinterDetect
- ZenAutoRun
- ZenBasebuildingConfig
- ZenBatteryPASPersistence
- ZenBetterChatFont
- ZenBrokenGlasses
- ZenBuildingDescription
- ZenCarAttachments
- ZenCarBatteryIcon
- ZenCarCompass
- ZenCarGlovebox
- ZenCarsCutDownTrees
- ZenCanteenTablets
- ZenCatchRain
- ZenCauseOfDeath
- ZenChickenCoops
- ZenCraftingSounds
- ZenCraftRagHands
- ZenComboLocks
- ZenCombineJSON
- ZenDropRuinedClothing
- ZenDynamicZoneLoot
- ZenEarPlugs
- ZenFireFuel
- ZenFireWood
- ZenFireplaceStick
- ZenFishingConfig
- ZenFixCarAttachmentGUI
- ZenGraves
- ZenGroundCleaning
- ZenHideGearInCars
- ZenHints
- ZenHologram
- ZenHologramControls
- ZenImmersiveChatHUD
- ZenImmersiveLogin
- ZenInformWeaponStateBug
- ZenInventoryAnimation
- ZenKnifeGardens
- ZenLeftovers
- ZenLogPiles
- ZenMagObfuscation
- ZenMap
- ZenMicCheck
- ZenNotifications
- ZenOpenCansRock
- ZenPainting
- ZenPimpMyRide
- ZenRadioPlugin
- ZenRebuildableWells
- ZenRepairJSON
- ZenRepairPumps
- ZenRepairWells
- ZenServerGUI
- ZenShove
- ZenSplitUI
- ZenSleep
- ZenStaminaSlope
- ZenTerritories
- ZenWeaponEngrave
- ZenWoodHealth
- ZenZombieDoors
Mods which add gear to the game:
- ZenArtillery
- ZenBackwardsCaps
- ZenBookshelf
- ZenBunnyMasks
- ZenCamoCamp
- ZenCarWorkbench
- ZenChess
- ZenChristmasTreeCraft
- ZenConcussionGrenade
- ZenDoubleArmbands
- ZenFlask
- ZenFlint
- ZenGhillie
- ZenJameson
- ZenLadders
- ZenMusic
- ZenNotes
- ZenRaidAlarm
- ZenRaybans
- ZenRunes
- ZenStaticObjects
- ZenSwissKnife
- ZenTimeBomb
- ZenTireRack
- ZenTreasure
- ZenTreehouse
- ZenVikingAxe
- ZenZippoLighter
Mods which run purely server-side:
- ZenBloodDrips
- ZenCampSites
- ZenDynamicZoneLoot
- ZenLootCyclingDetection
- ZenNightConfig
- ZenPersistentTrees
- ZenShelterCargo
- ZenTreesplosions
- ZenZombieController
- ZenZombieConfig
- ZenJameson
My standalone mods