Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: nosoop/SM-TFCustAttr

Build f464386

07 Mar 10:18

Choose a tag to compare

workflow-build8

Fix not iterating over sections

Build 4f6635d

07 Mar 08:56

Choose a tag to compare

workflow-build7

Sweep empty strings on installed KV

Build 1df61e3

06 Mar 13:35

Choose a tag to compare

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

06 Mar 12:38

Choose a tag to compare

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

06 Mar 12:03

Choose a tag to compare

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

06 Mar 11:10

Choose a tag to compare

Autobuild added for the current stable release.

index to ref to index or ref to ref to index? that is the question

15 Jun 10:08

Choose a tag to compare

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 EntRefToEntIndex and EntIndexToEntRef. 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-attrptr builds.

but at what cost

04 Jun 03:55

Choose a tag to compare

but at what cost Pre-release
Pre-release

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 CEconItemAttribute on the entity, bypassing the need to call TF2Attrib_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

01 Jun 08:59

Choose a tag to compare

been a while

Custom Attributes 0.3.2

Added

  • New natives TF2CustAttr_SetInt, TF2CustAttr_SetFloat, and TF2CustAttr_SetString to set attributes at runtime. This abstracts the attribute system away from needing to use KeyValues.

Changed

  • Modified the plugin to use TF2Attrib_GetByDefIndex instead of TF2Attrib_GetByName when looking up the container in an entity. The internal attribute name lookup took 66% of the time spent in each TF2CustAttr_Get* call, so this is an easy performance improvement.

Custom Attribute Manager 1.0.0

Changed

  • Removed include of stocksoup/log_server. LogServer wasn'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_add to add a name / value attribute pair to the active weapon for rapid iteration
  • sm_custattr_show to 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

05 Oct 10:01

Choose a tag to compare

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.