Raised This Month: $32 Target: $400
 8% 

[TF2] TFConds - Unused/Unclear Cond Explanations


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
404UserNotFound
BANNED
Join Date: Dec 2011
Old 02-03-2022 , 05:27   [TF2] TFConds - Unused/Unclear Cond Explanations
Reply With Quote #1

Wow, this is the first major thing I've posted here in like, what, 2 years now? In the process of working on the TCRF.net Team Fortress 2 article to document cut content, I happened to go through all the TFConds and figured out what some of the more unknown conditions actually did. For the longest time, these more unknown conditions' descriptions was that they were unused or didn't appear to do anything, but I've managed to clear a few things up.


1. TF_COND_TMPDAMAGEBONUS
Supposed to be a temporary damage buff but it does nothing. In the 2017 source code leak, the only time the AddTmpDamageBonus function (which is specifically for this condition) is called in the entire engine is commented out, making this condition entirely deprecated. It was meant to be for a weapon attribute that got cut, addperc_ondmgdone_tmpbuff

The condition being deprecated makes it perfect for using as your own custom tracking condition in a plugin, since adding it to a player does nothing. It's entirely harmless. There could be some really technical use for this in a plugin, for example if you wanted to track the time between two events maybe? What do I mean by "tracking condition", you might be wondering? I'll explain that in the next entry.
Source: game/shared/tf/tf_weaponbase.cpp#L4967-L4976


2. TF_COND_BLASTJUMPING
This is what I am going to call a "tracking condition" from now on. What that means is, it is applied to the player at one point, and removed at another point, but is used by the engine elsewhere in other various logic checks. In the case of this blast jumping condition, it was noted before that it doesn't do anything. True in a sense, but you probably shouldn't mess with this condition all willy-nilly just in case.

When you perform a rocket jump or a sticky jump and those actions' respective Events are fired (rocket_jump, sticky_jump), the condition is applied to you. When you land and those actions' respective Events are fired (rocket_jump_landed, sticky_jump_landed), the condition is removed. The game uses the condition elsewhere, such as logic checks for certain attributes, to determine whether or not you are currently in mid-blastjump.
Source: game/server/tf/tf_player.cpp#L8394-L8434


3 & 4. TF_COND_COMPETITIVE_WINNER & LOSER
Same situation as the blast jumping condition. They are both tracking conditions used by the game to assist in logic for the end-of-match Competitive screen, according to the code leak. No linkage to code snippets for this entry showing where they're used, I forgot to. I'll edit it in later.


5. TF_COND_GRAPPLED_BY_PLAYER
Another tracking condition, but this time for grappling hook targetting logic.
Source: game/server/tf/tf_player.cpp#L1009-L1083


6. TF_COND_HEALTH_OVERHEALED
Very mysterious condition initially. This condition is added to a player who is hit and subsequently healed by a bolt from a Crusader's Crossbow from their team's Medic. The condition is used by the C_TFPlayer::UpdateOverhealEffect function. If the player has this condition, the function checks whether they are overhealed or not, and applies the proper effects if they are not/cancels them if they are. It's basically a tracking condition. No source again, I'll fill it in later.


7. TF_COND_MEDIGUN_DEBUFF
Appears to be entirely unused. Doing a text crawl for the internal name in the source code returns no results except for tf_shareddefs.cpp and tf_shareddefs.h, where it is defined within the ETFCond enumerator with all the other condition flags. Could be repurposed into a second personal tracking condition for plugins since it's also useless like that TMPDAMAGEBONUS cond.


8. TF_COND_MINICRITBOOSTED_ON_KILL
Same situation as the previous entry. Only appears listed in the ETFCond enumerator and never appears in the code anywhere else. So let's make that three useless conditions that you can repurpose for whatever you want.



Hopefully this helps clear up what these odd conds actually do, and hopefully someone will figure out a nice new purpose for those three useless conds.

Full list of conds with functionality descriptions available at Team Fortress 2, Debug Commands - addcond @ TCRF.net

Last edited by 404UserNotFound; 02-03-2022 at 10:08.
404UserNotFound is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 02-03-2022 , 06:36   Re: [TF2] New info about some unclear TFConds
Reply With Quote #2

Bit of an afterthought, but you could create/fire your own begin/end events for....something....and use one of the useless conds as a tracker for whatever is happening in between the begin and end events. If it ever gets to a point where multiple plugins are using the same of any of those three useless conds for different purposes, issues between multiple plugins could pop up however, so proceed with caution.

Last edited by 404UserNotFound; 02-03-2022 at 06:39.
404UserNotFound is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode