Skip to content

Various projectile, visual, and mechanical changes to improve consistency and QoL. #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: tc2-mod
Choose a base branch
from

Conversation

Marxvee
Copy link

@Marxvee Marxvee commented Mar 2, 2025

Related Issue

  • No issue has been made in conjunction with this.

Implementation

This is just a large pool of weapon changes I've made to improve consistency with weapons that have had (quite frankly) better programming put behind them, fix existing bugs and exploits, and introduce better attribute support for various things.

  • Setting tf_hud_target_id_disable_floating_health to 2 now shows giant robot and RD robot health above their heads instead of not displaying health at all

  • Improved support for the "Allows you to see enemy health" attribute, now properly displaying enemy names on all classes.

  • Enemy target IDs are now labeled differently, using the previously underutilized "#TF_playerid_diffteam" localization string
    (Enemy disguised spies are still labeled as if they're on your team)

  • Fixed flipped viewmodels inversing the material cullmodes for Sandman baseballs, Wrap Assassin baubles, and botkiller heads in first person.

  • Dropped Medi Guns now have their back hose removed again, like how it was pre-Gun Mettle

  • The Ullapool Caber can now deal minicrit explosion damage via charging

  • Fixed an exploit regarding the building health upgrade in MvM allowing for infinite, instant full health refills

  • The Loose Cannon's cannonball impact damage now scales with damage upgrades in MvM

  • Pomson 6000 and Wrap Assassin projectiles can now pass through teammates at close range, now being more consistent with other projectiles.

  • Wrap Assassin baubles now no longer have their trails poof out of thin air once it hits something and explodes

  • Fixed Wrap Assassin baubles exploding twice on player impact
    (The explosion damage multiplier has been bumped up from 0.9 to 1.8 to compensate.)

  • Critical Wrap Assassin baubles can now deal crit explosion damage

  • Sandman baseballs, Wrap Assassin baubles and Flying Guillotine cleavers no longer "detonate" in midair, remaining active until it eventually hits something

  • The Flying Guillotine now has a close-range wall check 1:1 with the Sandman and Wrap Assassin before being able to be thrown
    (This mitigates the cleaver through walls bug)

  • Dragon's Fury and Short Circuit (primary and secondary fire) are now capable of scoring critical hits.
    (The Short Circuit cannot random crit, so this only benefits the Engineer if he's critboosted via external means.)

  • Spellbook Fireballs now credit the afterburn damage to the attacker rather than it being regarded as self-damage
    (TODO: Make afterburn kills from this use the fireball killicon.)

  • Syringe projectiles can now be affected by both projectile speed (mult_projectile_speed) and spread (mult_spread_scale) attributes

  • Fixed Festive Jarate, Self-Aware Beauty Mark, and Mutated Milk projectiles failing to intentionally collide with burning teammates at point-blank

  • Added support for a rechargeable Ullapool Caber. This behavior is disabled by default, acting like live TF2's non-rechargeable Caber unless the required static attribs (item_meter_charge_type, item_meter_charge_rate, etc.) have been defined.

  • Fixed the Cow Mangler 5000 not having damage rampup with it's minicrit damage while crit boosted

  • The following projectiles have been fixed to now ignore func_brushes:
    Arrows with projectile penetration upgrade
    Righteous Bison/Pomson 6000 projectiles
    Wrap Assassin bauble
    (Wrap Assassin bounces off of real collision from func_brushes, but that's okay. I was unable to cleanly implement collision fixes for the Dragon's Fury and Short Circuit, though. These could be better implemented by someone else in the future.)

  • The following projectiles have been fixed to now respect flipped viewmodels, spawning on the left when applicable:
    Dragon's Fury's fireball
    Short Circuit's energy orb
    All spellbook projectiles
    Unused "throwable" projectiles

Screenshots

image
image
image
image
image
image
image
image
image
image
image
image
image
image

Checklist

  • No other PRs implement this idea.
  • This PR does not introduce any regressions.
  • I certify that this PR is my own entirely original work, or I have permission from and have attributed the relevant authors.
  • I have agreed to and signed this project's Contributor License Agreement.
  • This PR targets the tc2-mod branch.
  • This change has been filed as an issue.
  • No other PRs address this.
  • This PR is as minimal as possible.
  • This PR does not introduce any regressions.
  • This PR has been built and locally tested on at least one platform.
  • This PR has been tested on all platforms, on both a dedicated server and on a listen server.

Testing Checklist

Client Server Version
Windows Tested Tested Windows 11
Linux N/A N/A N/A

Caveats

Wrap Assassin baubles now bounce off of real collisions with func_brushes. This is behavior already present in live TF2 with func_doors, however. This could be better implemented by someone else in the future.
Spellbook Fireball afterburn kills now need to have their killicon upadted to not use the generic flamethrower killicon

Alternatives

I had thought about not boosting the Wrap Assassin's splash damage for the double explosion bugfix, but it would ultimately nerf the weapon's damage output by 4-13 on a direct impact from doing so. This can be decided by Valve, should this get implemented.

Marxvee added 4 commits March 1, 2025 15:51
2 now mimics the new behavior, while 1 is the old, pre-patch behavior.
these didn't work cleanly, and need to be redone or done by someone with more experience (cries)

bison/pomson and arrows still wrok as normal though, so yay!
i may be stupid

ONLY wrap assassin baubles really need this change. flares still have a trail behind them in live tf2
@CLAassistant
Copy link

CLAassistant commented Mar 2, 2025

CLA assistant check
All committers have signed the CLA.

Marxvee added 2 commits March 1, 2025 18:42
The detonate think never actually thinks, so this is unneeded
Copy link

@treacherousfiend treacherousfiend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of things I noticed

@@ -109,6 +109,8 @@ void CTFWeaponFlameBall::PrimaryAttack( void )
#else
C_CTF_GameStats.Event_PlayerFiredWeapon( pPlayer, IsCurrentAttackACrit() );
#endif
// the DF does not list a "no random crits" stat, therefore it should random crit

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personal opinion I suppose (although I do use the DF a lot), but judging by the fact that they already check to see if the player is crit boosted, I'm more inclined to believe that not having the item attribute for no random crits is the issue, rather than that it was intended to random crit.
Especially since crit DF damage is a LOT, like shred an overhealed heavy in 2-3 shots (around 1 second) a lot.
Although I suppose if it were to get the attribute added this change would still be the correct way to handle crits anyway.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normal flamethrower's random crits shoot a whole stream of crit flames (and do absurd damage while doing so). A random crit from the DF only fires one crit fireball and is more difficult to aim with, so I personally think it's fine. Valve can always add the no random crits attribute as you said- this is just to make it more in line with the rest of the weapon types in regards to properly handling crits.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weapons that can get bonus damage in another way do not have random crits. Since the DF already does 3x damage to burning players, I won't be taking this change.

@@ -539,7 +541,8 @@ void CTFProjectile_Jar::PipebombTouch( CBaseEntity *pOther )
{
// Exception to this rule - if we're a jar or milk, and our potential victim is on fire, then allow collision after all.
// If we're a jar or milk, then still allow collision if our potential victim is on fire.
if (m_iProjectileType == TF_PROJECTILE_JAR || m_iProjectileType == TF_PROJECTILE_JAR_MILK)
// This condition only applies to non-cleaver jars, since there's so many jar types capable of extinguishing.
if ( m_iProjectileType != TF_PROJECTILE_CLEAVER )
Copy link

@treacherousfiend treacherousfiend Mar 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this allow all non-cleaver children of CTFJar to break within the grace period? like the Gas Passer (gas passer is intentional i'm dumb)
Like the Spellbook (child of CTFThrowable which is a child of CTFJar)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh shoot-- arcing spells are a child of CTFJar? I did not notice this. I'll add those exceptions-- better this way rather than having 6 checks looking for all of the extinguishable jars (including reskins)

Copy link

@treacherousfiend treacherousfiend Mar 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah its not a great situation, I'd argue that being inclusive rather than exclusive like it already was is better if Valve were to ever add new weapons that also are based on CTFJar, but its also on them in the first place for making different projectile types for the festive variants in the first place (surely there was a better way...), and I doubt they'll be adding new weapons anytime soon, or ever again for that matter, so this is probably fine.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check in itself is just odd- TF_PROJECTILE_JAR_GAS wasn't included in this check as of the SDK going public and yet it collides point-blank with burning teammates. I don't think the gas passer even assigns TF_PROJECTILE_JAR_GAS to itself!

Copy link

@treacherousfiend treacherousfiend Mar 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, thats odd, I'm not very familiar with how they set projectile types so I decided to do a bit of digging.

The weapon script for the gas passer has a key named ProjectileType that has it set to "projectile_jar_gas" (the weapon scripts names are different, weirdly inconsistent it looks like, the bread monster ones are spelled "projectfile" rather than "projectile"), but it looks like the only place that the weapon script projectile type is used is when TFBots check if their ammo is low, and they check if specifically the weapon script projectile type is TF_PROJECTILE_NONE.

Judging by code comments, this appears to be old behavior, and instead the (relatively) "new" behavior is they check the override_projectile_type item attribute instead. iirc this implementation has issues of its own right (I think it was part of the cause for the iron bomber hitbox bug a while back), but notably, the Gas Passer is missing this attribute! So I guess whoever set up the item definition/weapon script didn't know they were using the wrong system to determine projectile type, so presumably it just defaults to TF_PROJECTILE_JAR since that is set in the constructor for CTFProjectile_Jar, oops!

So i guess this is just a mess of old and new functionality combining to make some bugs which technically break things but doesn't actually break anything because none of the code treats TF_PROJECTILE_JAR_GAS any different than TF_PROJECTILE_JAR anyway.
Weirdly, even though the new behavior seems to have been around for a while (or at some point they retroactively set up some older weapons to use it, first weapon I see to use it is the Loose Cannon), they still kept the list for the old functionality up to date, but none of the reskins like the bread bite have separate weapon scripts anyway, so even if they wanted to use it they didn't, maybe thats why no one even noticed the "projectfile" typo!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

classic valve hahaha

they also messed up the dragon's fury projectile internal weapon ID name too (TF_WEPON_FLAME_BALL) but nothing broke as a result of it so it stayed there too

Marxvee added 2 commits March 1, 2025 19:07
Attributes need to be defined to use this (the behavior is unaltered from live tf2 otherwise), but this enables the Ullapool Caber to regenerate upon getting a full item meter charge.
@Marxvee
Copy link
Author

Marxvee commented Mar 2, 2025

New feature: The Ullapool Caber can now support the new item charge meter system and regenerate it's explosive hit once it charges to full. The HUD position needs adjustment, though. If the required attributes aren't defined, then the Caber behavior is unchanged (no meter shown. will not recharge unless you respawn or resupply).
image
image

If the Cow Mangler is crit boosted in vanilla TF2, the minicrit damage will not have any ramp up. This has been fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants