Raised This Month: $51 Target: $400
 12% 

[TF2] TF2Attributes (v1.7.2, 2022/09/18)


Post New Thread Reply   
 
Thread Tools Display Modes
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-30-2013 , 11:28   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #31

Quote:
Originally Posted by FlaminSarge View Post
My sig tells all.

I'll look it up some time tomorrow.
Unless Valve throws an additional update in there, it appears that the Linux versions retain their same signaturess. I'm not sure how to check the Windows versions, though.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 04-30-2013 at 11:28.
Powerlord is offline
Ravu al Hemio
Junior Member
Join Date: Mar 2008
Old 04-30-2013 , 12:06   [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #32

I checked with the gdc tools. Linux/OS X locations are given as symbol names, which gdc tries to find in the symbol table. Windows locations are given as byte patterns, which gdc tries to find in the code section of the DLL, making sure it finds each only once.

Both seem to be unchanged for the methods used by TF2Attributes.

Last edited by Ravu al Hemio; 04-30-2013 at 12:06.
Ravu al Hemio is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 05-01-2013 , 06:14   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #33

Nothing broke with this with SteamPipe on Windows, so we're good to go.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
realwx
Member
Join Date: May 2012
Old 05-02-2013 , 23:39   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #34

Sort of still stuck in a circle of figuring out why item attributes are applying themselves to the "Action" slot despite filtering out item ID's numbers by checking against the string trie. It's currently taking Melee (or, if available, PDA/PDA2 onto Action.) Even if I remove the melee slot before TF2Attributes apply, then it will just apply the secondary slot's attributes onto the Action slot. (I did try replacing "decl" with "new" in several places, Sarge, but it only made a difference on the first round, not any subsequent ones)

Tested by viewing stats in the MVM maps. Any clues on whether I'm doing this all wrong?

Code:
public TF2Items_OnGiveNamedItem_Post(client, String:classname[], itemDefinitionIndex, itemLevel, itemQuality, entityIndex)
{
    new applyOnSpawn = GetConVarInt(cvarApplyOnSpawn);
    
    if(enabled && ( (applyOnSpawn == 1 && !IsFakeClient(client)) || applyOnSpawn == 2) )
    {
        decl String:tmpID[16];
        decl String:strAttrib[64];
        decl String:fullAttr[256];
        
        Format(tmpID, sizeof(tmpID), "%d__%s", itemDefinitionIndex, selectedMod);

        if (!GetTrieString(g_hItemInfoTrie, tmpID, fullAttr, sizeof(fullAttr)))
        {
            Format(tmpID, sizeof(tmpID), "%d__default", itemDefinitionIndex);
            if(!GetTrieString(g_hItemInfoTrie, tmpID, fullAttr, sizeof(fullAttr)))
            {
                PrintToConsole(client, "Could not load value from %s.", tmpID); //debug
                return;
            }
        }
        
        TF2Attrib_RemoveAll(entityIndex);

        decl String:attrArray[MAX_ATTRIBUTES][32];
        new num_attribs = ExplodeString(fullAttr, " ; ", attrArray, MAX_ATTRIBUTES, 32);

        for (new i=0; i < num_attribs+1; i += 2)
        {
            TF2II_GetAttribName(StringToInt(attrArray[i]), strAttrib, sizeof(strAttrib));

            if (TF2Attrib_IsIntegerValue(StringToInt(attrArray[i+1])))
            {
                new value = StringToInt(attrArray[i+1]);
                TF2Attrib_SetByName(entityIndex, strAttrib, Float:value);
            }
            else
            {
                TF2Attrib_SetByName(entityIndex, strAttrib, StringToFloat(attrArray[i+1]));
            }
        }
        TF2_AddCondition(client, TFCond_SpeedBuffAlly, 0.01);
    }
}
__________________
realwx is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 05-04-2013 , 07:39   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #35

Have you tried flat-out rejecting certain indices or classnames instead of relying on GetTrieString to reject them?
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
realwx
Member
Join Date: May 2012
Old 05-05-2013 , 03:30   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #36

Oh man. I just... wow. I'm an idiot. I did try that days ago, but when I revisited it just now, I had a && where a || should've been. (Plus, I fixed something odd with ExplodeString returning ghost attributes, so the other problem is fixed.)

Thank you so much Sarge, and really sorry I've been bugging you
__________________
realwx is offline
Oshizu
Veteran Member
Join Date: Nov 2012
Location: Warsaw
Old 05-05-2013 , 06:42   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #37

Hello i've got a small problem with plugin. Halloween Attributes doesn't seem to work even with 'tf_forced_holiday'
__________________
...
Oshizu is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 05-05-2013 , 06:44   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #38

Valve intentionally broke those, I believe. (What with Halloween being over, and all...still though )
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
CoolJosh3k
AlliedModders Donor
Join Date: Mar 2010
Old 05-09-2013 , 12:50   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #39

Ya, Valve broke both Halloween and MvM stuff just for the creative community

Should be a work around in the future, somehow.
CoolJosh3k is offline
thesupremecommander
Member
Join Date: Apr 2012
Old 05-12-2013 , 10:18   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #40

Can a native to get all of the attributes on an entity be implemented (as opposed to having to blindly guess whether an entity even has an attribute)?
thesupremecommander is offline
Reply



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 03:33.


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