Raised This Month: $ Target: $400
 0% 

[TF2] Hidden dev attributes


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Fearts
ferts of daeth
Join Date: Oct 2008
Plugin ID:
7264
Plugin Version:
1.2
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Enables the use of attributes hidden into the code that never got added into items_game.txt
    Old 11-15-2021 , 23:02   Re: [TF2] Hidden dev attributes
    Reply With Quote #1

    After the last TF2 update the gamedata signatures I believe have broken for this plugin. If someone could fix this it would be very helpful.
    __________________
    Fearts is offline
    Mikusch
    AlliedModders Donor
    Join Date: Oct 2019
    Location: Germany
    Old 11-16-2021 , 17:40   Re: [TF2] Hidden dev attributes
    Reply With Quote #2

    Quote:
    Originally Posted by Fearts View Post
    After the last TF2 update the gamedata signatures I believe have broken for this plugin. If someone could fix this it would be very helpful.
    Valve changed something in CPopulationManager::FindPopulationFileByShort Name, so that signature needs updating, as well as the offset for g_pFullFileSystem.

    Update these lines:
    Code:
                "addr_g_pFullFileSystem"
                {
                    "linux"
                    {
                        "signature" "g_pFullFileSystem"
                        "read"    "0"
                    }
                    "windows"
                    {
                        "signature" "CPopulationManager::FindPopulationFileByShortName"
                        "read"    "52"
                        "read"    "0"
                    }
                }
    Code:
    "CPopulationManager::FindPopulationFileByShortName"
    {
        "library"        "server"
        "windows"    "\x55\x8B\xEC\x81\xEC\x04\x01\x00\x00\x8D\x85\xFC\xFE\xFF\xFF\x56\x68\x04\x01\x00\x00\x6A\x00\x50\xE8\x2A\x2A\x2A\x2A\x8B\x75\x08"
    }
    __________________

    Last edited by Mikusch; 11-16-2021 at 17:41.
    Mikusch is offline
    PC Gamer
    Veteran Member
    Join Date: Mar 2014
    Old 11-16-2021 , 19:33   Re: [TF2] Hidden dev attributes
    Reply With Quote #3

    Quote:
    Originally Posted by Mikusch View Post
    Valve changed something in CPopulationManager::FindPopulationFileByShort Name, so that signature needs updating, as well as the offset for g_pFullFileSystem.

    Update these lines:
    Tested and confirmed working. Thanks Mikusch!
    PC Gamer is offline
    Zethax
    Member
    Join Date: Sep 2015
    Location: In my couch
    Old 12-22-2021 , 01:27   Re: [TF2] Hidden dev attributes
    Reply With Quote #4

    I hope this doesn't count as advertising, but I made a repo for some custom attributes I'm making that use this plugin as a backbone. They can be applied onto custom weapons and base weapons alike.
    also if I could get some criticism on the code itself that'd be GREAT

    There's only one attribute in the repo at the time of writing, but I'm planning on adding more. Link
    __________________
    I code, I guess.
    Zethax is offline
    nosoop
    Veteran Member
    Join Date: Aug 2014
    Old 02-19-2022 , 09:37   Re: [TF2] Hidden dev attributes
    Reply With Quote #5

    Quote:
    Originally Posted by Zethax View Post
    also if I could get some criticism on the code itself that'd be GREAT
    Since you asked, I'd highly recommend using my fork of TF2Attributes. It's able to use the game's own functions for calculating attribute values in aggregate, so you don't have to iterate over client / weapons for the same effect nor retrieve the values manually.

    e.g. with kill_with_any_weapon_heals, you could drop the loop and simplify the code down to
    Code:
    int iHealAmount = TF2Attrib_HookValueInt(0, "health_on_kill_any_weapon", iAttacker);
    HealPlayer(iAttacker, iHealAmount, 1.5);
    __________________
    I do TF2, TF2 servers, and TF2 plugins.
    I don't do DMs over Discord -- PM me on the forums regarding inquiries.
    AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

    Last edited by nosoop; 02-19-2022 at 09:41.
    nosoop is offline
    possibly_yaboi_mark
    Junior Member
    Join Date: Jul 2022
    Old 07-17-2022 , 21:30   Re: [TF2] Hidden dev attributes
    Reply With Quote #6

    Quote:
    Originally Posted by Mikusch View Post
    Valve changed something in CPopulationManager::FindPopulationFileByShort Name, so that signature needs updating, as well as the offset for g_pFullFileSystem.

    Update these lines:
    Code:
                "addr_g_pFullFileSystem"
                {
                    "linux"
                    {
                        "signature" "g_pFullFileSystem"
                        "read"    "0"
                    }
                    "windows"
                    {
                        "signature" "CPopulationManager::FindPopulationFileByShortName"
                        "read"    "52"
                        "read"    "0"
                    }
                }
    Code:
    "CPopulationManager::FindPopulationFileByShortName"
    {
        "library"        "server"
        "windows"    "\x55\x8B\xEC\x81\xEC\x04\x01\x00\x00\x8D\x85\xFC\xFE\xFF\xFF\x56\x68\x04\x01\x00\x00\x6A\x00\x50\xE8\x2A\x2A\x2A\x2A\x8B\x75\x08"
    }
    so, after installing this (into addons/sourcemod), my server crashes whenever it attempts to load the plugin, and seeing this and the fact i'm running a windows server, i assumed that i needed to add the above code into tf2hiddenattribs.sp. the problem is i have no idea how i'm supposed to read this post (im new here (signed up yesterday), and i'm historically bad at seeing small details only, so please humor me here). do i add these two bits of code somewhere (doesnt state where in the file)? do i need to replace one already existing code and place in the other (cant find the code im supposed to replace)? i generally cannot tell.
    possibly_yaboi_mark is offline
    PC Gamer
    Veteran Member
    Join Date: Mar 2014
    Old 07-18-2022 , 14:36   Re: [TF2] Hidden dev attributes
    Reply With Quote #7

    Quote:
    Originally Posted by possibly_yaboi_mark View Post
    do i add these two bits of code somewhere (doesnt state where in the file)? do i need to replace one already existing code and place in the other (cant find the code im supposed to replace)? i generally cannot tell.
    Those were suggested edits to the tf2.hiddenattribs.txt gamedata file. I've edited it for you. You can place the attached edited tf2.hiddenattribs.txt file into your /sourcemod/gamedata/ folder.

    Enjoy!
    Attached Files
    File Type: txt tf2.hiddenattribs.txt (2.0 KB, 66 views)
    PC Gamer is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 11:39.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode