[TF2] Econ Data (supercedes TF2IDB, TF2ItemsInfo) (0.18.3, 2023-01-30)
Description:
Read TF2 item schema properties from game memory. Alternative to TF2ItemsInfo (only took 7 years for that mem-hacking version!) and TF2 Item DB. Looking for the CS:GO version? It's way over here. ConVars:
Go to the releases page and get the following from the topmost release:
Some example code is provided in the project README. The include file should be easy enough to read if you're familiar with how TF2 handles items; if there's anything that is unclear file an issue or post in the thread. I've also written up a list of equivalent natives between TF2II / TF2IDB and this library, for any developers that want to migrate. As this plugin is now able to match the feature set of the previous plugins, there is now a pre-alpha project that provides drop-in replacements for both TF2IDB and TF2ItemsInfo. If you're a developer that has plugins that depend on either, I'm sure others would appreciate any contributions to fill out the currently unimplemented natives. Important breaking changes / fixes for server operators running older versions: (This does not show feature additions; check the download link below or the include file link above for that.)
Team Fortress 2: Source / Download CS:GO: Post |
Re: [TF2] Econ Data (supercedes TF2IDB, TF2ItemsInfo)
Amazing! :bacon!:
I started something similar as a SM extension but with your plugin out, I've no need to work on that :bacon: Only thing to worry about is the gamedata, but I don't think the tf team is touching those functions anytime soon. Anyway great replacement for tf2ii & tf2idb thanks again. |
Re: [TF2] Econ Data (supercedes TF2IDB, TF2ItemsInfo)
Quote:
Otherwise, I'm not too worried about updates since I documented how to find the signatures / offsets to some extent; the bus factor should be greater than 1. Edit: I've written a basic porting guide for those that want to migrate plugins to this library from TF2ItemsInfo and TF2IDB. I'll get around to adding attribute support eventually, but for items you should be all set to migrate. Edit (2): 0.6.0 has been released. The only important change here is that a function was renamed. Plugins compiled against the older version will still work (the native is also mapped to the old function name), but I wanted to make this change while this plugin's still new. |
Re: [TF2] Econ Data (supercedes TF2IDB, TF2ItemsInfo)
Quote:
This thing's only been out for a day, I think it'd be safe to just scrap the old name entirely. |
Re: [TF2] Econ Data (supercedes TF2IDB, TF2ItemsInfo)
Quote:
Anyways, 0.7.1 has been released with support to convert item slot names to indices and vice-versa. Considering what I just said about backwards compatibility, ironically enough, I do have to note that the slot values are not compatible with those in TF2IDB and TF2II. Those two plugins return values mapping approximately to the virtual CBaseCombatWeapon::GetSlot() function (which is what GetPlayerWeaponSlot() looks up), while TF2 itself has a slightly different mapping. I'll refer to the former as "weapon slots", and the latter as "loadout slots". Here is TF2IDB's list, and this is the current game-specific mapping for comparison (the indices go from 0 to 18 inclusive): Code:
0: primary If you want to access the entity in a specific loadout slot, it'd be preferable to use an SDKCall to CTFPlayer::GetEntityForLoadoutSlot() or use my maintained fork of Powerlord's TF2 Wearables API, which has a native to do just that. Otherwise, you may want to grab a variation of GetSlotByName and translate from loadout slot → name → weapon slot. |
Re: [TF2] Econ Data (supercedes TF2IDB, TF2ItemsInfo) (0.7.1, 2019-03-21)
I really appreciate this plugin a lot and the API it offers, thank you very much.
|
Re: [TF2] Econ Data (supercedes TF2IDB, TF2ItemsInfo) (0.7.1, 2019-03-21)
thank you very much for this!
|
Re: [TF2] Econ Data (supercedes TF2IDB, TF2ItemsInfo) (0.7.1, 2019-03-21)
Nice work.
(Compatibility layer when?) |
Re: [TF2] Econ Data (supercedes TF2IDB, TF2ItemsInfo) (0.7.1, 2019-03-21)
Thanks, everyone!
Quote:
The raw KeyValues and direct address getters are also handy to work around API limitations. Quote:
I'll probably hold off on native adapters for TF2ItemsInfo / TF2 Item DB until I've attained feature parity, though the port guide is up to date if someone wants to tackle that themselves. ---- That said: 0.9.0 has been released with some basic attribute support. A bit more barebones than the item support. I have no clue what the use case is for reading attribute definitions (if any plugins even use that at all), so at the moment there are only the basic accessors in addition to reading static attribute definition / value pairs from item definitions. Let me know if there's any relevant features any of you would like to see added to attribute support (or other future additions). |
Re: [TF2] Econ Data (supercedes TF2IDB, TF2ItemsInfo) (0.7.1, 2019-03-21)
Quote:
|
All times are GMT -4. The time now is 08:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.