jump.tf Forums
Welcome B)

Modify Player Attributes on a Map Level

RNC1839 · 12 · 3681

RNC1839

  • Proficient
  • ****
    • Posts: 499
    • Frags: +0/-0
    • View Profile
trigger_add_or_remove_tf_player_attributes

I will be playing around with this A LOT and I'll post anything interesting here.

This is a brush entity that currently doesn't actually exist in the fgd of tf2 but whatever it still works.

From what I can tell so far, this is basically an in map, vanilla version of the tf2items sourcemod plugin. But I doubt that you'd be able to create your own weapons with this.

Attributes are the modifiers attached to weapons or players, and their effects can range from modifying jump height or max health to swapping out projectile type (rocket minigun, anyone?) or doing this ("torso scale"). From here on, I'll refer to an attribute attached to a weapon as a "weapon attribute", and an attribute attached directly to a player as a "player attribute".

It's important to note that attributes usually have nothing to do with "conditions".

Weapon attributes are pretty clear-cut. Player attributes are used for things like the MVM Player upgrades, set bonuses (those still exist), Wheel of Fate effects (sometimes), and more recently, the Dalokohs Bar effect (which used to be a weapon attribute until Gun Mettle exploits forced them to rework how it did its thing). What's different about the Dalokohs Bar is that the +50 "hidden maxhealth non buffed" it adds has a timer associated with it, in a special type of player attribute that Valve has taken to calling "custom attributes". This new trigger adds "custom attributes" in the same way the Dalokohs does, with an attribute name, value, and duration.
-FlaminSarge

I haven't played around with it much yet. But it looks like the only attributes that will work with this are stuff that are specific to either 1 weapon slot (max secondary ammo) or generic stuff like health or regen. Or a better way to say that is I don't know that you can apply these attributes to select weapons.

How to use it:


Now because this isn't actually in the game you will need to put all keyvalues in yourself. That is until someone writes up an addition to the fgd.
Spoiler (click to show/hide)


More Info:
http://tf2maps.net/threads/trigger_add_or_remove_tf_player_attributes.26677/

Prefab:
https://www.dropbox.com/s/x26hzhnbjlvlfe6/500_maxhealth_noOverheal.vmf?dl=0


FLUX+

  • Newbie
  • *
    • Posts: 41
    • Frags: +0/-0
  • I have bonus WRs
    • View Profile
This is cool, continue to update us
Bonus world records matter


RNC1839

  • Proficient
  • ****
    • Posts: 499
    • Frags: +0/-0
    • View Profile
Take no damage from self explosions:
attribute_name    rocket jump damage reduction
value             0



Also you can apply unusual effects to weapons. Although the actual unusual effects that came with gun mettle can't be applied to any weapon that doesn't have a skinned version of itself, i.e. rocket jumper.
http://imgur.com/a/DmSLW


I'm having trouble getting any clip increase to work for primary weapons. I can make the shotgun have 88 in a clip but not an RL.


AI

  • Administrator
  • Proficient
  • *****
    • Posts: 419
    • Frags: +0/-0
  • Plugins Developer
    • View Profile
    • Jump Academy


plep

  • Advanced
  • *****
    • Posts: 639
    • Frags: +0/-0
  • hi
    • View Profile


I truly love the concept. Please keep up udated I wanna learn more.

What a great christmas gift!


pants

  • Proficient
  • ****
    • Posts: 458
    • Frags: +0/-0
    • View Profile
'Auto fires full clip all at once'

Seems to only work with grenade launcher?. Kinda fun to instantly drop 4 grenades, would be great if it could work with RL to instant multi-syncs.

edit: you can use 'fire rate bonus'. set it to a really low integer (like 0.01). enjoy your instant syncs, pairs well with a 'reload time decreased' as you can fire faster than regen keeps up.


Also would really like to figure out clip size penalties, would be really handy for something I'm working on.

edit2: 'clip size bonus upgrade' seems to be the only clip size thingo i can get to work, but like RNC said it seems to only affect secondary weapons (shotgun/stickybombs).

Still seems like a lot of this only works when the game updates the items you are carrying like from a weapon swap.
« Last Edit: December 25, 2015, 09:05:26 PM by pants »


RNC1839

  • Proficient
  • ****
    • Posts: 499
    • Frags: +0/-0
    • View Profile
Yeah I forgot to mention the weapon switching thing. Which really is a downside, but there is one really important thing to remember.

This stuff isn't fully supported or implemented by the fgd, game, or anything else. So I'm not surprised at all that some of these things just don't work. Regardless it is still weird that only 1 clip thing works and only on secondary weps.

I'm hoping the reason this is being put into the game is in the same vein as tf_generic_bomb where Valve is making it easier for custom mapmakers to do crazy shenanigans.


pants

  • Proficient
  • ****
    • Posts: 458
    • Frags: +0/-0
    • View Profile
I was looking at ways to try and force weapon updates quicker (to allow these shenanigans) and discovered a simple but brute force solution. Basically using a trigger_mult to target the weapon type you are modifying e.g. tf_weapon_pipebomblauncher with a 'kill' override. A func_regen will then re-equip your desired weapon now with the modified attributes.

However! If I understand correctly, the kill trigger would remove ALL relevant entities server-wide, which would be unfortunate if you are mid-jump  ::)

Is it at all possible to target specific entities only equipped by the !activator of the trigger or say in a target volume? Alternatively I've tried and failed to find either a console cmd/add-cond which could effect the same desired outcome: a forced re-equip of your weapons.


RNC1839

  • Proficient
  • ****
    • Posts: 499
    • Frags: +0/-0
    • View Profile
Yeah I didn't think of just killing the entity. But yeah I don't know that it's server wide or just on one client in a trigger. Another thing to try would be impulse 101, although that's not easy to do vanilla, no sv_cheats.

I'm really hoping for a weapon attribute changing entity in the future once this is actually a supported thing.


Dystopia

  • Newbie
  • *
    • Posts: 34
    • Frags: +0/-0
    • View Profile
So I tried this, and the first thing I tried was "self dmg push force increased". Was really fun reaching max vel with 1 rocket


pants

  • Proficient
  • ****
    • Posts: 458
    • Frags: +0/-0
    • View Profile