#base robot_standard.pop #base robot_giant.pop WaveSchedule { StartingCurrency 1984 CanBotsAttackWhileInSpawnRoom no RespawnWaveTime 0 // DisallowUpgrade // { // ClassName "tf_powerup_bottle" // } DisallowUpgrade "refill_ammo" DisallowUpgrade "critboost" DisallowUpgrade "ubercharge" DisallowUpgrade "recall" DisallowUpgrade "canteen specialist" PointTemplates { CustomCanteensSetup { OnSpawnOutput { Target "@c@!activator" Action "$SetProp$m_usNumCharges" Param 0 Delay 0 } OnSpawnOutput { Target "!activator" Action "$SetVar$currentCustomCanteenCharges" Param 0 Delay 0 } } CustomCanteens { OnSpawnOutput { Target "canteen_input" Action "FireUser1" Delay 0.1 } OnSpawnOutput { Target "@c@!activator" Action "$SetProp$m_usNumCharges" Param "$$=!activator.currentCustomCanteenCharges" Delay 0 } OnSpawnOutput { //sync attribute with previous life before being reapplied because onapply doesn't sync with this properly Target "custom_charge_decrease" Action "FireUser2" Delay 0.1 } logic_compare { //check if m_usNumCharges is different from currentCustomCanteenCharges variable "targetname" "canteen_input_used_check" "CompareValue" "69420" //to be set later //"OnLessThan" "player,$DisplayTextChat,here,0,-1" "OnLessThan" "canteen_owned_check,TestActivator,,0,-1" } logic_compare { "targetname" "sanitize_canteen_input" "CompareValue" "6900" //"OnLessThan" "player,$DisplayTextChat,,0,-1" "OnLessThan" "canteen_input_used_check,SetCompareValue,$$=!activator.currentCustomCanteenCharges,0,-1" "OnLessThan" "canteen_input_used_check,SetValueCompare,,0.01,-1" } logic_relay { "targetname" "canteen_input" //"OnUser1" "player,$DisplayTextChat,used,0,-1" //since $getprop with @c@ work like an index loop doing the applied output on every child and default to a set value if the prop index doesn't exist //I can hook it to a logic_compare and see if the input is different from the default value "OnUser1" "@c@!activator,$GetProp$m_usNumCharges,sanitize_canteen_input|SetValueCompare|6900,0,-1" //"OnUser1" "player,$DisplayTextChat,here,0,-1" "OnUser1" "!self,FireUser1,,0.2,-1" } logic_compare { //check if canteen count is at 0 "targetname" "canteen_is_empty" "CompareValue" "0" //"OnEqualTo" "player,$DisplayTextChat,empty,0,-1" "OnEqualTo" "on_canteen_empty,Trigger,,0,-1" "OnUser1" "!activator,$GetVar$currentCustomCanteenCharges,canteen_is_empty|SetValueCompare|-1,0,-1" // "OnUser2" "!activator,$RemoveItemAttribute,refill_ammo|9,0,-1" // "OnUser2" "!activator,$RemoveItemAttribute,special item description|9,0,-1" // "OnUser2" "!activator,$SetVar$canteenIndex,-1,0,-1" } logic_relay { //triggered after a successful custom canteen use "targetname" "canteen_input_success" "spawnflags" "2" //"OnTrigger" "player,$DisplayTextChat,success2,0,-1" "OnTrigger" "!activator,$SetVar$currentCustomCanteenCharges,$$=!activator.currentCustomCanteenCharges - 1,0,-1" "OnTrigger" "@c@!activator,$SetProp$m_usNumCharges,$$=!activator.currentCustomCanteenCharges - 1,0,-1" "OnTrigger" "canteen_is_empty,FireUser1,,0.01,-1"//"!activator,$GetVar$currentCustomCanteenCharges,canteen_is_empty|SetValueCompare|-1,0.01,-1" //"OnTrigger" "player,$DisplayTextCenter,$$=!activator.currentCustomCanteenCharges - 1,0,-1" } $filter_variable { //check if player has any remaining canteen charges "targetname" "canteen_owned_check" "$name" "currentCustomCanteenCharges" "$value" "0" "$compare" "greater than" "Negated" "0" "OnPass" "canteen_effect,TestActivator,,0,-1" } logic_case { //change custom charge attribute to sync with upgrade station "targetname" "custom_charge_decrease" "case16" "%|%" "case01" "none" "case02" "0" "ondefault" "!activator,$AddPlayerAttribute,,0,-1" //using !self here will break things randomly btw. turbo autism but I'm used to that by now "OnUser1" "custom_charge_decrease,$SetKey$case01,$$=!activator.currentCustomCanteenAttribute,0,-1" "OnUser1" "custom_charge_decrease,$SetKey$case02,$$=!activator.currentCustomCanteenCharges - 1,0,-1" "OnUser1" "custom_charge_decrease,$Format,,0.1,-1" //resync "OnUser2" "custom_charge_decrease,$SetKey$case01,$$=!activator.currentCustomCanteenAttribute,0,-1" "OnUser2" "custom_charge_decrease,$SetKey$case02,$$=!activator.currentCustomCanteenCharges,0,-1" "OnUser2" "custom_charge_decrease,$Format,,0.1,-1" } $filter_variable { "targetname" "canteen_effect" //speed boost canteen "$value" "1" "$name" "canteenIndex" "$compare" "equal" "Negated" "0" //"OnPass" "player,$DisplayTextChat,success,0,-1" "OnPass" "canteen_input_success,Trigger,,0,-1" "OnPass" "custom_charge_decrease,FireUser1,,0,-1" "OnPass" "player,$DisplayTextChat,{red}{activator}{reset} has used their {9BBF4D}SPEED BOOST {reset}Power Up Canteen!,0,-1" "OnPass" "!activator,$AddCond,32,0,-1" "OnPass" "!activator,$RemoveCond,32,5,-1" } filter_activator_tfteam { "targetname" "filter_is_blue" "Negated" "0" "TeamNum" "3" } $filter_sendprop { "targetname" "filter_is_not_giant" "$name" "m_bIsMiniBoss" "$value" "0" "$compare" "equal" "Negated" "0" } filter_multi { "targetname" "filter_can_be_sapped" "Negated" "0" "FilterType" "0" "Filter01" "filter_is_blue" "Filter02" "filter_is_not_giant" } trigger_multiple { "targetname" "reprogram_canteen_apply" "origin" "0 0 0" "mins" "-300.0 -300.0 -300.0" "maxs" "300.0 300.0 300.0" "spawnflags" "1" "StartDisabled" "1" "filtername" "filter_can_be_sapped" "OnStartTouch" "!activator,$AddPlayerAttribute,receive friendly fire|1,0,-1" "OnStartTouch" "!activator,$AddCond,43,0,-1" "OnStartTouch" "!activator,$AddCond,50,0,-1" "OnStartTouch" "!activator,$RemovePlayerAttribute,receive friendly fire,8,-1" "OnStartTouch" "!activator,$RemoveCond,43,8,-1" "OnStartTouch" "!activator,$RemoveCond,50,8,-1" "OnStartTouch" "!activator,$Suicide,50,8,-1" //self-destruct bot after done reprogramming "OnUser1" "!self,Enable,,0,-1" "OnUser1" "!self,Disable,,0.01,-1" } info_particle_system { "targetname" "sapper_effect" "effect_name" "Explosion_ShockWave_01" "flag_as_weather" "0" "start_active" "0" } $filter_variable { "targetname" "canteen_effect" //reprogram canteen "$value" "2" "$name" "canteenIndex" "$compare" "equal" "Negated" "0" "OnPass" "canteen_input_success,Trigger,,0,-1" "OnPass" "custom_charge_decrease,FireUser1,,0,-1" "OnPass" "player,$DisplayTextChat,{red}{activator}{reset} has used their {9BBF4D}REPROGRAM {reset}Power Up Canteen!,0,-1" "OnPass" "sapper_effect,Stop,,0,-1" "OnPass" "sapper_effect,Start,,0.01,-1" "OnPass" "reprogram_canteen_apply,FireUser1,,0,-1" } $filter_variable { "targetname" "canteen_effect" //berserk canteen "$value" "3" "$name" "canteenIndex" "$compare" "equal" "Negated" "0" "OnPass" "canteen_input_success,Trigger,,0,-1" "OnPass" "custom_charge_decrease,FireUser1,,0,-1" "OnPass" "player,$DisplayTextChat,{red}{activator}{reset} has used their {9BBF4D}BERSERK {reset}Power Up Canteen!,0,-1" "OnPass" "!activator,$Addcond,41,0,-1" "OnPass" "!activator,$WeaponSwitchSlot,2,0.01,-1" //"OnPass" "!activator,$AddPlayerAttribute,CARD: damage bonus|1.15,0,-1" "OnPass" "!activator,$AddItemAttribute,fists have radial buff|1|2,0,-1" "OnPass" "!activator,$AddPlayerAttribute,melee range multiplier|1.1,0,-1" "OnPass" "!activator,$AddPlayerAttribute,melee attack rate bonus|0.8,0,-1" //"OnPass" "!activator,$RemovePlayerAttribute,CARD: damage bonus,5,-1" "OnPass" "!activator,$RemoveItemAttribute,fists have radial buff|2,5,-1" "OnPass" "!activator,$RemovePlayerAttribute,melee range multiplier,5,-1" "OnPass" "!activator,$RemovePlayerAttribute,melee attack rate bonus,5,-1" "OnPass" "!activator,$Removecond,41,5,-1" } $filter_variable { "targetname" "canteen_effect" //addrenaline canteen "$value" "4" "$name" "canteenIndex" "$compare" "equal" "Negated" "0" "OnPass" "canteen_input_success,Trigger,,0,-1" "OnPass" "custom_charge_decrease,FireUser1,,0,-1" "OnPass" "player,$DisplayTextChat,{red}{activator}{reset} has used their {9BBF4D}ADDRENALINE {reset}Power Up Canteen!,0,-1" "OnPass" "!activator,$Addcond,46,0,-1" "OnPass" "!activator,$AddPlayerAttribute,CARD: damage bonus|1.3,0,-1" "OnPass" "!activator,$AddPlayerAttribute,CARD: move speed bonus|1.2,0,-1" "OnPass" "!activator,$AddPlayerAttribute,CARD: health regen|3,0,-1" "OnPass" "!activator,$Addcond,46,0,-1" "OnPass" "!activator,$Removecond,46,5,-1" "OnPass" "!activator,$RemovePlayerAttribute,CARD: damage bonus,5,-1" "OnPass" "!activator,$RemovePlayerAttribute,CARD: move speed bonus,5,-1" "OnPass" "!activator,$RemovePlayerAttribute,CARD: health regen,5,-1" //fatigue "OnPass" "!activator,$AddPlayerAttribute,damage penalty|0.7,5,-1" "OnPass" "!activator,$AddPlayerAttribute,move speed penalty|0.8,5,-1" "OnPass" "!activator,$RemovePlayerAttribute,damage penalty,10,-1" "OnPass" "!activator,$RemovePlayerAttribute,move speed penalty,10,-1" } logic_relay { //proxy relay to deapply stealth, deapplication is cancelled upon using a new stealth canteen to prevent overlap "targetname" "stealth_can_duration" "spawnflags" "2" "OnTrigger" "!activator,$Removecond,64,14.9,-1" } $filter_variable { "targetname" "canteen_effect" //stealth canteen "$value" "5" "$name" "canteenIndex" "$compare" "equal" "Negated" "0" "OnPass" "canteen_input_success,Trigger,,0,-1" "OnPass" "custom_charge_decrease,FireUser1,,0,-1" "OnPass" "player,$DisplayTextChat,{red}{activator}{reset} has used their {9BBF4D}STEALTH {reset}Power Up Canteen!,0,-1" "OnPass" "stealth_can_duration,$CancelPending,,0,-1" "OnPass" "!activator,$Addcond,64,0,-1" "OnPass" "stealth_can_duration,Trigger,,0.1,-1" } // $filter_variable // { // "targetname" "canteen_effect" //refill ammo canteen, doesn't do anything beside catching up // "$value" "3" // "$name" "canteenIndex" // "$compare" "equal" // "Negated" "0" // "OnPass" "canteen_input_success,Trigger,,0,-1" // "OnPass" "custom_charge_decrease,FireUser1,,0,-1" // } } CanteenPurchase { NoFixup 1 logic_relay { "targetname" "canteen_count_update" "spawnflags" "2" "$OnUser5" "!activator,$RemoveItemAttribute,refill_ammo|9,0" "$OnUser5" "@c@!activator,$SetProp$m_usNumCharges,,0,-1" "$OnUser5" "!activator,$SetVar$currentCustomCanteenCharges,,0,-1" } logic_relay { "targetname" "on_canteen_empty" "spawnflags" "2" "OnTrigger" "!activator,$RemoveItemAttribute,refill_ammo|9,0,-1" "OnTrigger" "!activator,$RemoveItemAttribute,special item description|9,0,-1" "OnTrigger" "!activator,$SetVar$canteenIndex,-1,0,-1" } } } SpawnTemplate CanteenPurchase PlayerSpawnTemplate { Name CustomCanteens Origin "0 0 0" } PlayerSpawnOnceTemplate { Name CustomCanteensSetup Origin "0 0 0" } //todo: handle wave restore ExtendedUpgrades { //canteens speed_can { Name "Speed Boost Canteen" //random attribute, preferably one that doesn't do anything nor show up on the player, basically just meant to index //remember to edit output to apply this attribute as currentCustomCanteenAttribute so that it can automatically be formatted Attribute "mvm completed challenges bitmask" Cap 5 Increment 1 Cost 50 PlayerUpgrade 1 RequiredWeapons { Classname "tf_powerup_bottle" } RequiredWeaponsString "No canteen equipped" DisallowedUpgrade { Upgrade re_can } DisallowedUpgrade { Upgrade ammo_can } DisallowedUpgrade { Upgrade add_can } DisallowedUpgrade { Upgrade ber_can } DisallowedUpgrade { Upgrade cloak_can } OnUpgrade { Output "canteen_count_update,$FireUser5," Output "!activator,$AddItemAttribute,special item description|Consumable: Gain a speed boost for 5 seconds|9,0" Output "!activator,$SetVar$canteenIndex,1,0" Output "!activator,$SetVar$currentCustomCanteenAttribute,mvm completed challenges bitmask,0" } OnApply { Output "!activator,$AddItemAttribute,special item description|Consumable: Gain a speed boost for 5 seconds|9,0" Output "!activator,$SetVar$currentCustomCanteenAttribute,mvm completed challenges bitmask,0" Output "!activator,$SetVar$canteenIndex,1,0" } OnDowngrade { Output "canteen_count_update,$FireUser5," Output "on_canteen_empty,Trigger,,0" } } re_can { Name "Reprogram Canteen" Attribute "limited quantity item" Cap 10 Increment 1 Cost 5 PlayerUpgrade 1 Description "Reprogram non-giant enemies in a radius" RequiredWeapons { Classname "tf_powerup_bottle" } RequiredWeaponsString "No canteen equipped" DisallowedUpgrade { Upgrade ammo_can } DisallowedUpgrade { Upgrade speed_can } DisallowedUpgrade { Upgrade add_can } DisallowedUpgrade { Upgrade ber_can } DisallowedUpgrade { Upgrade cloak_can } OnUpgrade { Output "canteen_count_update,$FireUser5," Output "!activator,$AddItemAttribute,special item description|Consumable: Reprogram non-giant enemies in a radius|9,0" Output "!activator,$SetVar$currentCustomCanteenAttribute,limited quantity item,0" Output "!activator,$SetVar$canteenIndex,2,0" } OnApply { Output "!activator,$AddItemAttribute,special item description|Consumable: Reprogram non-giant enemies in a radius|9,0" Output "!activator,$SetVar$currentCustomCanteenAttribute,limited quantity item,0" Output "!activator,$SetVar$canteenIndex,2,0" } OnDowngrade { Output "canteen_count_update,$FireUser5," Output "on_canteen_empty,Trigger,,0" } } ber_can { Name "Berserk Canteen" Attribute "throwable healing" Cap 3 Increment 1 Cost 5 PlayerUpgrade 1 RequiredWeapons { Classname "tf_powerup_bottle" } RequiredWeaponsString "No canteen equipped" Description "Locked to melee for 5 seconds, greatly increased melee power" DisallowedUpgrade { Upgrade re_can } DisallowedUpgrade { Upgrade speed_can } DisallowedUpgrade { Upgrade add_can } DisallowedUpgrade { Upgrade cloak_can } OnUpgrade { Output "canteen_count_update,$FireUser5," Output "!activator,$AddItemAttribute,special item description|Consumable: Lock to melee but increase melee power|9,0" Output "!activator,$SetVar$currentCustomCanteenAttribute,throwable healing,0" Output "!activator,$SetVar$canteenIndex,3,0" } OnApply { Output "!activator,$AddItemAttribute,special item description|Consumable: Lock to melee but increase melee power|9,0" Output "!activator,$SetVar$currentCustomCanteenAttribute,throwable healing,0" Output "!activator,$SetVar$canteenIndex,3,0" } OnDowngrade { Output "canteen_count_update,$FireUser5," Output "on_canteen_empty,Trigger,,0" } } add_can { Name "Addrenaline Canteen" Attribute "throwable damage" Cap 3 Increment 1 Cost 5 PlayerUpgrade 1 RequiredWeapons { Classname "tf_powerup_bottle" } RequiredWeaponsString "No canteen equipped" Description "Gain various buffs for 5 seconds, become weakened for a duration afterward" DisallowedUpgrade { Upgrade re_can } DisallowedUpgrade { Upgrade speed_can } DisallowedUpgrade { Upgrade ber_can } DisallowedUpgrade { Upgrade cloak_can } OnUpgrade { Output "canteen_count_update,$FireUser5," Output "!activator,$AddItemAttribute,special item description|Consumable: Gain various buffs for 5 seconds and become fatigue briefly after duration|9,0" Output "!activator,$SetVar$currentCustomCanteenAttribute,throwable damage,0" Output "!activator,$SetVar$canteenIndex,4,0" } OnApply { Output "!activator,$AddItemAttribute,special item description|Consumable: Gain various buffs for 5 seconds and become fatigue briefly after duration|9,0" Output "!activator,$SetVar$currentCustomCanteenAttribute,throwable damage,0" Output "!activator,$SetVar$canteenIndex,4,0" } OnDowngrade { Output "canteen_count_update,$FireUser5," Output "on_canteen_empty,Trigger,,0" } } cloak_can { Name "Stealth Canteen" Attribute "throwable particle trail only" Cap 3 Increment 1 Cost 5 PlayerUpgrade 1 RequiredWeapons { Classname "tf_powerup_bottle" } RequiredWeaponsString "No canteen equipped" Description "Cloak for up to 15 seconds, cloak is cancelled when attacking" DisallowedUpgrade { Upgrade re_can } DisallowedUpgrade { Upgrade speed_can } DisallowedUpgrade { Upgrade ber_can } DisallowedUpgrade { Upgrade add_can } OnUpgrade { Output "canteen_count_update,$FireUser5," Output "!activator,$AddItemAttribute,special item description|Consumable: Cloak for up to 15 seconds|9,0" Output "!activator,$SetVar$currentCustomCanteenAttribute,throwable particle trail only,0" Output "!activator,$SetVar$canteenIndex,5,0" } OnApply { Output "!activator,$AddItemAttribute,special item description|Consumable: Cloak for up to 15 seconds|9,0" Output "!activator,$SetVar$currentCustomCanteenAttribute,throwable particle trail only,0" Output "!activator,$SetVar$canteenIndex,5,0" } OnDowngrade { Output "canteen_count_update,$FireUser5," Output "on_canteen_empty,Trigger,,0" } } // ammo_can // { // Name "Ammo Refill Canteen" // Attribute "throwable healing" // Cap 6 //cap = cap + 1 since ???????? // Increment 1 // Cost 50 // PlayerUpgrade 1 // RequiredWeapons // { // Classname "tf_powerup_bottle" // } // RequiredWeaponsString "No canteen equipped" // DisallowedUpgrade // { // Upgrade re_can // } // DisallowedUpgrade // { // Upgrade speed_can // } // OnUpgrade // { // Output "canteen_count_update,$FireUser5," // //Output "!activator,$AddPlayerAttribute,refill_ammo|1,0.1" // //Output "!activator,$AddItemAttribute,refill_ammo|1|9,0.1" // Output "!activator,$SetVar$currentCustomCanteenAttribute,throwable healing,0" // Output "!activator,$SetVar$canteenIndex,3,0" // } // OnApply // { // Output "canteen_count_update,$FireUser5," // //Output "!activator,$AddPlayerAttribute,refill_ammo|1,0.1" // //Output "!activator,$AddItemAttribute,refill_ammo|1|9,0.1" // Output "!activator,$SetVar$currentCustomCanteenAttribute,throwable healing,0" // Output "!activator,$SetVar$canteenIndex,3,0" // } // } } Wave { StartWaveOutput { Target wave_start_relay Action Trigger } DoneOutput { Target wave_finished_relay Action Trigger } WaveSpawn { Where spawnbot TotalCount 5 MaxActive 5 SpawnCount 5 WaitBeforeStarting 0.1 WaitBetweenSpawns 0 TotalCurrency 0 TFBot { Class Heavyweapons Attributes SuppressFire } } WaveSpawn { Where spawnbot TotalCount 1 MaxActive 1 SpawnCount 1 WaitBeforeStarting 0 WaitBetweenSpawns 0 TotalCurrency 0 TFBot { Template T_TFBot_Giant_Heavyweapons tag bot_giant Attributes SuppressFire } } } }