[TF2] Custom Attributes
Description:
A new unified API for community-made TF2 attributes. I started writing this two years ago because I was annoyed by the design of the attribute system in Custom Weapons. Since then, it was put into production on the CTF2W server, and Karma Charger funded the creation of many of the attributes that he's used in recent videos (which is probably the biggest reason why people care about this; those attributes aren't in CW3 format). It's still not quite as polished / clean as I'd personally like it to be, but since it's already out here, I might as well throw up a discussion thread for it. There are adapter plugins that provide integrations with official weapons, Custom Weapons, and Freak Fortress 2 (and due to its flexibility, possibly more in the future!). Installation: Grab the core plugin, tf_custom_attributes.smx, from the releases page. The plugin currently also depends on TF2Attributes, so install that too (this links to my version; FlaminSarge's version works just as well solely for core if you have an up-to-date build). The core plugin does nothing by itself; you'll need another plugin to write attributes to entities (and attribute plugins to read from them, of course). Refer to this page on Applying Custom Attributes for instructions on how to use it with your choice of plugin. Looking for attributes to play with? I've created a list of publicly available ones; if you've written any number of them yourself, you're welcome to share them by creating a new discussion for it in the project's Created Attributes catetory, or by replying to this AlliedModders thread. For developers: The include file should be easy enough to read. The custom attribute system only works with weapon, cosmetic, and player entities (as the core plugin takes advantage of the game's own attribute system). There's some more information available in the Creating Custom Attributes page of the project wiki. Source |
Re: [TF2] Custom Attributes
is good
|
Re: [TF2] Custom Attributes
YThat was an amazing plugin, a little hard to understand for beginner but really amazing, also, i have a question.
The stock TF2CustAttr_SetString just work on player and no and bots for me, and idk if this is wanted but I can not test plugin with TF2CustAttr_SetString on bots, can you make a version compatible with bots ? Anyway, that was a great job! |
Re: [TF2] Custom Attributes
Thanks!
Quote:
I just added sm_custattr_add_to and sm_custattr_add_on to the attribute debugger, so you should be able to test attributes applied to bots. sm_custattr_show also got a minor tweak so you can inspect attributes applied to targets and verify that they're there. You'll need to build the plugin yourself at this time. |
Re: [TF2] Custom Attributes
Quote:
|
Re: [TF2] Custom Attributes
Quote:
It sounds like you're attaching them at a different point in time though, and I'm not entirely familiar with how MvM works at the code level. You may need to tinker a bit more with when you call TF2CustAttr_SetString. Try using TF2Attrib_SetByName on the player entity at same time - if that also gets cleared then it's definitely getting wiped by the game (or a different plugin); if it doesn't, then my assumptions are out. The sm_custattr_add_on is an admin command, so you can run sm_custattr_add_on @bots <name> <value> to apply a custom attribute to all bots for testing and seeing when you can apply it. You'll want to verify that the custom attribute is actually applied to your bots using sm_custattr_show <player> as well (the latter only takes a single target though). |
Re: [TF2] Custom Attributes
Really weird, nothing seems to work for bot, can I send you the plugin (it's just a test, the code wasn't really clean) in mp ?
|
Re: [TF2] Custom Attributes
Quote:
|
Re: [TF2] Custom Attributes
Ok so that was my first package for Custom Attribute!
Can be update so check that! Added:
|
Re: [TF2] Custom Attributes
Hey ! It's me again, all works fine, I just have some issues with canteen. I don't see any function for remove attribute, but that can be possible ?
Nevermind, that works with tf2 atteibute remover. |
All times are GMT -4. The time now is 23:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.