- Sep 3, 2018
- 383
- 194
EDIT March 9th, 2021: This post is obsolete. You can still use this method, but there are other advanced methods to take advantage of!
Hello! I am writing this guide because I want to share my findings on how to reduce damage for specific damage types listed in the game's code. This can be applied to Halloween spells (DMG_GENERIC) and other damage types by applying body attributes using "trigger_add_or_remove_tf_player_attributes" to the players on the map.
This guide assumes you to understand the basics of Hammer and how weapon attributes work.
Note: I am not quite sure if this works for all game mode types, so I have specified in the title that it only works for Medieval Mode only. This may change in the future.
Note: You can find all weapon attributes Here.
By the end of this guide you should be able to:
For this guide, we will reduce damage of DMG_GENERIC. This is the damage-type used for all Halloween spells.
Note: To find out which weapons deal what damage types, please refer to this list here on Sigsegv's github.
What will we need in the map?
Place a trigger on the entire play area of the map, or all spaces the players will walk and interact with each other. Press ctrl+T and turn it into a "trigger_add_or_remove_tf_player_attributes". You will then duplicate these triggers two times, for a total of three triggers enveloping the entire map.
Note: If you do not have trigger_add_or_remove_tf_player_attributes in your Hammer, please install
Puddy's Small Mapping Resource Pack. Follow their guide to install it, and it will be added to your Hammer.
2
Name all three triggers the same name. For this guide I will name them "trigger_add_conditions" but you can name it what ever you want.
Note: This step is integral to be called by "logic_timer" in a later step.
3
Please click SmartEdit on one of the triggers you have made.
Place the following under attribute_name for each trigger you have placed:
4
Turn off SmartEdit and create a "logic_timer" somewhere in your map that will be easily find later.
We will do two things to this:
5
This is the last step: Explaining what was done in the guide.
The three attributes that were placed over the map do this:
weapon burn dmg increased is there because damage bonus HIDDEN does not multiply afterburn damage by itself, instead needing this attribute.
Bonus
If you wanted to prevent fall damage in your map, there is an attribute for that. Set a trigger_add_or_remove_tf_player_attributes to this:
Congratulations! You've done it. Hot dog!
Hello! I am writing this guide because I want to share my findings on how to reduce damage for specific damage types listed in the game's code. This can be applied to Halloween spells (DMG_GENERIC) and other damage types by applying body attributes using "trigger_add_or_remove_tf_player_attributes" to the players on the map.
This guide assumes you to understand the basics of Hammer and how weapon attributes work.
Note: I am not quite sure if this works for all game mode types, so I have specified in the title that it only works for Medieval Mode only. This may change in the future.
Note: You can find all weapon attributes Here.
By the end of this guide you should be able to:
- Understand how to add a brush entity that adds an item attribute onto all players on the map.
- Understand how to use a "logic_timer" entity to refresh the brush trigger so it will not lag players on the map and the server.
- Modify damage for specific damage-types, depending on what is provided on the already-existing list of weapon attributes.
- Bonus: Prevent any and all fall damage from players on the map.
For this guide, we will reduce damage of DMG_GENERIC. This is the damage-type used for all Halloween spells.
Note: To find out which weapons deal what damage types, please refer to this list here on Sigsegv's github.
What will we need in the map?
- Three brush entities "trigger_add_or_remove_tf_player_attributes" enveloping the entire map.
- One "logic_timer".
Place a trigger on the entire play area of the map, or all spaces the players will walk and interact with each other. Press ctrl+T and turn it into a "trigger_add_or_remove_tf_player_attributes". You will then duplicate these triggers two times, for a total of three triggers enveloping the entire map.
Note: If you do not have trigger_add_or_remove_tf_player_attributes in your Hammer, please install
Puddy's Small Mapping Resource Pack. Follow their guide to install it, and it will be added to your Hammer.
2
Name all three triggers the same name. For this guide I will name them "trigger_add_conditions" but you can name it what ever you want.
Note: This step is integral to be called by "logic_timer" in a later step.
3
Please click SmartEdit on one of the triggers you have made.
Place the following under attribute_name for each trigger you have placed:
- dmg taken increased
- damage bonus HIDDEN
- weapon burn dmg increased
- 0.5
- 2.0
- 2.0
- -1
4
Turn off SmartEdit and create a "logic_timer" somewhere in your map that will be easily find later.
We will do two things to this:
- Set the Refire Interval rate to 2.
- Create two new outputs exactly as follows:
5
This is the last step: Explaining what was done in the guide.
The three attributes that were placed over the map do this:
- dmg taken increased - Reduces all damage types down to 50%.
- damage bonus HIDDEN - Increases all damage types except DMG_GENERIC to 200%.
- weapon burn dmg increased - Increases any afterburn damage to 200%.
weapon burn dmg increased is there because damage bonus HIDDEN does not multiply afterburn damage by itself, instead needing this attribute.
Bonus
If you wanted to prevent fall damage in your map, there is an attribute for that. Set a trigger_add_or_remove_tf_player_attributes to this:
- attribute_name: cancel falling damage
- value: 1
Congratulations! You've done it. Hot dog!
Last edited: