<?xml version="1.0" encoding="utf-8"?>
<!-- ****************** Perk Buffs: Active buffs triggered by Perks ****************** -->
<!-- ****************** Injury Debuffs: Bleeding, Broken Limbs, Stunned, etc. ****************** -->
<!-- ****************** Elemental Debuffs: Hot, Cold, Burning, Freezing, Shock, etc. ****************** -->
<!-- ****************** Illness Debuffs: Dysentery, Pneumonia, etc. ****************** -->
<!-- ****************** Healing Item Buffs: Medical, Food, Drink ****************** -->
<!-- ****************** Item Buffs ****************** -->
<!-- ****************** Player Action Buffs / Procs ****************** -->
<!-- ****************** Deprecated Buffs? (Needs review) ****************** -->

<!--
List of hacks to be removed:

1x Buffs: trigger="OnReloadStop" not working at all

3x Buffs/Progression  onSelfXXXaryActionEnd  does nothing.
-->
<buffs>
	<!-- Use the redPill item to cycle through: off/bufftest1/bufftest2 etc. with primary/secondary action -->
	<buff name="bufftest01" name_key="Buff" icon="ui_game_symbol_block_repair">
		<display_value_key value="Test 1" /> <display_value value="xxx" /> <stack_type value="ignore" /><duration value="0" />
		<effect_group>



			<!--
			<passive_effect name="PerkLevel" tags="perkFromTheShadows" operation="base_set" value="5"/>
			<requirement name="ProgressionLevel" progression_name="perkAdvancedEngineering" operation="Equals" value="4"/>



		<triggered_effect trigger="onSelfPrimaryActionEnd" action="GiveExp" exp="@_crouching"/>
			<passive_effect name="NoiseMultiplier" operation="perc_subtract"  value="-.3"/>

				<passive_effect name="SilenceBlockSteps" operation="base_set"  value="1"/>
			<requirement name="CVarCompare" cvar="_crouching" operation="Equals" value="1"/>


			-->

		</effect_group>
		<effect_group><triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="bufftest02" /></effect_group>
	</buff>
	<buff name="bufftest02" name_key="Buff" icon="ui_game_symbol_block_repair">
		<display_value_key value="Test 2" /> <display_value value="xxx" /> <stack_type value="ignore" /><duration value="0" />
		<effect_group>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="infectionCounter" operation="add" value="-2800" />


		</effect_group>
		<effect_group><triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="bufftest01" /><triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="bufftest03" /></effect_group>
	</buff>
	<buff name="bufftest03" name_key="Buff" icon="ui_game_symbol_block_repair">
		<display_value_key value="Test 3" /> <display_value value="xxx" /> <stack_type value="ignore" /><duration value="0" />
		<effect_group>



		</effect_group>
		<effect_group><triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="bufftest02" /><triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="bufftest04" /></effect_group>
	</buff>
	<buff name="bufftest04" name_key="Buff" icon="ui_game_symbol_block_repair">
		<display_value_key value="Test 4" /> <display_value value="xxx" /> <stack_type value="ignore" /><duration value="0" />
		<effect_group>



		</effect_group>
		<effect_group><triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="bufftest03" /><triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="bufftest05" /></effect_group>
	</buff>
	<buff name="bufftest05" name_key="Buff" icon="ui_game_symbol_block_damage">
		<display_value_key value="Test 5" /> <display_value value="xxx" /> <stack_type value="ignore" /><duration value="0" />
		<effect_group>



		</effect_group>
		<effect_group><triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="bufftest04" /></effect_group>
	</buff>


	<!-- The god mode buff will be triggered...
	...in normal gameplay with dm on when you press the god mode button. Pressing god mode again turns it off.
	...in creative mode you start with the god buff and it's not removed regardless of pressing the godmode button.
	...in editor (developer) mode you start with the god buff and it's not removed regardless of pressing the godmode button. -->
	<buff name="god" name_key="buffGodModeName" description_key="buffGodModeDesc" tooltip_key="buffGodModeTooltip" icon="ui_game_symbol_add" icon_color="132,0,155">
		<stack_type value="ignore" />
		<display_value_key value="buffGodModeNameShort" /> <display_value value="xxx" />
		<effect_group>
			<passive_effect name="HealthLoss" operation="base_set" value="0" />
			<passive_effect name="HealthLoss" operation="perc_set" value="0" />
			<passive_effect name="HealthChangeOT" operation="perc_set" value="0" />
			<passive_effect name="WaterChangeOT" operation="perc_set" value="0" />
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="1000" />
			<passive_effect name="HealthMaxModifierOT" operation="base_add" value="100" />
			<passive_effect name="StaminaMaxModifierOT" operation="base_add" value="100" />
			<passive_effect name="CarryCapacity" operation="base_set" value="45" />
			<passive_effect name="ElementalDamageResist" operation="base_add" value="200" tags="cold,heat,electrical" />
			<passive_effect name="PhysicalDamageResist" operation="base_add" value="200" />
			<passive_effect name="PhysicalDamageResist" operation="base_add" value="200" tags="coredamageresist" />
			<passive_effect name="HealthLoss" operation="perc_add" value="-1.2" />

			<!-- <triggered_effect trigger="onSelfBuffStart" action="GiveExp" exp="@_expdeficit"/> -->

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveAllNegativeBuffs" />
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="Health" operation="set" value="1000" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="Water" operation="set" value="1000" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="Stamina" operation="set" value="1000" />

			<!--
			<triggered_effect trigger="onSelfBuffUpdate" action="LogMessage" message="Crouching"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="_sheltered"/>
			-->
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".LegHurtCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="maxedout" icon="ui_game_symbol_perk" icon_color="132,0,155">
		<display_value_key value="Max Stats" /> <display_value value="xxx" />
		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_set" value="10" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="SkillLevel" operation="base_set" value="1" />
			<passive_effect name="PerkLevel" operation="base_set" value="5" />
		</effect_group>
	</buff>
	<buff name="buffme" icon="ui_game_symbol_perk" icon_color="132,0,155">
		<display_value_key value="Max Stats" /> <display_value value="xxx" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="nerfme" />
			<passive_effect name="AttributeLevel" operation="base_set" value="10" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="SkillLevel" operation="base_set" value="1" />
			<passive_effect name="PerkLevel" operation="base_set" value="5" />
		</effect_group>
	</buff>
	<buff name="nerfme" icon="ui_game_symbol_perk" icon_color="255,0,0">
		<display_value_key value="Min Stats" /> <display_value value="xxx" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffme" />
			<passive_effect name="AttributeLevel" operation="base_set" value="1" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="SkillLevel" operation="base_set" value="1" />
			<passive_effect name="PerkLevel" operation="base_set" value="0" />
		</effect_group>
	</buff>
	<buff name="messmeup" icon="ui_game_symbol_perk" icon_color="255,0,0">
		<duration value="5" />
		<effect_group>
			<passive_effect name="WaterChangeOT" operation="base_subtract" value="10" />
			<passive_effect name="StaminaMaxModifierOT" operation="base_subtract" value="10" />

			<!--
			<passive_effect name="StaminaMaxModifierOT" operation="base_subtract" value="10"/>
			<passive_effect name="HealthMaxModifierOT" operation="base_subtract" value="10"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$foodAmount" operation="set" value="-2"/>
			-->
		</effect_group>
	</buff>

	<buff name="megadamage" icon="ui_game_symbol_destruction2" icon_color="132,0,155">
		<display_value_key value="Megadamage" /> <display_value value="xxx" />
		<effect_group>
			<passive_effect name="EntityDamage" operation="perc_set" value="100" />
			<passive_effect name="BlockDamage" operation="perc_set" value="100" />
			<passive_effect name="StaminaLoss" operation="base_set" value="0" tags="primary,secondary" />
		</effect_group>
	</buff>

	<buff name="pegasus" icon="ui_game_symbol_agility" icon_color="132,0,155">
		<display_value_key value="Pegasus" /> <display_value value="xxx" />
		<stack_type value="ignore" />
		<effect_group>
			<passive_effect name="WalkSpeed" operation="base_set" value="1.65" />
			<passive_effect name="RunSpeed" operation="base_set" value="4" />
		</effect_group>
	</buff>

<!--
	<buff name="buffDrunk01" name_key="beers" description_key="drunkDesc" tooltip_key="drunkTooltip" icon="ui_game_symbol_beer">
		<stack_type value="duration"/>
		<duration value="3"/>
		<effect_group>
			<passive_effect name="StaminaChangeOT" operation="base_add" value="2"/>
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="ping"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" enabled="true" intensity="0.45" effect_group="SpawnIn"/>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" enabled="false" intensity="0" effect_group="SpawnIn"/>
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffDrunk01"/>
		</effect_group>
	</buff>
-->

	<buff name="buffStatusCheck01" hidden="true" remove_on_death="false">
		<stack_type value="ignore" />
		<update_rate value="2" />
		<!--
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffA17b7patch">
				<requirement name="CVarCompare" cvar="$A17b7patch" operation="LT" value="1"/>
			</triggered_effect>
		</effect_group>

		<effect_group name="temp cleanup for the patch">
			<requirement name="CVarCompare" cvar="$journalB147" operation="Equals" value="0"/>
				<triggered_effect trigger="onSelfBuffUpdate" action="AddJournalEntry" journal="meleeWeaponStatsTip"/>
				<triggered_effect trigger="onSelfBuffUpdate" action="AddJournalEntry" journal="rangedWeaponStatsTip"/>
				<triggered_effect trigger="onSelfBuffUpdate" action="AddJournalEntry" journal="armorStatsTip"/>

				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$journalB147" operation="set" value="1"/>
		</effect_group>
		-->
		<effect_group>
				<!--
				<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="$illnessChance"/>
				<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="$DrowningTimerMax"/>
				<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="healthPerkIncrease"/>
				<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="medicPerkIncrease"/>


				<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="$DrunkMelee"/>
				<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="$DrunkStam"/>
				<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="$DrunkRes"/>
				<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="$DrunkHeal"/>
				<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="$PainTolerance"/>
				<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar=".DeadEyeKillCounter"/>
				-->

				<!--
				<triggered_effect trigger="onSelfPrimaryActionStart" action="LogMessage" message="Primary Start"/>
				<triggered_effect trigger="onSelfPrimaryActionEnd" action="LogMessage" message="Primary End"/>
				<triggered_effect trigger="onSelfSecondaryActionStart" action="LogMessage" message="Secondary Start"/>
				<triggered_effect trigger="onSelfSecondaryActionEnd" action="LogMessage" message="Secondary End"/>
				<triggered_effect trigger="onReloadStart" action="LogMessage" message="Reload Start"/>
				<triggered_effect trigger="onReloadStop" action="LogMessage" message="Reload Stop"/>

				<triggered_effect trigger="onSelfFirstSpawn" action="LogMessage" message="Player respawn trigger"/>
				<triggered_effect trigger="onSelfRespawn" action="LogMessage" message="Player respawn trigger"/>
				<triggered_effect trigger="onSelfLeaveGame" action="LogMessage" message="Player entered game trigger"/>
				<triggered_effect trigger="onSelfEnteredGame" action="LogMessage" message="Player entered game trigger"/>

				<triggered_effect trigger="onSelfEquipStart" action="LogMessage" message="Equip Start"/>
				<triggered_effect trigger="onSelfEquipStop" action="LogMessage" message="Equip Stop"/>
				<triggered_effect trigger="onSelfAimingGunStart" action="LogMessage" message="Aiming Start"/>
				<triggered_effect trigger="onSelfAimingGunStop" action="LogMessage" message="Aiming Stop"/>

				<triggered_effect trigger="onSelfHoldingItemCreated" action="LogMessage" message="HoldingItemCreated"/>
				<triggered_effect trigger="onSelfSecondaryActionStart" action="LogMessage" message="onSelfSecondaryActionEnd"/>

				<triggered_effect trigger="onSelfItemLooted" action="LogMessage" message="onSelfItemLooted"/>
				<triggered_effect trigger="onSelfItemLost" action="LogMessage" message="onSelfItemLost"/>
				<triggered_effect trigger="onSelfItemGained" action="LogMessage" message="onSelfItemGained"/>

				<triggered_effect trigger="onSelfRun" action="LogMessage" message="onSelfRun"/>
				<triggered_effect trigger="onSelfJump" action="LogMessage" message="onSelfJump"/>
				<triggered_effect trigger="onSelfLandJump" action="LogMessage" message="onSelfLandJump"/>
				<triggered_effect trigger="onSelfWalk" action="LogMessage" message="onSelfWalk"/>
				<triggered_effect trigger="onSelfCrouch" action="LogMessage" message="onSelfCrouch"/>
				<triggered_effect trigger="onSelfStand" action="LogMessage" message="onSelfStand"/>
				<triggered_effect trigger="onSelfCrouchRun" action="LogMessage" message="onSelfCrouchRun"/>
				<triggered_effect trigger="onSelfCrouchWalk" action="LogMessage" message="onSelfCrouchWalk"/>
				<triggered_effect trigger="onSelfSwimStart" action="LogMessage" message="onSelfSwimStart"/>
				<triggered_effect trigger="onSelfSwimStop" action="LogMessage" message="onSelfSwimStop"/>
				<triggered_effect trigger="onSelfSwimRun" action="LogMessage" message="onSelfSwimRun"/>
				<triggered_effect trigger="onSelfSwimIdle" action="LogMessage" message="onSelfSwimIdle"/>
				<triggered_effect trigger="onSelfRespawn" action="LogMessage" message="onSelfRespawn"/>
				<triggered_effect trigger="onSelfEnteredGame" action="LogMessage" message="onSelfEnteredGame"/>
				-->
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffJournalUnlocks" />

			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="$infectionMaxDuration" operation="set" value="25200" /> <!-- in seconds -->
			<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="$dysenteryMaxDuration" operation="set" value="3600" /> <!-- in seconds -->

			<!-- <triggered_effect trigger="onSelfRespawn" action="AddBuff" target="self" buff="buffStatusCheck01,buffStatusCheck02,buffPerkAbilityUpdate,buffNearDeathTraumaTrigger"/> -->

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffStatusHungry01">
				<requirement name="StatComparePercModMaxToMax" stat="Stamina" operation="LTE" value="0.5" />
				<requirement name="NotHasBuff" buff="buffStatusHungry02" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffStatusHungry02">
				<requirement name="StatComparePercModMaxToMax" stat="Stamina" operation="LTE" value="0.3" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffStatusThirsty01">
				<requirement name="StatComparePercCurrentToMax" stat="Water" operation="LTE" value="0.75" />
				<requirement name="NotHasBuff" buff="buffStatusThirsty02" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffStatusThirsty02">
				<requirement name="StatComparePercCurrentToMax" stat="Water" operation="LTE" value="0.3" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffStatusWounded">
				<requirement name="StatComparePercModMaxToMax" stat="Health" operation="LTE" value="0.5" />
			</triggered_effect>

			<!-- Remove particle effect if not on fire, this is a backup removal for remote clients -->
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveParticleEffectFromEntity" particle="p_onFire">
				<requirement name="NotHasBuff" buff="buffIsOnFire" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="AttachParticleEffectToEntity" particle="p_onFire">
				<requirement name="HasBuff" buff="buffIsOnFire" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffPerkPain">
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="LTE" value="@PainTolerance" />
			</triggered_effect>


			<!--<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="_sheltered"/>-->
			<!--<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="_shaded"/>-->
			<!--<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="_wetness"/>-->

			<!-- One time weather survival buff for newbies -->
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffNewbieCoat" />

			<!-- Weather Survival HOT -->
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffElementHot">
				<requirement name="NotHasBuff" buff="god" />
				<requirement name="CVarCompare" cvar="_coretemp" operation="GT" value="10" />
				<requirement name="CVarCompare" cvar="_coretemp" operation="LT" value="30" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffElementHot">
				<requirement name="CVarCompare" cvar="_coretemp" operation="LTE" value="10" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffElementHot">
				<requirement name="CVarCompare" cvar="_coretemp" operation="GTE" value="30" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffElementSweltering">
				<requirement name="NotHasBuff" buff="god" />
				<requirement name="CVarCompare" cvar="_coretemp" operation="GTE" value="30" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffElementSweltering">
				<requirement name="CVarCompare" cvar="_coretemp" operation="LT" value="30" />
			</triggered_effect>

			<!-- Weather Survival COLD -->
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffElementCold">
				<requirement name="NotHasBuff" buff="god" />
				<requirement name="CVarCompare" cvar="_coretemp" operation="GT" value="-30" />
				<requirement name="CVarCompare" cvar="_coretemp" operation="LT" value="-10" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffElementCold">
				<requirement name="CVarCompare" cvar="_coretemp" operation="GTE" value="-10" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffElementCold">
				<requirement name="CVarCompare" cvar="_coretemp" operation="LTE" value="-30" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffElementFreezing">
				<requirement name="NotHasBuff" buff="god" />
				<requirement name="CVarCompare" cvar="_coretemp" operation="LTE" value="-30" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffElementFreezing">
				<requirement name="CVarCompare" cvar="_coretemp" operation="GT" value="-30" />
			</triggered_effect>

			<!-- Weather Survival WETNESS -->
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffElementWet">
				<requirement name="CVarCompare" cvar="_wetness" operation="GT" value=".15" />
			</triggered_effect>

			<!-- Biome radiation effects (simplified! We only use "3" for now) -->
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffRadiation03">
				<requirement name="NotHasBuff" buff="god" />
				<requirement name="CVarCompare" cvar="_biomeradiation" operation="GT" value="2.5" />
			</triggered_effect>
			<!--
			<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="_biomeradiation"/>
			-->

			<!-- set max bleeding stacks that a player can apply -->
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$maxBleedCounter" operation="set" value="2">
				<requirement name="ProgressionLevel" progression_name="perkDeepCuts" operation="Equals" value="0" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$maxBleedCounter" operation="set" value="3">
				<requirement name="ProgressionLevel" progression_name="perkDeepCuts" operation="Equals" value="1" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$maxBleedCounter" operation="set" value="4">
				<requirement name="ProgressionLevel" progression_name="perkDeepCuts" operation="Equals" value="2" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$maxBleedCounter" operation="set" value="5">
				<requirement name="ProgressionLevel" progression_name="perkDeepCuts" operation="Equals" value="3" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$maxBleedCounter" operation="set" value="6">
				<requirement name="ProgressionLevel" progression_name="perkDeepCuts" operation="Equals" value="4" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$maxBleedCounter" operation="set" value="7">
				<requirement name="ProgressionLevel" progression_name="perkDeepCuts" operation="Equals" value="5" /></triggered_effect>

			<!-- Encumbrance from inventory slots
			This is not tied to the POSITION of the slot you use but the total number of slots used / unlocked. -->
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffEncumberedInv">
				<requirement name="CVarCompare" cvar="_encumberedslots" operation="GT" value="0" />
			</triggered_effect>

			<!-- Encumbrance from equipped items -->
			<triggered_effect trigger="onSelfEquipStart" action="AddBuff" buff="buffEncumberedWield">
				<requirement name="NotHasBuff" buff="god" />
				<requirement name="NotHasBuff" buff="buffEncumberedWield" />
			</triggered_effect>

			<!-- Reloading -->
			<triggered_effect trigger="onReloadStart" action="AddBuff" buff="buffReloadMovementPenalty">
				<requirement name="HoldingItemHasTags" tags="reloadPenalty" />
			</triggered_effect>

			<!-- Aiming -->
			<triggered_effect trigger="onSelfAimingGunStart" action="AddBuff" buff="buffHoldBreathAiming01">
				<requirement name="HoldingItemHasTags" tags="holdBreathAiming" />
			</triggered_effect>

			<!-- Drawing a bow -->
			<triggered_effect trigger="onSelfPrimaryActionStart" action="AddBuff" buff="buffDrawBow01">
				<requirement name="HoldingItemHasTags" tags="bowDrawPenalty" />
			</triggered_effect>

			<!-- Counting burst length -->
			<!--
			<triggered_effect trigger="onSelfPrimaryActionStart" action="AddBuff" buff="buffBurstCounter">


	onSelfPrimaryActionStart			works
	onSelfPrimaryActionRayHit		works
	onSelfPrimaryActionEnd
	onSelfPrimaryActionUpdate		fires constantly
	onSelfPrimaryActionAttackFinished  n/a?



			<triggered_effect trigger="onSelfPrimaryActionUpdate" action="AddBuff" buff="buffBurstCounter">
				<requirement name="HoldingItemHasTags" tags="perkAutoWeaponsDamage"/>
			</triggered_effect>
			-->



			<!-- Initialise perk abilities; buff only works onStack so fire it 2x -->
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<!-- Update cvar driven perks on buying perk levels -->
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<!-- Drowning -->
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffDrowning01">
				<requirement name="CVarCompare" cvar="_underwater" operation="Equals" value="1" />
				<requirement name="NotHasBuff" buff="buffDrowning01" />
				<requirement name="NotHasBuff" buff="buffDrowning02" />
				<requirement name="NotHasBuff" buff="buffDrowning03" />
			</triggered_effect>

			<!-- Falling -->
			<triggered_effect trigger="onSelfFallImpact" action="AddBuff" buff="buffPlayerFallingDamage">
				<requirement name="CVarCompare" cvar="_fallSpeed" operation="GTE" value=".08" /> <!-- a bit over 1.5m while walking -->
			</triggered_effect>

			<!-- Crouching -->
			<triggered_effect trigger="onSelfCrouch" action="AddBuff" buff="buffCrouching" />

			<!-- Tracking leveling / level up -->
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffLevelUpTracking">
				<requirement name="PlayerLevel" operation="GT" value="@$LastPlayerLevel" />
			</triggered_effect>

			<!-- Player HP / stamina per level -->
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$PlayerLevelBonus" operation="set" value="@$LastPlayerLevel" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$PlayerLevelBonus" operation="add" value="-1">
				<requirement name="PlayerLevel" operation="LT" value="2" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$PlayerLevelBonus" operation="set" value="100">
				<requirement name="PlayerLevel" operation="GT" value="100" />
			</triggered_effect>

			<passive_effect name="HealthMax" operation="base_add" value="@$PlayerLevelBonus" />
			<passive_effect name="StaminaMax" operation="base_add" value="@$PlayerLevelBonus" />
			<passive_effect name="WaterMax" operation="base_add" value="@$PlayerLevelBonus" />
		</effect_group>

		<!--
		<effect_group name="Power Attack Grunt">
			<triggered_effect trigger="onSelfSecondaryActionStart" action="LogMessage" message=" SECONDARY attack, looking at ENTITY">
				<requirement name="IsLookingAtEntity"/>
			</triggered_effect>

			<triggered_effect trigger="onSelfSecondaryActionStart" action="LogMessage" message=" SECONDARY attack, looking at BLOCK">
				<requirement name="IsLookingAtBlock"/>
			</triggered_effect>
		</effect_group>
		-->

		<effect_group name="Power Attack Grunt">
			<triggered_effect trigger="onSelfSecondaryActionStart" action="PlaySound" sound="player#powerattack">
				<requirement name="CVarCompare" cvar="_crouching" operation="Equals" value="0" />
				<requirement name="!HoldingItemBroken" />
				<requirement name="HoldingItemHasTags" tags="grunting" />
				<requirement name="!HoldingItemHasTags" tags="thrownWeapon" />
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="80" />
			</triggered_effect>

			<triggered_effect trigger="onSelfSecondaryActionEnd" action="PlaySound" sound="player#powerattack">
				<requirement name="CVarCompare" cvar="_crouching" operation="Equals" value="0" />
				<requirement name="!HoldingItemBroken" />
				<requirement name="HoldingItemHasTags" tags="grunting" />
				<requirement name="HoldingItemHasTags" tags="thrownWeapon" />
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="80" />
			</triggered_effect>
		</effect_group>

		<effect_group name="Pain Sound">
			<triggered_effect trigger="onOtherDamagedSelf" action="PlaySound" sound="player#painlg">
				<requirement name="StatComparePercCurrentToMax" operation="LTE" value="0.5" />
			</triggered_effect>
			<triggered_effect trigger="onOtherDamagedSelf" action="PlaySound" sound="player#painsm">
				<requirement name="StatComparePercCurrentToMax" operation="GT" value="0.5" />
			</triggered_effect>
		</effect_group>
	</buff>

	<buff name="buffStatusCheck02" hidden="true" remove_on_death="false">
		<stack_type value="ignore" />
		<update_rate value="2.217" />

		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightWorn" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyWorn" operation="set" value="0" />
		</effect_group>

		<effect_group> <!-- light armor, detemine how many pieces are worn -->
			<requirements compare_type="or">
				<requirement name="ProgressionLevel" progression_name="perkLightArmor" operation="GT" value="0" />
				<requirement name="HasBuff" buff="buffUrbanCombatAdrenalineRush" />
			</requirements>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightWorn" operation="set" value="1">
					<requirement name="WornItems" tags="lightArmorPenalty" operation="Equals" value="1" />
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightWorn" operation="set" value="2">
					<requirement name="CVarCompare" cvar=".ArmorLightWorn" operation="Equals" value="0" />
					<requirement name="WornItems" tags="lightArmorPenalty" operation="Equals" value="2" />
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightWorn" operation="set" value="3">
					<requirement name="CVarCompare" cvar=".ArmorLightWorn" operation="Equals" value="0" />
					<requirement name="WornItems" tags="lightArmorPenalty" operation="Equals" value="3" />
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightWorn" operation="set" value="4">
					<requirement name="CVarCompare" cvar=".ArmorLightWorn" operation="Equals" value="0" />
					<requirement name="WornItems" tags="lightArmorPenalty" operation="Equals" value="4" />
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightWorn" operation="set" value="5">
					<requirement name="CVarCompare" cvar=".ArmorLightWorn" operation="Equals" value="0" />
					<requirement name="WornItems" tags="lightArmorPenalty" operation="Equals" value="5" />
				</triggered_effect>
		</effect_group>

		<effect_group> <!-- light armor, determine how much of the armor-internal passives is discounted / added back in -->
			<requirements compare_type="or">
				<requirement name="ProgressionLevel" progression_name="perkLightArmor" operation="Equals" value="0" />
				<requirement name="CVarCompare" cvar=".ArmorLightWorn" operation="Equals" value="0" />
			</requirements>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaWalk" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaRun" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightMobility" operation="set" value="0" />
		</effect_group>
		<effect_group> <!-- light armor, determine which % the armor perk restores -->
			<requirement name="ProgressionLevel" progression_name="perkLightArmor" operation="Equals" value="1" />
			<requirement name="CVarCompare" cvar=".ArmorLightWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaWalk" operation="set" value=".1" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightMobility" operation="set" value=".15" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkLightArmor" operation="Equals" value="2" />
			<requirement name="CVarCompare" cvar=".ArmorLightWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaWalk" operation="set" value=".2" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightMobility" operation="set" value=".30" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkLightArmor" operation="Equals" value="3" />
			<requirement name="CVarCompare" cvar=".ArmorLightWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaWalk" operation="set" value=".3" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightMobility" operation="set" value=".45" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkLightArmor" operation="Equals" value="4" />
			<requirement name="CVarCompare" cvar=".ArmorLightWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaWalk" operation="set" value=".4" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightMobility" operation="set" value=".60" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkLightArmor" operation="Equals" value="5" />
			<requirement name="CVarCompare" cvar=".ArmorLightWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaWalk" operation="set" value=".5" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightMobility" operation="set" value=".75" />
		</effect_group>
		<effect_group>
			<requirement name="HasBuff" buff="buffUrbanCombatAdrenalineRush" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightMobility" operation="set" value="1" />
		</effect_group>

		<effect_group> <!-- light armor, add penalties back in -->
			<requirement name="CVarCompare" cvar=".ArmorLightWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaRun" operation="set" value="@.ArmorLightStaminaWalk" />
				<!-- the full penalty that 1 piece of light armor adds -->
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaRun" operation="multiply" value="0.0562" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaWalk" operation="multiply" value="0.0281" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightMobility" operation="multiply" value="0.04" />

				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaRun" operation="multiply" value="@.ArmorLightWorn" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightStaminaWalk" operation="multiply" value="@.ArmorLightWorn" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorLightMobility" operation="multiply" value="@.ArmorLightWorn" />

				<passive_effect name="StaminaChangeOT" operation="perc_add" value="@.ArmorLightStaminaWalk" tags="walking" />
				<passive_effect name="StaminaChangeOT" operation="perc_add" value="@.ArmorLightStaminaRun" tags="running" />
				<passive_effect name="Mobility" operation="perc_add" value="@.ArmorLightMobility" />
		</effect_group>

		<effect_group> <!-- heavy armor, detemine how many pieces are worn -->
			<requirements compare_type="or">
				<requirement name="ProgressionLevel" progression_name="perkHeavyArmor" operation="GT" value="0" />
				<requirement name="HasBuff" buff="buffUrbanCombatAdrenalineRush" />
			</requirements>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyWorn" operation="set" value="1">
					<requirement name="WornItems" tags="heavyArmorPenalty" operation="Equals" value="1" />
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyWorn" operation="set" value="2">
					<requirement name="CVarCompare" cvar=".ArmorHeavyWorn" operation="Equals" value="0" />
					<requirement name="WornItems" tags="heavyArmorPenalty" operation="Equals" value="2" />
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyWorn" operation="set" value="3">
					<requirement name="CVarCompare" cvar=".ArmorHeavyWorn" operation="Equals" value="0" />
					<requirement name="WornItems" tags="heavyArmorPenalty" operation="Equals" value="3" />
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyWorn" operation="set" value="4">
					<requirement name="CVarCompare" cvar=".ArmorHeavyWorn" operation="Equals" value="0" />
					<requirement name="WornItems" tags="heavyArmorPenalty" operation="Equals" value="4" />
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyWorn" operation="set" value="5">
					<requirement name="CVarCompare" cvar=".ArmorHeavyWorn" operation="Equals" value="0" />
					<requirement name="WornItems" tags="heavyArmorPenalty" operation="Equals" value="5" />
				</triggered_effect>
		</effect_group>

		<effect_group> <!-- heavy armor, determine how much of the armor-internal passives is discounted / added back in -->
			<requirements compare_type="or">
				<requirement name="ProgressionLevel" progression_name="perkHeavyArmor" operation="Equals" value="0" />
				<requirement name="CVarCompare" cvar=".ArmorHeavyWorn" operation="Equals" value="0" />
			</requirements>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaWalk" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaRun" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyMobility" operation="set" value="0" />
		</effect_group>
		<effect_group> <!-- heavy armor, determine which % the armor perk restores -->
			<requirement name="ProgressionLevel" progression_name="perkHeavyArmor" operation="Equals" value="1" />
			<requirement name="CVarCompare" cvar=".ArmorHeavyWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaWalk" operation="set" value=".05" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkHeavyArmor" operation="Equals" value="2" />
			<requirement name="CVarCompare" cvar=".ArmorHeavyWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaWalk" operation="set" value=".1" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkHeavyArmor" operation="Equals" value="3" />
			<requirement name="CVarCompare" cvar=".ArmorHeavyWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaWalk" operation="set" value=".15" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkHeavyArmor" operation="Equals" value="4" />
			<requirement name="CVarCompare" cvar=".ArmorHeavyWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaWalk" operation="set" value=".2" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkHeavyArmor" operation="Equals" value="5" />
			<requirement name="CVarCompare" cvar=".ArmorHeavyWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaWalk" operation="set" value=".25" />
		</effect_group>

		<effect_group> <!-- heavy armor, add penalties back in -->
			<requirement name="CVarCompare" cvar=".ArmorHeavyWorn" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaRun" operation="set" value="@.ArmorHeavyStaminaWalk" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyMobility" operation="set" value="@.ArmorHeavyStaminaWalk" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyMobility" operation="set" value="1">
					<requirement name="HasBuff" buff="buffUrbanCombatAdrenalineRush" />
				</triggered_effect>

				<!-- the full penalty that 1 piece of heavy armor adds -->
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaRun" operation="multiply" value="0.09" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaWalk" operation="multiply" value="0.045" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyMobility" operation="multiply" value="0.06" />

				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaRun" operation="multiply" value="@.ArmorHeavyWorn" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyStaminaWalk" operation="multiply" value="@.ArmorHeavyWorn" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".ArmorHeavyMobility" operation="multiply" value="@.ArmorHeavyWorn" />

				<passive_effect name="StaminaChangeOT" operation="perc_add" value="@.ArmorHeavyStaminaWalk" tags="walking" />
				<passive_effect name="StaminaChangeOT" operation="perc_add" value="@.ArmorHeavyStaminaRun" tags="running" />
				<passive_effect name="Mobility" operation="perc_add" value="@.ArmorHeavyMobility" />
		</effect_group>

	</buff>

	<!--
	<buff name="buffA17b7patch" hidden="true" remove_on_death="false">
		<stack_type value="ignore"/>
		<duration value=".8"/>
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$A17b7patch" operation="set" value="1"/>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffHealHealth"/>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffHealHealthMax"/>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffHealStaminaMax"/>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffHealWaterMax"/>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffWaterStaminaRegen"/>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveAllNegativeBuffs"/>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$foodAmountAdd" operation="set" value="55"/>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$waterAmountAdd" operation="set" value="55"/>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$foodAmount" operation="set" value="45"/>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$waterAmount" operation="set" value="45"/>
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffProcessConsumables"/>
		</effect_group>
	</buff>
	-->

	<buff name="buffJournalUnlocks" hidden="true" remove_on_death="false">
		<stack_type value="ignore" />
		<duration value="500" />
		<update_rate value="20" />
		<effect_group name="staggered unlock for journal tips to avoid blocking at game start">
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$journalUnlockTimer" operation="add" value="1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$journalUnlockTimer" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffUpdate" action="AddJournalEntry" journal="survivalTip">
				<requirement name="CVarCompare" cvar="$journalUnlockTimer" operation="Equals" value="6" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddJournalEntry" journal="firstAidTip">
				<requirement name="CVarCompare" cvar="$journalUnlockTimer" operation="Equals" value="7" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddJournalEntry" journal="infectionTip">
				<requirement name="CVarCompare" cvar="$journalUnlockTimer" operation="Equals" value="8" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddJournalEntry" journal="waterTip">
				<requirement name="CVarCompare" cvar="$journalUnlockTimer" operation="Equals" value="9" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddJournalEntry" journal="foodPoisoningTip">
				<requirement name="CVarCompare" cvar="$journalUnlockTimer" operation="Equals" value="10" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddJournalEntry" journal="meleeWeaponStatsTip">
				<requirement name="CVarCompare" cvar="$journalUnlockTimer" operation="Equals" value="11" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddJournalEntry" journal="rangedWeaponStatsTip">
				<requirement name="CVarCompare" cvar="$journalUnlockTimer" operation="Equals" value="12" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddJournalEntry" journal="armorStatsTip">
				<requirement name="CVarCompare" cvar="$journalUnlockTimer" operation="Equals" value="13" /> </triggered_effect>
		</effect_group>
	</buff>

	<buff name="buffLevelUpTracking" hidden="true" remove_on_death="false">
		<stack_type value="ignore" />
		<duration value="20" />
		<update_rate value=".1" />

		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$LastPlayerLevel" operation="add" value="1">
				<requirement name="PlayerLevel" operation="GT" value="@$LastPlayerLevel" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$xpFromLootThisLevel" operation="set" value="@_xpFromLoot" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$xpFromHarvestingThisLevel" operation="set" value="@_xpFromHarvesting" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$xpFromKillThisLevel" operation="set" value="@_xpFromKill" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$xpFromLootThisLevel" operation="subtract" value="@$xpFromLootLast" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$xpFromHarvestingThisLevel" operation="subtract" value="@$xpFromHarvestingLast" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$xpFromKillThisLevel" operation="subtract" value="@$xpFromKillLast" />

			<triggered_effect trigger="onSelfBuffStart" action="LogMessage" message="XP gained during the last level:" />
			<triggered_effect trigger="onSelfBuffStart" action="CVarLogValue" cvar="$xpFromLootThisLevel" />
			<triggered_effect trigger="onSelfBuffStart" action="CVarLogValue" cvar="$xpFromHarvestingThisLevel" />
			<triggered_effect trigger="onSelfBuffStart" action="CVarLogValue" cvar="$xpFromKillThisLevel" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$xpFromLootLast" operation="set" value="@_xpFromLoot" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$xpFromHarvestingLast" operation="set" value="@_xpFromHarvesting" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$xpFromKillLast" operation="set" value="@_xpFromKill" />

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$xpFromLootThisLevel" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$xpFromHarvestingThisLevel" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$xpFromKillThisLevel" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffPerkAbilityUpdate" hidden="true" remove_on_death="false">
		<!-- There is no trigger for a perk being lowered by the governing attribute dropping below a perk level's requirement. -->
		<stack_type value="replace" />
		<effect_group>
			<!-- <triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$DrunkMelee" operation="set" value="0"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$DrunkStam" operation="set" value="0"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$DrunkRes" operation="set" value="0"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$DrunkHeal" operation="set" value="0"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$PainTolerance" operation="set" value="0"/> -->
			<triggered_effect trigger="onSelfDied" action="ModifyCVar" cvar=".DeadEyeKillCounter" operation="set" value="0" />

			<!-- <triggered_effect trigger="onSelfRespawn" action="ModifyCVar" cvar="$DrunkMelee" operation="set" value="0"/>
			<triggered_effect trigger="onSelfRespawn" action="ModifyCVar" cvar="$DrunkStam" operation="set" value="0"/>
			<triggered_effect trigger="onSelfRespawn" action="ModifyCVar" cvar="$DrunkRes" operation="set" value="0"/>
			<triggered_effect trigger="onSelfRespawn" action="ModifyCVar" cvar="$DrunkHeal" operation="set" value="0"/>
			<triggered_effect trigger="onSelfRespawn" action="ModifyCVar" cvar="$PainTolerance" operation="set" value="0"/> -->

			<!-- perkIntrinsicImmunity update; will likely have to overhaul diseases but... not now -->
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$illnessChance" operation="set" value="20">
				<requirement name="ProgressionLevel" progression_name="perkIntrinsicImmunity" operation="Equals" value="0" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$illnessChance" operation="set" value="18">
				<requirement name="ProgressionLevel" progression_name="perkIntrinsicImmunity" operation="Equals" value="1" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$illnessChance" operation="set" value="16">
				<requirement name="ProgressionLevel" progression_name="perkIntrinsicImmunity" operation="Equals" value="2" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$illnessChance" operation="set" value="14">
				<requirement name="ProgressionLevel" progression_name="perkIntrinsicImmunity" operation="Equals" value="3" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$illnessChance" operation="set" value="12">
				<requirement name="ProgressionLevel" progression_name="perkIntrinsicImmunity" operation="Equals" value="4" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$illnessChance" operation="set" value="10">
				<requirement name="ProgressionLevel" progression_name="perkIntrinsicImmunity" operation="Equals" value="5" /> </triggered_effect>

			<!-- perkSlowMetabolism : food poisoning / dysentery resistence -->
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismResist" operation="set" value="0">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="0" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismResist" operation="set" value="-1">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="1" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismResist" operation="set" value="-2">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="2" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismResist" operation="set" value="-3">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="3" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismResist" operation="set" value="-4">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="4" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismResist" operation="set" value="-5">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="5" /></triggered_effect>

			<!-- perkSlowMetabolism : breath hold duration update -->
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$DrowningTimerMax" operation="set" value="-12" />
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$DrowningTimerMax" operation="multiply" value="@$MetabolismResist" />
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$DrowningTimerMax" operation="add" value="30" />

			<!-- perkSlowMetabolism : buff duration update -->
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismDuration" operation="set" value="1">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="0" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismDuration" operation="set" value=".909">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="1" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismDuration" operation="set" value=".833">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="2" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismDuration" operation="set" value=".769">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="3" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismDuration" operation="set" value=".714">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="4" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$MetabolismDuration" operation="set" value=".667">
				<requirement name="ProgressionLevel" progression_name="perkSlowMetabolism" operation="Equals" value="5" /></triggered_effect>

			<!-- perkPhysician update -->
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="healthPerkIncrease" operation="set" value="2">
				<requirement name="ProgressionLevel" progression_name="perkPhysician" operation="LT" value="3" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="healthPerkIncrease" operation="set" value="2.5">
				<requirement name="ProgressionLevel" progression_name="perkPhysician" operation="Equals" value="3" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="healthPerkIncrease" operation="set" value="3">
				<requirement name="ProgressionLevel" progression_name="perkPhysician" operation="Equals" value="4" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="healthPerkIncrease" operation="set" value="4">
				<requirement name="ProgressionLevel" progression_name="perkPhysician" operation="Equals" value="5" /></triggered_effect>

			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="medicPerkIncrease" operation="set" value="1">
				<requirement name="ProgressionLevel" progression_name="perkPhysician" operation="LT" value="3" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="medicPerkIncrease" operation="set" value="1.25">
				<requirement name="ProgressionLevel" progression_name="perkPhysician" operation="Equals" value="3" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="medicPerkIncrease" operation="set" value="1.5">
				<requirement name="ProgressionLevel" progression_name="perkPhysician" operation="Equals" value="4" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="medicPerkIncrease" operation="set" value="2">
				<requirement name="ProgressionLevel" progression_name="perkPhysician" operation="Equals" value="5" /></triggered_effect>

			<!-- perkParkour update -->
			<!-- 1m = .01414 -->
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$parkourBonus" operation="set" value="0">
				<requirement name="ProgressionLevel" progression_name="perkParkour" operation="Equals" value="0" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$parkourBonus" operation="set" value=".0162">
				<requirement name="ProgressionLevel" progression_name="perkParkour" operation="Equals" value="1" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$parkourBonus" operation="set" value=".0304">
				<requirement name="ProgressionLevel" progression_name="perkParkour" operation="Equals" value="2" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$parkourBonus" operation="set" value=".0445">
				<requirement name="ProgressionLevel" progression_name="perkParkour" operation="Equals" value="3" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$parkourBonus" operation="set" value=".0587">
				<requirement name="ProgressionLevel" progression_name="perkParkour" operation="Equals" value="4" /> </triggered_effect>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$parkourBonus" operation="set" value=".0728">
				<requirement name="ProgressionLevel" progression_name="perkParkour" operation="Equals" value="5" /> </triggered_effect>
		</effect_group>
	</buff>

	<buff name="buffCrouching" hidden="true">
		<stack_type value="ignore" />
		<effect_group>
			<triggered_effect trigger="onSelfStand" action="RemoveBuff" buff="buffCrouching" />
			<triggered_effect trigger="onSelfEnteredGame" action="RemoveBuff" buff="buffCrouching" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" effect_name="Dark" intensity=".3" fade=".5" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" effect_name="Dark" intensity="0" fade=".5" />

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffCrouching">
				<requirement name="CVarCompare" cvar="_crouching" operation="Equals" value="0" />
			</triggered_effect>
		</effect_group>
	</buff>

	<buff name="buffHarvest" tooltip_key="buffHarvestTooltip" hidden="true" remove_on_death="false">
		<!-- buff multiple times to increase effect. Enable God mode or leave game to disable. -->
		<damage_type value="stun" />
		<stack_type value="effect" />
		<duration value="0" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffHarvestBonus" operation="set" value=".5" />
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$buffHarvestBonus" operation="add" value=".5" />
			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="open_apache_artifact_chest" />
			<passive_effect name="HarvestCount" operation="base_add" value="@$buffHarvestBonus" />
			<triggered_effect trigger="onSelfLeaveGame" action="RemoveBuff" buff="buffHarvest" />
			<triggered_effect trigger="onSelfEnteredGame" action="RemoveBuff" buff="buffHarvest" />
		</effect_group>
	</buff>

	<buff name="buffNewbieCoat" name_key="buffNewbieCoatName" description_key="buffNewbieCoatDesc" icon="ui_game_symbol_light_armor" remove_on_death="false">
		<!-- Be careful with that remove_on_death="false". You may have to restart screen effects, particles, etc. on game load. -->
		<stack_type value="ignore" />
		<effect_group>
			<requirement name="PlayerLevel" operation="LT" value="2" />
				<passive_effect name="HypothermalResist" operation="base_add" value="65" />
				<passive_effect name="HyperthermalResist" operation="base_add" value="65" />
		</effect_group>
		<effect_group>
			<requirement name="PlayerLevel" operation="Equals" value="2" />
				<passive_effect name="HypothermalResist" operation="base_add" value="52" />
				<passive_effect name="HyperthermalResist" operation="base_add" value="52" />
		</effect_group>
		<effect_group>
			<requirement name="PlayerLevel" operation="Equals" value="3" />
				<passive_effect name="HypothermalResist" operation="base_add" value="39" />
				<passive_effect name="HyperthermalResist" operation="base_add" value="39" />
		</effect_group>
		<effect_group>
			<requirement name="PlayerLevel" operation="Equals" value="4" />
				<passive_effect name="HypothermalResist" operation="base_add" value="26" />
				<passive_effect name="HyperthermalResist" operation="base_add" value="26" />
		</effect_group>
		<effect_group>
			<requirement name="PlayerLevel" operation="Equals" value="5" />
				<passive_effect name="HypothermalResist" operation="base_add" value="13" />
				<passive_effect name="HyperthermalResist" operation="base_add" value="13" />
		</effect_group>

		<effect_group>
			<requirement name="PlayerLevel" operation="LTE" value="5" />
				<passive_effect name="ExpDeficitPerDeathPercentage" operation="base_set" value="0" />
				<passive_effect name="ExpDeficitMaxPercentage" operation="base_set" value="0" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffNewbieCoat">
				<requirement name="PlayerLevel" operation="GT" value="5" />
			</triggered_effect>

			<!-- Taking care of food/water not being maxed with all the game start / initial chunk generation -->
			<passive_effect name="WaterChangeOT" operation="base_add" value="2,2" duration="0,8" />
			<passive_effect name="StaminaMaxModifierOT" operation="base_add" value="2,2" duration="0,8" />
			<passive_effect name="HealthChangeOT" operation="base_add" value="2,2" duration="0,8" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$foodAmountAdd" operation="add" value="99" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterAmountAdd" operation="add" value="99" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$foodAmount" operation="add" value="48" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterAmount" operation="add" value="48" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffProcessConsumables" />
		</effect_group>
		<!-- <duration value="0"/>
		<update_rate value="180"/>
		 180 x 40 degrees = 7200s = 2 game days = 2 RT hours

		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="NewbieTempProtection"/>

			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffNewbieCoat">
				<requirement name="CVarCompare" cvar="NewbieTempProtection" operation="LT" value="0"/>
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="NewbieTempProtection" operation="set" value="40">
				<requirement name="CVarCompare" cvar="NewbieTempProtection" operation="Equals" value="0"/>
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="NewbieTempProtection" operation="add" value="-1"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffNewbieCoat">
				<requirement name="CVarCompare" cvar="NewbieTempProtection" operation="LT" value="0"/>
			</triggered_effect>
			<passive_effect name="HypothermalResist" operation="base_add" value="@NewbieTempProtection"/>
			<passive_effect name="HyperthermalResist" operation="base_add" value="@NewbieTempProtection"/>
		</effect_group>

	<buff name="buffNewbieCoatReset"><duration value="0.5"/>
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="NewbieTempProtection" operation="set" value="0"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="NewbieTempProtection" operation="set" value="2"/>
		</effect_group>
	</buff>
	-->
	</buff>

<!-- ****************** Perk Buffs: Active buffs triggered by Perks ****************** -->

	<buff name="buffPerkPummelPete" name_key="buffPerkPummelPeteName" description_key="buffPerkPummelPeteDesc" icon="ui_game_symbol_stunned">
		<stack_type value="replace" />
		<duration value="1.8" />

		<effect_group name="perkT3">
			<!-- counter goes up on attack, buff gets stacked up at the same time -->
			<requirement name="ProgressionLevel" progression_name="perkPummelPete" operation="Equals" value="3" />
			<requirement name="CVarCompare" cvar=".PummelPeteCombo" operation="GTE" value="4" />
				<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".PummelPeteBonusReady" operation="set" value="1" />
		</effect_group>
		<effect_group name="perkT4">
			<requirement name="ProgressionLevel" progression_name="perkPummelPete" operation="Equals" value="4" />
			<requirement name="CVarCompare" cvar=".PummelPeteCombo" operation="Equals" value="3" />
				<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".PummelPeteBonusReady" operation="set" value="1" />
		</effect_group>
		<effect_group name="perkT5">
			<requirement name="ProgressionLevel" progression_name="perkPummelPete" operation="Equals" value="5" />
			<requirement name="CVarCompare" cvar=".PummelPeteCombo" operation="Equals" value="2" />
				<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".PummelPeteBonusReady" operation="set" value="1" />
		</effect_group>

		<effect_group name="apply bonus after this attack has finished">
			<requirement name="CVarCompare" cvar=".PummelPeteBonusReady" operation="GT" value="0" />
				<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" buff="buffPerkPummelPeteBonus" />
				<triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" buff="buffPerkPummelPete" />
				<triggered_effect trigger="onSelfSecondaryActionEnd" action="AddBuff" buff="buffPerkPummelPeteBonus" />
				<triggered_effect trigger="onSelfSecondaryActionEnd" action="RemoveBuff" buff="buffPerkPummelPete" />
		</effect_group>

		<effect_group name="cleanup">
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".PummelPeteCombo" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".PummelPeteBonusReady" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffPerkPummelPeteBonus" name_key="buffPerkPummelPeteBonusName" description_key="buffPerkPummelPeteBonusDesc" icon="ui_game_symbol_stunned" icon_color="0,255,0" icon_blink="true">
		<stack_type value="ignore" />
		<duration value="5" />
		<effect_group>
			<passive_effect name="EntityDamage" operation="perc_add" value="1" tags="perkPummelPete" />
			<triggered_effect trigger="onSelfAttackedOther" action="ModifyCVar" cvar=".PummelPeteBonusRemove" operation="set" value="1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".PummelPeteBonusRemove" operation="set" value="0" />
		</effect_group>

		<effect_group name="wait until the next attack (with any weapon) has started AND ended, then remove bonus">
			<requirement name="CVarCompare" cvar=".PummelPeteBonusRemove" operation="GT" value="0" />
				<triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" buff="buffPerkPummelPeteBonus" />
				<triggered_effect trigger="onSelfSecondaryActionEnd" action="RemoveBuff" buff="buffPerkPummelPeteBonus" />
		</effect_group>
	</buff>


	<buff name="buffPerkGunslinger" name_key="buffPerkGunslingerName" description_key="buffPerkGunslingerDesc" icon="ui_game_symbol_gunslinger">
		<stack_type value="replace" />
		<duration value="1.8" />

		<effect_group name="perkT3">
			<!-- counter goes up on attack, buff gets stacked up at the same time -->
			<requirement name="ProgressionLevel" progression_name="perkGunslinger" operation="Equals" value="3" />
			<requirement name="CVarCompare" cvar=".GunslingerCombo" operation="GTE" value="4" />
				<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".GunslingerBonusReady" operation="set" value="1" />
		</effect_group>
		<effect_group name="perkT4">
			<requirement name="ProgressionLevel" progression_name="perkGunslinger" operation="Equals" value="4" />
			<requirement name="CVarCompare" cvar=".GunslingerCombo" operation="Equals" value="3" />
				<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".GunslingerBonusReady" operation="set" value="1" />
		</effect_group>
		<effect_group name="perkT5">
			<requirement name="ProgressionLevel" progression_name="perkGunslinger" operation="Equals" value="5" />
			<requirement name="CVarCompare" cvar=".GunslingerCombo" operation="Equals" value="2" />
				<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".GunslingerBonusReady" operation="set" value="1" />
		</effect_group>

		<effect_group name="apply bonus after this attack has finished">
			<requirement name="CVarCompare" cvar=".GunslingerBonusReady" operation="GT" value="0" />
				<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" buff="buffPerkGunslingerBonus" />
				<triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" buff="buffPerkGunslinger" />
				<triggered_effect trigger="onSelfSecondaryActionEnd" action="AddBuff" buff="buffPerkGunslingerBonus" />
				<triggered_effect trigger="onSelfSecondaryActionEnd" action="RemoveBuff" buff="buffPerkGunslinger" />
		</effect_group>

		<effect_group name="cleanup">
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".GunslingerCombo" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".GunslingerBonusReady" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffPerkGunslingerBonus" name_key="buffPerkGunslingerBonusName" description_key="buffPerkGunslingerBonusDesc" icon="ui_game_symbol_gunslinger" icon_color="0,255,0" icon_blink="true">
		<stack_type value="ignore" />
		<duration value="5" />
		<effect_group>
			<passive_effect name="EntityDamage" operation="perc_add" value="1" tags="perkGunslinger" />
			<triggered_effect trigger="onSelfAttackedOther" action="ModifyCVar" cvar=".GunslingerBonusRemove" operation="set" value="1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".GunslingerBonusRemove" operation="set" value="0" />
		</effect_group>

		<effect_group name="wait until the next attack (with any weapon) has started AND ended, then remove bonus">
			<requirement name="CVarCompare" cvar=".GunslingerBonusRemove" operation="GT" value="0" />
				<triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" buff="buffPerkGunslingerBonus" />
				<triggered_effect trigger="onSelfSecondaryActionEnd" action="RemoveBuff" buff="buffPerkGunslingerBonus" />
		</effect_group>
	</buff>

	<buff name="buffPerkPain" name_key="buffPerkPainName" description_key="buffPerkPainDesc" icon="ui_game_symbol_boxer">
		<effect_group>
			<passive_effect name="EntityDamage" operation="perc_add" value="0.15" />
			<passive_effect name="StaminaChangeOT" operation="base_add" value="5" />

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffPerkPain">
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="GT" value="@PainTolerance" />
			</triggered_effect>
		</effect_group>
	</buff>

	<buff name="buffDeadEyeDetector" hidden="true">
		<stack_type value="replace" />
		<duration value=".1" />

		<effect_group>
			<!-- count the kill if both an attack with the weapon and a kill have happened -->
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".DeadEyeKillCounter" operation="add" value=".1">
				<requirement name="CVarCompare" cvar=".DeadEyeDetector" operation="GT" value="0" />
				<requirement name="CVarCompare" cvar=".DeadEyeKillCounter" operation="LT" value=".3" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffDeadEye">
				<requirement name="CVarCompare" cvar=".DeadEyeKillCounter" operation="GT" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".DeadEyeDetector" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffDeadEyeDetector" />
		</effect_group>
	</buff>

	<buff name="buffDeadEye" name_key="buffDeadEyeName" description_key="buffDeadEyeDesc" icon="ui_game_symbol_map_cursor" icon_color="0,255,0" icon_blink="true">
		<stack_type value="replace" />
		<duration value="6" />
		<display_value value=".DeadEyeEffectDisplay" />
		<display_value_key value="+{0}%" />

		<effect_group>
			<!-- 1st shot	2nd shot	3rd shot
				T3	10	20	30
				T4	20	30	40
				T5	30	40	50 -->


<!-- 1st shot	2nd shot	3rd shot
				T5	30	40	50
Kill Streak: Successive kills increase damage bonus by 10%, 20% to a maximum of 30%.
Kill Streak: Successive kills increase damage bonus by 20%, 30% to a maximum of 40%.
Kill Streak: Successive kills increase damage bonus by 30%, 40% up to a maximum of 50%.
-->

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".DeadEyeEffectBase" operation="set" value="0">
				<requirement name="ProgressionLevel" progression_name="perkDeadEye" operation="LTE" value="3" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".DeadEyeEffectBase" operation="set" value=".1">
				<requirement name="ProgressionLevel" progression_name="perkDeadEye" operation="Equals" value="4" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".DeadEyeEffectBase" operation="set" value=".2">
				<requirement name="ProgressionLevel" progression_name="perkDeadEye" operation="Equals" value="5" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".DeadEyeEffectApply" operation="set" value="@.DeadEyeKillCounter" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".DeadEyeEffectApply" operation="add" value="@.DeadEyeEffectBase" />

			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".DeadEyeEffectApply" operation="set" value="@.DeadEyeKillCounter" />
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".DeadEyeEffectApply" operation="add" value="@.DeadEyeEffectBase" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".DeadEyeEffectDisplay" operation="set" value="@.DeadEyeEffectApply" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".DeadEyeEffectDisplay" operation="multiply" value="100" />
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".DeadEyeEffectDisplay" operation="set" value="@.DeadEyeEffectApply" />
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".DeadEyeEffectDisplay" operation="multiply" value="100" />

			<passive_effect name="EntityDamage" operation="perc_add" value="@.DeadEyeEffectApply" tags="ranged">
				<requirement name="HoldingItemHasTags" tags="perkDeadEye" />
			</passive_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDeadEye">
				<requirement name="CVarCompare" cvar=".DeadEyeKillCounter" operation="LTE" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".DeadEyeKillCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".DeadEyeEffectApply" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".DeadEyeEffectBase" operation="set" value="0" />
			<!--
			<triggered_effect trigger="onSelfBuffStart" action="LogMessage" message="   One shot buff started"/>
			<triggered_effect trigger="onSelfBuffStack" action="LogMessage" message="   One shot buff STACKED"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar=".DeadEyeEffectApply"/>
			-->
		</effect_group>
	</buff>


	<buff name="buffPerkCharismaticNature" name_key="perkCharismaticNatureName" description_key="buffPerkCharismaticNatureDesc" icon="ui_game_symbol_talk" icon_color="0,255,0" icon_blink="false" hidden="false">
	<!--
	<buff name="buffPerkCharismaticNature" tooltip_key="buffPerkCharismaticNatureTooltip" icon="ui_game_symbol_talk">
	-->
		<stack_type value="replace" />
		<duration value="5" />

		<effect_group>
			<requirement name="CVarCompare" cvar="CharismaticNature" operation="GTE" value="1" />
			<requirement name="CVarCompare" cvar="CharismaticNature" operation="LTE" value="3" />
				<passive_effect name="AttributeLevel" tags="attFortitude" operation="base_add" value="1" />
				<passive_effect name="AttributeLevel" tags="attAgility" operation="base_add" value="1" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="CharismaticNature" operation="GTE" value="2" />
				<passive_effect name="EntityDamage" operation="perc_add" value=".2" />
				<passive_effect name="BlockDamage" operation="perc_add" value=".2" tags="melee" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="CharismaticNature" operation="GTE" value="4" />
				<passive_effect name="AttributeLevel" tags="attFortitude" operation="base_add" value="2" />
				<passive_effect name="AttributeLevel" tags="attAgility" operation="base_add" value="2" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStack" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="CharismaticNature" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffPerkParkour" name_key="buffPerkParkourName" description_key="buffPerkParkourDesc" icon="ui_game_symbol_parkour">
		<stack_type value="replace" />
		<duration value="5" />
		<effect_group>
			<passive_effect name="RunSpeed" operation="perc_add" value="3" />
			<triggered_effect trigger="onSelfFallImpact" action="RemoveBuff" buff="buffPerkParkour" />
		</effect_group>
		<!-- to activate <triggered_effect trigger="onSelfJump" action="AddBuff" buff="buffPerkParkour"/> -->
	</buff>

	<buff name="buffAnimalTracker" name_key="buffAnimalTrackerName" description_key="buffAnimalTrackerDesc" icon="ui_game_symbol_animal_tracker">
		<duration value="0" />
		<update_rate value=".5" />
		<display_value value=".AnimalTrackerDelay" />
		<display_value_format value="time" />

<!--


<passive_effect name="AnimalTracking" operation="base_set" value="1" tags="chicken,deer,boar">
				<requirement name="CVarCompare" cvar="_crouching" operation="Equals" value="1"/>
			</passive_effect>
-->

		<effect_group name="Startup">
			<!-- set the time delay for animal tracking -->
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="set" value="4">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="LT" value="2" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="set" value="3.5">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="2" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="set" value="3">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="3" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="set" value="2.5">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="4" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="set" value="2">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="5" /></triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="add" value="-.5" />
		</effect_group>

		<effect_group name="check conditions for a successful track">
			<requirement name="CVarCompare" cvar=".AnimalTrackerDelay" operation="LTE" value="0" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="set" value=".0117">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="1" />
				<requirement name="HasTrackedEntity" tags="perkAT01" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="set" value=".0117">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="2" />
				<requirement name="HasTrackedEntity" tags="perkAT02" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="set" value=".0117">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="3" />
				<requirement name="HasTrackedEntity" tags="perkAT03" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="set" value=".0117">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="4" />
				<requirement name="HasTrackedEntity" tags="perkAT04" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerDelay" operation="set" value=".0117">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="5" />
				<requirement name="HasTrackedEntity" tags="perkAT05" />
			</triggered_effect>
		</effect_group>

		<effect_group>
			<!-- tracking successful, activate next buff -->
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffAnimalTrackerAcquired">
				<requirement name="CVarCompare" cvar=".AnimalTrackerDelay" operation="Equals" value=".0117" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffAnimalTracker">
				<requirement name="CVarCompare" cvar=".AnimalTrackerDelay" operation="Equals" value=".0117" />
			</triggered_effect>

			<!-- abort -->
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffAnimalTracker">
				<requirement name="CVarCompare" cvar="_crouching" operation="Equals" value="0" />
			</triggered_effect>
		</effect_group>

		<effect_group name="Tracking not successful, shutdown">
			<requirement name="CVarCompare" cvar=".AnimalTrackerDelay" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ShowToolbeltMessage" message_key="buffAnimalTrackerNoneTooltip" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffAnimalTracker" />
		</effect_group>
	</buff>

	<buff name="buffAnimalTrackerAcquired" name_key="buffAnimalTrackerName" description_key="buffAnimalTrackerAcquiredDesc" icon="ui_game_symbol_animal_tracker" icon_color="0,255,0">
		<duration value="0" />
		<display_value value=".AnimalTrackerLoseTimer" />
		<display_value_format value="time" />

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffAnimalTracker" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".AnimalTrackerLoseTimer" operation="set" value="20" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerLoseTimer" operation="add" value="-1" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerLoseTimer" operation="set" value="20">
				<requirement name="CVarCompare" cvar="_crouching" operation="Equals" value="1" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".AnimalTrackerLoseTimer" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".AnimalTrackerTerminate" operation="set" value="0" />
		</effect_group>

		<effect_group name="check conditions for no trackable animals">
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerTerminate" operation="set" value="1" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerTerminate" operation="set" value="0">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="1" />
				<requirement name="HasTrackedEntity" tags="perkAT01" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerTerminate" operation="set" value="0">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="2" />
				<requirement name="HasTrackedEntity" tags="perkAT02" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerTerminate" operation="set" value="0">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="3" />
				<requirement name="HasTrackedEntity" tags="perkAT03" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerTerminate" operation="set" value="0">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="4" />
				<requirement name="HasTrackedEntity" tags="perkAT04" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".AnimalTrackerTerminate" operation="set" value="0">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="5" />
				<requirement name="HasTrackedEntity" tags="perkAT05" />
			</triggered_effect>
		</effect_group>

		<effect_group name="Track animals">
			<passive_effect name="AnimalTracking" operation="base_set" value="1" tags="perkAT01">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="1" /></passive_effect>
			<passive_effect name="AnimalTracking" operation="base_set" value="1" tags="perkAT02">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="2" /></passive_effect>
			<passive_effect name="AnimalTracking" operation="base_set" value="1" tags="perkAT03">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="3" /></passive_effect>
			<passive_effect name="AnimalTracking" operation="base_set" value="1" tags="perkAT04">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="4" /></passive_effect>
			<passive_effect name="AnimalTracking" operation="base_set" value="1" tags="perkAT05">
				<requirement name="ProgressionLevel" progression_name="perkAnimalTracker" operation="Equals" value="5" /></passive_effect>
		</effect_group>

		<effect_group name="Tracking time ran out or no targets">
			<requirements compare_type="or">
				<requirement name="CVarCompare" cvar=".AnimalTrackerLoseTimer" operation="LTE" value="0" />
				<requirement name="CVarCompare" cvar=".AnimalTrackerTerminate" operation="Equals" value="1" />
			</requirements>
				<triggered_effect trigger="onSelfBuffUpdate" action="ShowToolbeltMessage" message_key="buffPerkAnimalTrackerLostTooltip" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffAnimalTrackerAcquired" />
		</effect_group>
	</buff>

	<buff name="buffBrawlerNoTeeth" name_key="buffBrawlerNoTeethName" description_key="buffBrawlerNoTeethDesc" icon="ui_game_symbol_boxer">
		<duration value="0" />
		<effect_group>
			<passive_effect name="BuffProcChance" operation="base_set" value="0" tags="buffInfectionCatch" />
			<passive_effect name="BuffProcChance" operation="perc_set" value="-5" tags="buffInfectionCatch" />
		</effect_group>
	</buff>

	<buff name="buffBurstCounter" name_key="buff Burst Counter" icon="ui_game_symbol_rifle" remove_on_death="false" hidden="true">
		<duration value="2" />
		<stack_type value="replace" />
		<update_rate value=".6" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".BurstCounter" operation="add" value="1">
				<requirement name="HoldingItemHasTags" tags="perkAutoWeaponsDamage" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".BurstCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".BurstCounter" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffPistolPeteSwissKnees" name_key="buffPistolPeteSwissKnees" icon="ui_game_symbol_pistol" hidden="true">
		<duration value="20" />
		<stack_type value="replace" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".PistolPeteSwissKnees" operation="add" value="10" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffInjuryCrippled01">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="@.PistolPeteSwissKnees" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".PistolPeteSwissKnees" operation="add" value="10" />
			<triggered_effect trigger="onSelfBuffStack" action="AddBuff" buff="buffInjuryCrippled01">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="@.PistolPeteSwissKnees" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".PistolPeteSwissKnees" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffAutoWeaponsRagdoll" name_key="buffAutoWeaponsRagdoll" icon="ui_game_symbol_pistol" hidden="true">
		<duration value="5" />
		<stack_type value="replace" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".AutoWeaponsRagdoll" operation="add" value="4" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffInjuryKnockdown01">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="@.AutoWeaponsRagdoll" />
				<requirement name="NotHasBuff" buff="buffInjuryKnockdown01Cooldown" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".AutoWeaponsRagdoll" operation="add" value="4" />
			<triggered_effect trigger="onSelfBuffStack" action="AddBuff" buff="buffInjuryKnockdown01">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="@.AutoWeaponsRagdoll" />
				<requirement name="NotHasBuff" buff="buffInjuryKnockdown01Cooldown" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".AutoWeaponsRagdoll" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffAutoWeaponsComplete" name_key="buffAutoWeaponsCompleteName" description_key="buffAutoWeaponsCompleteDesc" showonhud="false" icon="ui_game_symbol_rifle" icon_color="0,255,0">
		<duration value="20" />
		<stack_type value="replace" />
		<effect_group>
			<passive_effect name="RunSpeed" operation="perc_add" value=".2" />
		</effect_group>
	</buff>

	<buff name="buffUrbanCombatAdrenalineRush" name_key="buffUrbanCombatAdrenalineRushName" description_key="buffUrbanCombatAdrenalineRushDesc" showonhud="false" icon="ui_game_symbol_light_armor2" icon_color="0,255,0">
		<duration value="20" />
		<stack_type value="replace" />
	</buff>


<!-- ****************** Injury Debuffs: Bleeding, Broken Limbs, Stunned, etc. ****************** -->
	<buff name="buffInjuryBleedingZombie" name_key="buffInjuryBleedingZombie" icon="ui_game_symbol_critical" icon_color="255,255,0" icon_blink="true" hidden="true">
		<damage_type value="bloodloss" />
		<duration value="4" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="bleedCounter" operation="set" value="0">
				<!-- check for leftover counters without buff -->
				<requirement name="NotHasBuff" buff="buffInjuryBleeding" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="bleedCounter" operation="add" value="1">
				<!-- Limit the amount of bleeding stacks that enemies can put on. -->
				<requirement name="CVarCompare" cvar="bleedCounter" operation="LT" value="2" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffInjuryBleeding">
				<!-- They can still extend/refresh the buff. -->
				<requirement name="CVarCompare" cvar="bleedCounter" operation="GT" value="0" />
			</triggered_effect>
		</effect_group>
	</buff>

	<!--
	<buff name="buffInjuryBleedingPlayer" name_key="buffInjuryBleedingPlayer" icon="ui_game_symbol_critical" icon_color="255,255,0" icon_blink="true" hidden="true">
		<damage_type value="bloodloss"/>
		<duration value="2"/>
		<effect_group>
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffInjuryBleeding">
					<requirement name="CVarCompare" cvar="bleedCounter" operation="GT" value="0"/>
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryBleedingPlayer"/>
		</effect_group>
	</buff>

	<buff name="buffInjuryBleedingSignal" name_key="buffInjuryBleedingSignalName" description_key="buffInjuryBleedingSignalDesc" icon="ui_game_symbol_deep_cuts" icon_color="0,255,0" icon_blink="true">
		<duration value="5"/>
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".bleedSignalCounter" operation="add" value="1"/>
			<triggered_effect trigger="onSelfBuffStart" action="ShowToolbeltMessage" message_key="buffInjuryBleedingSignalTooltip">
					<requirement name="CVarCompare" cvar=".bleedSignalCounter" operation="LT" value="4"/>
			</triggered_effect>
		</effect_group>
	</buff>
	-->

	<buff name="buffInjuryBleeding" name_key="buffInjuryBleedingName" description_key="buffInjuryBleedingDesc" tooltip_key="buffInjuryBleedingTooltip" icon="ui_game_symbol_critical" icon_color="255,0,0" icon_blink="true">
		<damage_type value="bloodloss" />
		<stack_type value="replace" />
		<duration value="20" />

		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffInjuryBleeding">
				<requirement name="CVarCompare" cvar="bleedCounter" operation="Equals" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$bleedAmount" operation="set" value="@bleedCounter" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$bleedAmount" operation="divide" value="2">
				<requirement name="CVarCompare" cvar="CharismaticNature" operation="GTE" value="3" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$bleedAmount" operation="set" value="@bleedCounter" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$bleedAmount" operation="divide" value="2">
				<requirement name="CVarCompare" cvar="CharismaticNature" operation="GTE" value="3" />
			</triggered_effect>

			<passive_effect name="HealthMaxModifierOT" operation="base_subtract" value="@$bleedAmount" />
			<passive_effect name="HealthChangeOT" operation="base_subtract" value="@$bleedAmount" />
			<passive_effect name="RunSpeed" operation="perc_add" value="@$bleedSlowdown" />

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="bleedCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$bleedAmount" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$bleedSlowdown" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="buff_bleeding" play_in_head="true" />
			<triggered_effect trigger="onSelfBuffRemove" action="StopSound" sound="buff_bleeding" play_in_head="true" />
			<triggered_effect trigger="onSelfLeaveGame" action="StopSound" sound="buff_bleeding" play_in_head="true" />
			<triggered_effect trigger="onSelfEnteredGame" action="PlaySound" sound="buff_bleeding" play_in_head="true" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" effect_name="Blur" intensity=".6" fade="0.5" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" effect_name="Blur" intensity="0" fade="1" />
			<triggered_effect trigger="onSelfDied" action="ModifyScreenEffect" effect_name="Infected" intensity="0" fade="0" />
			<triggered_effect trigger="onSelfDied" action="RemoveBuff" buff="buffInjuryBleeding" />
<!--
			<triggered_effect trigger="onSelfBuffStart" action="CVarLogValue" cvar="bleedCounter"/>
			<triggered_effect trigger="onSelfBuffStart" action="CVarLogValue" cvar="$bleedAmount"/>
			<triggered_effect trigger="onSelfBuffStack" action="CVarLogValue" cvar="bleedCounter"/>
			<triggered_effect trigger="onSelfBuffStack" action="CVarLogValue" cvar="$bleedAmount"/>

			<triggered_effect trigger="onSelfBuffStart" action="AttachParticleEffectToEntity" particle="p_electric_shock" local_offset="0,0.75,0"/>
			<triggered_effect trigger="onSelfDied" action="RemoveParticleEffectFromEntity" particle="p_electric_shock"/>
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveParticleEffectFromEntity" particle="p_electric_shock"/>
-->
		</effect_group>
	</buff>





	<buff name="buffPlayerFallingDamage" name_key="buffInjuryBleedingName" description_key="buffInjuryBleedingDesc" icon="ui_game_symbol_critical" icon_color="255,0,0" hidden="true">
		<!-- The code does not DO fall damage. It writes the impact speed into the cvar and fires a trigger. -->
		<damage_type value="break" />
		<stack_type value="ignore" />
		<duration value=".1" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$impactSpeed" operation="set" value="@_fallSpeed" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$impactSpeed" operation="add" value="-.114">
				<requirement name="ProgressionLevel" progression_name="perkGreatHeistAdrenalineFall" operation="Equals" value="1" />
				<requirement name="PlayerItemCount" item_name="casinoCoin" operation="GTE" value="5000" />
			</triggered_effect>
		</effect_group>

		<effect_group>
			<requirements compare_type="or">
				<requirement name="HasBuff" buff="buffLegSprained" />
				<requirement name="HasBuff" buff="buffLegBroken" />
				<requirement name="HasBuff" buff="buffLegSplinted" />
				<requirement name="HasBuff" buff="buffLegCast" />
			</requirements>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$impactSpeed" operation="add" value=".02828" /> <!-- add 2m -->
		</effect_group>

		<effect_group> <!-- modify by parkour or similar mods -->
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$impactSpeed" operation="subtract" value="@$parkourBonus" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$impactSpeed" operation="subtract" value=".02121">
				<requirement name="HasBuff" buff="buffImpactBracing" />
			</triggered_effect>

			<!--
			<triggered_effect trigger="onSelfBuffStart" action="LogMessage" message="- - - - - - - - -"/>
			<triggered_effect trigger="onSelfBuffStart" action="CVarLogValue" cvar="_fallSpeed"/>
			<triggered_effect trigger="onSelfBuffStart" action="CVarLogValue" cvar="$impactSpeed"/>
			-->
		</effect_group>

		<effect_group> <!-- check impact speed for broken leg probability -->
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$breakLeg" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$breakLeg" operation="set" value="1">
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="GTE" value=".2197" />
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="LTE" value=".2315" />
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="25" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$breakLeg" operation="set" value="1">
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="GT" value=".2315" />
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="LTE" value=".2472" />
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="50" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$breakLeg" operation="set" value="1">
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="GT" value=".2472" />
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="LTE" value=".259" />
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="75" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$breakLeg" operation="set" value="1">
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="GT" value=".259" />
			</triggered_effect>
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$breakLeg" operation="Equals" value="1" />
			<requirement name="ProgressionLevel" progression_name="perkParkour" operation="LT" value="5" />
			<requirement name="NotHasBuff" buff="buffDontBreakMyLeg" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffLegBroken" />
				<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="breakleg" />
				<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="player#painlg" />
				<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$breakLeg" operation="set" value="2" />
		</effect_group>

		<effect_group> <!-- check impact speed for sprained leg probability -->
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$sprainLeg" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$sprainLeg" operation="set" value="1">
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="GTE" value=".204" />
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="LTE" value=".2197" />
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="25" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$sprainLeg" operation="set" value="1">
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="GT" value=".2197" />
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="LTE" value=".2315" />
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="50" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$sprainLeg" operation="set" value="1">
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="GT" value=".2315" />
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="LTE" value=".2472" />
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="75" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$sprainLeg" operation="set" value="1">
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="GT" value=".2472" />
			</triggered_effect>
		</effect_group>
		<effect_group>
			<requirement name="NotHasBuff" buff="buffLegBroken" />
			<requirement name="NotHasBuff" buff="buffLegSplinted" />
			<requirement name="NotHasBuff" buff="buffLegCast" />
			<requirement name="NotHasBuff" buff="buffDontBreakMyLeg" />
			<requirement name="ProgressionLevel" progression_name="perkParkour" operation="LT" value="4" />
			<requirement name="CVarCompare" cvar="$sprainLeg" operation="Equals" value="1" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffLegSprained" />
				<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="player#painsm" />
				<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$sprainLeg" operation="set" value="2" />
		</effect_group>

		<effect_group> <!-- Landing Sound regular landing -->
			<requirement name="ProgressionLevel" progression_name="perkUrbanCombatJumping" operation="Equals" value="0" />
			<requirement name="CVarCompare" cvar="$impactSpeed" operation="GTE" value="0.08" /> <!-- .0784 = 1.5m -->
				<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="PlayerLandThump" />
		</effect_group>
		<effect_group> <!-- Landing Sound regular landing -->
			<requirement name="ProgressionLevel" progression_name="perkUrbanCombatJumping" operation="Equals" value="1" />
			<requirement name="CVarCompare" cvar="$impactSpeed" operation="GTE" value="0.08" /> <!-- .0784 = 1.5m -->
			<requirement name="CVarCompare" cvar="_crouching" operation="Equals" value="0" />
				<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="PlayerLandThump" />
		</effect_group>

		<effect_group> <!-- apply fall damage -->
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$impactSpeed" operation="subtract" value=".189" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$impactSpeed" operation="multiply" value="300" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Health" operation="subtract" value="@$impactSpeed">
				<requirement name="NotHasBuff" buff="god" />
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="GTE" value="1" />
			</triggered_effect>
		</effect_group>

		<effect_group> <!-- Landing Sound stealth book -->
			<requirement name="ProgressionLevel" progression_name="perkUrbanCombatJumping" operation="Equals" value="1" />
			<requirement name="CVarCompare" cvar="_crouching" operation="Equals" value="1" />
			<requirement name="CVarCompare" cvar="$impactSpeed" operation="GTE" value="1" />
				<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="PlayerLandThump" />
		</effect_group>

		<effect_group> <!-- play pain sound depending on fall damage received -->
			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="player#painsm">
				<requirement name="CVarCompare" cvar="$sprainLeg" operation="LT" value="2" />
				<requirement name="CVarCompare" cvar="$breakLeg" operation="LT" value="2" />
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="GTE" value="2" />
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="LT" value="10" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="player#painlg">
				<requirement name="CVarCompare" cvar="$sprainLeg" operation="LT" value="2" />
				<requirement name="CVarCompare" cvar="$breakLeg" operation="LT" value="2" />
				<requirement name="CVarCompare" cvar="$impactSpeed" operation="GTE" value="10" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$sprainLeg" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$breakLeg" operation="set" value="0" />

			<!-- clear value on exit.  Useful for debugging but not all the time -->
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$impactSpeed" operation="set" value="0" />
		</effect_group>

		<!-- design for fall height jumping falling fall damage falldamage

		6m safe
		7m (and every 1m above) +25% chance of sprained leg
		8m (and every 1m above) +20% chance of broken leg

		_Having_ anything like a sprained/splinted/broken leg lowers all those numbers by 2m
		Parkour perk increases them.

		6m: .1883
		7m: .204
		8   .2197
		9   .2315
		10   .2472
		11  .259

		.01414/m -->
	</buff>

	<buff name="buffLegSprained" name_key="buffLegSprainedName" description_key="buffLegSprainedDesc" tooltip_key="buffLegSprainedTooltip" icon="ui_game_symbol_brokenbone" icon_color="255,128,0">
		<damage_type value="sprain" />
		<stack_type value="replace" />
		<duration value="0" />
		<display_value value=".LegHurtDuration" />
		<display_value_format value="time" />
			<requirement name="NotHasBuff" buff="buffLegBroken" />
			<requirement name="NotHasBuff" buff="buffLegSplinted" />
			<requirement name="NotHasBuff" buff="buffLegCast" />
			<requirement name="NotHasBuff" buff="buffDontBreakMyLeg" />
			<requirement name="ProgressionLevel" progression_name="perkParkour" operation="LT" value="4" />

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".LegHurtCounter" operation="add" value="305" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".LegHurtCounter" operation="set" value="485">
				<requirement name="CVarCompare" cvar=".LegHurtCounter" operation="GT" value="485" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtCounter" operation="add" value="-1" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="@.LegHurtCounter" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="@.LegHurtCounter" />

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffLegSprained">
				<requirement name="CVarCompare" cvar=".LegHurtCounter" operation="LTE" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".LegHurtCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="0" />
		</effect_group>

		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_subtract" value="1" tags="attAgility" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
				<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="RunSpeed" operation="perc_subtract" value="0.15" />
			<passive_effect name="WalkSpeed" operation="perc_subtract" value="0.15" />
			<passive_effect name="CrouchSpeed" operation="perc_subtract" value="0.15" />
			<passive_effect name="JumpStrength" operation="perc_subtract" value="0.04" />
		</effect_group>
	</buff>

	<buff name="buffLegBroken" name_key="buffLegBrokenName" description_key="buffLegBrokenDesc" tooltip_key="buffLegBrokenTooltip" icon="ui_game_symbol_brokenbone" icon_color="255,0,0">
		<!-- Note: sprinting with a broken leg could randomly rangdoll the player -->
		<damage_type value="break" />
		<stack_type value="replace" />
		<duration value="0" />
		<display_value value=".LegHurtDuration" />
		<display_value_format value="time" />

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffLegSplinted" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffLegCast" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffLegSprained" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".LegHurtCounter" operation="set" value="3605" />
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".LegHurtCounter" operation="set" value="3605" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtCounter" operation="add" value="-1" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="@.LegHurtCounter" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="@.LegHurtCounter" />
		</effect_group>

		<effect_group>
			<requirement name="CVarCompare" cvar=".LegHurtCounter" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtCounter" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffLegBroken" />
		</effect_group>

		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_subtract" value="1" tags="attFortitude,attAgility" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
				<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="RunSpeed" operation="perc_subtract" value="0.5" />
			<passive_effect name="WalkSpeed" operation="perc_subtract" value="0.5" />
			<passive_effect name="CrouchSpeed" operation="perc_subtract" value="0.5" />
			<passive_effect name="JumpStrength" operation="perc_subtract" value="0.12" />
		</effect_group>
	</buff>

	<buff name="buffLegSplinted" name_key="buffLegSplintedName" description_key="buffLegSplintedDesc" tooltip_key="buffLegSplintedTooltip" icon="ui_game_symbol_splint">
		<damage_type value="sprain" />
		<duration value="0" />
		<display_value value=".LegHurtDuration" />
		<display_value_format value="time" />

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffLegBroken" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtCounter" operation="add" value="-2" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="@.LegHurtCounter" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".LegHurtDuration" operation="divide" value="2" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="@.LegHurtCounter" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtDuration" operation="divide" value="2" />
		</effect_group>

		<effect_group>
			<requirement name="CVarCompare" cvar=".LegHurtCounter" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtCounter" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffLegSplinted" />
		</effect_group>

		<effect_group>
			<passive_effect name="RunSpeed" operation="perc_subtract" value="0.15" />
			<passive_effect name="WalkSpeed" operation="perc_subtract" value="0.15" />
			<passive_effect name="CrouchSpeed" operation="perc_subtract" value="0.15" />
			<passive_effect name="JumpStrength" operation="perc_subtract" value="0.06" />
		</effect_group>
	</buff>

	<buff name="buffLegCast" name_key="buffLegCastName" description_key="buffLegCastDesc" icon="ui_game_symbol_splint">
		<damage_type value="sprain" />
		<duration value="0" />
		<display_value value=".LegHurtDuration" />
		<display_value_format value="time" />

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffLegBroken" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffLegSplinted" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtCounter" operation="add" value="-3" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="@.LegHurtCounter" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".LegHurtDuration" operation="divide" value="3" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="@.LegHurtCounter" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtDuration" operation="divide" value="3" />
		</effect_group>

		<effect_group>
			<requirement name="CVarCompare" cvar=".LegHurtCounter" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtCounter" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".LegHurtDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffLegCast" />
		</effect_group>

		<effect_group>
			<passive_effect name="RunSpeed" operation="perc_subtract" value="0.1" />
			<passive_effect name="WalkSpeed" operation="perc_subtract" value="0.1" />
			<passive_effect name="CrouchSpeed" operation="perc_subtract" value="0.1" />
			<passive_effect name="JumpStrength" operation="perc_subtract" value="0.09" />
		</effect_group>
	</buff>

	<buff name="buffArmSprained" name_key="buffArmSprainedName" description_key="buffArmSprainedDesc" tooltip_key="buffArmSprainedDesc" icon="ui_game_symbol_brokenbone">
		<damage_type value="sprain" />
		<stack_type value="replace" />
		<duration value="300" />
		<requirement name="NotHasBuff" buff="buffArmBroken" />
		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_subtract" value="1" tags="attStrength,attPerception" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="AttacksPerMinute" operation="perc_subtract" value="0.2,0" duration="0,300" />
			<passive_effect name="RoundsPerMinute" operation="perc_subtract" value="0.2,0" duration="0,300" />
			<passive_effect name="StaminaLoss" operation="perc_add" value="0.2,0" duration="0,300" tags="melee,ranged" />

			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffArmSplinted" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffArmCast" />
		</effect_group>
	</buff>

	<buff name="buffArmBroken" name_key="buffArmBrokenName" description_key="buffArmBrokenDesc" tooltip_key="buffArmBrokenDesc" icon="ui_game_symbol_brokenbone">
		<damage_type value="break" />
		<stack_type value="replace" />
		<duration value="3600" />
		<update_rate value="5" />

		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_subtract" value="2,0" duration="0,3600" tags="attFortitude,attStrength,attPerception" />
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="AttacksPerMinute" operation="perc_subtract" value="0.7,0" duration="0,3600" />
			<passive_effect name="RoundsPerMinute" operation="perc_subtract" value="0.7,0" duration="0,3600" />
			<passive_effect name="StaminaLoss" operation="perc_add" value="0.8,0" duration="0,3600" tags="melee,ranged" />

			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffArmSplinted" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffArmCast" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffArmSprained" />
		</effect_group>
	</buff>

	<buff name="buffArmSplinted" name_key="buffArmSplintedName" description_key="buffArmSplintedDesc" icon="ui_game_symbol_splintarm">
		<stack_type value="replace" />
		<duration value="1800" />
		<effect_group>
			<passive_effect name="AttacksPerMinute" operation="perc_subtract" value="0.2,0" duration="0,2400" />
			<passive_effect name="RoundsPerMinute" operation="perc_subtract" value="0.2,0" duration="0,2400" />
			<passive_effect name="StaminaLoss" operation="perc_add" value="0.2,0" duration="0,2400" tags="melee,ranged" />

			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffArmBroken" />
		</effect_group>
	</buff>

	<buff name="buffArmCast" name_key="buffArmCastName" description_key="buffArmCastDesc" icon="ui_game_symbol_splintarm">
		<stack_type value="replace" />
		<duration value="1200" />

		<effect_group>
			<passive_effect name="AttacksPerMinute" operation="perc_subtract" value="0.1,0" duration="0,1200" />
			<passive_effect name="RoundsPerMinute" operation="perc_subtract" value="0.1,0" duration="0,1200" />
			<passive_effect name="StaminaLoss" operation="perc_add" value="0.1,0" duration="0,1200" tags="melee,ranged" />

			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffArmBroken" />
		</effect_group>
	</buff>


	<buff name="buffInjuryStunned01Shotgun" name_key="buff Injury Stunned 01 Shotgun" hidden="true" icon="ui_game_symbol_stunned" icon_color="255,128,0">
		<damage_type value="stun" />
		<stack_type value="replace" />
		<duration value="3" />
		<effect_group>
			<requirement name="!EntityTagCompare" tags="player" />
			<requirement name="EntityTagCompare" tags="walker" />
				<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".shotgunSuppressCooldown" operation="set" value="1" />
				<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned01Cooldown" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffInjuryStunned01" />
		</effect_group>
	</buff>

	<buff name="buffInjuryStunned02Shotgun" name_key="buff Injury Stunned 02 Shotgun" hidden="true" icon="ui_game_symbol_stunned" icon_color="255,128,0">
		<damage_type value="stun" />
		<stack_type value="replace" />
		<duration value="3" />
		<effect_group>
			<requirement name="!EntityTagCompare" tags="player" />
			<requirement name="EntityTagCompare" tags="walker" />
				<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".shotgunSuppressCooldown" operation="set" value="1" />
				<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned01Cooldown" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffInjuryStunned02" />
		</effect_group>
	</buff>

	<buff name="buffInjuryStunned03Shotgun" name_key="buff Injury Stunned 03 Shotgun" hidden="true" icon="ui_game_symbol_stunned" icon_color="255,128,0">
		<damage_type value="stun" />
		<stack_type value="replace" />
		<duration value="3" />
		<effect_group>
			<requirement name="!EntityTagCompare" tags="player" />
			<requirement name="EntityTagCompare" tags="walker" />
				<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".shotgunSuppressCooldown" operation="set" value="1" />
				<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned01Cooldown" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffInjuryStunned03" />
		</effect_group>
	</buff>

	<!-- Do not rename. Code checks for buffInjuryStunned00,01,02 by name -->
	<buff name="buffInjuryStunned00" name_key="buffInjuryStunned01Name" description_key="buffInjuryStunned01Desc" icon="ui_game_symbol_stunned" icon_color="255,128,0">
		<damage_type value="stun" />
		<stack_type value="replace" />
		<duration value="2" />
		<display_value value=".stunDisplay" /><display_value_key value="{0}" />
		<requirements compare_type="or">
			<requirement name="NotHasBuff" buff="buffDrugPainkillers" />
		</requirements>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned01" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned01" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned02" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned02" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned03" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned03" />

			<passive_effect name="RunSpeed" operation="perc_subtract" value="0.8,.2" duration="0,2" />
			<passive_effect name="WalkSpeed" operation="perc_subtract" value="0.8,.2" duration="0,2" />
			<passive_effect name="CrouchSpeed" operation="perc_subtract" value="0.8,.2" duration="0,2" />
			<passive_effect name="JumpStrength" operation="perc_subtract" value="0.8,.2" duration="0,2" />
			<passive_effect name="AttacksPerMinute" operation="perc_add" value="-.5,0" duration="0,2">
				<requirement name="!EntityTagCompare" tags="player" />
			</passive_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="0.5" fade="1" effect_name="Blur" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" fade="1" effect_name="Blur" />

			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="buff_stunned" play_in_head="true" />
			<triggered_effect trigger="onSelfEnteredGame" action="PlaySound" sound="buff_stunned" play_in_head="true" />

			<triggered_effect trigger="onSelfBuffRemove" action="FadeOutSound" sound="buff_stunned" play_in_head="true" />
			<triggered_effect trigger="onSelfLeaveGame" action="StopSound" sound="buff_stunned" play_in_head="true" />

			<triggered_effect trigger="onSelfBuffFinish" action="ModifyCVar" cvar=".shotgunSuppressCooldown" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".stunDisplay" operation="set" value="2" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".stunDisplay" operation="add" value="-1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".stunDisplay" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffInjuryStunned01" name_key="buffInjuryStunned01Name" description_key="buffInjuryStunned01Desc" icon="ui_game_symbol_stunned" icon_color="255,128,0">
		<damage_type value="stun" />
		<stack_type value="replace" />
		<duration value="4" />
		<display_value value=".stunDisplay" /><display_value_key value="{0}" />

		<requirements compare_type="or">
			<requirement name="NotHasBuff" buff="buffDrugPainkillers" />
			<requirement name="NotHasBuff" buff="buffInjuryStunned01Cooldown" />
		</requirements>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned00" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned00" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned02" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned02" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned03" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned03" />

			<passive_effect name="RunSpeed" operation="perc_subtract" value="0.8,.2" duration="0,4" />
			<passive_effect name="WalkSpeed" operation="perc_subtract" value="0.8,.2" duration="0,4" />
			<passive_effect name="CrouchSpeed" operation="perc_subtract" value="0.8,.2" duration="0,4" />
			<passive_effect name="JumpStrength" operation="perc_subtract" value="0.8,.2" duration="0,4" />
			<passive_effect name="AttacksPerMinute" operation="perc_add" value="-.5,0" duration="0,4">
				<requirement name="!EntityTagCompare" tags="player" />
			</passive_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="0.5" fade="1" effect_name="Blur" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" fade="1" effect_name="Blur" />

			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="buff_stunned" play_in_head="true" />
			<triggered_effect trigger="onSelfEnteredGame" action="PlaySound" sound="buff_stunned" play_in_head="true" />

			<triggered_effect trigger="onSelfBuffRemove" action="FadeOutSound" sound="buff_stunned" play_in_head="true" />
			<triggered_effect trigger="onSelfLeaveGame" action="StopSound" sound="buff_stunned" play_in_head="true" />

			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffInjuryStunned01Cooldown">
				<requirement name="CVarCompare" cvar=".shotgunSuppressCooldown" operation="LT" value="1" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffFinish" action="ModifyCVar" cvar=".shotgunSuppressCooldown" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".stunDisplay" operation="set" value="4" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".stunDisplay" operation="add" value="-1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".stunDisplay" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffInjuryStunned02" name_key="buffInjuryStunned01Name" description_key="buffInjuryStunned01Desc" icon="ui_game_symbol_stunned" icon_color="255,128,0">
		<damage_type value="stun" />
		<stack_type value="replace" />
		<duration value="6" />
		<display_value value=".stunDisplay" /><display_value_key value="{0}" />

		<requirements compare_type="or">
			<requirement name="NotHasBuff" buff="buffDrugPainkillers" />
			<requirement name="NotHasBuff" buff="buffInjuryStunned01Cooldown" />
		</requirements>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned00" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned00" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned01" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned01" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned03" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned03" />

			<passive_effect name="RunSpeed" operation="perc_subtract" value="0.8,.2" duration="0,6" />
			<passive_effect name="WalkSpeed" operation="perc_subtract" value="0.8,.2" duration="0,6" />
			<passive_effect name="CrouchSpeed" operation="perc_subtract" value="0.8,.2" duration="0,6" />
			<passive_effect name="JumpStrength" operation="perc_subtract" value="0.8,.2" duration="0,6" />
			<passive_effect name="AttacksPerMinute" operation="perc_add" value="-.5,0" duration="0,6">
				<requirement name="!EntityTagCompare" tags="player" />
			</passive_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="0.5" fade="1" effect_name="Blur" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" fade="1" effect_name="Blur" />

			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="buff_stunned" play_in_head="true" />
			<triggered_effect trigger="onSelfEnteredGame" action="PlaySound" sound="buff_stunned" play_in_head="true" />

			<triggered_effect trigger="onSelfBuffRemove" action="FadeOutSound" sound="buff_stunned" play_in_head="true" />
			<triggered_effect trigger="onSelfLeaveGame" action="StopSound" sound="buff_stunned" play_in_head="true" />

			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffInjuryStunned01Cooldown">
				<requirement name="CVarCompare" cvar=".shotgunSuppressCooldown" operation="LT" value="1" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffFinish" action="ModifyCVar" cvar=".shotgunSuppressCooldown" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".stunDisplay" operation="set" value="6" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".stunDisplay" operation="add" value="-1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".stunDisplay" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffInjuryStunned03" name_key="buffInjuryStunned01Name" description_key="buffInjuryStunned01Desc" icon="ui_game_symbol_stunned" icon_color="255,128,0">
		<damage_type value="stun" />
		<stack_type value="replace" />
		<duration value="8" />
		<display_value value=".stunDisplay" /><display_value_key value="{0}" />

		<requirements compare_type="or">
			<requirement name="NotHasBuff" buff="buffDrugPainkillers" />
			<requirement name="NotHasBuff" buff="buffInjuryStunned01Cooldown" />
		</requirements>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned00" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned00" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned01" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned01" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryStunned02" />
			<triggered_effect trigger="onSelfBuffStack" action="RemoveBuff" buff="buffInjuryStunned02" />

			<passive_effect name="RunSpeed" operation="perc_subtract" value="0.8,.2" duration="0,8" />
			<passive_effect name="WalkSpeed" operation="perc_subtract" value="0.8,.2" duration="0,8" />
			<passive_effect name="CrouchSpeed" operation="perc_subtract" value="0.8,.2" duration="0,8" />
			<passive_effect name="JumpStrength" operation="perc_subtract" value="0.8,.2" duration="0,8" />
			<passive_effect name="AttacksPerMinute" operation="perc_add" value="-.5,0" duration="0,8">
				<requirement name="!EntityTagCompare" tags="player" />
			</passive_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="0.5" fade="1" effect_name="Blur" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" fade="1" effect_name="Blur" />

			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="buff_stunned" play_in_head="true" />
			<triggered_effect trigger="onSelfEnteredGame" action="PlaySound" sound="buff_stunned" play_in_head="true" />

			<triggered_effect trigger="onSelfBuffRemove" action="FadeOutSound" sound="buff_stunned" play_in_head="true" />
			<triggered_effect trigger="onSelfLeaveGame" action="StopSound" sound="buff_stunned" play_in_head="true" />

			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffInjuryStunned01Cooldown">
				<requirement name="CVarCompare" cvar=".shotgunSuppressCooldown" operation="LT" value="1" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffFinish" action="ModifyCVar" cvar=".shotgunSuppressCooldown" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".stunDisplay" operation="set" value="8" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".stunDisplay" operation="add" value="-1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".stunDisplay" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffInjuryStunned01Cooldown" hidden="true"> <duration value="3" /> <stack_type value="ignore" /> </buff>

	<buff name="buffBatterUpSlowDown" name_key="buffBatterUpSlowDownName" description_key="buffBatterUpSlowDownDesc" tooltip_key="buffBatterUpSlowDownDesc" icon="ui_game_symbol_run" icon_color="255,128,0">
		<damage_type value="stun" />
		<stack_type value="replace" />
		<duration value="6" />
		<effect_group>
			<passive_effect name="RunSpeed" operation="perc_subtract" value="0.25,.05" duration="0,6" />
			<passive_effect name="WalkSpeed" operation="perc_subtract" value="0.25,.05" duration="0,6" />
			<passive_effect name="CrouchSpeed" operation="perc_subtract" value="0.25,.05" duration="0,6" />
			<passive_effect name="JumpStrength" operation="perc_subtract" value="0.25,.05" duration="0,6" />
		</effect_group>
	</buff>

	<buff name="buffInjuryCrippled01" name_key="buff Injury Crippled 01" icon="ui_game_symbol_stunned" icon_color="255,128,0">
		<damage_type value="stun" />
		<stack_type value="ignore" />
		<duration value="300" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryCrippled01">
				<requirement name="!EntityTagCompare" tags="walker" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInjuryCrippled01">
				<requirement name="EntityTagCompare" tags="player" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="AnimatorSetInt" property="WalkType" value="5">
				<requirement name="!EntityTagCompare" tags="player" />
				<requirement name="EntityTagCompare" tags="walker" />
			</triggered_effect>
		</effect_group>

		<effect_group>
			<requirement name="!EntityTagCompare" tags="player" />
				<passive_effect name="RunSpeed" operation="perc_subtract" value="0.3" />
				<passive_effect name="WalkSpeed" operation="perc_subtract" value="0.3" />
		</effect_group>
	</buff>

	<buff name="buffInjuryKnockdown01" name_key="buffInjuryKnockdown01Name" description_key="buffInjuryKnockdown01Desc" icon="ui_game_symbol_stunned" icon_color="255,128,0">
		<damage_type value="knockdown" />
		<stack_type value="ignore" />
		<duration value="4" />
		<display_value value=".knockdownDisplay" /><display_value_key value="{0}" />
		<requirements compare_type="or">
			<requirement name="NotHasBuff" buff="buffInjuryKnockdown01Cooldown" />
		</requirements>

		<effect_group>
			<passive_effect name="RunSpeed" operation="perc_set" value="0" />
			<passive_effect name="WalkSpeed" operation="perc_set" value="0" />
			<passive_effect name="CrouchSpeed" operation="perc_set" value="0" />
			<passive_effect name="JumpStrength" operation="perc_set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="Ragdoll" duration="3.5" />
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffInjuryKnockdown01Cooldown" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".knockdownDisplay" operation="set" value="4" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".knockdownDisplay" operation="add" value="-1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".knockdownDisplay" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffInjuryKnockdown02" name_key="buffInjuryKnockdown01Name" description_key="buffInjuryKnockdown01Desc" icon="ui_game_symbol_stunned" icon_color="255,128,0">
		<damage_type value="knockdown" />
		<stack_type value="ignore" />
		<duration value="6" />
		<display_value value=".knockdownDisplay" /><display_value_key value="{0}" />
		<requirements compare_type="or">
			<requirement name="NotHasBuff" buff="buffInjuryKnockdown01Cooldown" />
		</requirements>

		<effect_group>
			<passive_effect name="RunSpeed" operation="perc_set" value="0" />
			<passive_effect name="WalkSpeed" operation="perc_set" value="0" />
			<passive_effect name="CrouchSpeed" operation="perc_set" value="0" />
			<passive_effect name="JumpStrength" operation="perc_set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="Ragdoll" duration="5.5" />
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffInjuryKnockdown01Cooldown" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".knockdownDisplay" operation="set" value="6" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".knockdownDisplay" operation="add" value="-1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".knockdownDisplay" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffInjuryKnockdown01Cooldown" hidden="true"> <duration value="5" /> <stack_type value="ignore" /> </buff>

	<buff name="buffInjuryUnconscious" name_key="buffInjuryUnconsciousName" description_key="buffInjuryUnconsciousDesc" tooltip_key="buffInjuryUnconsciousTooltip" icon="ui_game_symbol_critical">
		<damage_type value="knockout" />
		<stack_type value="replace" />
		<duration value="3" />
		<effect_group>
			<passive_effect name="RunSpeed" operation="perc_set" value="0" />
			<passive_effect name="WalkSpeed" operation="perc_set" value="0" />
			<passive_effect name="CrouchSpeed" operation="perc_set" value="0" />
			<passive_effect name="JumpStrength" operation="perc_set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="1" fade="1" effect_name="Blur" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" fade="1" effect_name="Blur" />

			<triggered_effect trigger="onSelfBuffStart" action="Ragdoll" duration="5" />
			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="buff_stunned" play_in_head="true" />
			<triggered_effect trigger="onSelfBuffRemove" action="FadeOutSound" sound="buff_stunned" play_in_head="true" />
			<triggered_effect trigger="onSelfLeaveGame" action="StopSound" sound="buff_stunned" play_in_head="true" />
			<triggered_effect trigger="onSelfEnteredGame" action="PlaySound" sound="buff_stunned" play_in_head="true" />
		</effect_group>
	</buff>

	<buff name="buffStayDownKO" hidden="true">
		<damage_type value="knockout" />
		<stack_type value="ignore" />
		<duration value="0.2" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="Ragdoll" duration="0.1" />
		</effect_group>
	</buff>

	<buff name="buffInjuryConcussion" name_key="buffInjuryConcussionName" description_key="buffInjuryConcussionDesc" tooltip_key="buffInjuryConcussionTooltip" icon="ui_game_symbol_stunned" icon_color="255,128,0">
		<damage_type value="stun" />
		<stack_type value="replace" />
		<duration value="3600" />
		<update_rate value="2.5" />
		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_subtract" value="2" tags="attPerception,attAgility" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffInjuryStunned01">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="@$illnessChance" />
			</triggered_effect>
		</effect_group>
	</buff>



<!-- ****************** Elemental Debuffs: Hot, Cold, Burning, Freezing, Shock, etc. ****************** -->

	<buff name="buffElementHot" name_key="buffElementHotName" description_key="buffElementHotDesc" tooltip_key="buffElementHotTooltip" icon="ui_game_symbol_hot" icon_color="255,128,0">
		<damage_type value="heat" />
		<stack_type value="ignore" />
		<effect_group>
			<passive_effect name="WaterLossPerStaminaPointGained" operation="perc_add" value="3" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="0.5" fade="2" effect_name="Hot" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" fade="1" effect_name="Hot" />
			<triggered_effect trigger="onSelfBuffStart" action="AddJournalEntry" journal="hotWeatherTip" />
		</effect_group>
	</buff>

	<buff name="buffElementSweltering" name_key="buffElementSwelteringName" description_key="buffElementSwelteringDesc" tooltip_key="buffElementSwelteringTooltip" icon="ui_game_symbol_hot" icon_color="255,0,0" icon_blink="true">
		<damage_type value="heat" />
		<stack_type value="ignore" />
		<effect_group>
			<passive_effect name="WaterLossPerStaminaPointGained" operation="perc_add" value="6" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="1" fade="2" effect_name="Hot" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" fade="1" effect_name="Hot" />
			<triggered_effect trigger="onSelfBuffStart" action="AddJournalEntry" journal="hotWeatherTip" />
		</effect_group>
	</buff>

	<buff name="buffElementCold" name_key="buffElementColdName" description_key="buffElementColdDesc" tooltip_key="buffElementColdTooltip" icon="ui_game_symbol_cold" icon_color="255,128,0">
		<damage_type value="cold" />
		<stack_type value="ignore" />
		<effect_group>
			<passive_effect name="StaminaLossMaxMult" operation="perc_add" value="3" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="0.5" fade="2" effect_name="Cold" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" fade="1" effect_name="Cold" />
			<triggered_effect trigger="onSelfBuffStart" action="AddJournalEntry" journal="coldWeatherTip" />
		</effect_group>
	</buff>

	<buff name="buffElementFreezing" name_key="buffElementFreezingName" description_key="buffElementFreezingDesc" tooltip_key="buffElementFreezingTooltip" icon="ui_game_symbol_cold" icon_color="255,0,0" icon_blink="true">
		<damage_type value="cold" />
		<stack_type value="ignore" />
		<effect_group>
			<passive_effect name="StaminaLossMaxMult" operation="perc_add" value="6" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="1" fade="2" effect_name="Cold" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" fade="1" effect_name="Cold" />
			<triggered_effect trigger="onSelfBuffStart" action="AddJournalEntry" journal="coldWeatherTip" />
		</effect_group>
	</buff>

	<buff name="buffElementWet" name_key="buffElementWetName" description_key="buffElementWetDesc" tooltip_key="buffElementWetTooltip" icon="ui_game_symbol_wet">
		<damage_type value="cold" />
		<stack_type value="ignore" />
		<update_rate value="2.4" />
		<display_value value="$WetTempModifierDisplay" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$WetTempModifier" operation="set" value="2" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$WetTempModifierActive" operation="set" value="2" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$WetTempModifier" operation="set" value="@_wetness" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$WetTempModifier" operation="multiply" value="16" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$WetTempModifierActive" operation="set" value="@$WetTempModifier">
				<requirement name="CVarCompare" cvar="$WetTempModifier" operation="GT" value="@$WetTempModifierActive" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$WetTempModifierDisplay" operation="set" value="@$WetTempModifierActive" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$WetTempModifierDisplay" operation="multiply" value="6.25" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$WetTempModifierActive" operation="subtract" value=".2" />

			<passive_effect name="HypothermalResist" operation="base_subtract" value="@$WetTempModifierActive" />
			<passive_effect name="HyperthermalResist" operation="base_add" value="@$WetTempModifierActive" />

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffElementWet">
				<requirement name="CVarCompare" cvar="$WetTempModifierActive" operation="LT" value="1" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$WetTempModifierActive" operation="set" value="0" />
		</effect_group>

		<effect_group>
			<requirements compare_type="or">
				<requirement name="HoldingItemHasTags" tags="heldTorch" />
				<requirement name="HasBuff" buff="buffCampfireAOE" />
			</requirements>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$WetTempModifierActive" operation="subtract" value=".4" />
		</effect_group>
	</buff>

	<buff name="buffShocked" description_key="buffShockedDesc" tooltip_key="buffShockedTooltip" icon="ui_game_symbol_electric_power" name_key="buffShockedName" icon_color="255,0,0">
		<damage_type value="electrical" />
		<stack_type value="replace" />
		<duration value="4.5" />
		<effect_group>
			<passive_effect name="HealthChangeOT" operation="base_add" value="-6" />
			<passive_effect name="RunSpeed" operation="perc_subtract" value="0.9,0" duration="0,3.2" />
			<passive_effect name="WalkSpeed" operation="perc_subtract" value="0.9,0" duration="0,3.2" />
			<passive_effect name="CrouchSpeed" operation="perc_subtract" value="0.9,0" duration="0,3.2" />
			<passive_effect name="JumpStrength" operation="perc_subtract" value="0.9,0" duration="0,3.2" />

			<triggered_effect trigger="onSelfBuffStart" action="AttachParticleEffectToEntity" particle="p_electric_shock" local_offset="0,0.75,0" />
			<triggered_effect trigger="onSelfEnteredGame" action="AttachParticleEffectToEntity" particle="p_electric_shock" local_offset="0,0.75,0" />

			<triggered_effect trigger="onSelfDied" action="RemoveParticleEffectFromEntity" particle="p_electric_shock" />

			<triggered_effect trigger="onSelfBuffFinish" action="RemoveParticleEffectFromEntity" particle="p_electric_shock" />
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveParticleEffectFromEntity" particle="p_electric_shock" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="ETrapHit" operation="set" value="0" />
			<triggered_effect trigger="onSelfLeaveGame" action="RemoveParticleEffectFromEntity" particle="p_electric_shock" />

			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="electric_fence_impact" />
			<triggered_effect trigger="onSelfBuffRemove" action="FadeOutSound" sound="electric_fence_impact" />
			<triggered_effect trigger="onSelfLeaveGame" action="StopSound" sound="electric_fence_impact" />
		</effect_group>
	</buff>

	<buff name="buffBurningZombie" hidden="true">
		<damage_type value="heat" />
		<stack_type value="ignore" /><duration value="0.1" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffBurningElementDuration" operation="set" value="10" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffBurningElement" />
		</effect_group>
	</buff>

	<buff name="buffBurningElement" hidden="true">
		<damage_type value="heat" />
		<stack_type value="replace" /><duration value="0" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffBurningElementDuration" operation="add" value="-1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$buffBurningElementDuration" operation="set" value="0" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffBurningElementDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffBurningElementDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBurningElement" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffIsOnFire" />

			<passive_effect name="HealthChangeOT" operation="base_subtract" value="1.5" />
			<passive_effect name="WaterChangeOT" operation="base_subtract" value="2" />
			<passive_effect name="HypothermalResist" operation="base_add" value="30" />
			<passive_effect name="HyperthermalResist" operation="base_add" value="-10" />
		</effect_group>
	</buff>

	<buff name="buffBurningEnvironment" hidden="true"> <!-- remove when blocks proc buffs correctly -->
		<damage_type value="heat" />
		<stack_type value="ignore" />
		<duration value=".5" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffBurningEnvironmentHack" />
		</effect_group>
	</buff>
	<buff name="buffBurningEnvironmentHack" hidden="true"> <!-- rename to "buffBurningEnvironment" when blocks proc buffs correctly -->
		<damage_type value="heat" />
		<stack_type value="replace" />
		<duration value="2" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".BurningEnvironmentCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".BurningEnvironmentCounter" operation="add" value="1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".BurningEnvironmentCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$BurningEnvironmentDuration" operation="set" value="0" />
<!--
			<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar=".BurningEnvironmentCounter"/>
			<triggered_effect trigger="onSelfBuffStack" action="CVarLogValue" cvar=".BurningEnvironmentCounter"/>
-->

			<passive_effect name="WaterChangeOT" operation="base_subtract" value=".3" />
			<passive_effect name="HypothermalResist" operation="base_add" value="30" />
			<passive_effect name="HyperthermalResist" operation="base_add" value="-20" />
		</effect_group>

		<effect_group>
			<requirement name="CVarCompare" cvar=".BurningEnvironmentCounter" operation="GTE" value="5" />
				<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffIsOnFire" />
				<triggered_effect trigger="onSelfBuffStack" action="AddBuff" buff="buffIsOnFire" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$BurningEnvironmentDuration" operation="set" value="1" />
				<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$BurningEnvironmentDuration" operation="set" value="1" />

				<passive_effect name="HealthChangeOT" operation="base_subtract" value="1" />
		</effect_group>
	</buff>

	<buff name="buffBurningFlamingArrow" hidden="true">
		<damage_type value="heat" />
		<stack_type value="replace" /><duration value="0" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffBurningFlamingArrowDuration" operation="add" value="-1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$buffBurningFlamingArrowDuration" operation="set" value="0" />
		</effect_group>

		<effect_group>
			<requirement name="CVarCompare" cvar="$buffBurningFlamingArrowDuration" operation="LT" value="14" />
				<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffBurningFlamingArrowDuration" operation="set" value="14" />
				<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$buffBurningFlamingArrowDuration" operation="set" value="14" />
		</effect_group>

		<effect_group>
			<requirement name="CVarCompare" cvar="$buffBurningFlamingArrowDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffBurningFlamingArrowDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBurningFlamingArrow" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffIsOnFire" />

			<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,12,16" value="4,12.3,15">
				<requirement name="EntityTagCompare" tags="player" />
			</passive_effect>

			<passive_effect name="WaterChangeOT" operation="base_subtract" value="1.5" />
			<passive_effect name="HypothermalResist" operation="base_add" value="35" />
			<passive_effect name="HyperthermalResist" operation="base_add" value="-15" />
		</effect_group>

		<effect_group>
			<requirement name="!EntityTagCompare" tags="player" />
				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,12,16" value="8,26.9,30">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="0" /></passive_effect>
				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,12,16" value="6,18.4,22.5">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="1" /></passive_effect>
				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,12,16" value="4,12.3,15">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="2" /></passive_effect>
				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,12,16" value="3.32,10.2,12.5">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="3" /></passive_effect>
				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,12,16" value="2.64,8.1,9.9">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="4" /></passive_effect>
				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,12,16" value="2,6.1,7.5">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="5" /></passive_effect>
		</effect_group>
	</buff>

	<buff name="buffBurningMolotov" hidden="true">
		<damage_type value="heat" />
		<stack_type value="replace" /><duration value="0" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="buffBurningMolotovDuration" operation="add" value="-1" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="buffBurningMolotovDuration" operation="set" value="0" />
		</effect_group>

		<effect_group>
			<requirement name="CVarCompare" cvar="buffBurningMolotovDuration" operation="LT" value="16" />
				<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="buffBurningMolotovDuration" operation="set" value="16" />
				<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="buffBurningMolotovDuration" operation="set" value="16" />
		</effect_group>

		<effect_group>
			<requirement name="CVarCompare" cvar="buffBurningMolotovDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="buffBurningMolotovDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBurningMolotov" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffIsOnFire" />

			<!-- Player damage outgoing
			case 0: _strength = Mathf.RoundToInt(_strength * 2.0f);
			case 1: _strength = Mathf.RoundToInt(_strength * 1.5f);
			case 2: 1
			case 3: _strength = Mathf.RoundToInt(_strength * 0.83f);
			case 4: _strength = Mathf.RoundToInt(_strength * 0.66f);
			case 5: _strength = Mathf.RoundToInt(_strength * 0.5f);

			Player damage incoming
			case 0: _strength = Mathf.RoundToInt(_strength * 0.5f);
			case 1: _strength = Mathf.RoundToInt(_strength * 0.75f);
			case 2: 1
			case 3: _strength = Mathf.RoundToInt(_strength * 1.5f);
			case 4: _strength = Mathf.RoundToInt(_strength * 2.0f);
			case 5: _strength = Mathf.RoundToInt(_strength * 2.5f); -->

			<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,8,14,18" value="1,5,11,13">
				<requirement name="EntityTagCompare" tags="player" />
			</passive_effect>

			<passive_effect name="WaterChangeOT" operation="base_subtract" value="1.5" />
			<passive_effect name="HypothermalResist" operation="base_add" value="35" />
			<passive_effect name="HyperthermalResist" operation="base_add" value="-15" />
		</effect_group>

		<effect_group>
			<requirement name="!EntityTagCompare" tags="player" />
				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,8,14,18" value="10,36,51,56">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="0" /></passive_effect>
				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,8,14,18" value="7.5,27,38.2,42">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="1" /></passive_effect>

				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,8,14,18" value="5,18,25.5,28">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="2" /></passive_effect>

				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,8,14,18" value="4.2,14.9,21.1,23.2">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="3" /></passive_effect>
				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,8,14,18" value="3.3,11.9,16.8,18.5">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="4" /></passive_effect>
				<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,8,14,18" value="2.5,9,12.7,14">
					<requirement name="CVarCompare" cvar="_difficulty" operation="Equals" value="5" /></passive_effect>
		</effect_group>
	</buff>

	<buff name="buffIsOnFire" name_key="buffIsOnFireName" description_key="buffIsOnFireDesc" tooltip_key="buffIsOnFireTooltip" icon="ui_game_symbol_fire" icon_color="255,0,0" icon_blink="true">
		<damage_type value="Heat" />
		<stack_type value="ignore" />
		<duration value="0" /><update_rate value="1" />
		<display_value value=".buffIsOnFireDisplay" /><display_value_format value="time" />
		<!-- bookkeeping for all burning buffs -->

		<effect_group> <!-- extinguish any fire if wet or if buffExtinguishFire is executed -->
			<requirements compare_type="or">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,1" operation="LTE" value="@_wetness" />
				<requirement name="HasBuff" buff="buffExtinguishFire" />
			</requirements>

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBurningFlamingArrow" />
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBurningMolotov" />
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBurningEnvironmentHack" />
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBurningEnvironment" />
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBurningElement" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffIsOnFireDisplay" operation="set" value="@$buffBurningFlamingArrowDuration" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffIsOnFireDisplay" operation="set" value="@buffBurningMolotovDuration">
				<requirement name="CVarCompare" cvar="buffBurningMolotovDuration" operation="GT" value="@.buffIsOnFireDisplay" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffIsOnFireDisplay" operation="set" value="@$BurningEnvironmentDuration">
				<requirement name="CVarCompare" cvar="$BurningEnvironmentDuration" operation="GT" value="@.buffIsOnFireDisplay" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffIsOnFireDisplay" operation="set" value="@$buffBurningElementDuration">
				<requirement name="CVarCompare" cvar="$buffBurningElementDuration" operation="GT" value="@.buffIsOnFireDisplay" /></triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffIsOnFireDisplay" operation="set" value="@$buffBurningFlamingArrowDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffIsOnFireDisplay" operation="set" value="@buffBurningMolotovDuration">
				<requirement name="CVarCompare" cvar="buffBurningMolotovDuration" operation="GT" value="@.buffIsOnFireDisplay" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffIsOnFireDisplay" operation="set" value="@$BurningEnvironmentDuration">
				<requirement name="CVarCompare" cvar="$BurningEnvironmentDuration" operation="GT" value="@.buffIsOnFireDisplay" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffIsOnFireDisplay" operation="set" value="@$buffBurningElementDuration">
				<requirement name="CVarCompare" cvar="$buffBurningElementDuration" operation="GT" value="@.buffIsOnFireDisplay" /></triggered_effect>
		</effect_group>

		<effect_group> <!-- terminate only if all burn buffs are gone -->
			<requirements>
				<requirement name="NotHasBuff" buff="buffBurningFlamingArrow" />
				<requirement name="NotHasBuff" buff="buffBurningMolotov" />
				<requirement name="NotHasBuff" buff="buffBurningEnvironmentHack" />
				<requirement name="NotHasBuff" buff="buffBurningEnvironment" />
				<requirement name="NotHasBuff" buff="buffBurningElement" /> <!-- torch, burning zombie -->
			</requirements>
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffIsOnFire" />
		</effect_group>

		<effect_group name="run particles, cleanup">
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffIsOnFireDisplay" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="AttachParticleEffectToEntity" particle="p_onFire" local_offset="0,-.2,0" parent_transform="Hips" />
			<triggered_effect trigger="onSelfEnteredGame" action="AttachParticleEffectToEntity" particle="p_onFire" local_offset="0,-.2,0" parent_transform="Hips" />

			<triggered_effect trigger="onSelfBuffRemove" action="RemoveParticleEffectFromEntity" particle="p_onFire" />
			<triggered_effect trigger="onSelfDied" action="RemoveParticleEffectFromEntity" particle="p_onFire" />

			<triggered_effect trigger="onSelfBuffStart" action="AddJournalEntry" journal="onFireTip" />
		</effect_group>
	</buff>

	<buff name="buffExtinguishFire" name_key="buffExtinguishFire" icon="ui_game_symbol_water" icon_color="0,255,0" hidden="true">
		<stack_type value="replace" />
		<duration value="10" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="forge_fire_die" />
			<triggered_effect trigger="onSelfBuffStack" action="PlaySound" sound="forge_fire_die" />
		</effect_group>
	</buff>



	<buff name="buffBurningWeapon" name_key="buffBurningWeaponName" icon="ui_game_symbol_fire" icon_color="0,255,0" hidden="true">
		<stack_type value="replace" />
		<duration value="10" />

		<effect_group>
			<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="30" />
			<triggered_effect trigger="onSelfPrimaryActionRayHit" action="AddBuff" target="other" buff="buffBurningElement" />
		</effect_group>

		<effect_group>
				<triggered_effect trigger="onSelfBuffStart" action="AttachParticleEffectToEntity" particle="p_torch_wall" local_offset="0,0.3,0" parent_transform="GunJoint" />
				<triggered_effect trigger="onSelfBuffStart" action="AttachPrefabToEntity" prefab="p_onFire" local_offset="0,0.3,0" parent_transform="GunJoint" />
				<passive_effect name="DegradationPerUse" operation="perc_add" value="1.5" />

			<triggered_effect trigger="onSelfBuffStart" action="AttachParticleEffectToEntity" particle="p_torch_wall" />
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveParticleEffectFromEntity" particle="p_torch_wall" />
			<triggered_effect trigger="onSelfDied" action="RemoveParticleEffectFromEntity" particle="p_torch_wall" />
		</effect_group>
<!--
			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="forge_fire_die">
				<requirement name="HoldingItemHasTags" tags="melee"/>
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" target="other" buff="buffBurningWeapon"/>
				<requirement name="!HoldingItemHasTags" tags="melee"/>
			</triggered_effect>

			<requirement name="HoldingItemHasTags" tags="melee"/>

			<triggered_effect trigger="onSelfBuffStart" action="AttachParticleEffectToEntity" particle="p_onFire"/>
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveParticleEffectFromEntity" particle="p_onFire"/>
			<triggered_effect trigger="onSelfDied" action="RemoveParticleEffectFromEntity" particle="p_onFire"/>
-->
	</buff>




	<buff name="buffRadiation03" name_key="buffRadiation03Name" description_key="buffRadiation03Desc" tooltip_key="buffRadiation03Tooltip" icon="ui_game_symbol_radiation" icon_color="255,0,0" icon_blink="true">
		<damage_type value="radiation" />
		<stack_type value="ignore" />
		<duration value="5000" />
		<update_rate value="1" />
		<effect_group>
			<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,10" value="1,1" />
			<passive_effect name="HealthChangeOT" operation="base_subtract" duration="10,50" value="1,30" />
			<passive_effect name="HealthChangeOT" operation="base_subtract" duration="50,1000" value="40,1000" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="RadiationSignal" operation="add" value="1" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="RadiationSignal" operation="set" value="0">
				<requirement name="CVarCompare" cvar="RadiationSignal" operation="Equals" value="2" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="RadiationSignal" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyScreenEffect" intensity="1" fade=".7" effect_name="Hot">
				<requirement name="CVarCompare" cvar="RadiationSignal" operation="Equals" value="1" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyScreenEffect" intensity="0" fade=".7" effect_name="Hot">
				<requirement name="CVarCompare" cvar="RadiationSignal" operation="Equals" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" fade="1" effect_name="Hot" />
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffRadiation03">
				<requirement name="CVarCompare" cvar="_biomeradiation" operation="LT" value="2.5" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" effect_name="Radiation" intensity=".6" fade="2" />
			<triggered_effect trigger="onSelfDied" action="ModifyScreenEffect" effect_name="Radiation" intensity="0" fade="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" effect_name="Radiation" intensity="0" fade="2" />
		</effect_group>
	</buff>


<!-- ****************** Illness Debuffs: Dysentery, Pneumonia, etc. ****************** -->


	<buff name="buffNearDeathTraumaTrigger" hidden="true">
		<stack_type value="replace" />
		<duration value=".1" />
		<!-- Intended death rules:
				Death incurs XP debt.
				All negative buffs are cleared on death.
				Player respawns / regens to 90% health/food/water -->

		<effect_group>
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffNearDeathTrauma">
				<requirement name="PlayerLevel" operation="LTE" value="300" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffNearDeathRegen" />

			<!--
			<requirement name="PlayerLevel" operation="GT" value="5"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaCounter" operation="set" value="1800">
				<requirement name="NotHasBuff" buff="buffNearDeathTrauma"/>
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaCounter" operation="add" value="1800"/>
			-->
			<!--
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaCounter" operation="set" value="3600"/>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaReduction" operation="set" value="@$NearDeathTraumaCounter"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaReduction" operation="divide" value="40"/>

			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffNearDeathProtection"/>
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffNearDeathTrauma"/>
			-->
		</effect_group>
	</buff>

	<buff name="buffNearDeathTrauma" name_key="buffNearDeathTraumaName" description_key="buffNearDeathTraumaDesc" icon="ui_game_symbol_near_death_trauma" icon_color="255,128,0" remove_on_death="false">
		<!--<damage_type value="disease"/>-->
		<stack_type value="replace" />
		<duration value="0" />
		<update_rate value="2.1" />

		<effect_group>
			<requirements compare_type="or">
				<requirement name="CVarCompare" cvar="_expdeficit" operation="LT" value="1" />
				<requirement name="PlayerLevel" operation="GTE" value="300" />
			</requirements>

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffNearDeathTrauma" />

			<!-- Added: Custom read-only variable "_difficulty"
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffNearDeathTraumaCalculate"/>

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$NearDeathTraumaCounter" operation="subtract" value="@$NearDeathTraumaReduction"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffNearDeathTraumaCalculate"/>

			<passive_effect name="AttributeLevel" operation="base_subtract" value="@$NearDeathTraumaEffect"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffPerkAbilityUpdate"/>
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate"/>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$NearDeathTraumaCounter" operation="set" value="0"/>
			-->
		</effect_group>
	</buff>

	<buff name="buffNearDeathTraumaCalculate" hidden="true">
		<damage_type value="disease" />
		<stack_type value="ignore" />
		<duration value=".5" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaEffect" operation="set" value="2" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaEffect" operation="set" value="1">
				<requirement name="PlayerLevel" operation="LTE" value="60" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaEffect" operation="set" value="1">
				<requirement name="CVarCompare" cvar="$NearDeathTraumaCounter" operation="LT" value="1800" />
			</triggered_effect>

			<!--
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaEffect" operation="set" value="1">
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaEffect" operation="set" value="2">
				<requirement name="CVarCompare" cvar="$NearDeathTraumaCounter" operation="GT" value="1800"/>
				<requirement name="CVarCompare" cvar="$NearDeathTraumaCounter" operation="LTE" value="3600"/>
				<requirement name="PlayerLevel" operation="GTE" value="20"/>
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaEffect" operation="set" value="3">
				<requirement name="CVarCompare" cvar="$NearDeathTraumaCounter" operation="GT" value="3600"/>
				<requirement name="CVarCompare" cvar="$NearDeathTraumaCounter" operation="LTE" value="5400"/>
				<requirement name="PlayerLevel" operation="GTE" value="40"/>
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathTraumaEffect" operation="set" value="4">
				<requirement name="CVarCompare" cvar="$NearDeathTraumaCounter" operation="GT" value="5400"/>
				<requirement name="PlayerLevel" operation="GTE" value="60"/>
			</triggered_effect>
			-->
		</effect_group>
	</buff>

	<!-- In the early game it was deemed too easy get in a death loop so health/food/water regen to a degree. -->
	<buff name="buffNearDeathRegen" name_key="buffNearDeathTraumaName" icon="ui_game_symbol_near_death_trauma" icon_color="0,255,0" hidden="true">
		<stack_type value="ignore" />
		<duration value="100" />
		<display_value_key value="NDR {0}" /> <display_value value="$NearDeathRegen" /> <stack_type value="ignore" />

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathRegen" operation="set" value=".9" />

			<!--<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathRegen" operation="set" value=".95">
				<requirement name="PlayerLevel" operation="LT" value="4"/></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathRegen" operation="set" value=".9">
				<requirement name="PlayerLevel" operation="Equals" value="4"/></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathRegen" operation="set" value=".8">
				<requirement name="PlayerLevel" operation="Equals" value="5"/></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathRegen" operation="set" value=".7">
				<requirement name="PlayerLevel" operation="Equals" value="6"/></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathRegen" operation="set" value=".6">
				<requirement name="PlayerLevel" operation="Equals" value="7"/></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathRegen" operation="set" value=".5">
				<requirement name="PlayerLevel" operation="Equals" value="8"/></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathRegen" operation="set" value=".4">
				<requirement name="PlayerLevel" operation="Equals" value="9"/></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$NearDeathRegen" operation="set" value=".3">
				<requirement name="PlayerLevel" operation="GT" value="9"/></triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffNearDeathRegen">
				<requirement name="PlayerLevel" operation="GTE" value="10"/></triggered_effect> -->

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$NearDeathRegen" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="RemoveAllNegativeBuffs">
				<requirement name="PlayerLevel" operation="LT" value="6" /></triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffLegSprained">
				<requirement name="PlayerLevel" operation="LT" value="11" /></triggered_effect>

			<passive_effect name="HealthMaxModifierOT" operation="base_add" value="1">
				<requirement name="StatComparePercModMaxToMax" stat="Health" operation="LTE" value="@$NearDeathRegen" />
			</passive_effect>
			<passive_effect name="HealthChangeOT" operation="base_add" value="1">
				<requirement name="StatComparePercCurrentToMax" stat="health" operation="LTE" value="@$NearDeathRegen" />
			</passive_effect>
			<passive_effect name="StaminaMaxModifierOT" operation="base_add" value="1">
				<requirement name="StatComparePercModMaxToMax" stat="Stamina" operation="LTE" value="@$NearDeathRegen" />
			</passive_effect>
			<passive_effect name="WaterChangeOT" operation="base_add" value="1">
				<requirement name="StatComparePercCurrentToMax" stat="Water" operation="LTE" value="@$NearDeathRegen" />
			</passive_effect>
		</effect_group>

		<effect_group>
			<requirement name="StatComparePercModMaxToMax" stat="Stamina" operation="GTE" value="@$NearDeathRegen" />
			<requirement name="StatComparePercCurrentToMax" stat="Water" operation="GTE" value="@$NearDeathRegen" />
			<requirement name="StatComparePercModMaxToMax" stat="Health" operation="GTE" value="@$NearDeathRegen" />
			<requirement name="StatComparePercCurrentToMax" stat="health" operation="GTE" value="@$NearDeathRegen" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffNearDeathRegen" />
		</effect_group>
	</buff>

	<buff name="buffNearDeathProtection" icon="ui_game_symbol_near_death_trauma" icon_color="0,255,0" remove_on_death="false" hidden="true">
		<stack_type value="replace" />
		<duration value="10" />
		<effect_group>
			<triggered_effect trigger="onSelfRespawn" action="RemoveBuff" buff="buffNearDeathProtection" />
			<triggered_effect trigger="onSelfEnteredGame" action="RemoveBuff" buff="buffNearDeathProtection" />
			<triggered_effect trigger="onSelfTeleported" action="RemoveBuff" buff="buffNearDeathProtection" />

			<passive_effect name="BuffResistance" operation="base_add" value="2" tags="buffInfectionCatch,buffInfection01Main,buffInjuryBleeding,buffDrowning01,buffDrowning02,buffArmorShredding,buffLegSprained,buffLegBroken,buffArmSprained" />
			<passive_effect name="BuffResistance" operation="base_add" value="2" tags="buffArmBroken,buffInjuryStunned01,buffInjuryStunned02,buffInjuryStunned03,buffInjuryCrippled01,buffInjuryKnockdown01,buffInjuryKnockdown01,buffInjuryUnconscious,buffStayDownKO" />
			<passive_effect name="BuffResistance" operation="base_add" value="2" tags="buffInjuryConcussion,buffShocked,buffBurningElement,buffBurningEnvironment,buffBurningFlamingArrow,buffBurningMolotov,buffBurning" />
		</effect_group>
	</buff>


	<buff name="buffDysenteryCatch" name_key="buff Dysentery Catch" hidden="true">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value=".1" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$dysenteryCounter" operation="add" value="1080" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$dysenteryNextPoopAttack" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffDysenteryMain">
				<requirement name="NotHasBuff" buff="buffDysenteryMain" />
			</triggered_effect>
		</effect_group>
	</buff>

	<buff name="buffDysenteryMain" name_key="buff Dysentery Main" hidden="true" icon="ui_game_symbol_dysentery">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="0" />
		<update_rate value="1" />

		<!-- Dysentery is fully %-based. $dysenteryCounter is a float % value. Dysentery kills the player when it reaches 100%, cures when it reaches 0%. -->
		<effect_group>
			<!-- $dysenteryMaxDuration defined in buffStatusCheck01 (1 hour) -->
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$dysenteryDisplayDivisor" operation="set" value="@$dysenteryMaxDuration" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$dysenteryDisplayDivisor" operation="divide" value="100" />
				<!-- .dysenteryDisplayPerc = $dysenteryCounter / $dysenteryDisplayDivisor	-->

			<!-- cleanup -->
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$dysenteryCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".dysenteryDisplayPerc" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$dysenteryDisplayDivisor" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$dysenteryCureCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$dysenteryNextPoopAttack" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".dummy" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".dummy" operation="set" value="0" />
		</effect_group>

		<effect_group name="main loop">
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$dysenteryCounter" operation="add" value="-1" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$dysenteryCounter" operation="add" value="-1">
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="GT" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$dysenteryCounter" operation="set" value="0">
				<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="LT" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$dysenteryCureCounter" operation="add" value="-2">
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="GT" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$dysenteryCureCounter" operation="set" value="0">
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="LT" value="0" />
			</triggered_effect>
		</effect_group>

		<effect_group name="poop attacks 1">
			<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="LT" value="@$dysenteryNextPoopAttack" />
				<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffDysentery01UntreatedDiarrhea">
					<requirement name="HasBuff" buff="buffDysentery01Untreated" />
					<requirement name="NotHasBuff" buff="buffDysentery01UntreatedDiarrhea" />
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffDysentery01GetBetterDiarrhea">
					<requirement name="HasBuff" buff="buffDysentery01GetBetter" />
					<requirement name="NotHasBuff" buff="buffDysentery01GetBetterDiarrhea" />
				</triggered_effect>
		</effect_group>

		<effect_group name="poop attacks 2">
			<requirements compare_type="or">
				<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="LT" value="@$dysenteryNextPoopAttack" />
				<requirement name="CVarCompare" cvar="$dysenteryNextPoopAttack" operation="Equals" value="0" />
			</requirements>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".dummy" operation="set" value="@$dysenteryCounter" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".dummy" operation="subtract" value="randomint(162,306)">
					<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="LTE" value="0" />
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".dummy" operation="subtract" value="randomint(324,612)">
					<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="GT" value="0" />
				</triggered_effect>
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$dysenteryNextPoopAttack" operation="set" value="@.dummy" />
		</effect_group>

		<effect_group name="shut down">
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDysenteryMain">
				<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="LTE" value="0" />
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="LTE" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="buffDysenteryCureDisplay" />
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="buffDysentery01Untreated" />
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="buffDysentery01GetBetter" />
		</effect_group>

		<effect_group name="display % values">
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".dysenteryDisplayPerc" operation="set" value="@$dysenteryCounter" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".dysenteryDisplayPerc" operation="divide" value="@$dysenteryDisplayDivisor" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".dysenteryCureDisplayPerc" operation="set" value="@$dysenteryCureCounter" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".dysenteryCureDisplayPerc" operation="divide" value="@$dysenteryDisplayDivisor" />
		</effect_group>

		<effect_group name="signaling buffs 1">
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffDysenteryCureDisplay">
				<requirement name="NotHasBuff" buff="buffDysenteryCureDisplay" />
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="GT" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDysentery01Untreated">
				<requirement name="HasBuff" buff="buffDysentery01Untreated" />
				<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="LTE" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDysentery01GetBetter">
				<requirement name="HasBuff" buff="buffDysentery01GetBetter" />
				<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="LTE" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffDysentery01GetBetter">
				<requirement name="NotHasBuff" buff="buffDysentery01GetBetter" />
				<requirement name="NotHasBuff" buff="buffDysentery01UntreatedDiarrhea" />
				<requirement name="NotHasBuff" buff="buffDysentery01GetBetterDiarrhea" />
				<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="GT" value="0" />
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="GT" value="0" />
			</triggered_effect>
		</effect_group>

		<effect_group name="signaling buffs 2">
			<requirement name="NotHasBuff" buff="buffDysentery01Untreated" />
			<requirement name="NotHasBuff" buff="buffDysentery01UntreatedDiarrhea" />
			<requirement name="NotHasBuff" buff="buffDysentery01GetBetterDiarrhea" />
			<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="GT" value="0" />
			<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ShowToolbeltMessage" message_key="buffDysentery01UntreatedTooltip" />
				<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffDysentery01Untreated" />
		</effect_group>
	</buff>

	<buff name="buffDysenteryAddCure" name_key="buff Dysentery Add Cure" hidden="true" icon="ui_game_symbol_pills">
		<stack_type value="ignore" />
		<duration value=".1" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffDysenteryAddCurePerc" operation="multiply" value="@$dysenteryMaxDuration" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffDysenteryAddCurePerc" operation="divide" value="100" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$dysenteryNextPoopAttack" operation="set" value="0">
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="LTE" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$dysenteryCureCounter" operation="add" value="@$buffDysenteryAddCurePerc" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffDysenteryAddCurePerc" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$dysenteryCureCounter" operation="set" value="@$dysenteryMaxDuration">
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="GT" value="@$dysenteryMaxDuration" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffDysenteryMain" />
		</effect_group>
	</buff>

	<buff name="buffDysenteryCureDisplay" name_key="buffDysenteryCureDisplayName" description_key="buffDysenteryCureDisplayDesc" showonhud="false" icon="ui_game_symbol_pills">
		<duration value="0" />
		<update_rate value="1.7" />
		<display_value value=".dysenteryCureDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<requirements compare_type="or">
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="LTE" value="0" />
				<requirement name="NotHasBuff" buff="buffDysenteryMain" />
			</requirements>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDysenteryCureDisplay" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$dysenteryCureCounter" operation="set" value="0" />
		</effect_group>
		<effect_group>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".dysenteryCureDisplayPerc" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffDysentery01Untreated" name_key="buffDysentery01UntreatedName" description_key="buffDysentery01UntreatedDesc" icon="ui_game_symbol_dysentery" icon_color="255,128,0">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="0" />
		<display_value value=".dysenteryDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffDysentery01GetBetter" />
		</effect_group>
	</buff>
	<buff name="buffDysentery01GetBetter" name_key="buffDysentery01GetBetterName" description_key="buffDysentery01GetBetterDesc" icon="ui_game_symbol_dysentery_better" icon_color="255,128,0">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="0" />
		<display_value value=".dysenteryDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffDysentery01Untreated" />
		</effect_group>
	</buff>

	<buff name="buffDysentery01UntreatedDiarrhea" name_key="buffDysentery01UntreatedName" description_key="buffDysentery01UntreatedDesc" icon="ui_game_symbol_dysentery" icon_color="255,128,0" icon_blink="true">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="5.5" />
		<display_value value=".dysenteryDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffDysentery01Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffDysentery01GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$foodAmount" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$foodAmountAdd" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterAmount" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterAmountAdd" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="water" operation="add" value="-1.5" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="Stamina" value_type="modifiedmax" operation="add" value="-.5" />
		</effect_group>
		<effect_group>
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffDysentery01Untreated">
				<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="GT" value="0" />
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="LTE" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffDysentery01GetBetter">
				<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="GT" value="0" />
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="GT" value="0" />
			</triggered_effect>
		</effect_group>
	</buff>

	<buff name="buffDysentery01GetBetterDiarrhea" name_key="buffDysentery01GetBetterName" description_key="buffDysentery01GetBetterDesc" icon="ui_game_symbol_dysentery_better" icon_color="255,128,0" icon_blink="true">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="5.5" />
		<display_value value=".dysenteryDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffDysentery01Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffDysentery01GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$foodAmount" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$foodAmountAdd" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterAmount" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterAmountAdd" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="water" operation="add" value="-1.5" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="Stamina" value_type="modifiedmax" operation="add" value="-.5" />
		</effect_group>
		<effect_group>
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffDysentery01Untreated">
				<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="GT" value="0" />
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="LTE" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffDysentery01GetBetter">
				<requirement name="CVarCompare" cvar="$dysenteryCounter" operation="GT" value="0" />
				<requirement name="CVarCompare" cvar="$dysenteryCureCounter" operation="GT" value="0" />
			</triggered_effect>
		</effect_group>
	</buff>


	<buff name="buffIllFoodPoisoning01" name_key="buffIllFoodPoisoning01Name" description_key="buffIllFoodPoisoning01Desc" tooltip_key="buffIllFoodPoisoning01Desc" icon="ui_game_symbol_food_poisoning" icon_color="255,128,0">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="5" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Water" operation="add" value="-20" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Stamina" value_type="modifiedmax" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Stamina" value_type="modifiedmax" operation="add" value="3" />
			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="player#vomit" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$foodAmount" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$waterAmount" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$foodAmountAdd" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$waterAmountAdd" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$foodAmountAdd2" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$waterAmountAdd2" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$waterStaminaRegenAmount" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffHealHealth">
					<requirement name="CVarCompare" cvar="medicalHealthAmount" operation="LTE" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffHealStaminaMax" />
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffHealWaterMax" />
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffWaterStaminaRegen" />
		</effect_group>
	</buff>

	<buff name="buffIllPneumonia00" hidden="true">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="90" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffIllPneumonia01">
				<requirement name="RandomRoll" seed_type="Random" min_max="1,200" operation="LTE" value="@$illnessChance" />
			</triggered_effect>

		</effect_group>
	</buff>

	<buff name="buffIllPneumonia01" name_key="buffIllPneumonia01Name" description_key="buffIllPneumonia01Desc" tooltip_key="buffIllPneumonia01Tooltip" icon="ui_game_symbol_" icon_color="255,0,0" icon_blink="true">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="300" />
		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_subtract" value="2" tags="attFortitude,attStrength" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="StaminaChangeOT" operation="base_subtract" value="3" />

			<passive_effect name="HealthMaxModifierOT" operation="base_subtract" value=".05" />
			<passive_effect name="HealthChangeOT" operation="base_subtract" value=".01" />
			<passive_effect name="StaminaMaxModifierOT" operation="base_subtract" value=".1" />

			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffIllPneumonia01">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="@$illnessChance" />
			</triggered_effect>

		</effect_group>
	</buff>

	<buff name="buffInfectionCatch" name_key="buff Infection Catch" hidden="true">
		<damage_type value="Infection" />
		<stack_type value="ignore" />
		<duration value=".1" />

		<effect_group name="a chance to nope out of infection that is based on health">
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".InfectionNope" operation="set" value="12.6">
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="GT" value=".95" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".InfectionNope" operation="set" value="17.2">
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="LTE" value=".95" />
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="GT" value=".90" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".InfectionNope" operation="set" value="26.4">
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="LTE" value=".90" />
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="GT" value=".85" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".InfectionNope" operation="set" value="35.6">
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="LTE" value=".85" />
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="GT" value=".80" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".InfectionNope" operation="set" value="44.8">
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="LTE" value=".80" />
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="GT" value=".70" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".InfectionNope" operation="set" value="63.2">
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="LTE" value=".70" />
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="GT" value=".60" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".InfectionNope" operation="set" value="81.6">
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="LTE" value=".60" />
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="GT" value=".50" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".InfectionNope" operation="set" value="100">
				<requirement name="StatComparePercCurrentToMax" stat="Health" operation="LTE" value=".50" />
			</triggered_effect>
		</effect_group>

		<effect_group>
			<requirement name="RandomRoll" seed_type="Random" min_max="1,100" operation="LT" value="@.InfectionNope" />
			<requirement name="NotHasBuff" buff="buffInfectionMain" />
				<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="infectionCounter" operation="add" value="1" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffInfectionMain" />
		</effect_group>

		<effect_group name="zombie hit increases infection severity">
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="infectionCounter" operation="add" value="@infectionZombieHit">
				<requirement name="CVarCompare" cvar="infectionCounter" operation="GT" value="0" />
				<requirement name="RandomRoll" seed_type="Random" min_max="1,50" operation="LT" value="@.InfectionNope" />
			</triggered_effect>
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffFinish" action="ModifyCVar" cvar="infectionZombieHit" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffFinish" action="ModifyCVar" cvar=".InfectionNope" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffInfectionMain" name_key="buff Infection Main" hidden="true" icon="ui_game_symbol_infection">
		<damage_type value="Infection" />
		<stack_type value="ignore" />
		<duration value="0" />
		<update_rate value="1" />

		<!-- Infection is fully %-based. infectionCounter is a float % value. Infection kills the player when it reaches 100%, cures when it reaches 0%. -->
		<effect_group>
			<!-- $infectionMaxDuration defined in buffStatusCheck01 (7 hours) -->
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$infectionStage2Duration" operation="set" value="14" /> <!-- % of the full buff duration -->
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$infectionStage3Duration" operation="set" value="57" /> <!-- % of the full buff duration -->

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$infectionDisplayDivisor" operation="set" value="@$infectionMaxDuration" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$infectionDisplayDivisor" operation="divide" value="100" />
				<!-- .infectionDisplayPerc = infectionCounter / $infectionDisplayDivisor	-->
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$infectionStage2Duration" operation="multiply" value="@$infectionDisplayDivisor" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$infectionStage3Duration" operation="multiply" value="@$infectionDisplayDivisor" />

			<!-- cleanup -->
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="infectionCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".infectionDisplayPerc" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$infectionDisplayDivisor" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$infectionCureCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$infectionStage2Duration" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$infectionStage3Duration" operation="set" value="0" />
		</effect_group>

		<effect_group name="main loop">
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="infectionCounter" operation="add" value="1" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="infectionCounter" operation="add" value="-3">
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="GT" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="infectionCounter" operation="set" value="0">
				<requirement name="CVarCompare" cvar="infectionCounter" operation="LT" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$infectionCureCounter" operation="add" value="-2">
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="GT" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$infectionCureCounter" operation="set" value="0">
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="LT" value="0" />
			</triggered_effect>
		</effect_group>

		<effect_group name="shut down">
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffInfectionMain">
				<requirement name="CVarCompare" cvar="infectionCounter" operation="LTE" value="0" />
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="LTE" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="buffInfectionCureDisplay" />
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="buffInfection01Untreated" />
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="buffInfection01GetBetter" />
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="buffInfection02Untreated" />
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="buffInfection02GetBetter" />
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="buffInfection03Untreated" />
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="buffInfection03GetBetter" />
		</effect_group>

		<effect_group name="display % values">
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".infectionDisplayPerc" operation="set" value="@infectionCounter" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".infectionDisplayPerc" operation="divide" value="@$infectionDisplayDivisor" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".infectionCureDisplayPerc" operation="set" value="@$infectionCureCounter" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".infectionCureDisplayPerc" operation="divide" value="@$infectionDisplayDivisor" />
		</effect_group>

		<effect_group name="signaling buffs">
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffInfectionCureDisplay">
				<requirement name="NotHasBuff" buff="buffInfectionCureDisplay" />
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="GT" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffInfection01Untreated">
				<requirement name="NotHasBuff" buff="buffInfection01Untreated" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="GT" value="0" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="LT" value="@$infectionStage2Duration" />
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="LTE" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffInfection01GetBetter">
				<requirement name="NotHasBuff" buff="buffInfection01GetBetter" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="GT" value="0" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="LT" value="@$infectionStage2Duration" />
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="GT" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffInfection01GetBetter">
				<requirement name="HasBuff" buff="buffInfection01GetBetter" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="LTE" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffInfection02Untreated">
				<requirement name="NotHasBuff" buff="buffInfection02Untreated" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="GTE" value="@$infectionStage2Duration" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="LT" value="@$infectionStage3Duration" />
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="LTE" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffInfection02GetBetter">
				<requirement name="NotHasBuff" buff="buffInfection02GetBetter" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="GTE" value="@$infectionStage2Duration" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="LT" value="@$infectionStage3Duration" />
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="GT" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffInfection03Untreated">
				<requirement name="NotHasBuff" buff="buffInfection03Untreated" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="GTE" value="@$infectionStage3Duration" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="LT" value="@$infectionMaxDuration" />
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="LTE" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffInfection03GetBetter">
				<requirement name="NotHasBuff" buff="buffInfection03GetBetter" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="GTE" value="@$infectionStage3Duration" />
				<requirement name="CVarCompare" cvar="infectionCounter" operation="LT" value="@$infectionMaxDuration" />
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="GT" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffInfection04">
				<requirement name="CVarCompare" cvar="infectionCounter" operation="GTE" value="@$infectionMaxDuration" />
			</triggered_effect>
		</effect_group>
	</buff>

	<buff name="buffInfectionAddCure" name_key="buff Infection Add Cure" hidden="true" icon="ui_game_symbol_pills">
		<stack_type value="ignore" />
		<duration value=".1" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffInfectionAddCurePerc" operation="multiply" value="@$infectionMaxDuration" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffInfectionAddCurePerc" operation="divide" value="100" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$infectionCureCounter" operation="add" value="@$buffInfectionAddCurePerc" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffInfectionAddCurePerc" operation="set" value="0" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$infectionCureCounter" operation="set" value="@$infectionMaxDuration">
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="GT" value="@$infectionMaxDuration" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffInfectionMain" />
		</effect_group>
	</buff>

	<buff name="buffInfectionCureDisplay" name_key="buffInfectionCureDisplayName" description_key="buffInfectionCureDisplayDesc" showonhud="false" icon="ui_game_symbol_pills">
		<duration value="0" />
		<update_rate value="1.7" />
		<display_value value=".infectionCureDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<requirements compare_type="or">
				<requirement name="CVarCompare" cvar="$infectionCureCounter" operation="LTE" value="0" />
				<requirement name="NotHasBuff" buff="buffInfectionMain" />
			</requirements>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffInfectionCureDisplay" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$infectionCureCounter" operation="set" value="0" />
		</effect_group>
		<effect_group>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".infectionCureDisplayPerc" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffInfection01Untreated" name_key="buffInfection01UntreatedName" description_key="buffInfection01UntreatedDesc" tooltip_key="buffInfection01UntreatedTooltip" icon="ui_game_symbol_infection">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="0" />
		<display_value value=".infectionDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection01GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection02Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection02GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection03Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection03GetBetter" />
		</effect_group>
	</buff>
	<buff name="buffInfection01GetBetter" name_key="buffInfection01GetBetterName" description_key="buffInfection01GetBetterDesc" icon="ui_game_symbol_infection_better">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="0" />
		<display_value value=".infectionDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection01Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection02Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection02GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection03Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection03GetBetter" />
		</effect_group>
	</buff>

	<buff name="buffInfection02Untreated" name_key="buffInfection02UntreatedName" description_key="buffInfection02UntreatedDesc" icon="ui_game_symbol_infection" icon_color="255,128,0">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="0" />
		<display_value value=".infectionDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection01Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection01GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection02GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection03Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection03GetBetter" />
		</effect_group>

		<effect_group>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="-.25" />
		</effect_group>
	</buff>
	<buff name="buffInfection02GetBetter" name_key="buffInfection02GetBetterName" description_key="buffInfection02GetBetterDesc" icon="ui_game_symbol_infection_better" icon_color="255,128,0">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="0" />
		<display_value value=".infectionDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection01Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection01GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection02Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection03Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection03GetBetter" />
		</effect_group>

		<effect_group>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="-.125" />
		</effect_group>
	</buff>

	<buff name="buffInfection03Untreated" name_key="buffInfection03UntreatedName" description_key="buffInfection03UntreatedDesc" icon="ui_game_symbol_infection" icon_color="255,0,0">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="0" />
		<display_value value=".infectionDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection01Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection01GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection02Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection02GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection03GetBetter" />
		</effect_group>

		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_subtract" value="1" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="-.35" />
		</effect_group>
	</buff>
	<buff name="buffInfection03GetBetter" name_key="buffInfection03GetBetterName" description_key="buffInfection03GetBetterDesc" icon="ui_game_symbol_infection_better" icon_color="255,0,0">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="0" />
		<display_value value=".infectionDisplayPerc" /><display_value_key value="{0:0.0}%" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection01Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection01GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection02Untreated" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection02GetBetter" />
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffInfection03Untreated" />
		</effect_group>

		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_subtract" value="1" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="-.17" />
		</effect_group>
	</buff>

	<buff name="buffInfection04" tooltip_key="buffInfection04Tooltip" icon="ui_game_symbol_infection" icon_color="255,0,0">
		<damage_type value="Infection" />
		<stack_type value="ignore" />
		<duration value=".1" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Health" operation="subtract" value="99999999" />
		</effect_group>
	</buff>

	<buff name="buffStatusHungry01" name_key="buffStatusHungry01Name" description_key="buffStatusHungry01Desc" tooltip_key="buffStatusHungry01Tooltip" icon="ui_game_symbol_hunger" icon_color="255,128,0">
		<damage_type value="Starvation" />
		<stack_type value="ignore" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffStatusHungry01">
				<requirement name="StatComparePercModMaxToMax" stat="Stamina" operation="GT" value="0.52" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="Player$Hungry" play_in_head="true" />
		</effect_group>
	</buff>

	<buff name="buffStatusHungry02" name_key="buffStatusHungry02Name" description_key="buffStatusHungry02Desc" tooltip_key="buffStatusHungry02Tooltip" icon="ui_game_symbol_hunger" icon_color="255,0,0" icon_blink="true">
		<damage_type value="Starvation" />
		<damage_source value="Internal" />
		<stack_type value="ignore" />
		<update_rate value="2.2" />
		<effect_group>
			<requirement name="NotHasBuff" buff="buffHealStaminaMax" />
			<passive_effect name="StaminaChangeOT" operation="perc_subtract" value=".1" />
			<passive_effect name="HealthMaxModifierOT" operation="base_subtract" value="0.05" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="Health" operation="subtract" value=".3">
					<requirement name="StatComparePercModMaxToMax" stat="stamina" operation="LT" value=".26" />
			</triggered_effect>
		</effect_group>

		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_subtract" value="2" tags="attStrength,attFortitude" />
			<passive_effect name="AttributeLevel" operation="base_subtract" value="1" tags="attPerception" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<passive_effect name="HealthChangeOT" operation="base_subtract" value=".00416" /> <!-- 15 p h -->

			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffStatusHungry01" />
			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="Player$Hungry" play_in_head="true" />
		</effect_group>

		<effect_group>
			<requirement name="StatComparePercModMaxToMax" stat="Stamina" operation="GTE" value="0.32" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffStatusHungry02" />
				<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffStatusHungry01" />
		</effect_group>
	</buff>

	<buff name="buffStatusThirsty01" name_key="buffStatusThirsty01Name" description_key="buffStatusThirsty01Desc" tooltip_key="buffStatusThirsty01Tooltip" icon="ui_game_symbol_water" icon_color="255,128,0">
		<damage_type value="Dehydration" />
		<stack_type value="ignore" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffStatusThirsty01">
				<requirement name="StatComparePercCurrentToMax" stat="Water" operation="GT" value="0.77" />
			</triggered_effect>
		</effect_group>
	</buff>

	<buff name="buffStatusThirsty02" name_key="buffStatusThirsty02Name" description_key="buffStatusThirsty02Desc" tooltip_key="buffStatusThirsty02Tooltip" icon="ui_game_symbol_water" icon_color="255,0,0" icon_blink="true">
		<damage_type value="Dehydration" />
		<damage_source value="Internal" />
		<stack_type value="ignore" />
		<update_rate value="2.2" />
		<effect_group>
			<requirement name="NotHasBuff" buff="buffHealWaterMax" />
			<passive_effect name="HealthMaxModifierOT" operation="base_subtract" value=".1" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="Health" operation="subtract" value=".5">
				<requirement name="StatComparePercCurrentToMax" stat="Water" operation="LTE" value=".26" />
			</triggered_effect>
		</effect_group>

		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_subtract" value="2" tags="attStrength,attFortitude,attAgility,attPerception" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffStatusThirsty01" />
		</effect_group>

		<effect_group>
			<requirement name="StatComparePercCurrentToMax" stat="Water" operation="GTE" value="0.32" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffStatusThirsty02" />
				<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffStatusThirsty01" />
		</effect_group>
	</buff>

	<buff name="buffStatusWounded" name_key="buffStatusWoundedName" description_key="buffStatusWoundedTooltip" tooltip_key="buffStatusWoundedTooltip" icon="ui_game_symbol_medical" icon_color="255,128,0">
		<damage_type value="Piercing" />
		<stack_type value="ignore" />
		<duration value="0" />
		<update_rate value="2.5" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffStatusWounded">
				<requirement name="StatComparePercModMaxToMax" stat="Health" operation="GT" value="0.55" />
			</triggered_effect>
		</effect_group>
	</buff>


<!-- ****************** Healing Item Buffs: Medical, Food, Drink ****************** -->
	<buff name="buffProcessConsumables" hidden="true">
		<stack_type value="ignore" />
		<duration value=".05" />
		<effect_group>
			<requirement name="StatComparePercCurrentToModMax" stat="health" operation="GT" value=".99" /><!-- max food healing reached -->
			<requirement name="StatComparePercModMaxToMax" stat="health" operation="LT" value=".99" /><!-- medical healing needed -->
			<requirement name="CVarCompare" cvar="foodHealthAmount" operation="GT" value="0" /><!-- item is adding food healing -->
			<requirement name="StatComparePercModMaxToMax" stat="stamina" operation="GTE" value=".99" /><!-- you are not trying to heal max stamina, a valid use of food -->
			<requirement name="CVarCompare" cvar="maxHealthAmount" operation="LTE" value="0" />
			<requirement name="NotHasBuff" buff="buffDoingHealingWrongCooldown" />
			<requirement name="CVarCompare" cvar="$doingHealingWrong" operation="LT" value="5" />
			<requirement name="NotHasBuff" buff="buffIllFoodPoisoning01" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffDoingHealingWrong" /><!-- display "Dude, you are doing it wrong!" message -->
		</effect_group>

		<effect_group>
			<requirement name="NotHasBuff" buff="buffIllFoodPoisoning01" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffHealHealth">
					<requirement name="CVarCompare" cvar="medicalHealthAmount" operation="GT" value="0" /></triggered_effect>
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffHealHealth">
					<requirement name="CVarCompare" cvar="foodHealthAmount" operation="GT" value="0" /></triggered_effect>
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffHealHealthMax">
					<requirement name="CVarCompare" cvar="maxHealthAmount" operation="GT" value="0" /></triggered_effect>
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffHealStaminaMax">
					<requirement name="CVarCompare" cvar="$foodAmountAdd" operation="GT" value="0" /></triggered_effect>
		</effect_group>

		<effect_group>
			<requirement name="NotHasBuff" buff="buffIllFoodPoisoning01" />
			<requirement name="CVarCompare" cvar="$waterAmountAdd" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterStaminaRegenAmount" operation="add" value="@$waterAmountAdd" />
				<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterAmountAdd2" operation="add" value="@$waterAmountAdd" />

				<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffHealWaterMax" />
				<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffWaterStaminaRegen" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$waterAmountAdd" operation="set" value="0" />

			<!-- <triggered_effect trigger="onSelfBuffRemove" action="LogMessage" message="water buff triggered"/> -->
		</effect_group>
	</buff>

	<buff name="buffHealHealth" name_key="buffHealHealthName" description_key="buffHealHealthDesc" icon="ui_game_symbol_add">
		<stack_type value="ignore" />
		<update_rate value="1" />
		<effect_group>
			<requirement name="CVarCompare" cvar="foodHealthAmount" operation="GTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="Health" operation="add" value=".5" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="foodHealthAmount" operation="subtract" value=".5" />
		</effect_group>

		<effect_group>
			<requirement name="CVarCompare" cvar="medicalHealthAmount" operation="GT" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="Health" operation="add" value="2" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="medicalHealthAmount" operation="subtract" value="2" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffHealHealth">
				<requirement name="CVarCompare" cvar="medicalHealthAmount" operation="LTE" value="0" />
				<requirement name="CVarCompare" cvar="foodHealthAmount" operation="LTE" value="-.5" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="healthIncrease" operation="set" value="2" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="foodHealthAmount" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="medicalHealthAmount" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffHealHealthMax" name_key="buffHealHealthMaxName" description_key="buffHealHealthMaxDesc" icon="ui_game_symbol_medical">
		<stack_type value="ignore" />
		<update_rate value="1" />
		<effect_group>
			<passive_effect name="HealthMaxModifierOT" operation="base_add" value="@maxHealthIncrease" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="maxHealthAmount" operation="subtract" value="1" />
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffHealHealthMax">
				<requirement name="CVarCompare" cvar="maxHealthAmount" operation="LTE" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffFinish" action="ModifyCVar" cvar="maxHealthIncrease" operation="set" value="1" />

			<!--
			<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="maxHealthIncrease"/>
			-->
		</effect_group>
	</buff>

	<!-- digesting food -->
	<!-- $foodAmountAdd is not displayed to the player and is the amount of Max Stamina that consuming food items stacks up.
		$foodAmount  is ADDED to the food stat for display purposes. The internal food stat number range is still = Max Stamina. -->
	<buff name="buffHealStaminaMax" name_key="buffHealStaminaMaxName" icon="ui_game_symbol_hunger" icon_color="0,200,0" hidden="true">
		<stack_type value="ignore" />
		<update_rate value=".1" />
		<effect_group name="heal Stamina Max from $foodAmount reserve">
			<requirement name="!IsStatAtMax" stat="maxstamina" />
			<requirement name="CVarCompare" cvar="$foodAmount" operation="GTE" value=".1" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="stamina" value_type="modifiedmax" operation="add" value=".1" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$foodAmount" operation="subtract" value=".1" />
		</effect_group>

		<effect_group name="converting $foodAmountAdd into $foodAmount">
			<requirement name="CVarCompare" cvar="$foodAmountAdd" operation="GTE" value=".1" />
			<requirement name="CVarCompare" cvar="$foodAmount" operation="LT" value="50" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$foodAmount" operation="add" value=".1" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$foodAmountAdd" operation="subtract" value=".1" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffHealStaminaMax">
				<requirement name="CVarCompare" cvar="$foodAmount" operation="LT" value=".1" />
				<requirement name="CVarCompare" cvar="$foodAmountAdd" operation="LT" value=".1" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$foodAmount" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$foodAmountAdd" operation="set" value="0" />
		</effect_group>

		<effect_group name="how much you can overeat">
			<requirement name="CVarCompare" cvar="$foodAmount" operation="GTE" value="50" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$foodAmount" operation="set" value="50" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$foodAmountAdd" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffPuking01" name_key="buffPuking01Name" icon="ui_game_symbol_hunger" icon_color="255,0,0" hidden="true">
		<damage_type value="Disease" />
		<stack_type value="ignore" />
		<duration value="4" />
		<update_rate value="2" />
		<effect_group>
			<passive_effect name="StaminaMaxModifierOT" operation="base_add" value="-12.5" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="water" operation="subtract" value="50" />
			<passive_effect name="WalkSpeed" operation="perc_add" duration="0,4" value="-.9,-.7" />
			<passive_effect name="RunSpeed" operation="perc_add" duration="0,4" value="-.9,-.7" />
			<passive_effect name="CrouchSpeed" operation="perc_add" duration="0,4" value="-.9,-.7" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$foodAmount" operation="set" value="1">
				<requirement name="CVarCompare" cvar="$foodAmount" operation="GT" value="1" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="0.4" fade=".8" effect_name="Drunk" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyScreenEffect" intensity="0" fade=".8" effect_name="Drunk" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" effect_name="Drunk" />

			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="player#vomit" play_in_head="true" />
		</effect_group>
	</buff>

	<buff name="buffDoingHealingWrong" name_key="buffDoingHealingWrongName" description_key="buffDoingHealingWrongDesc" tooltip_key="buffDoingHealingWrongTooltip" icon="ui_game_symbol_add" icon_color="255,128,0" icon_blink="true">
		<stack_type value="ignore" />
		<duration value="20" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffDoingHealingWrongCooldown" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$doingHealingWrong" operation="add" value="1" />
		</effect_group>
	</buff>
	<buff name="buffDoingHealingWrongCooldown" name_key="buff Doing Healing Wrong Cooldown" icon="ui_game_symbol_add" hidden="true">
		<stack_type value="ignore" />
		<duration value="300" />
	</buff>


	<!-- digesting water -->
	<buff name="buffHealWaterMax" name_key="buffHealWaterMaxName" description_key="buffHealWaterMaxDesc" icon="ui_game_symbol_water" hidden="true">
		<stack_type value="ignore" />
		<update_rate value=".1" />
		<effect_group name="heal water stat from $waterAmount reserve">
			<requirement name="!IsStatAtMax" stat="water" />
			<requirement name="CVarCompare" cvar="$waterAmount" operation="GTE" value=".1" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyStats" stat="water" operation="add" value=".1" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$waterAmount" operation="subtract" value=".1" />
		</effect_group>

		<effect_group name="converting $waterAmountAdd2 into $waterAmount">
			<requirement name="CVarCompare" cvar="$waterAmountAdd2" operation="GTE" value=".1" />
			<requirement name="CVarCompare" cvar="$waterAmount" operation="LT" value="50" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$waterAmount" operation="add" value=".1" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$waterAmountAdd2" operation="subtract" value=".1" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffHealWaterMax">
				<requirement name="CVarCompare" cvar="$waterAmount" operation="LT" value=".1" />
				<requirement name="CVarCompare" cvar="$waterAmountAdd2" operation="LT" value=".1" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$waterAmount" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$waterAmountAdd2" operation="set" value="0" />
		</effect_group>

		<effect_group name="how much you can overdrink">
			<requirement name="CVarCompare" cvar="$waterAmount" operation="GTE" value="50" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$waterAmount" operation="set" value="50" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$waterAmountAdd2" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffWaterStaminaRegen" name_key="buffWaterStaminaRegenName" description_key="buffWaterStaminaRegenDesc" icon="ui_game_symbol_water">
		<stack_type value="ignore" />
		<update_rate value="2" />
		<effect_group>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value=".15" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$waterStaminaRegenAmount" operation="subtract" value="1" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$waterStaminaRegenAmount" operation="set" value="150">
				<requirement name="CVarCompare" cvar="$waterStaminaRegenAmount" operation="GT" value="150" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffWaterStaminaRegen">
				<requirement name="CVarCompare" cvar="$waterStaminaRegenAmount" operation="LTE" value="0" />
			</triggered_effect>
		</effect_group>
	</buff>

	<buff name="buffDrugPainkillers" name_key="buffDrugPainkillersName" description_key="buffDrugPainkillersDesc" icon="ui_game_symbol_pills">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffDrugPainkillersDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugPainkillersDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugPainkillersDisplay" operation="set" value="@$buffDrugPainkillersDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugPainkillersDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffDrugPainkillersDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffDrugPainkillersDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugPainkillersDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrugPainkillers" />
		</effect_group>

		<effect_group>
			<passive_effect name="HealthLoss" operation="perc_subtract" value="0.1" />
			<passive_effect name="WaterChangeOT" operation="base_subtract" value="0.222" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Health" operation="add" value="40" />
		</effect_group>
	</buff>

	<buff name="buffDrugVitamins" name_key="drugVitamins" description_key="drugVitaminsDesc" icon="ui_game_symbol_pills">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffDrugVitaminsDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugVitaminsDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugVitaminsDisplay" operation="set" value="@$buffDrugVitaminsDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugVitaminsDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffDrugVitaminsDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffDrugVitaminsDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugVitaminsDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrugVitamins" />
		</effect_group>

		<effect_group>
			<passive_effect name="BuffResistance" operation="base_add" value="2" tags="buffInfectionCatch,buffIllFoodPoisoning01,buffDysenteryCatch" />
		</effect_group>
	</buff>


<!--legacy drunk code
	<buff name="buffDrunk01" name_key="buffDrunk01Name" description_key="buffDrunk01Desc" tooltip_key="buffDrunk01Tooltip" icon="ui_game_symbol_beer">
		<stack_type value="duration"/>
		<duration value="60"/>
		<update_rate value="30"/>
		<effect_group>
			<passive_effect name="EntityDamage" operation="perc_add" value="@$DrunkMelee" tags="melee"/>
			<passive_effect name="StaminaChangeOT" operation="base_add" value="@$DrunkStam"/>

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffDrunk02">
				<requirement name="CVarCompare" cvar="beers" operation="GT" value="3"/>
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="0.5" effect_name="Drunk"/>
			<triggered_effect trigger="onSelfBuffFinish" action="ModifyScreenEffect" intensity="0" effect_name="Drunk"/>
		</effect_group>
	</buff>

	<buff name="buffDrunk01Extended" icon="ui_game_symbol_beer">
		<duration value="1"/>
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffDrunk01"/>
		</effect_group>
	</buff>

	<buff name="buffDrunk02" name_key="buffDrunk02Name" description_key="buffDrunk02Desc" tooltip_key="buffDrunk02Tooltip" icon="ui_game_symbol_beer">
		<stack_type value="duration"/>
		<duration value="120"/>
		<effect_group>
			<passive_effect name="EntityDamage" operation="perc_add" value="@$DrunkMelee" tags="melee"/>
			<passive_effect name="StaminaChangeOT" operation="base_add" value="@$DrunkStam"/>
			<passive_effect name="HealthLoss" operation="perc_subtract" value="@$DrunkRes"/>
			<passive_effect name="HealthChangeOT" operation="base_add" value="@$DrunkHeal"/>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="1" effect_name="Drunk"/>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" effect_name="Drunk"/>

			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffDrunk01"/>
			<triggered_effect trigger="onSelfBuffFinish" action="ModifyCVar" cvar="beers" operation="subtract" value="2"/>

			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffDrunk01">
				<requirement name="CVarCompare" cvar="beers" operation="LT" value="3"/>
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffDrunk02">
				<requirement name="CVarCompare" cvar="beers" operation="GTE" value="3"/>
			</triggered_effect>
		</effect_group>
	</buff>-->

	<buff name="buffEncumberedInv" name_key="buffEncumberedInvName" description_key="buffEncumberedInvDesc" tooltip_key="buffEncumberedInvTooltip" icon="ui_game_symbol_pack_mule">
		<stack_type value="ignore" />
		<damage_type value="stun" />
		<update_rate value="2.1" />
		<display_value value="_encumberedslots" />
		<display_value_key value="{0}" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="AddJournalEntry" journal="encumbranceTip" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$encumbranceEffect" operation="set" value="@_encumberedslots" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$encumbranceEffect" operation="multiply" value="0.026" /> <!--0.026% X 27 = 0.70-->
			<passive_effect name="Mobility" operation="perc_subtract" value="@$encumbranceEffect" />
			<!--<passive_effect name="JumpStrength" operation="perc_subtract" value="@$encumbranceEffect"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="_encumbrance"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="_encumberedslots"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="$encumbranceEffect"/>
			-->
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffEncumberedInv">
				<requirement name="CVarCompare" cvar="_encumberedslots" operation="LT" value="1" />
			</triggered_effect>
		</effect_group>
	</buff>

	<buff name="buffEncumberedWield" hidden="true" name_key="buffEncumberedWieldName" description_key="buffEncumberedWieldDesc" tooltip_key="buffEncumberedWieldTooltip">
		<stack_type value="ignore" />
		<damage_type value="stun" />
		<effect_group>
<!--
icon="ui_game_symbol_pack_mule"

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$encumbranceEffect" operation="set" value="@_encumbrance"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$encumbranceEffect" operation="multiply" value="0.7"/>
			<passive_effect name="Mobility" operation="perc_subtract" value="@$encumbranceEffect"/>
			<passive_effect name="JumpStrength" operation="perc_subtract" value="@$encumbranceEffect"/>
-->
		</effect_group>
	</buff>

	<buff name="buffDrowning01" name_key="buffDrowning01Name" description_key="buffDrowning01Desc" tooltip_key="buffDrowning01Desc" icon="ui_game_symbol_oxygen">
		<damage_type value="Suffocation" />
		<duration value="0" />
		<display_value value=".DrowningTimerDisplay" /><display_value_key value="{0}" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrowning01">
				<requirement name="CVarCompare" cvar="_underwater" operation="NotEquals" value="1" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$DrowningTimer" operation="set" value="@$DrowningTimerMax" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$DrowningTimer" operation="subtract" value="1" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".DrowningTimerDisplay" operation="set" value="@$DrowningTimerMax" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".DrowningTimerDisplay" operation="add" value="@$DrowningTimerMax" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".DrowningTimerDisplay" operation="set" value="@$DrowningTimerMax" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".DrowningTimerDisplay" operation="add" value="@$DrowningTimer" />

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffDrowning02">
				<requirement name="CVarCompare" cvar="$DrowningTimer" operation="LTE" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrowning01">
				<requirement name="CVarCompare" cvar="$DrowningTimer" operation="LTE" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$DrowningTimer" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".DrowningTimerDisplay" operation="set" value="0" />
		</effect_group>
	</buff>
	<buff name="buffDrowning02" name_key="buffDrowning01Name" description_key="buffDrowning02Desc" tooltip_key="buffDrowning02Tooltip" icon="ui_game_symbol_oxygen" icon_color="255,128,0">
		<damage_type value="Suffocation" />
		<duration value="0" />
		<display_value value=".DrowningTimerDisplay" /><display_value_key value="{0}" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrowning02">
				<requirement name="CVarCompare" cvar="_underwater" operation="NotEquals" value="1" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$DrowningTimer" operation="set" value="@$DrowningTimerMax" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$DrowningTimer" operation="subtract" value="1" />

			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".DrowningTimerDisplay" operation="set" value="@$DrowningTimerMax" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".DrowningTimerDisplay" operation="set" value="@$DrowningTimer" />

			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffDrowning03">
				<requirement name="CVarCompare" cvar="$DrowningTimer" operation="LTE" value="0" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrowning02">
				<requirement name="CVarCompare" cvar="$DrowningTimer" operation="LTE" value="0" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$DrowningTimer" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".DrowningTimerDisplay" operation="set" value="0" />
		</effect_group>
	</buff>
	<buff name="buffDrowning03" name_key="buffDrowning03Name" description_key="buffDrowning03Desc" tooltip_key="buffDrowning03Desc" icon="ui_game_symbol_oxygen" icon_color="255,0,0" icon_blink="true">
		<damage_type value="Suffocation" />
		<duration value="1000" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrowning03">
				<requirement name="CVarCompare" cvar="_underwater" operation="NotEquals" value="1" />
			</triggered_effect>
			<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,10" value="1,1" />
			<passive_effect name="HealthChangeOT" operation="base_subtract" duration="10,50" value="1,30" />
			<passive_effect name="HealthChangeOT" operation="base_subtract" duration="50,1000" value="40,1000" />
		</effect_group>
	</buff>



<!-- ****************** Item Buffs ****************** -->

	<!--
	<buff name="buffJumpJetsActivated" hidden="true">
		<stack_type value="replace"/>
		<duration value="5"/>
		<effect_group>
			<passive_effect name="WalkSpeed" operation="perc_subtract" value=".35"/>
			<passive_effect name="RunSpeed" operation="perc_subtract" value=".35"/>
			<passive_effect name="JumpStrength" operation="perc_add" value="3.2"/>
			<passive_effect name="StaminaLoss" operation="perc_subtract" value=".75" tags="jumping"/>

			<triggered_effect trigger="onSelfJump" action="PlaySound" sound="m136_fire" play_in_head="true"/>
			<triggered_effect trigger="onSelfJump" action="AddBuff" buff="buffJumpJetsAirborne"/>

			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="buff_stunned" play_in_head="true"/>
			<triggered_effect trigger="onSelfEnteredGame" action="PlaySound" sound="buff_stunned" play_in_head="true"/>

			<triggered_effect trigger="onSelfBuffRemove" action="FadeOutSound" sound="buff_stunned" play_in_head="true"/>

		</effect_group>
	</buff>
	-->
	<buff name="buffBloodDrawKitMain" hidden="true" remove_on_death="false" icon="ui_game_symbol_skull">
		<stack_type value="replace" />
		<duration value="0" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$BloodDrawKitCounter" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBloodDrawKitMain" />
		</effect_group>
	</buff>
	<buff name="buffBloodDrawKit01" hidden="true" icon="ui_game_symbol_skull">
		<stack_type value="ignore" />
		<duration value="0" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBloodDrawKit01" />
		</effect_group>
	</buff>
	<buff name="buffBloodDrawKit02" hidden="true" icon="ui_game_symbol_skull">
		<stack_type value="ignore" />
		<duration value="0" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBloodDrawKit02" />
		</effect_group>
	</buff>
	<buff name="buffBloodDrawKit03" hidden="true" icon="ui_game_symbol_skull">
		<stack_type value="ignore" />
		<duration value="0" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBloodDrawKit03" />
		</effect_group>
	</buff>
	<buff name="buffBloodDrawKit04" hidden="true" icon="ui_game_symbol_skull">
		<stack_type value="ignore" />
		<duration value="0" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBloodDrawKit04" />
		</effect_group>
	</buff>

	<buff name="buffJumpJetsAirborne" hidden="true">
		<stack_type value="replace" />
		<duration value="5" />
		<effect_group>
			<passive_effect name="WalkSpeed" operation="perc_add" value="2.35" />
			<passive_effect name="RunSpeed" operation="perc_add" value="2.35" />
			<triggered_effect trigger="onSelfFallImpact" action="RemoveBuff" buff="buffJumpJetsAirborne" />
		</effect_group>
	</buff>

	<buff name="buffRocketBootsAirborne" hidden="true">
		<stack_type value="replace" />
		<duration value="5" />
		<effect_group>
			<passive_effect name="WalkSpeed" operation="base_set" value="1.65" />
			<passive_effect name="RunSpeed" operation="base_set" value="4" />
			<passive_effect name="WalkSpeed" operation="perc_add" value="2.35" />
			<passive_effect name="RunSpeed" operation="perc_add" value="2.35" />
			<triggered_effect trigger="onSelfFallImpact" action="RemoveBuff" buff="buffRocketBootsAirborne" />
		</effect_group>
	</buff>

	<buff name="buffBandolier" hidden="true">
		<stack_type value="ignore" />
		<duration value="0" />
		<effect_group>
			<passive_effect name="ReloadSpeedMultiplier" operation="perc_add" value=".3" />
		</effect_group>
	</buff>

	<buff name="buffCoffee" name_key="drinkJarCoffee" description_key="drinkJarCoffeeDesc" icon="ui_game_symbol_coffee">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffCoffeeDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffCoffeeDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffCoffeeDisplay" operation="set" value="@$buffCoffeeDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffCoffeeDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffCoffeeDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffCoffeeDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffCoffeeDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffCoffee" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffBlackStrapCoffee" />
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="0.25">
				<requirement name="NotHasBuff" buff="buffHealWaterMax" />
			</passive_effect>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="0.1">
				<requirement name="HasBuff" buff="buffHealWaterMax" />
			</passive_effect>
			<passive_effect name="HypothermalResist" operation="base_add" value="5" />
		</effect_group>
	</buff>

	<buff name="buffBlackStrapCoffee" name_key="drinkJarBlackStrapCoffee" description_key="buffCoffeeDesc" icon="ui_game_symbol_coffee">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffCoffeeDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffCoffeeDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffCoffeeDisplay" operation="set" value="@$buffCoffeeDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffCoffeeDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffCoffeeDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffCoffeeDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffCoffeeDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBlackStrapCoffee" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffCoffee" />
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="0.3">
				<requirement name="NotHasBuff" buff="buffHealWaterMax" />
			</passive_effect>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="0.1">
				<requirement name="HasBuff" buff="buffHealWaterMax" />
			</passive_effect>
			<passive_effect name="HypothermalResist" operation="base_add" value="10" />
		</effect_group>
	</buff>

	<buff name="buffYuccaJuiceSmoothie" name_key="drinkYuccaJuiceSmoothie" description_key="drinkYuccaJuiceSmoothieDesc" icon="ui_game_symbol_coffee">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffYuccaJuiceSmoothieDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffYuccaJuiceSmoothieDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffYuccaJuiceSmoothieDisplay" operation="set" value="@$buffYuccaJuiceSmoothieDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffYuccaJuiceSmoothieDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffYuccaJuiceSmoothieDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffYuccaJuiceSmoothieDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffYuccaJuiceSmoothieDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffYuccaJuiceSmoothie" />
		</effect_group>
		<effect_group>
			<passive_effect name="HypothermalResist" operation="base_add" value="30" />
		</effect_group>
	</buff>

	<buff name="buffBeer" name_key="buffDrunk01Name" description_key="buffDrunk01Desc" tooltip_key="buffDrunk01Tooltip" icon="ui_game_symbol_beer">
		<damage_type value="disease" />
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffBeerDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffBeerDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffBeerDisplay" operation="set" value="@$buffBeerDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffBeerDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffBeerDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffBeerDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBeer" />
		</effect_group>

		<effect_group>
			<passive_effect name="EntityDamage" operation="perc_add" value="3">
				<requirement name="HoldingItemHasTags" tags="perkBrawler" />
			</passive_effect>

			<passive_effect name="StaminaChangeOT" operation="perc_add" value="0.5">
				<requirement name="NotHasBuff" buff="buffHealWaterMax" />
			</passive_effect>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="0.35">
				<requirement name="HasBuff" buff="buffHealWaterMax" />
			</passive_effect>

			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="0.3" effect_name="Drunk" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" effect_name="Drunk" />
			<passive_effect name="BuffResistance" operation="base_add" value="1" tags="buffInjuryStunned01" />

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffBeerDisplay" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$buffBeerDuration" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffMegaCrush" name_key="buffMegaCrushName" description_key="buffMegaCrushDesc" tooltip_key="buffMegaCrushTooltip" icon="ui_game_symbol_pills">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffMegaCrushDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffMegaCrushDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffMegaCrushDisplay" operation="set" value="@$buffMegaCrushDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffMegaCrushDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffMegaCrushDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffMegaCrushDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffMegaCrushDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffMegaCrush" />
		</effect_group>

		<effect_group>
			<passive_effect name="RunSpeed" operation="perc_add" value=".5" />
			<passive_effect name="WaterLossPerStaminaPointGained" operation="perc_add" value="1.2" /> <!-- regening stamina costs you water -->
			<passive_effect name="StaminaLossMaxMult" operation="perc_add" value="1.2" /> <!-- regening stamina costs food, blacks out the stamina bar -->
		</effect_group>
	</buff>

	<buff name="buffRedTea" name_key="buffRedTea" description_key="buffRedTeaDesc" icon="ui_game_symbol_stomach">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffRedTeaDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffRedTeaDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffRedTeaDisplay" operation="set" value="@$buffRedTeaDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffRedTeaDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffRedTeaDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffRedTeaDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffRedTeaDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffRedTea" />
		</effect_group>

		<effect_group>
			<passive_effect name="WaterLossPerStaminaPointGained" operation="perc_subtract" value="0.2" />
			<passive_effect name="StaminaLossMaxMult" operation="perc_subtract" value="0.15" />
		</effect_group>
	</buff>

	<buff name="buffDrunkGrandpasMoonshine" name_key="buffDrunkGrandpasMoonshineName" description_key="buffDrunkGrandpasMoonshineDesc" tooltip_key="buffDrunkGrandpasMoonshineTooltip" icon="ui_game_symbol_beer">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffGrandpasMoonshineDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffGrandpasMoonshineDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffGrandpasMoonshineDisplay" operation="set" value="@$buffGrandpasMoonshineDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffGrandpasMoonshineDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffGrandpasMoonshineDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffGrandpasMoonshineDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrunkGrandpasMoonshine" />
		</effect_group>

		<effect_group>
			<passive_effect name="AttributeLevel" tags="attFortitude" operation="base_add" value="2" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="EntityDamage" operation="perc_add" value="4">
				<requirement name="HoldingItemHasTags" tags="melee" />
			</passive_effect>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="0.7" />
			<passive_effect name="BuffResistance" operation="base_add" value="1" tags="buffInjuryStunned01" />
			<passive_effect name="HealthLoss" operation="perc_subtract" value="0.5" />
			<passive_effect name="HealthChangeOT" operation="base_add" value="20" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyScreenEffect" intensity="1" fade="4" effect_name="Drunk" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" intensity="0" fade="4" effect_name="Drunk" />

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$buffGrandpasMoonshineDuration" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffGrandpasMoonshineDisplay" operation="set" value="0" />
		</effect_group>
	</buff>

	<buff name="buffDrunkGrandpasAwesomeSauce" name_key="buffDrunkGrandpasAwesomeSauceName" description_key="buffDrunkGrandpasAwesomeSauceDesc" tooltip_key="buffDrunkGrandpasAwesomeSauceTooltip" icon="ui_game_symbol_beer">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffGrandpasAwesomeSauceDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffGrandpasAwesomeSauceDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffGrandpasAwesomeSauceDisplay" operation="set" value="@$buffGrandpasAwesomeSauceDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffGrandpasAwesomeSauceDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffGrandpasAwesomeSauceDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffGrandpasAwesomeSauceDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffGrandpasAwesomeSauceDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrunkGrandpasAwesomeSauce" />
		</effect_group>
		<effect_group>
			<passive_effect name="BarteringBuying" operation="base_add" value=".2" />
			<passive_effect name="BarteringSelling" operation="base_add" value=".2" />
		</effect_group>
	</buff>

	<buff name="buffDrunkGrandpasLearningElixir" name_key="buffDrunkGrandpasLearningElixirName" description_key="buffDrunkGrandpasLearningElixirDesc" tooltip_key="buffDrunkGrandpasLearningElixirTooltip" icon="ui_game_symbol_beer">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffGrandpasLearningElixirDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffGrandpasLearningElixirDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffGrandpasLearningElixirDisplay" operation="set" value="@$buffGrandpasLearningElixirDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffGrandpasLearningElixirDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffGrandpasLearningElixirDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffGrandpasLearningElixirDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffGrandpasLearningElixirDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrunkGrandpasLearningElixir" />
		</effect_group>
		<effect_group>
			<passive_effect name="PlayerExpGain" operation="perc_add" value=".2" />
		</effect_group>
	</buff>

	<buff name="buffPumpkinCheesecake" name_key="foodPumpkinCheesecake" description_key="foodPumpkinCheesecakeDesc" icon="ui_game_symbol_fork">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffPumpkinCheesecakeDisplay" /><display_value_format value="time" />
		<effect_group>
			<passive_effect name="BarteringBuying" operation="base_add" value=".05" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffPumpkinCheesecakeDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffPumpkinCheesecakeDisplay" operation="set" value="@$buffPumpkinCheesecakeDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffPumpkinCheesecakeDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffPumpkinCheesecakeDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffPumpkinCheesecakeDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffPumpkinCheesecakeDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffPumpkinCheesecake" />
		</effect_group>
	</buff>

	<buff name="buffShamChowder" name_key="foodShamChowder" description_key="foodShamChowderDesc" icon="ui_game_symbol_fork">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffShamChowderDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffShamChowderDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffShamChowderDisplay" operation="set" value="@$buffShamChowderDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffShamChowderDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffShamChowderDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffShamChowderDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffShamChowderDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffShamChowder" />
		</effect_group>
		<effect_group>
			<passive_effect name="AttributeLevel" tags="attFortitude" operation="base_add" value="1" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />
		</effect_group>
	</buff>

	<buff name="buffDrugSteroids" name_key="drugSteroids" description_key="drugSteroidsDesc" icon="ui_game_symbol_steroids">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffDrugSteroidsDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugSteroidsDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugSteroidsDisplay" operation="set" value="@$buffDrugSteroidsDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugSteroidsDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffDrugSteroidsDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffDrugSteroidsDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugSteroidsDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrugSteroids" />
		</effect_group>

		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_add" value="3" tags="attStrength" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
				<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<passive_effect name="WaterChangeOT" operation="base_subtract" value=".083" />
			<passive_effect name="CarryCapacity" operation="base_set" value="50" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffDrugSteroidsSideEffect" />
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffDrugSteroidsSideEffect">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="25" />
			</triggered_effect>
		</effect_group>
	</buff>
	<buff name="buffDrugSteroidsSideEffect" name_key="buffDrugSteroidsSideEffectName" description_key="buffDrugSteroidsSideEffectDesc" tooltip_key="buffDrugSteroidsSideEffectTooltip" icon="ui_game_symbol_pills" icon_color="255,128,0">
		<damage_type value="disease" />
		<stack_type value="ignore" />
		<duration value="600" />
		<effect_group>
			<passive_effect name="AttributeLevel" tags="attStrength" operation="base_subtract" value="1" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
				<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />
		</effect_group>
	</buff>

	<buff name="buffDrugRecog" name_key="drugRecog" description_key="drugRecogDesc" tooltip_key="buffDrugRecogTooltip" icon="ui_game_symbol_gunslinger">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffDrugRecogDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugRecogDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugRecogDisplay" operation="set" value="@$buffDrugRecogDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugRecogDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffDrugRecogDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugRecogDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrugRecog" />
		</effect_group>

		<effect_group>
			<passive_effect name="AttributeLevel" tags="attPerception" operation="base_add" value="2" />
			<passive_effect name="EntityDamage" operation="perc_add" value="4">
				<requirement name="HoldingItemHasTags" tags="ranged" />
			</passive_effect>
			<passive_effect name="WaterChangeOT" operation="base_subtract" value=".65" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffDrugRecogSideEffect" />
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffDrugRecogSideEffect">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="25" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="$buffDrugRecogDuration" operation="set" value="0" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffDrugRecogDisplay" operation="set" value="0" />
		</effect_group>
	</buff>
	<buff name="buffDrugRecogSideEffect" name_key="buffDrugRecogSideEffectName" description_key="buffDrugRecogSideEffectDesc" icon="ui_game_symbol_gunslinger" icon_color="255,128,0">
		<damage_type value="disease" />
		<stack_type value="ignore" />
		<update_rate value="4" />
		<duration value="600" />
		<effect_group>
			<passive_effect name="AttributeLevel" tags="attPerception" operation="base_subtract" value="1" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
				<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyScreenEffect" effect_name="Blur" intensity="0" fade="2.0">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="50" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyScreenEffect" effect_name="Blur" intensity=".75" fade="2.0">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="20" />
			</triggered_effect>
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyScreenEffect" effect_name="Blur" intensity="0" fade="1.5" />
		</effect_group>
	</buff>

	<buff name="buffDrugFortBites" name_key="drugFortBites" description_key="drugFortBitesDesc" tooltip_key="buffDrugFortBitesTooltip" icon="ui_game_symbol_defense">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffDrugFortBitesDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugFortBitesDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugFortBitesDisplay" operation="set" value="@$buffDrugFortBitesDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugFortBitesDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffDrugFortBitesDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffDrugFortBitesDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugFortBitesDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrugFortBites" />
		</effect_group>

		<effect_group>
			<passive_effect name="AttributeLevel" tags="attFortitude" operation="base_add" value="2" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
				<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="HealthChangeOT" operation="base_add" duration="0,5.5" value="5,5" />

			<passive_effect name="PhysicalDamageResist" operation="base_add" value="50" tags="coredamageresist" />
			<passive_effect name="HyperthermalResist" operation="base_add" value="50" />
			<passive_effect name="HypothermalResist" operation="base_add" value="50" />
			<passive_effect name="WaterChangeOT" operation="base_subtract" value=".25" />
		</effect_group>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" buff="buffDrugFortBitesSideEffect" />
			<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" buff="buffDrugFortBitesSideEffect">
				<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="25" />
			</triggered_effect>
		</effect_group>
	</buff>
	<buff name="buffDrugFortBitesSideEffect" name_key="buffDrugFortBitesSideEffectName" description_key="buffDrugFortBitesSideEffectDesc" icon="ui_game_symbol_defense" icon_color="255,128,0">
		<damage_type value="disease" />
		<stack_type value="ignore" />
		<duration value="600" />
		<effect_group>
			<passive_effect name="AttributeLevel" tags="attFortitude" operation="base_subtract" value="1" />
				<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
				<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="HealthMax" operation="base_add" duration="0,20,550,600" value="0,-20,-20,0" />
			<passive_effect name="PhysicalDamageResist" operation="base_add" value="-10" tags="coredamageresist" />
			<passive_effect name="HyperthermalResist" operation="base_add" value="-5" />
			<passive_effect name="HypothermalResist" operation="base_add" value="-5" />
		</effect_group>
	</buff>

	<buff name="buffDrugDiazepam" name_key="buffDrugDiazepamName" description_key="buffDrugDiazepamDesc" tooltip_key="buffDrugDiazepamTooltip" icon="ui_game_symbol_pills">
		<stack_type value="replace" /><duration value="0" />
		<display_value value=".buffDrugDiazepamDisplay" /><display_value_format value="time" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugDiazepamDuration" operation="subtract" value="@$MetabolismDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugDiazepamDisplay" operation="set" value="@$buffDrugDiazepamDuration" />
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffDrugDiazepamDisplay" operation="divide" value="@$MetabolismDuration" />
		</effect_group>
		<effect_group>
			<requirement name="CVarCompare" cvar="$buffDrugDiazepamDuration" operation="LTE" value="0" />
				<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffDrugDiazepamDisplay" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffDrugDiazepamDuration" operation="set" value="0" />
				<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrugDiazepam" />
		</effect_group>

		<effect_group>
			<passive_effect name="AttributeLevel" operation="base_add" value="2" tags="attPerception" />
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffPerkAbilityUpdate" />
			<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" buff="buffPerkAbilityUpdate" />

			<passive_effect name="SpreadMultiplierHip" operation="perc_subtract" value="0.25" />
			<passive_effect name="SpreadMultiplierAiming" operation="perc_subtract" value="0.25" />
			<passive_effect name="WaterChangeOT" operation="base_subtract" value="1" />
		</effect_group>
	</buff>

	<buff name="buffArmorShredding" name_key="buffArmorShreddingName" description_key="buffArmorShreddingDesc" tooltip_key="buffArmorShreddingTooltip" icon="ui_game_symbol_armor_iron" icon_color="255,128,0">
		<stack_type value="replace" />
		<duration value="20" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".ArmorShreddingCounter" operation="set" value=".2" />
			<triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar=".ArmorShreddingCounter" operation="add" value=".2" />
			<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".ArmorShreddingCounter" operation="set" value="0" />
			<passive_effect name="PhysicalDamageResist" operation="perc_subtract" value="@.ArmorShreddingCounter" />
		</effect_group>
	</buff>


<!-- ****************** Player Action Buffs / Procs ****************** -->

	<buff name="buffPowerAttackStaminaStunt" icon="ui_game_symbol_run" icon_color="255,128,0" hidden="true">
		<stack_type value="replace" />
		<duration value="3" />
		<effect_group>
			<passive_effect name="StaminaChangeOT" operation="perc_subtract" value="1" />
			<passive_effect name="StaminaChangeOT" operation="perc_add" value="1" tags="running" />
		</effect_group>
	</buff>

	<buff name="buffHoldBreathAiming01" name_key="Aiming1" description_key="" tooltip_key="" icon="ui_game_symbol_all_blocks" hidden="true">
		<stack_type value="replace" />
		<duration value="0" />
		<effect_group>
			<triggered_effect trigger="onSelfDied" action="RemoveBuff" buff="buffHoldBreathAiming01" />
			<triggered_effect trigger="onSelfEnteredGame" action="RemoveBuff" buff="buffHoldBreathAiming01" />
			<triggered_effect trigger="onSelfAimingGunStop" action="RemoveBuff" buff="buffHoldBreathAiming01" />
			<triggered_effect trigger="onSelfEquipStart" action="RemoveBuff" buff="buffHoldBreathAiming01" />

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffHoldBreathAiming01">
				<requirement name="!HoldingItemHasTags" tags="holdBreathAiming" />
			</triggered_effect>

			<!--
			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="open_vending"/>
			<triggered_effect trigger="onSelfBuffRemove" action="PlaySound" sound="close_vending"/>
			-->
			<passive_effect name="StaminaChangeOT" operation="perc_add" duration="0,1" value="-.9,-1.6" />
			<passive_effect name="StaminaChangeOT" operation="perc_add" duration="1,9999" value="-1.6,-1.6" />

			<passive_effect name="WeaponHandling" operation="perc_add" value="-.45" />
		</effect_group>

		<effect_group>
			<requirement name="HoldingItemHasTags" tags="perkDeadEye" />

			<passive_effect name="StaminaChangeOT" operation="perc_add" value=".1">
				<requirement name="ProgressionLevel" progression_name="perkDeadEye" operation="Equals" value="3" />
			</passive_effect>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value=".2">
				<requirement name="ProgressionLevel" progression_name="perkDeadEye" operation="Equals" value="4" />
			</passive_effect>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value=".3">
				<requirement name="ProgressionLevel" progression_name="perkDeadEye" operation="Equals" value="5" />
			</passive_effect>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value=".15">
				<requirement name="ProgressionLevel" progression_name="perkSniperControlledBreathing" operation="Equals" value="1" />
			</passive_effect>
		</effect_group>
	</buff>

	<buff name="buffDrawBow01" name_key="buffDrawBow01" icon="ui_game_symbol_all_blocks" hidden="true">
		<stack_type value="replace" />
		<duration value="0" />
		<effect_group>
			<triggered_effect trigger="onSelfDied" action="RemoveBuff" buff="buffDrawBow01" />
			<triggered_effect trigger="onSelfEnteredGame" action="RemoveBuff" buff="buffDrawBow01" />
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" buff="buffDrawBow01" />
			<triggered_effect trigger="onSelfEquipStart" action="RemoveBuff" buff="buffDrawBow01" />
			<!--
			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="open_vending"/>
			<triggered_effect trigger="onSelfBuffRemove" action="PlaySound" sound="close_vending"/>
			-->

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffDrawBow01">
				<requirement name="!HoldingItemHasTags" tags="bowDrawPenalty" />
			</triggered_effect>

			<passive_effect name="StaminaChangeOT" operation="perc_subtract" value="1.4" />
		</effect_group>

		<!-- <effect_group>
			<requirement name="HoldingItemHasTags" tags="perkArchery"/>

			<passive_effect name="StaminaChangeOT" operation="perc_add" value=".1">
				<requirement name="ProgressionLevel" progression_name="perkArchery" operation="GTE" value="3"/>
			</passive_effect>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value=".2">
				<requirement name="ProgressionLevel" progression_name="perkArchery" operation="GTE" value="4"/>
			</passive_effect>
			<passive_effect name="StaminaChangeOT" operation="perc_add" value=".3">
				<requirement name="ProgressionLevel" progression_name="perkArchery" operation="GTE" value="5"/>
			</passive_effect>
		</effect_group> -->
	</buff>

	<buff name="buffReloadMovementPenalty" name_key="Reloading" icon="ui_game_symbol_pack_mule" icon_color="255,128,0" hidden="true">
		<stack_type value="ignore" />
		<damage_type value="stun" />
		<duration value="7" />
		<effect_group>
			<triggered_effect trigger="onReloadStop" action="RemoveBuff" buff="buffReloadMovementPenalty" />
		</effect_group>

		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkRunAndGun" operation="Equals" value="0" />
				<passive_effect name="WalkSpeed" operation="perc_subtract" value=".5" />
				<passive_effect name="RunSpeed" operation="perc_subtract" value=".5" />
				<passive_effect name="JumpStrength" operation="perc_subtract" value=".5" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkRunAndGun" operation="Equals" value="1" />
				<passive_effect name="WalkSpeed" operation="perc_subtract" value=".4" />
				<passive_effect name="RunSpeed" operation="perc_subtract" value=".4" />
				<passive_effect name="JumpStrength" operation="perc_subtract" value=".4" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkRunAndGun" operation="Equals" value="2" />
				<passive_effect name="WalkSpeed" operation="perc_subtract" value=".3" />
				<passive_effect name="RunSpeed" operation="perc_subtract" value=".3" />
				<passive_effect name="JumpStrength" operation="perc_subtract" value=".3" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkRunAndGun" operation="Equals" value="3" />
				<passive_effect name="WalkSpeed" operation="perc_subtract" value=".2" />
				<passive_effect name="RunSpeed" operation="perc_subtract" value=".2" />
				<passive_effect name="JumpStrength" operation="perc_subtract" value=".2" />
		</effect_group>
		<effect_group>
			<requirement name="ProgressionLevel" progression_name="perkRunAndGun" operation="Equals" value="4" />
				<passive_effect name="WalkSpeed" operation="perc_subtract" value=".1" />
				<passive_effect name="RunSpeed" operation="perc_subtract" value=".1" />
				<passive_effect name="JumpStrength" operation="perc_subtract" value=".1" />
		</effect_group>
	</buff>

	<buff name="buffLegendaryBoss" name_key="Legendary Boss Buff Name" description_key="legendaryDesc" tooltip_key="na" icon="ui_game_symbol_skull">
		<stack_type value="replace" />
		<duration value="0" />
		<effect_group>
			<passive_effect name="HealthMax" operation="perc_set" value="3" />
			<passive_effect name="EntityDamage" operation="perc_set" value="3" />
		</effect_group>
	</buff>

	<buff name="buffTazasWrath" name_key="buffTazasWrathName" description_key="buffTazasWrathDesc" tooltip_key="buffTazasWrathTooltip" icon="ui_game_symbol_skull">
		<stack_type value="replace" />
		<duration value="1" />
		<update_rate value=".5" />
		<effect_group>
			<!--
			<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$VarTest" operation="setvalue" value="randomfloat(12,13)"/>
			<triggered_effect trigger="onSelfBuffUpdate" action="CVarLogValue" cvar="$VarTest"/>
			-->
			<passive_effect name="EntityDamage" operation="perc_add" value="1" tags="melee,tazas" />

			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="open_apache_artifact_chest" />
		</effect_group>
	</buff>

	<buff name="buffRingOfFire" name_key="buffRingOfFireName" description_key="buffRingOfFireDesc" icon="ui_game_symbol_fire" icon_color="200,200,0" icon_blink="true" remove_on_death="false">
		<stack_type value="replace" />
		<duration value="0" />
		<update_rate value=".7" />
		<display_value_key value="buffRingOfFireEffectNameShort" /><display_value value="xxx" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" target="selfAOE" range="10" buff="buffRingOfFireEffect">
				<requirement name="!EntityTagCompare" target="other" tags="npc,vehicle,player,turret" />
			</triggered_effect>

			<triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="FireMediumLoop" play_in_head="true" />
			<triggered_effect trigger="onSelfBuffStart" action="FadeOutSound" sound="FireMediumLoop" play_in_head="true" />
			<triggered_effect trigger="onSelfBuffRemove" action="PlaySound" sound="forge_fire_die" play_in_head="true" />
		</effect_group>
	</buff>
	<buff name="buffRingOfFireEffect" name_key="buffRingOfFireName" description_key="buffRingOfFireEffectDesc" tooltip_key="buffRingOfFireEffectDesc" icon="ui_game_symbol_fire" icon_color="255,0,0" icon_blink="true">
		<damage_type value="heat" />
		<stack_type value="ignore" />
		<duration value="10" />
		<update_rate value="1.2" />
		<effect_group>
			<passive_effect name="HealthChangeOT" operation="base_subtract" duration="0,10" value="0,500" />

			<triggered_effect trigger="onSelfBuffStart" action="AttachParticleEffectToEntity" particle="p_onFire" />
			<triggered_effect trigger="onSelfBuffRemove" action="RemoveParticleEffectFromEntity" particle="p_onFire" />
			<triggered_effect trigger="onSelfDied" action="RemoveParticleEffectFromEntity" particle="p_onFire" />
		</effect_group>
	</buff>

	<buff name="buffDontBreakMyLeg" hidden="true" remove_on_death="false">
	<stack_type value="replace" /><duration value="0" /></buff>

	<buff name="buffRadiatedRegen" name_key="buffRadiatedRegenDesc" description_key="buffRadiatedRegenDesc" tooltip_key="buffRadiatedRegenDesc" icon="ui_game_symbol_radiation" icon_color="255,0,0">
		<stack_type value="ignore" />
		<duration value="2000000000" />
		<update_rate value="2.5" />

		<effect_group>
			<requirement name="NotHasBuff" buff="buffRadiatedRegenBlock" />
				<passive_effect name="HealthChangeOT" operation="base_add" value="@RadiatedRegenAmount" />
		</effect_group>

		<effect_group>
			<!--
			<triggered_effect trigger="onSelfBuffStart" action="AttachParticleEffectToEntity" particle="RadiatedParticlesOnMesh" local_offset="0,0.75,0"/>

			<triggered_effect trigger="onSelfBuffRemove" action="RemoveParticleEffectFromEntity" particle="RadiatedParticlesOnMesh"/>
			<triggered_effect trigger="onSelfDied" action="RemoveParticleEffectFromEntity" particle="RadiatedParticlesOnMesh"/>
			-->

			<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffRadiatedRegen">
				<requirement name="StatComparePercCurrentToMax" stat="health" operation="GTE" value=".8" />
			</triggered_effect>

			<!--
			entityclasses.xml has
				<property name="ParticleOnSpawn" value="ParticleEffects/RadiatedParticlesOnMesh" param1="SetShapeToMesh0"/>

			That is what I would need as an argument for
			AttachParticleEffectToEntity

			<triggered_effect trigger="onSelfBuffUpdate" action="AttachParticleEffectToEntity" particle="RadiatedParticlesOnMesh" local_offset="0,0.75,0"/>
					AttachParticleEffectToEntity		target, particle, parent_transform, local_offset, local_rotation
			-->
		</effect_group>
	</buff>

	<buff name="buffRadiatedRegenBlock" name_key="buffRadiatedRegenBlockName" icon="ui_game_symbol_radiation" icon_color="255,255,0" hidden="true">
		<stack_type value="replace" /><duration value="90" />
	</buff>

	<buff name="buffHarvestXPBalance" name_key="buffHarvestXPBalanceName" icon="ui_game_symbol_radiation" icon_color="255,255,0" hidden="true">
		<stack_type value="ignore" /><duration value="0" />
		<effect_group>
			<passive_effect name="PlayerExpGain" operation="perc_add" value="-.1" tags="Harvesting" />
		</effect_group>
	</buff>

	<buff name="buffDummyEntitySuicide" name_key="buffDummyEntitySuicideName" icon="ui_game_symbol_radiation" hidden="true">
		<duration value="1" />
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Health" operation="add" value="-1000" />
		</effect_group>
	</buff>

	<buff name="buffCampfireAOE" hidden="true">
		<stack_type value="ignore" />
		<duration value=".1" />
		<!-- without the 2nd buff the buff display will flicker -->
		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffCampfireAOEEffect" />
		</effect_group>
	</buff>
	<buff name="buffCampfireAOEEffect" name_key="buffCampfireAOEEffectName" description_key="buffCampfireAOEEffectDesc" icon="ui_game_symbol_campfire">
		<stack_type value="replace" />
		<duration value="2" />
		<effect_group>
			<passive_effect name="HypothermalResist" operation="base_add" value="15" />
		</effect_group>
	</buff>

	<buff name="buffInternalBleeding" name_key="buffInternalBleedingName" description_key="buffInternalBleedingDesc" tooltip_key="buffInternalBleedingTooltip" icon="ui_game_symbol_critical" icon_color="255,0,0" icon_blink="true">
		<damage_type value="bloodloss" />
		<stack_type value="ignore" />
		<duration value="60" />

		<effect_group>
			<passive_effect name="HealthChangeOT" operation="base_subtract" value="1,5,200" duration="0,3,60" />
			<triggered_effect trigger="onSelfDied" action="RemoveBuff" buff="buffInternalBleeding" />
		</effect_group>
	</buff>

	<buff name="buffImpactBracing" hidden="true"> <stack_type value="ignore" /> <duration value="0" /> </buff>


<!-- ****************** Deprecated Buffs? (Needs review) ****************** -->

	<buff name="buffArrowCriticalBleedout"><duration value=".1" /></buff>

	<buff name="buffToolMsg" name_key="buffToolMsgName" description_key="buffToolMsgDesc" tooltip_key="buffToolMsgTooltip" icon="ui_game_symbol_skull">
		<duration value="10" />
		<effect_group>
			<!-- <triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="open_apache_artifact_chest"/> -->

			<!-- <triggered_effect trigger="onSelfBuffStart" action="ShowToolbeltMessage" message="Buff Start, plain message"/> -->
			<triggered_effect trigger="onSelfBuffStart" action="ShowToolbeltMessage" message_key="perkWasteTreasuresClothDesc" sound="open_apache_artifact_chest" />
			<triggered_effect trigger="onSelfBuffStart" action="LogMessage" message="Buff Start, console message" />

			<!-- <triggered_effect trigger="onSelfBuffFinish" action="ShowToolbeltMessage" message="Buff Finish, plain message"/> -->
			<triggered_effect trigger="onSelfBuffFinish" action="ShowToolbeltMessage" message_key="gmSurvivalDesc" sound="open_apache_artifact_chest" />
			<triggered_effect trigger="onSelfBuffFinish" action="LogMessage" message="Buff Finish, console message" />
		</effect_group>
	</buff>

	<buff name="buffDismemberSignal" name_key="buffToolMsgName" description_key="buffToolMsgDesc" tooltip_key="Dismember trigger" icon="ui_game_symbol_table_saw" icon_color="0,255,255" icon_blink="true">
		<duration value="4" />
	</buff>

</buffs>



<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
D:\7DTD_Project\trunk\Assets\Scripts\Engine\XmlParsers\BuffsFromXml.cs

<buff> node

name :				internal name for referencing this buff. Do NOT use single numbers in there like MyBuff1. Unity is no good at creating hashes out of those.
name_key / description_key / tooltip_key :	Localisation
icon [file name] :		available .tga in the icon atlas, \Assets\GUI\Textures\ e.g. "ui_game_symbol_brokenbone"
icon_color [RGB] : 		The tint colour of the icon. If this is "255,0,0" the icon will be blinking.
icon_blink [bool] :		what it sounds like
hidden [bool] :
showonhud [bool] :		default=true, omits this buff from display on the main HUD but still keeps it on the full list of status effects on the character window.

warning_color [?] :		??? is this a tooltip text? Boolean?
alert_color [?] :
emergency_color [?] :

= = = = = = = = = = = = = = = = = = = = = = = = = = = = =
<buff> child nodes. (outside of the <buff> tag)

<damage_source value="x"/> [Internal,External]  External damage will be integers and affected by armor, Internal is the default for buffs

<damage_type value="x"/> [fallingBlock,starve,dehydrate,fall,radiation,radiationSickness,disease,suffocating] : ???
					[bashing, ?] :     Not "BashingDamage" ???

<stack_type value="x"/> [duration,effect,replace,ignore] :  duration: append the duration, effect: stack up the effect, replace: reset the duration, ignore: 2nd buff bounces

<duration value="x"/>  (Float) : Duration in RT seconds. 0 means infinite. 214748364s is the max duration.

<update_rate value="x"/> (ushort at 20 ticks/s) Default = 1 update /s. 3275s is the max  update_rate.
					The time time step of this buff. How frequently  onSelfBuffUpdate  is run.
					If the buff does not contain a  onSelfBuffUpdate  trigger then this is irrelevant. No updates are running.

<display_value value="_coretemp"/>		The buff can display the value of a cvar for additional information.
<display_value_key value="+{0}°"/>	A direct format like this can be used or a localisation key.
								Can use formatting for the number according to ToString.
								cvar=5.30,  "{0}" : 5,  {0:0.00} : 5.30,  {0:0.##} : 5.3
<display_value_format value="time"/>	INSTEAD OF  display_value_key  you can use this to display the cvar as a time, based on seconds.


<requirements compare_type="or">  (AND is the default for all requirements)
	<requirement name="CVarCompare" target="self" cvar="holdBreathTest" operation="Equals" value="0"/>
	This prevents the entire buff from firing.
</requirements>

<effect_group>
	<requirement name="CVarCompare" target="self" cvar="holdBreathTest" operation="Equals" value="2"/>
	This effect group of the buff is invalid if the condition is false.
	Any passive_effect or triggered_effect go into an effect group.
</effect_group>

<effect_group>
	This 2nd effect group of this buff is always active.
	<triggered_effect trigger="onSelfPrimaryAction" action="ModifyStats" target="self" stat="health" operation="base_add" value="2" compare_type="or">
		<requirement name="StatCompare" target="other" stat="health" operation="gt" value="20"/>
		buuuut this specific effect has it's own condition.
	</triggered_effect>


	Specific timing on individual PASSIVE effects:
	<passive_effect name="SpreadMultiplierAiming" operation="perc_set" value="0.8" duration="2.2,3.5"/>
		This one passive effect kicks in at 2.2s into the buff and shuts down at 3.5s.


	<passive_effect name="SpreadMultiplierAiming" operation="perc_set" value="0.8,0.15" duration="1.2,8"/>
		This one PASSIVE effect kicks in at  1.2s with a multiplier of 0.8.
		For the next 6.8s it lerps the multiplier to 0.15.
		After 6.8s it shuts off.
</effect_group>

</buff>


= = = = = = = = = = = = = = = = = = = = = = = = = = = = =
<effect_group name="Franz" tiered="false"/> node

name : Technically irrelevant but can immensly help readability
tiered (Bool) : On ITEMS this is an untiered, always-on effect.
			If default / true, the item has a tier and is not stackable.


= = = = = = = = = = = = = = = = = = = = = = = = = = = = =

OPERATIONS AND CVARS, game variables

cvar : custom variable name. Use whatever you want.
operation [set,setvalue,add,subtract,multiply,divide,randomfloat,randomint] :
value (Float,@cvar,#gameVariable) : Leading with @/# will parse the value of an existing cvar or game variable instead of a number.
value="randomfloat(1,10)" /  value="randomint(1,10)"  this generates a random number to be used in the cvar manipulation.
	<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="test2" operation="set" value="randomint(1,10)"/>

Read only cvars start with an underscore:

_degreesabsorbed : amount of degrees absorbed by armor; always positive; the deviation from 70F
_coretemp			: difference from 70 degrees F
_sheltered		: 0-1 value of how enclosed the area you are in is
_shaded			: similar to sheltered but only checks above
_wetness			: total wetness from rain and standing in water 1 = 100% wet.
_underwater		:
_difficulty		: game difficulty setting
_biomeradiation	:
_encumberedslots	:
_encumbrance		:
_fallSpeed		:
_crouching		:


- - - - - - - - - - - -

Cvars that start with "$" are NOT networked.
You can use them locally and for math operations but they can not be accessed between different entities.

CVars that start with "." are NOT networked AND they are not saved with the game.

You can SET .variables  to another entity. You just cannot read them.
	<triggered_effect trigger="onSelfSecondaryActionRayHit" action="ModifyCVar" target="other" cvar=".somethingsomething" operation="set" value="1"/>

= = = = = = = = = = = = = = = = = = = = = = = = = = = = =

USING CUSTOM VARIABLES AND GAME VARIABLES

A custom variable (float) is declared on the target entity whenever you use one.
<triggered_effect trigger="onSelfAimingGunStop" action="ModifyCVar" target="self" cvar="iAmYourNewCVar" operation="set" value="5"/>

When USING a custom variable INSTEAD OF a fixed value you reference it with an "@" instead of a numeric value.
	<passive_effect name="JumpStrength" operation="perc_set" value="@iAmYourNewCVar"/>
	<requirement name="StatCompare" target="self" stat="stamina" operation="GTE" value="@iAmYourNewCVar"/>


GAME VARIABLES are constants (read-only)

A game variable (whatever data type it is) can be USED in requirements / values.
	<passive_effect name="JumpStrength" operation="perc_set" value="#GameTime"/>
	<requirement name="StatCompare" target="self" stat="stamina" operation="GTE" value="#GameTime"/>


= = = = = = = = = = = = = = = = = = = = = = = = = = = = =

REQUIREMENTS / CONDITIONS:             list of requirements list

	<requirement name="StatCompare" target="self" stat="stamina" operation="GTE" value="3"/>

	This inverts the condition:
	<requirement name="!StatCompare" target="self" stat="stamina" operation="GTE" value="3"/>


	TARGET= : see below

	invert				boolean, inverts the condition

		RandomRoll: 			target, min_max, operation, value, seed_type, seed_additive
				seed_type:		Item, Player, Random
								Random is the default in most cases. A simple random number.
								Player is the static seed of this player on this map. You can create random "genetic" effects that permanently remain with this player.
								Item uses a seed that is generated based on creation time of the item. (so yes, that could detect dupes with some certainty, you're welcome)

		CVarCompare: 			target, cvar, operation, value
		HasBuff: 				target, buff
		NotHasBuff: 			target, buff
		IsMale				target
		EntityTagCompare: 		tags (list of tags); has_all_tags(bool); target  //		This matches entityclasses.xml <property name="Tags" value="entity,player"/>
		RequirementItemTier: 	target, tier, operation, value
		ProgressionLevel     	target, progression_name="attStrength" (or a perk name, whatever), operation, value
		PlayerLevel			target, operation, value
		CompareLightLevel
		HoldingItemHasTags		tags (string), has_all_tags(bool);  does not check for the tags of a mod that is installed in the item
							  *in theory* <passive_effect name="EntityDamage" operation="perc_add" value="100" tags="club"/>
							  will match tags on a held/equipped item but there is no guarantee every coder has passed the tags to every bit of code. You can try it. =)
		IsItemActive			(?) For activated items. Use only on the item/mod in question or the scope gets messy.
		IsLookingAtBlock		(not hooked up)		tags, has_all_tags
		IsLookingAtEntity		(not hooked up)		tags, has_all_tags
		IsStatAtMax			stat (Health,MaxStamina,Stamina,Water);  detects if a stat is within 0.1f UNITS of max, not %.


		For stat comparisons Health/Stamina are a bit twisted.
		You have Max which is the absolute ceiling value that your health can possibly reach.
		Then you have ModMax which is the "middle ceiling" that is lowered by serious injuries.
		Then you have Current which is the hit points you actualy have remaining. You lose all of those, you die.

		So Current HP can increase up to ModMax HP.
		If you want Current HP to increase up to Max HP you need to increase ModMax HP to Max HP first.
		0 <-> Current HP <-> ModMax HP <-> Max HP
		Armed with that knowledge the stat comparisons are slightly less confusing:

		StatCompareCurrent  	target, stat(health,stamina, water), operation, value
		StatCompareMax
		StatCompareModMax
		StatComparePercCurrentToMax
		StatComparePercCurrentToModMax
		StatComparePercModMaxToMax

				<requirement name="StatComparePercCurrentToMax" stat="health" operation="LTE" value=".8"/>


		StatCompare: 			target, stat, operation, value    (deprecated?)
		StatComparePercent: 	target, stat, operation, value    (deprecated?)

		Stat / cvar comparison operators:
				None,
				Equals,
				NotEquals,
				Less, LessThan, LT,
				Greater, GreaterThan, GT,
				LessOrEqual, LessThanOrEqualTo, LTE,
				GreaterOrEqual, GreaterThanOrEqualTo, GTE

		IsSecondaryAttack
		IsPrimaryAttack

		HasTrackedEntity	tags (entity tags).   This uses the "TrackDistance" passive for the distance check.
						Is not actually connected to the AnimalTracking passive. It simply returns TRUE if a tagged entity is in range.

		IsDay
		IsNight
		InBiome biome="<biome id>"      			<requirement name="InBiome" biome="9"/>
		PerksUnlocked skill_name="<skill name>"
		PlayerItemCount item_name="<item name>"		An expensive function that should be used sparingly.
		<requirement name="TimeOfDay" operation="GTE" value="1230"/>
		IsSleeping
		BlockStandingOn,   check block tags like for "walking on snow"
		HitLocation,		body_parts="Torso,Head,LeftUpperArm"
						None,Head,Torso,LeftUpperArm,RightUpperArm,LeftLowerArm,RightLowerArm,LeftUpperLeg,RightUpperLeg,LeftLowerLeg,RightLowerLeg

		IsIndoors
		BurstRoundCount
		TargetRange,	for the range between the attacking entity and the target. Intended to be used for firearms, specifically as the requirement for a buff to trigger on hit.
					Not all triggers work with this. onSelfPrimaryActionRayHit did not, onSelfAttackedOther did.
		RecipeUnlocked
		RoundsInMagazine

= = = = = = = = = = = = = = = = = = = = = = = = = = = = =

REQUIREMENTS / CONDITIONS / TAGS :

Tags can be used to limit passive effects to certain (hit) locations, states, or stances.

	Movement/stance:
	crouching, standing, idle, walking, running, swimming, floating, jumping, falling, climbing
		<passive_effect name="JumpStrength" operation="base_set" value="0.13"/>
		<passive_effect name="JumpStrength" operation="base_set" value="0.15" tags="running"/>

	Hit location (see below)

	Item tags:
		With passives you can not simply check the tags of the weapon you are using.
		<passive_effect name="RoundsPerMinute" tags="perkGunslinger" operation="perc_add" value="2,2" level="1,5"/>
		does not work.

		Instead you need to use
		<requirement name="HoldingItemHasTags" tags="perkGunslinger"/>
		<passive_effect name="RoundsPerMinute" operation="perc_add" value="2,2" level="1,5"/>

	invert_tag_check="true"
		This will pass all items/passives that do NOT have the listed tag.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = =

ACTIVE / TRIGGERED EFFECTS     (do not confuse with passive effects!)

<triggered_effect trigger="onSelfBuffStart" action="Ragdoll" [other parameters depending on the action]/>

Triggered effects are atomic operations that instantly change a value, start a buff, start a sound.
They do stuff but the trigger itself has NO inherent duration.


	Triggered effects can check TARGET TAGS but use a different notation:

	target_tags="walker,head"
				animal,bear,coyote,dog,entity,feral,hostile,human,npc,player,radiated,turret,vehicle,vulture,walker,wolf,zombie,
	There are 3 special tags:   ally, party, enemy
	These let you filter an effect to a group of these like with an AOE effect.

	target_tags
	- DO NOT have a  match_all_tags
	- DO NOT allow to filter for hit locations

= = = = = = = = = = = = = = = = = = = = = = = = = = = = =

MinEvents / Triggers

	onSelfBuffStart = 0
	onSelfBuffUpdate,  Frame-based, not 1/s
	onSelfBuffFinish,  Runs when the duration of a buff has run out.
	onSelfBuffRemove,  When the buff is being removed by any source. Can not be used for a buff to restart itself.
	onSelfBuffStack    When the buff is refreshed/extended/stacked... anything but "ignore"

	onSelfProgressionUpdate;  runs all such events in progression 1x per second
	onPerkLevelChanged;  fires when you BUY a perk, not when it is temporarily increased or lowered; this is intended and how passives work

	onCombatEntered

	onOtherDamagedSelf
	onOtherAttackedSelf		target="other" is the entity that last attacked you.
	onOtherHealedSelf

	onSelfDamagedOther
	onSelfAttackedOther
	onSelfHealedOther, //Hook Up
	onDismember

	onProjectileImpact; trigger for projectiles like arrows, molotovs, rockets

	onSelfDamagedSelf
	onSelfHealedSelf
	onSelfKilledOther

	onSelfDied
	onOtherKilledSelf
	onBlockKilledSelf
	onSelfKilledSelf

	onSelfPrimaryActionStart			works
	onSelfPrimaryActionRayHit		works
	onSelfPrimaryActionEnd			also fires on releasing a spear throw
	onSelfPrimaryActionUpdate		fires constantly
	onSelfPrimaryActionAttackFinished  n/a?
	onSelfPrimaryActionRayMiss		attack has not hit an entity and has not hit a block

	onSelfPrimaryActionGrazeHit
	onSelfPrimaryActionGrazeMiss		attack has not hit an entity and has not hit a block

	onSelfRangedBurstShot			on shots that are fired while holding the trigger down, between ActionStart and AttackFinished.

	onSelfSecondaryActionStart		works
	onSelfSecondaryActionRayHit		works
	onSelfSecondaryActionEnd			also fires on releasing a spear throw
	onSelfSecondaryActionUpdate		fires constantly
	onSelfSecondaryActionAttackFinished  n/a?
	onSelfSecondaryActionRayMiss		attack has not hit an entity and has not hit a block

	onSelfSecondaryActionGrazeHit
	onSelfSecondaryActionGrazeMiss	attack has not hit an entity and has not hit a block

	onSelfExplosionAttackedOther
	onSelfExplosionDamagedOther

	onSelfRepairBlock
	onSelfPlaceBlock
	onSelfUpgradedBlock
	onSelfDamagedBlock
	onSelfDestroyedBlock
	onSelfHarvestBlock
	onSelfHarvestOther

	onOtherEnteredRange, //Hook Up
	onOtherLeftRange, //Hook Up

	onSelfEquipStart ; can only work on an item/mod
	onSelfEquipStop
	onSelfItemActivate ; can only work on an item/mod
	onSelfItemDeactivate

	onReloadStart
	onReloadUpdate
	onReloadStop   ?

	onSelfFirstSpawn
	onSelfRespawn,		on respawn after death
	onSelfLeaveGame
	onSelfEnteredGame,	every time you load into the game
	onSelfTeleported

	onSelfJump
	onSelfLandJump
	onSelfRun
	onSelfWalk,		//triggers once on starting to walk
	onSelfCrouch
	onSelfStand
	onSelfAimingGunStart
	onSelfAimingGunStop
	onSelfCrouchRun
	onSelfCrouchWalk
	onSelfSwimStart,  entering/leaving water
	onSelfSwimStop
	onSelfWaterSubmerge		diving below / above the water surface, when the water screen effect changes
	onSelfWaterSurface
	onSelfSwimRun
	onSelfSwimIdle

	onSelfHoldingItemCreated    ;when you equip a belt item in the active slot?
	onSelfItemCrafted, //Hook Up
	onSelfItemRepaired, //Hook Up
	onSelfItemLooted, //Hook Up
	onSelfItemLost, //Hook Up
	onSelfItemGained, //Hook Up
	onSelfItemSold, //Hook Up
	onSelfItemBought, //Hook Up

	//onSelfDiscoveredPOI, //Hook Up
	//onSelfDiscoveredArea, //Hook Up

	//onSelfEnteredPOI, //Hook Up
	//onSelfExitedPOI, //Hook Up

	//onSelfEnteredArea, //Hook Up
	//onSelfExitedArea, //Hook Up

	onSelfEnteredBiome

	onSelfLootContainer
	onSelfOpenLootContainer

	//onQuestStart, //Hook Up
	//onQuestLocationReached, //Hook Up
	//onQuestLocationLeft, //Hook Up
	//onQuestCompleted, //Hook Up
	//onQuestFailed, //Hook Up

	//onGameBloodmoonStart, //Hook Up
	//onGameBloodmoonEnd, //Hook Up
	//onGameDayStart, //Hook Up
	//onGameNightStart, //Hook Up
	//onGameRainStart, //Hook Up
	//onGameRainEnd, //Hook Up
	//onGameSnowStart, //Hook Up
	//onGameSnowEnd, //Hook Up
	//onGameFogStart, //Hook Up
	//onGameFogEnd, //Hook Up

= = = = = = = = = = = = = = = = = = = = = = = = = = = = =

ACTIVE / TRIGGERED EFFECTS: ACTIONS

	TARGET parameter for <triggered_effect/> supports [self, other, selfAOE, otherAOE, positionAOE]
		AOE only if the specific action supports it. If an AOE event has a requirement, this req will be checked
		for all targets and only those who meet all req will be valid targets.
			target="self" is the default and can be overridden with target="other" if you want to check on the target of (an attack?)
			For event triggers like being attacked, "other" is your attacker.

	Depending on what TARGET or TRIGGER is used, it may require a range parameter:
	range="x"

	AnimatorSetFloat:		target, property, value
	AnimatorSetInt:		target, property, value ; change the animation / walk type
	AnimatorSetBool:		target, property, value
	AddBuff:				target, buff
	RemoveBuff:			target, buff
	ModifyCVar:			target, cvar, operation[set,add,subtract,multiply,divide], value
							value="randomfloat(1,10)" /  value="randomint(1,10)"  this generates a random number to be used in the cvar manipulation.
						Perform a basic math operation of   "cvar" "operation" "value"
						and write the result back to  "cvar"
	CVarLogValue:			target, cvar   (print a debug message to the console)
	LogMessage:			message
	ModifyScreenEffect:		target, effect_name, intensity, fade;   intensity=0 disables it
						Shaders are in \Assets\Resources\ScreenEffects\Shaders
	PlaySound:			target, sound, play_in_head;   sound references not a file name but a sound name from sounds.xml
						sound can use wildcards. "#" is replaced by "1" (male) or "2" (female), "$" is replaced by "Male" or "female"
							example: sound="player#painlg"
	StopSound:			target, sound, play_in_head
	FadeOutSound:			target, sound
	ModifyStat:			deprecated  (does not support value_type)
	ModifyStats:			target, stat[health,stamina,water,coretemp],
						value_type [max,modifiedmax],
						operation[set,setvalue,add,subtract,multiply,divide,randomfloat ?,randomint ?], value,

							Note that the operators are DIFFERENT from the ones on passive effects.
						Perform a basic math operation of   "stat" "operation" "value"
						and write the result back to  "stat"
	Ragdoll:				target, duration
	ShowToolbeltMessage		target?, message="blahblub" | message_key="localizationKey",  sound=""   play_in_head is always true for this.
						There will be a 1+ second delay before this message appears. The coder said that this is intentional. I suspect that there are ghost messages clogging the queue.

	AttachParticleEffectToEntity		target, particle, parent_transform, local_offset, local_rotation
	RemoveParticleEffectFromEntity	target, particle

	ResetProgression		hardcoded to ignore book perks
	GiveExp				exp="@_expdeficit" | exp="0"

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

PASSIVE EFFECTS       list of passives list

	Every passive effect essentially IS a number. It reflects a CURRENT STATE of an entity, like it's maximum carrying capacity or the upwards recoil of a gun.

	All applied changes are permanent... until the next update runs the entire Order Of Operation (OOO) and determines a NEW current value for the effect in question.

	Worn items apply their effects while being worn.
	Hand items (tools) apply their effects while being held, being in the active hotbar slot.
	Buffs apply their effects while being active.
	All of these effects can fully or partially depend on conditions so if you have a special regen buff it would
		keep going... but it's healing effect could temporarily drop out WHILE you ALSO have a "burning" buff on you.

	Modifying numbers is all this system does. If you want a buff started - you're in the wrong place.
	If you want to change how much stamina each jump uses - that's what we do here.

	target="self" is implied with all passive effects.
	You cannot apply an effect to target="other" because it would not have a duration and be overridden on the next update.
	A buff can be applied to another entity, of course. That buff is then a part of this entity's OOO and the effects are applied.



SPECIAL CASES

	ITEMS

		Items can have tiers.

		<passive_effect name="RunSpeed" operation="perc_add" value="5" tier="1"/>
		<passive_effect name="RunSpeed" operation="perc_add" value="10,50" tier="2,6"/>
		The tier parameter limits an effect to a specific tier or range of tiers.
		Both of the above can be part of the same item.


	PROGRESSION  (attibutes,skills,perks)

		Stuff has a "level" here. You can limit a certain effect... see above.

		<passive_effect name="RunSpeed" operation="perc_add" value="5" level="1"/>
		<passive_effect name="RunSpeed" operation="perc_add" value="10,50" level="2,6"/>


	BUFFS

		You have probably figured out that buffs have a duration.
		The default case is that all included effects are "on" while the buff is.

		This would be way too simple so let's have some fun and model effect CURVES!

		duration  is an optional parameter of passive effects.
		A buff's duration value 0 is when the buff is started.

		<passive_effect name="SpreadMultiplierAiming" operation="perc_add" duration="2,4,8.5" value="0,-20,-85"/>
		This effect does nothing for the first 2 seconds of the buff.
		Between 2s and 4s of buff time it moves  SpreadMultiplierAiming from normal to -20%.
		Between 4s and 8.5s of buff time it moves  SpreadMultiplierAiming from -20% to -85%.
		After 8.5s there is no effect.

		<passive_effect name="SpreadMultiplierAiming" operation="perc_add" duration="8.50001,600" value="-85"/>
		This effect kicks in at 8.50001s and always applies the same effect.
		(you would roll that into the previous effect curve - this here is just a demonstration)


	RANDOM LERP
		But wait! There's more!
		If any ITEMS/PROGRESSION/BUFFS passive effect has NO tier/level/duration but DOES have TWO values

		as in value="3,10" then this will be considered a random range.


	Gossip:
		Internally, tier|level|duration is the same value. It's meaning is derived from the context so a skill would work like an item if... but let's keep our sanity for now.


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

PASSIVE EFFECTS : OPERATIONS

	Passive effects always have an operation.
	You DO remember that changing numbers is all they do? So they must have an operation.

	Note that these are not "operators" but rather more complex operations performed over the course of the OOO.
	These operations are completely different from the simpler  ModifyCVar / ModifyStats  operations.

	<passive_effect name="RunSpeed" operation="base_set|base_add|base_subtractperc_set|perc_add|perc_subtract" value="5"/>

	OPERATION:
	base_set:			SET the absolute (base) value of a stat, such as setting HealthMax to exactly 100.
					The smart thing to do would be to make sure you only ever have one such "base_set" because it's an unconditional overwrite.
					The base / default value is "1".
	base_add:			a value of 10 adds 10 points to the absolute value
	base_subtract:		(guess)

	perc_set:			set the % modifiers of an effect to a specific value. Likely not used very often because it overwrites a lot of what's going on.
	perc_add:			add this % mofifier to an effect
					A value of ".07" means +7%
					All percentage modifiers for an effect are cumulated and applied ONCE after all base value changes have been applied.
					See OOO. You will see this material again.
	perc_subtract:      (as above but not)


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

PASSIVE EFFECT TAGS

	Tags are a filter for which effects are APPLIED to an item or entity.


	<perk name="Pistols" parent="attPerception" name_key="perkPistols" desc_key="perkPistolsDesc" icon="ui_game_symbol_pistol">
		<passive_effect name="EntityDamage" operation="perc_add" level="0,10" value="0,100" tags="pistol"/>

	<item id="48" name="gunAK47">
		<property name="Tags" value="weapon,ranged,gun,rifle,barrelAttachments"/>

	<item id="42" name="gun44Magnum">
		<property name="Tags" tags="secondary,revolver"/>

	Here we have one perk, say at level 10 which means +100% damage when using things tagged with "pistol".

	In the OOO skills come after items.
	The perk now checks if ALL OF ITS TAGS are present in the tags of the item.
	With the magnum there is a "pistol" tag so that works. On the AK47 there is none so the effect (damage increase) does not apply.

	If the perk had  tags="pistol,longRange"  then the magnum would NOT qualify.
	All tags must be a match.
	Items can have additional tags that are relevant to other perks/buffs but each perk checks for ALL of it's tags being present on the item.


	If an effect has NO tags it will be applied to all items/attacks.
	Tags are for LIMITING an effect to very specific items so the default is "no limitation".


SPECIAL CASE: CLOTHING AND ARMOR

	If an item is tagged "clothing" or "armor" this is also read as "ignoreWhenHeld" (on the hotbar)


PRIMARY / SECONDARY ACTION TAGS

	The primary / secondary actions are hardcoded to add  "primary"  or  "secondary"  to an item's tags.

	So if I want a buff or skill to put an effect on the SECONDARY attack of all REVOLVERS, I would use
		<passive_effect name="EntityDamage" operation="perc_add" value="100" tags="secondary,revolver"/>


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

LIST OF PASSIVE EFFECTS   (it does not matter on which item/entity a passive is active. Only a few *require* a certain scope, like being on an item or mod)

	Typical stats/effects of an entity. How high you jump, how fast you run, what your loot tier/ability is...
	These are (as I get around to it) declared in entityclasses.xml.
	Then they are ALTERED by buffs, perks, items and whatnot.

	EntityHeal, //Hook Up
	BlockRepairAmount, //Hook Up
	DamageModifier; used for headshot multiplier;  this multiplies damage by x, used for headshots or material differences. If you base_set it to a flat 100, entity damage will be 100 flat.
					This is a multiplier that is applied AFTER base damage and perc_add for an attack have been determined so it is a true exponential multiplier.
					base_add/perc_add work as usual here.  A "wood" bonus of 10 on the chainsaw +0.5 from a WoodSplitter mod = 10.5


	PhysicalDamageResist;  a value of 0-100; 100 meaning invulnerable,
						tags for damage types are"piercing,bashing,slashing,crushing,none,corrosive"
						tags="coredamageresist" effects are calculated *after* the armor and degradation values.
						These are not affected by the armor skills tagged for items.
						You CAN become invulnerable if you screw up the balancing.
	ElementalDamageResist
	PhysicalDamageResistMax;	unused
	ElementalDamageResistMax;	unused

	TrapIncomingDamage		This is land mines only and modifies the damage that is taken.  perc_set=.8 reduces it by 20% but base_set=90 sets it to a flat value 90.
	BlockPickup		<passive_effect name="BlockPickup" operation="base_set" value="1" tags="Mine"/>

	HypothermalResist
	HyperthermalResist

	//All vehicles
	VehicleSpeedMax
	VehicleBoostedSpeedMax

	VehicleFuelUsePer
	VehicleVelocityMaxPer
	VehicleVelocityMaxTurboPer

	VehicleCarryCapacity
	VehicleEntityDamage
	VehicleBlockDamage
	VehicleReflectedDamage

	//Gas vehicles
	VehicleTankSize

	//Manual vehicles
	VehicleHopStrength
	VehiclePlayerStaminaDrainRate


	BatteryMaxLoadInVolts
	BatteryDischargeTimeInMinutes
	DistractionResistance
	DistractionRadius
	DistractionLifetime
	DistractionStrength
	DistractionEatTicks

	ProjectileVelocity
	ProjectileGravity
	ProjectileStickChance	default 0.5. Probably. <passive_effect name="ProjectileStickChance" operation="perc_set" value="0" tags="glass"/>

	RecipeTagUnlocked  		<passive_effect name="RecipeTagUnlocked" tags="ammo44MagnumBulletHP,ammoShotgunSlug"/>, or set a cvar named "ammo44MagnumBulletHP"

	EconomicValue
	#endregion

	AttributeLevel
	SkillLevel
	PerkLevel

	SkillExpGain
	PlayerExpGain,   Tags:  Kill, Harvesting, Upgrading, Crafting, Selling, Quest, Looting, Party, Other

	ExpDeficitPerDeathPercentage,	percentage is based on TotalExpNeeded for the next level. default is 10% per death
	ExpDeficitMaxPercentage,		 default= 50% deficit,   also note: CVAR _expdeficit

	ElectricalTrapXP,	default=0, % of trap kill XP that the player gets. Works on specific block classes like "BladeTrap". Only tile entities can store an owner.

	NoiseMultiplier
	LightMultiplier

	CraftingTime,   this passive can also be on a workstation-installable "tool". It then affects crafting time in that workstation.
	CraftingTier,  a _recipe_ can have a  tags="perkElectrocutioner".  Then a passive tagged with that will only affect recipes with this tag.
	CraftingSmeltTime,
	CraftingOutputCount, //Hook Up
	ActiveCraftingSlots, //Hook Up
	CraftingSlots, //Hook Up

	CarryCapacity,  the number of slots "unlocked" in the inventory
	BagSize,   the max number of slots on the UI

	RepairTime, //Hook Up
	RepairAmount

	ReloadSpeedMultiplier,  higher value is faster

	WaterRegenRate,	multiplier for how fast stamina/health are regening

	HealthMax,	Total max hit points.
	HealthMaxModifierOT,   changing the portion of "damaged" health up or down every 1s
	HealthChangeOT,	Alter hit points by this much every 1second
	HealthGain,		when you gain health it's modified by this, generally for bonus healing or lowering heal amount
	HealthLoss,		whenever health is lost it's modified by this
	HealthLossMaxMult,	when hp is lost, this is the % of it to apply to healthMax as well

	StaminaMax
	StaminaMaxModifierOT,	USE THIS ONE instead of FoodChangeOT;  changing the portion of "damaged" health up or down  every 1s
	StaminaChangeOT
	StaminaGain
	StaminaLoss
	StaminaLossMaxMult

	FoodMax,	food translates into the usable length of the stamina bar.
	FoodChangeOT
	FoodGain
	FoodLoss
	FoodLossPerHealthPointLost

	WaterMax,		water translates into how fast you can regen stamina / HP
	WaterChangeOT
	WaterGain
	WaterLoss
	WaterLossPerHealthPointGained
	WaterLossPerStaminaPointGained

	CoreTempChangeOT, //Hook Up
	CoreTempGain, //Hook Up
	CoreTempLoss, //Hook Up

	JumpStrength
	WalkSpeed
	RunSpeed
	CrouchSpeed
	Mobility

	ScavengingTime
	ScavengingTier
	ScavengingItemCount, //Hook Up
	HarvestCount;  this is a multiplier for harvest. Default= 0 !

	DismemberChance, ; decapitation, 0-1;  tags are "head,arm,leg"
		<property name="DismemberMultiplierHead" value="1"/> These zombie properties multiply the set dismember chance.
		<property name="DismemberMultiplierArms" value="1"/>
		<property name="DismemberMultiplierLegs" value="1"/>

	TreasureRadius
	BreathHoldDuration, //Hook Up

	BarteringBuying
	BarteringSelling
	SecretStash
	LootTier, //Hook Up
	HeatGain, //Hook Up

	QuestBonusItemReward
	QuestRewardOptionCount
	QuestRewardChoiceCount

	GameStage
	LootGamestage,			LootGamestage only counts for containers that you open. It does not affect party loot GS.

	LandMineImmunity
	MovementFactorMultiplier,	Would be used to mitigate the movement slowdown that certain blocks apply.
	TrackDistance
	TurretWakeUp
	TrapDoorTriggerDelay
	LandMineTriggerDelay

	LockPickTime - Used to reduce the time it takes to lock pick
	LockPickBreakChance - Percent chance to reduce the lock pick breaking chance

	LandClaimDamageModifier - damage done to blocks in land claim areas
		  the base value for this is:  serverconfig.xml / LandClaimOnlineDurabilityModifier / LandClaimOfflineDurabilityModifier

	FallDamageReduction - Reduces damage taken from falling. Takes the cvar _fallSpeed as the base value. You can then affect it with a base_add, set, or perc_add before it enters the buff system.

	LootDropProb,		Takes an entities LootDropProb *property* as the base value. You can then affect it with a base_add, set, or perc_add.
	LootQuantity

	CriticalChance
	BuffProcChance
	BuffResistance;  tags references a buff name, at .4 on  "buffInjuryConcussion,buffBurning" you have a 40% chance for either buff to bounce instead of taking hold

	EntityDamage
	DamageBonus,    A multiplier applied as a final calculation to scale damage vs specific body parts or materials.
	EntityHeal, //Hook Up
	BlockDamage,		BlockDamage now uses tags which can limit the damage to blocks specifically tagged for that - not just an entire material type.
	BlockRepairAmount, //Hook Up

	AttacksPerMinute
	SphereCastRadius

	SpreadMultiplierHip
	SpreadMultiplierAiming
	SpreadMultiplierRunning
	SpreadMultiplierWalking
	SpreadMultiplierCrouching
	SpreadMultiplierIdle

	IncrementalSpreadMultiplier

	WeaponHandling, higher value is better

	MagazineSize
	ReloadSpeedMultiplier

	DamageFalloffRange
	MaxRange,    guns only
	BlockRange,    guns only          tools need to have a longer range for the block raycast for playability
	SpreadDegreesVertical
	SpreadDegreesHorizontal
	KickDegreesVerticalMin / KickDegreesVerticalMax
	KickDegreesHorizontalMin / KickDegreesHorizontalMax


	JunkTurretActiveRange,	default=10, can be on the item or the player (progression/buffs), not on the turret entity.
	JunkTurretActiveCount,  default=1,  this is bugged. A value of 0 means that 1 turret is active, 2 and 3 turrets will be active.

	BurstRoundCount
	RoundsPerMinute,    guns only
	ExplosionRadius
	RoundRayCount,   now an ammo property
	SphereCastRadius,   guns only  - eventually for melee weapons

	LightIntensity,  the light level (0-15) in the game world

	HealthSteal

	GrazeDamageMultiplier
	GrazeStaminaMultiplier

	DegradationMax
	DegradationPerUse

	Tier
	ModSlots
	ModPowerBonus

	PiercingDamage, //Hook Up
	SlashingDamage, //Hook Up
	BashingDamage, //Hook Up
	CrushingDamage, //Hook Up
	ExplosiveDamage, //Hook Up
	HeatDamage, //Hook Up
	ColdDamage, //Hook Up
	RadiationDamage, //Hook Up
	CorrosiveDamage, //Hook Up
	ElectricalDamage, //Hook Up

	TargetArmor,		When hitting an entity, modify the target entity's armor by this value. See  ammo9mmBulletAP.
	FallingBlockDamage
	SilenceBlockSteps,		Sneaking over trash makes no sound.
	CraftingIngredientCount
	EntityPenetrationCount
	BlockPenetrationFactor,	default=251; This many block hit points reduce EntityPenetrationCount by 1.  251 is just enough to penetrate 1 wood block or door.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
	LIST OF PASSIVE ARMOR EFFECTS

	PiercingProtection
	SlashingProtection
	BashingProtection
	CrushingProtection
	ExplosiveProtection

	//Elemental Damage Types
	HeatProtection
	ColdProtection
	RadiationProtection
	CorrosiveProtection
	ElectricalProtection

	//Internal Body Damage Types (probably more used in mods and on buffs than on armor)
	SuffocationProtection
	DiseaseProtection
	InfectionProtection, //Hook Up
	StarvationProtection, //Hook Up
	DehydrationProtection, //Hook Up
	FeverProtection, //Hook Up

	//Environmental Damage Types
	FallingProtection, //Hook Up


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

	VehicleDamagePassedToPlayer
	VehicleSteering
	VehicleMaxSteeringAngle
	VehicleAcceleration
	VehicleBraking
	VehiclePlayerStaminaDrainRate
	VehicleMaxSpeed
	VehicleMetersPerLiter
	VehicleIdleSecondsPerLiter
	VehicleNoise
	VehicleTraction
	VehicleDrag
	VehicleTankSize
	VehicleStorageWidth
	VehicleStorageHeight

	BatteryMaxLoadInVolts
	BatteryDischargeTimeInMinutes


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

DAMAGE TYPES

	Any buff that has a  <damage_type value=""/>  that is not null will be taken out with the  RemoveAllNegativeBuffs  action.
	This is also how buffs interact with the player kill / friendly fire settings.  Only positive buffs will go through unless set to hostile.

	//Physical Damage Types
	Piercing
	Slashing
	Bashing
	Crushing
	Corrosive

	//Elemental Damage Types
	Heat
	Cold
	Radiation
	Toxic
	Electrical


	//Systemic Damage Types
	Disease
	Infection
	Starvation
	Dehydration
	Falling
	Suffocation
	BloodLoss		: This damage type (bleeding) has a reduced (10%) change to trigger the damage response like speeding up the zombie on damage
	Sprain
	Break
	Stun
	Concuss
	KnockOut
	BlackOut
	KnockDown

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Wishlist:

- A requirement that can check if an item is in the player inventory
- An action to add or remove an item to/from the player inventory.
  If the inventory is full it would drop to the ground.

Obvious usecase:
A pistol expels one casing per shot. These would drop the the ground and would need a small dropmesh.

If you install a brass catcher mod, the items would go into your inventory instead of you having to pick them up from the ground.

This mod would add an invisible perk. That way we can block the "drops to the ground" base feature and instead use the one that the modd adds.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =




Requirements:


Effects:


-->