Releases: nosoop/SM-TFCustAttr
Build f464386
workflow-build8 Fix not iterating over sections
Build 4f6635d
workflow-build7 Sweep empty strings on installed KV
Build 1df61e3
Trigger weapon redetect on team change Weapons don't get destroyed / created if the player spawns in as the same class, so we'll just have to refresh those weapons ourselves.
Build 02bb1a3
Keep processed sections This was a slight error in the design. Originally I wanted to clean them up to keep things tidy. Reverting them allows weapon pickups to work, as long as the attributes are located in separate team subsections so they reset any attributes applied on the top level.
Build 0ea8c83
Added team-specific subsection handler. With tf_custom_attributes_team_section.smx loaded in, you can apply attributes to weapons spawned on specific teams:
Example for configs/tf_custom_attributes.txt:
// The Gunslinger
"142"
{
"red"
{
"mod building health" "sentry=10 dispenser=50"
}
"blue"
{
// make BLU buildings have more health
"mod building health" "sentry=90 dispenser=220"
}
}
It should work with any attribute management system that applies attributes before the weapon is equipped on a player.
Thanks to kingofings for supporting the initiative and allowing the code to be published.
Note that overwritten attributes are not reset, so you will need to have them in separate sections if they need to be overwritten. Attributes that should be cleared should have empty strings.
Build 3c1d538
Autobuild added for the current stable release.
index to ref to index or ref to ref to index? that is the question
Again, this is a preview build. This release only contains the core Custom Attributes plugin.
I suspect there's a much higher possibility of server crashes; please use the latest proper release if you're using this in a production server.
This release also requires SourceMod 1.10 or newer.
Custom Attributes 0.3.3
Fixed
- Mixed up the ordering of
EntRefToEntIndexandEntIndexToEntRef. Both would work fine if an entity index was passed in; it would throw an invalid entity index exception if a reference was passed in instead. Most attribute plugins only deal with indices; a select few operated with references instead.- This is a regression only present in the
cache-attrptrbuilds.
- This is a regression only present in the
but at what cost
This is a preview build. This release only contains the core Custom Attributes plugin.
I suspect there's a much higher possibility of server crashes; please use the latest proper release if you're using this in a production server.
This release also requires SourceMod 1.10 or newer.
Custom Attributes 0.3.3
Changed
- Added an internal caching mechanism for the attribute container. The plugin stores the last known address of the
CEconItemAttributeon the entity, bypassing the need to callTF2Attrib_GetByDefIndex. I suspect that the address could be invalidated at some point, resulting in a crash if the memory is inaccessible.- Relative to release 0.3.2, calls to retrieve attribute values occur in half the time.
fast testing, faster plugin. zoooom
been a while
Custom Attributes 0.3.2
Added
- New natives
TF2CustAttr_SetInt,TF2CustAttr_SetFloat, andTF2CustAttr_SetStringto set attributes at runtime. This abstracts the attribute system away from needing to useKeyValues.
Changed
- Modified the plugin to use
TF2Attrib_GetByDefIndexinstead ofTF2Attrib_GetByNamewhen looking up the container in an entity. The internal attribute name lookup took 66% of the time spent in eachTF2CustAttr_Get*call, so this is an easy performance improvement.
Custom Attribute Manager 1.0.0
Changed
- Removed include of
stocksoup/log_server.LogServerwasn't in the project by this time. Was it ever?
Custom Attribute Debugger
New optional helper plugin. This is a utility that provides the following commands for root-access users:
sm_custattr_addto add a name / value attribute pair to the active weapon for rapid iterationsm_custattr_showto display the name / attribute value pairs on all equipped weapons (or all equipped items including wearables, if tf2wearables is present), for verifying their presence (to debug a custom applicator or something)
Optionally uses tf2wearables and Econ Data for improved functionality.
os.path.normpath
Maintenance release for the Custom Weapons adapter. Other files are unchanged.
Custom Weapon Adapter 1.2.2
Fixed
- Normalized paths on Windows to properly handle the strict plugin load checks.