Files
barotrauma-gamefiles/Content/Events/PvPEvents.xml
2025-04-13 10:54:55 +02:00

419 lines
23 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<RandomEvents>
<EventPrefabs>
<!-- ****************************************************************************************************************************************************** -->
<!-- deathmatchweapondrop -->
<!-- ****************************************************************************************************************************************************** -->
<ScriptedEvent identifier="deathmatchweapondrop1" tags="deathmatchweapondrop">
<!-- INITIAL BASIC SUPPLIES -->
<TriggerEventAction identifier="trashitems" />
<Label name="basicsupplies" />
<ClearTagAction tag="selectedsupplycab" />
<!-- choose a random supply cab to spawn stuff in -->
<TagAction criteria="itemidentifier:suppliescabinet" tag="selectedsupplycab" submarinetype="outpost" ChooseRandom="true" ChooseRandomExcludingTag="usedsupplycab" ContinueIfNoTargetsFound="true" />
<!-- mark as already used-->
<TagAction criteria="eventtag:selectedsupplycab" tag="usedsupplycab" submarinetype="outpost" ContinueIfNoTargetsFound="true" />
<CountTargetsAction TargetTag="selectedsupplycab" minamount="1">
<Success>
<RNGAction chance="0.5">
<Success>
<RNGAction chance="0.75">
<Success>
<SpawnAction itemidentifier="antibleeding1" amount="4" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="antibloodloss1" amount="4" targetinventory="selectedtrashcan" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="revolver" TargetTag="spawnedrevolver" amount="1" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="revolverround" amount="6" targetinventory="spawnedrevolver" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Failure>
</RNGAction>
</Success>
<Failure>
<RNGAction chance="0.9">
<Success>
<SpawnAction itemidentifier="wrench" amount="1" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="heavywrench" amount="1" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Failure>
</RNGAction>
</Failure>
</RNGAction>
<RNGAction chance="0.5">
<Success>
<RNGAction chance="0.9">
<Success>
<SpawnAction itemidentifier="crowbar" amount="1" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="boardingaxe" amount="1" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Failure>
</RNGAction>
</Success>
<Failure>
<RNGAction chance="0.5">
<Success>
<SpawnAction itemidentifier="screwdriver" amount="1" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="weldingtool" amount="1" TargetTag="spawnedwelder" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="weldingfueltank" amount="1" targetinventory="spawnedwelder" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="weldingfueltank" amount="4" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Failure>
</RNGAction>
</Failure>
</RNGAction>
</Success>
</CountTargetsAction>
<GoTo name="basicsupplies" maxtimes="10" />
<!-- TIER 1 -->
<SpawnAction itemtag="weapondroptier1" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier1" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier1" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier1" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
<RNGAction chance="0.3">
<Success>
<SpawnAction itemtag="weapondroptier1_special" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
</Success>
</RNGAction>
<WaitAction time="120" />
<TriggerEventAction identifier="cleanup_weapondrops" />
<!-- TIER 2 -->
<Label name="tier2" />
<SpawnAction itemtag="weapondroptier2" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier2" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
<RNGAction chance="0.3">
<Success>
<SpawnAction itemtag="weapondroptier2_special" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
</Success>
</RNGAction>
<WaitAction time="120" />
<GoTo name="tier2" maxtimes="2" />
<!-- TIER 3 -->
<Label name="tier3" />
<SpawnAction itemtag="weapondroptier3" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier3" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
<RNGAction chance="0.3">
<Success>
<SpawnAction itemtag="weapondroptier3_special" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
</Success>
</RNGAction>
<WaitAction time="120" />
<GoTo name="tier3" maxtimes="2" />
<!-- TIER 4-->
<Label name="tier4" />
<SpawnAction itemtag="weapondroptier4" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier4" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
<RNGAction chance="0.3">
<Success>
<SpawnAction itemtag="weapondroptier4_special" SpawnPointTag="deathmatchweapondrop" ignorebyai="true" offset="200" />
</Success>
</RNGAction>
<WaitAction time="120" />
<GoTo name="tier4" />
</ScriptedEvent>
<!-- ****************************************************************************************************************************************************** -->
<!-- alienruindmweapondrop -->
<!-- ****************************************************************************************************************************************************** -->
<ScriptedEvent identifier="alienruindmweapondrop1" tags="alienruindmweapondrop">
<!-- INITIAL BASIC SUPPLIES -->
<TriggerEventAction identifier="trashitems" />
<Label name="basicsupplies" />
<ClearTagAction tag="selectedsupplycab" />
<!-- choose a random supply cab to spawn stuff in -->
<TagAction criteria="itemidentifier:suppliescabinet" tag="selectedsupplycab" submarinetype="outpost" ChooseRandom="true" ChooseRandomExcludingTag="usedsupplycab" ContinueIfNoTargetsFound="true" />
<!-- mark as already used-->
<TagAction criteria="eventtag:selectedsupplycab" tag="usedsupplycab" submarinetype="outpost" ContinueIfNoTargetsFound="true" />
<CountTargetsAction TargetTag="selectedsupplycab" minamount="1">
<Success>
<RNGAction chance="0.9">
<Success>
<SpawnAction itemidentifier="wrench" amount="1" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="heavywrench" amount="1" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Failure>
</RNGAction>
<RNGAction chance="0.9">
<Success>
<SpawnAction itemidentifier="crowbar" amount="1" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="boardingaxe" amount="1" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Failure>
</RNGAction>
<RNGAction chance="0.5">
<Success>
<SpawnAction itemidentifier="antibiotics" amount="2" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="rum" amount="2" targetinventory="selectedsupplycab" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Failure>
</RNGAction>
</Success>
</CountTargetsAction>
<GoTo name="basicsupplies" maxtimes="10" />
<TriggerEventAction identifier="alienruindmdivingsuits" />
<!-- TIER 1 -->
<SpawnAction itemtag="weapondroptier1" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier1" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier1" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier1" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
<RNGAction chance="0.3">
<Success>
<SpawnAction itemtag="weapondroptier1_ruin_special" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
</Success>
</RNGAction>
<WaitAction time="120" />
<TriggerEventAction identifier="cleanup_weapondrops" />
<!-- TIER 2 -->
<SpawnAction itemtag="weapondroptier2_ruin_scooters" SpawnPointTag="alienruindmscooterdrop1" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier2_ruin_scooters" SpawnPointTag="alienruindmscooterdrop2" ignorebyai="true" offset="200" />
<Label name="tier2" />
<SpawnAction itemtag="weapondroptier2_ruin" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier2_ruin" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
<RNGAction chance="0.3">
<Success>
<SpawnAction itemtag="weapondroptier2_ruin_special" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
</Success>
</RNGAction>
<WaitAction time="120" />
<GoTo name="tier2" maxtimes="2" />
<!-- TIER 3 -->
<SpawnAction itemtag="weapondroptier3_ruin_scooters" SpawnPointTag="alienruindmscooterdrop1" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier3_ruin_scooters" SpawnPointTag="alienruindmscooterdrop2" ignorebyai="true" offset="200" />
<Label name="tier3" />
<SpawnAction itemtag="weapondroptier3_ruin" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier3_ruin" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
<RNGAction chance="0.3">
<Success>
<SpawnAction itemtag="weapondroptier3_ruin_special" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
</Success>
</RNGAction>
<WaitAction time="120" />
<GoTo name="tier3" maxtimes="2" />
<!-- TIER 4-->
<SpawnAction itemtag="weapondroptier4_ruin_scooters" SpawnPointTag="alienruindmscooterdrop1" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier4_ruin_scooters" SpawnPointTag="alienruindmscooterdrop2" ignorebyai="true" offset="200" />
<Label name="tier4" />
<SpawnAction itemtag="weapondroptier4_ruin" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
<SpawnAction itemtag="weapondroptier4_ruin" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
<RNGAction chance="0.3">
<Success>
<SpawnAction itemtag="weapondroptier4_ruin_special" SpawnPointTag="alienruindmweapondrop" ignorebyai="true" offset="200" />
</Success>
</RNGAction>
<WaitAction time="120" />
<GoTo name="tier4" />
</ScriptedEvent>
<!-- DIVING SUITS -->
<ScriptedEvent identifier="alienruindmdivingsuits">
<Label name="divingsuitcontainers_tier1" />
<ClearTagAction tag="selecteddivingsuitlocker" />
<ClearTagAction tag="spawneddivingsuit" />
<!-- choose a random diving suit locker to spawn stuff in -->
<TagAction criteria="itemidentifier:divingsuitlocker" tag="selecteddivingsuitlocker" submarinetype="outpost" ChooseRandom="true" ContinueIfNoTargetsFound="true" />
<CountTargetsAction TargetTag="selecteddivingsuitlocker" minamount="1">
<Success>
<RNGAction chance="0.1">
<Success>
<SpawnAction itemidentifier="combatdivingsuit" amount="1" TargetTag="spawneddivingsuit" targetinventory="selecteddivingsuitlocker" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="oxygentank" amount="1" targetinventory="spawneddivingsuit" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" RequireSpawnPointTag="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="divingsuit" amount="1" TargetTag="spawneddivingsuit" targetinventory="selecteddivingsuitlocker" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="oxygentank" amount="1" targetinventory="spawneddivingsuit" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" RequireSpawnPointTag="true" />
</Failure>
</RNGAction>
</Success>
</CountTargetsAction>
<WaitAction time="5" />
<GoTo name="divingsuitcontainers_tier1" maxtimes="20"/>
<Label name="divingsuitcontainers_tier2" />
<ClearTagAction tag="selecteddivingsuitlocker" />
<ClearTagAction tag="spawneddivingsuit" />
<!-- choose a random diving suit locker to spawn stuff in -->
<TagAction criteria="itemidentifier:divingsuitlocker" tag="selecteddivingsuitlocker" submarinetype="outpost" ChooseRandom="true" ContinueIfNoTargetsFound="true" />
<CountTargetsAction TargetTag="selecteddivingsuitlocker" minamount="1">
<Success>
<RNGAction chance="0.3">
<Success>
<SpawnAction itemidentifier="combatdivingsuit" amount="1" TargetTag="spawneddivingsuit" targetinventory="selecteddivingsuitlocker" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="oxygentank" amount="1" targetinventory="spawneddivingsuit" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" RequireSpawnPointTag="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="divingsuit" amount="1" TargetTag="spawneddivingsuit" targetinventory="selecteddivingsuitlocker" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="oxygentank" amount="1" targetinventory="spawneddivingsuit" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" RequireSpawnPointTag="true" />
</Failure>
</RNGAction>
</Success>
</CountTargetsAction>
<WaitAction time="5" />
<GoTo name="divingsuitcontainers_tier2" maxtimes="40"/>
<Label name="divingsuitcontainers_tier3" />
<ClearTagAction tag="selecteddivingsuitlocker" />
<ClearTagAction tag="spawneddivingsuit" />
<!-- choose a random diving suit locker to spawn stuff in -->
<TagAction criteria="itemidentifier:divingsuitlocker" tag="selecteddivingsuitlocker" submarinetype="outpost" ChooseRandom="true" ContinueIfNoTargetsFound="true" />
<CountTargetsAction TargetTag="selecteddivingsuitlocker" minamount="1">
<Success>
<RNGAction chance="0.6">
<Success>
<SpawnAction itemidentifier="combatdivingsuit" amount="1" TargetTag="spawneddivingsuit" targetinventory="selecteddivingsuitlocker" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="oxygentank" amount="1" targetinventory="spawneddivingsuit" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" RequireSpawnPointTag="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="divingsuit" amount="1" TargetTag="spawneddivingsuit" targetinventory="selecteddivingsuitlocker" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="oxygentank" amount="1" targetinventory="spawneddivingsuit" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" RequireSpawnPointTag="true" />
</Failure>
</RNGAction>
</Success>
</CountTargetsAction>
<WaitAction time="5" />
<GoTo name="divingsuitcontainers_tier3" maxtimes="40" />
<Label name="divingsuitcontainers_tier4" />
<ClearTagAction tag="selecteddivingsuitlocker" />
<ClearTagAction tag="spawneddivingsuit" />
<!-- choose a random diving suit locker to spawn stuff in -->
<TagAction criteria="itemidentifier:divingsuitlocker" tag="selecteddivingsuitlocker" submarinetype="outpost" ChooseRandom="true" ContinueIfNoTargetsFound="true" />
<CountTargetsAction TargetTag="selecteddivingsuitlocker" minamount="1">
<Success>
<RNGAction chance="0.1">
<Success>
<SpawnAction itemidentifier="slipsuit" amount="1" TargetTag="spawneddivingsuit" targetinventory="selecteddivingsuitlocker" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="oxygentank" amount="1" targetinventory="spawneddivingsuit" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" RequireSpawnPointTag="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="combatdivingsuit" amount="1" TargetTag="spawneddivingsuit" targetinventory="selecteddivingsuitlocker" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
<SpawnAction itemidentifier="oxygentank" amount="1" targetinventory="spawneddivingsuit" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" RequireSpawnPointTag="true" />
</Failure>
</RNGAction>
</Success>
</CountTargetsAction>
<WaitAction time="5" />
<GoTo name="divingsuitcontainers_tier4" />
</ScriptedEvent>
<!-- ****************************************************************************************************************************************************** -->
<!-- Trashcan items -->
<!-- ****************************************************************************************************************************************************** -->
<ScriptedEvent identifier="trashitems">
<Label name="basictrashitems" />
<ClearTagAction tag="selectedtrashcan" />
<!-- choose a random trash can to spawn stuff in -->
<TagAction criteria="itemidentifier:opdeco_trashcan" tag="selectedtrashcan" submarinetype="outpost" ChooseRandom="true" ChooseRandomExcludingTag="usedtrashcan" ContinueIfNoTargetsFound="true" />
<!-- mark as already used-->
<TagAction criteria="eventtag:selectedtrashcan" tag="usedtrashcan" submarinetype="outpost" ContinueIfNoTargetsFound="true" />
<CountTargetsAction TargetTag="selectedtrashcan" minamount="1">
<Success>
<RNGAction chance="0.6">
<Success>
<SpawnAction itemidentifier="antibleeding1" amount="4" targetinventory="selectedtrashcan" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="revolverround" amount="12" targetinventory="selectedtrashcan" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Failure>
</RNGAction>
<RNGAction chance="0.6">
<Success>
<SpawnAction itemidentifier="antibloodloss2" amount="2" targetinventory="selectedtrashcan" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="smgmagazine" amount="1" targetinventory="selectedtrashcan" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Failure>
</RNGAction>
<RNGAction chance="0.6">
<Success>
<SpawnAction itemidentifier="opium" amount="2" targetinventory="selectedtrashcan" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Success>
<Failure>
<SpawnAction itemidentifier="spear" amount="12" targetinventory="selectedtrashcan" SpawnIfInventoryFull="false" ContinueIfFailedToSpawn="true" />
</Failure>
</RNGAction>
</Success>
</CountTargetsAction>
<GoTo name="basictrashitems" maxtimes="10" />
</ScriptedEvent>
<!-- ****************************************************************************************************************************************************** -->
<!-- Cleanup weaponcrates -->
<!-- ****************************************************************************************************************************************************** -->
<ScriptedEvent identifier="cleanup_weapondrops">
<Label name="repeat" />
<WaitAction time="10" />
<ClearTagAction tag="weaponcrate" />
<TagAction criteria="itemtag:weapondrop" tag="weaponcrate" submarinetype="outpost" ContinueIfNoTargetsFound="true" />
<!-- Check if the crate no longer contains at least one item (medium or small item) -->
<CheckConditionalAction targettag="weaponcrate" targetitemcomponent="ItemContainer" ContainedItemCount="0" ApplyTagToTarget="emptycrate">
<Success>
<!-- Despawn crates that do not have anything in them -->
<RemoveItemAction targettag="emptycrate" />
</Success>
</CheckConditionalAction>
<GoTo name="repeat" />
</ScriptedEvent>
</EventPrefabs>
</RandomEvents>