Skip to content

Releases: nosoop/SM-TFEconData

Finally, a quality plugin

03 Oct 06:03
Compare
Choose a tag to compare
Pre-release

This update finally adds support for statically-defined item qualities. Not sure what purpose this serves since this doesn't get you the dynamic qualities at runtime from entities, but since TF2ItemsInfo and TF2IDB both support this, I guess it must be done.

But, now that it's done, I think the plugin now has a feature set that fully matches (and rivals) those of the schema-info-retrieving plugins that were available prior.

There's a few more API tweaks that I think are worth adding, but The Big One-Point-Oh is Soon™.

Added

  • Native TF2Econ_GetItemQuality, which returns the statically-defined quality value for the given item definition index.

Changed

  • Minor changes to offset discovery notes, which should improve finding those offsets again.

#protoman4smash

21 Sep 22:40
Compare
Choose a tag to compare
#protoman4smash Pre-release
Pre-release

This release adds support for protobuf-defined paintkits, and raw access to the protoscript manager.
It also adds support for reading statically-defined rarities out of item definitions.

Added

  • Native TF2Econ_GetPaintKitDefinitionList, which returns an ArrayList containing paintkit proto definition indices. So now you have a list of valid values for the paintkit_proto_def_index attribute.
  • Native TF2Econ_GetProtoDefManagerAddress, which returns the address of the CProtoBufScriptObjectDefinitionManager, which holds all the new protobuf-based objects.
  • Native TF2Econ_GetPaintKitDefinitionAddress, which returns the address of the CPaintKitDefinition instance.
  • Native TF2Econ_GetItemRarity, returning the static rarity value of the given item definition.

It's not unusual to crash the hat market

12 Sep 08:10
Compare
Choose a tag to compare

This release finally adds basic support for unusual particles.

CUtlRBTrees are still a massive pain to parse the disassembly of (and I still don't quite understand how they work), but the utility functions I wrote three months ago to deal with traversal of them (which I wrote to extract entity class sizes from the entity factories) makes it a lot easier to deal with.

I could add support for all the other values the schema parses for these particles, but I don't think most people care about those.

Added

  • Native TF2Econ_GetParticleAttributeSystemName, which returns the particle system name for a given particle attribute value. You could pull the particle value from a player's item with TF2Attributes, but really, I think more people care about finding out what values are valid. Speaking of:
  • Native TF2Econ_GetParticleAttributeList returns an ArrayList of valid particle attribute values. You can specify whether you want all of them or only the ones for taunts / weapons / cosmetics.
  • Native TF2Econ_GetParticleAttributeAddress for those raw value accesses.

Equipment coverage stuff

12 Apr 06:30
Compare
Choose a tag to compare
Pre-release

This release adds support for reading the schema's equip region data, as well as getting item equip region information.

Added

  • Native TF2Econ_GetItemEquipRegionMask, which returns an item's equip region mask that can be and'd together with another item's (or equip region's) mask to see if the items have overlapping equip regions.
  • Native TF2Econ_GetItemEquipRegionGroupBits, which returns the item's equip region groups as a bitfield ([0, 28] left-shifted).
  • Native TF2Econ_GetEquipRegionGroups, which returns a StringMap containing equip region names mapped to their group index. Equip regions under a shared subsection in the schema's equip_regions_list section have the same group index.
  • Native TF2Econ_GetEquipRegionMask, which stores the group's mask given a valid group name.

How to CUtlRBTree?

11 Apr 07:46
Compare
Choose a tag to compare
How to CUtlRBTree? Pre-release
Pre-release

This release adds support for item qualities and rarities.

Linux has CEconItemSchema::GetQualityDefinition(), but Windows doesn't (probably stripping out unused functions, which that particular one is). After doing a bunch of research, it turns out the CUtlRBTree lookup just points to an index in an underlying array, so I ditched it altogether in favor of iterating the data.

Support for rarities was added shortly after since it was the exact same setup barring offset and iteration size changes.

Added

  • Native TF2Econ_GetQualityName, which stores the name of a given item quality into a given buffer. (TF2 stores qualities internally as a CEconItemQualityDefinition, so we use "get" in this case even though there aren't any other properties present.)
  • Native TF2Econ_TranslateQualityNameToValue, which returns the item quality value given a valid name, or -1 if not valid.
  • Native TF2Econ_GetQualityList, which returns all the valid quality values in an ArrayList.
  • Native TF2Econ_GetRarityName, which stores the name of a given item rarity into a given buffer.
  • Native TF2Econ_TranslateRarityNameToValue, which returns the item rarity value given a valid name, or -1 if not valid.
  • Native TF2Econ_GetRarityList, which returns all the valid rarity values in an ArrayList.
  • Native TF2Econ_GetRarityDefinitionAddress, which returns the address of the CEconItemRarityDefinition of the given rarity value.

Rapid prototyping edition

09 Apr 10:53
Compare
Choose a tag to compare
Pre-release

This release adds a couple of additional natives.

Added

  • Native TF2Econ_GetItemSchemaAddress, which returns the address of the CTFItemSchema singleton, should you want raw access to it for whatever reason.
  • Native TF2Econ_TranslateAttributeNameToDefinitionIndex, which returns the attribute definition index for a given attribute name or -1 if an attribute with that name doesn't exist. I was debating on how to implement this in #3 and settled on adding another SDKCall for the time being.

0.9.0: Basic attribute support

04 Apr 13:38
Compare
Choose a tag to compare
Pre-release

This update adds basic support for reading attribute definitions, as well as support for reading raw static attribute data from items (similar to how TF2Attributes does it with TF2Attrib_GetStaticAttribs).

Added

  • Native TF2Econ_GetItemStaticAttributes, which returns an ArrayList containing attribute definition / value pairs for a given item.
  • Native TF2Econ_IsValidAttributeDefinition, which returns true if an attribute definition index corresponds to a valid attribute.
  • Native TF2Econ_IsAttributeHidden, which returns true if a given attribute is marked as hidden.
  • Native TF2Econ_IsAttributeStoredAsInteger, which returns true if a given attribute is stored as an integer.
  • Native TF2Econ_GetAttributeName, which stores the name of an attribute into a given buffer.
  • Native TF2Econ_GetAttributeClassName, which stores the attribute_class of an attribute into a given buffer.
  • Native TF2Econ_GetAttributeDefinitionString, which retrieves an arbitrary string from an attribute definition's KeyValues structure.
  • Native TF2Econ_GetAttributeDefinitionAddress, which returns the address of a given CEconItemAttributeDefinition.

Changed

  • Split off code into separate .sp files based on functionality.

Working with CUtlVector: loadout slot edition

21 Mar 09:33
Compare
Choose a tag to compare

Added

  • Native TF2Econ_TranslateLoadoutSlotIndexToName, which takes in a loadout slot index and a buffer to store the slot name (corresponds to the item_slot key on items).
  • Native TF2Econ_TranslateLoadoutSlotNameToIndex, which performs the inverse operation; given a slot name it returns the slot index.
  • Native TF2Econ_GetLoadoutSlotCount, which returns the number of current valid loadout slots.

0.6.0: Changes for upcoming functionality

18 Mar 16:17
Compare
Choose a tag to compare

Added

  • Native TF2Econ_IsValidItemDefinition is equivalent to TF2Econ_IsValidDefinitionIndex, but more in line with the naming conventions of the other functions (which refer to items). This was done in preparation for non-item functionality.

Deprecated

  • All instances of TF2Econ_IsValidDefinitionIndex should be replaced with TF2Econ_IsValidItemDefinition. Both names point to the same native, and while deprecated, is unlikely to be removed.

0.5.1: Bugfix 1

17 Mar 13:06
Compare
Choose a tag to compare
0.5.1: Bugfix 1 Pre-release
Pre-release

Important fix release. Didn't hit this case until after I did the first public release.

Fixes

  • Fixes SourceMod (1.9?) crash when returning from CEconItemDefinition::GetDefinitionString() on a non-existing key (#1)