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

More optimized way for tf2items_manager plugin to modify weapons.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-13-2014 , 11:45   More optimized way for tf2items_manager plugin to modify weapons.
Reply With Quote #1

I know the current system of the tf2items_manager plugin that is shipped with the extension uses item index numbers to modify weapons, but you can't(from what I tried) use 1 block for multiple weapons(without copy+paste) plus it'll be annoying trying to keep up-to-date when new weapons are released.
So I'm suggesting that you can either choose to modify weapons by item definition index OR the classname(like tf_weapon_knife)
WildCard65 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-13-2014 , 21:36   Re: More optimized way for tf2items_manager plugin to modify weapons.
Reply With Quote #2

That wouldn't even remotely be "more optimized".
__________________
asherkin is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-14-2014 , 11:31   Re: More optimized way for tf2items_manager plugin to modify weapons.
Reply With Quote #3

It would cut down on the number of keyvalues in the config file.
https://wiki.alliedmods.net/Optimizi...arge_KeyValues

Last edited by WildCard65; 02-14-2014 at 11:31.
WildCard65 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-14-2014 , 11:36   Re: More optimized way for tf2items_manager plugin to modify weapons.
Reply With Quote #4

Quote:
Originally Posted by WildCard65 View Post
It would cut down on the number of keyvalues in the config file.
https://wiki.alliedmods.net/Optimizi...arge_KeyValues
Except that you can no longer jump directly to the appropriate key and have to instead parse every section name one by one.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-14-2014 , 11:37   Re: More optimized way for tf2items_manager plugin to modify weapons.
Reply With Quote #5

Oh. I see your point then powerlord.
WildCard65 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-14-2014 , 20:50   Re: More optimized way for tf2items_manager plugin to modify weapons.
Reply With Quote #6

Quote:
Originally Posted by WildCard65 View Post
It would cut down on the number of keyvalues in the config file.
https://wiki.alliedmods.net/Optimizi...arge_KeyValues
The KeyValues structure is only parsed once, it's not kept around - it's verbosity is completely irrelevant to performance. Your proposition however would slow things down considerably, as it would mean a lot more work every time a weapon is given.
__________________
asherkin is offline
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Location: ☠☠☠
Old 02-18-2014 , 00:04   Re: More optimized way for tf2items_manager plugin to modify weapons.
Reply With Quote #7

Does tf2itemsinfo have a function to get all the item indexes of a specific weapon classname?
ReFlexPoison is offline
arthurdead
Senior Member
Join Date: Jul 2013
Old 02-18-2014 , 08:18   Re: More optimized way for tf2items_manager plugin to modify weapons.
Reply With Quote #8

Quote:
Originally Posted by ReFlexPoison View Post
Does tf2itemsinfo have a function to get all the item indexes of a specific weapon classname?
TF2II_FindItems( "tf_weapon_sword" );
// get items with 'tf_weapon_sword' classname only
arthurdead is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 02-25-2014 , 17:34   Re: More optimized way for tf2items_manager plugin to modify weapons.
Reply With Quote #9

Quote:
Originally Posted by ReFlexPoison View Post
Does tf2itemsinfo have a function to get all the item indexes of a specific weapon classname?
Good if you want to leak thousands of handles too
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram 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 07:20.


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