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

How hard would it be to make a x10 plugin.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hamza47sohail
Senior Member
Join Date: Jan 2014
Old 02-25-2014 , 21:57   How hard would it be to make a x10 plugin.
Reply With Quote #1

-Delete this
__________________
The Server Is In CANADA GameTracker Is Being Weird

Last edited by hamza47sohail; 03-18-2014 at 17:59.
hamza47sohail is offline
arthurdead
Senior Member
Join Date: Jul 2013
Old 02-25-2014 , 22:41   Re: How hard would it be to make a x10 plugin.
Reply With Quote #2

PHP Code:
stock MultiplyBy(clientindex, &Handle:hItemmultiply)
{
    
hItem TF2Items_CreateItem(OVERRIDE_ATTRIBUTES PRESERVE_ATTRIBUTES);
    
TF2Items_SetFlags(hItemOVERRIDE_ATTRIBUTES PRESERVE_ATTRIBUTES);
    new 
iAIndexes[16]
    new 
Float:flAValues[16]; 
    new 
iNumAttributes TF2II_GetItemNumAttributes(index);
    
TF2Items_SetNumAttributes(hItemiNumAttributes);
    if(
iNumAttributes 0
    {
        for(new 
0< (iNumAttributes 16 16 iNumAttributes); a++) 
        {
            
iAIndexes[a] = TF2II_GetItemAttributeID(indexa);
            
flAValues[a] = TF2II_GetItemAttributeValue(indexa);
            
TF2Items_SetAttribute(hItemaiAIndexes[a], flAValues[a] * multiply);
        }
    }
}

public 
Action:TF2Items_OnGiveNamedItem(clientString:classname[], iItemDefinitionIndex, &Handle:hItem)
{
    
MultiplyBy(clientiItemDefinitionIndexhItem10);
    return 
Plugin_Changed;

just that of course they have blacklist custom attributes etc but if you want just X10
arthurdead is offline
hamza47sohail
Senior Member
Join Date: Jan 2014
Old 02-26-2014 , 07:13   Re: How hard would it be to make a x10 plugin.
Reply With Quote #3

Quote:
Originally Posted by arthurdead View Post
PHP Code:
stock MultiplyBy(clientindex, &Handle:hItemmultiply)
{
    
hItem TF2Items_CreateItem(OVERRIDE_ATTRIBUTES PRESERVE_ATTRIBUTES);
    
TF2Items_SetFlags(hItemOVERRIDE_ATTRIBUTES PRESERVE_ATTRIBUTES);
    new 
iAIndexes[16]
    new 
Float:flAValues[16]; 
    new 
iNumAttributes TF2II_GetItemNumAttributes(index);
    
TF2Items_SetNumAttributes(hItemiNumAttributes);
    if(
iNumAttributes 0
    {
        for(new 
0< (iNumAttributes 16 16 iNumAttributes); a++) 
        {
            
iAIndexes[a] = TF2II_GetItemAttributeID(indexa);
            
flAValues[a] = TF2II_GetItemAttributeValue(indexa);
            
TF2Items_SetAttribute(hItemaiAIndexes[a], flAValues[a] * multiply);
        }
    }
}

public 
Action:TF2Items_OnGiveNamedItem(clientString:classname[], iItemDefinitionIndex, &Handle:hItem)
{
    
MultiplyBy(clientiItemDefinitionIndexhItem10);
    return 
Plugin_Changed;

just that of course they have blacklist custom attributes etc but if you want just X10
Thankyou!
But blacklisting attributes would be needed as there are weapons that would just break or be extremely over powered.

Another aspect of this would be to be able to keep it to a certain team if possible. So only read team gets x10 weapons.

Also can we add a chunk of code to this that would be executed if the weapon meets a certain index?

Sorry if I am wrong, I am very new to sourcepawn and coding in general. I just have experience with html and php.


Code:
if item index= xxx
{
attributes or just plain code
}
extra code if needed

if not item index:
YOUR CODE HERE
__________________
The Server Is In CANADA GameTracker Is Being Weird

Last edited by hamza47sohail; 02-26-2014 at 11:12.
hamza47sohail is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 02-26-2014 , 10:59   Re: How hard would it be to make a x10 plugin.
Reply With Quote #4

My understanding of that mod is that it's not literally 10x for all weapon stats, just overall buffed weapon stats that somehow make a "balanced" gamemode. Hence the above stock won't be that useful.

It's not that difficult to make, just tedious. All the tools are out there: TF2Items, TF2Info, TF2Attributes. The only tedious part is going through each weapon and setting its stats manually which hey, are all listed here.
__________________
pheadxdll is offline
hamza47sohail
Senior Member
Join Date: Jan 2014
Old 02-26-2014 , 11:11   Re: How hard would it be to make a x10 plugin.
Reply With Quote #5

Quote:
Originally Posted by pheadxdll View Post
My understanding of that mod is that it's not literally 10x for all weapon stats, just overall buffed weapon stats that somehow make a "balanced" gamemode. Hence the above stock won't be that useful.

It's not that difficult to make, just tedious. All the tools are out there: TF2Items, TF2Info, TF2Attributes. The only tedious part is going through each weapon and setting its stats manually which hey, are all listed here.
You are right its not all x10 and some stuff is just custom.
Like the default grenade launcher shoots like the beggars bazooka and has extended clip size. That has nothing to do with x10
__________________
The Server Is In CANADA GameTracker Is Being Weird
hamza47sohail is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-26-2014 , 11:29   Re: How hard would it be to make a x10 plugin.
Reply With Quote #6

Quote:
Originally Posted by arthurdead View Post
PHP Code:
stock MultiplyBy(clientindex, &Handle:hItemmultiply)
{
    
hItem TF2Items_CreateItem(OVERRIDE_ATTRIBUTES PRESERVE_ATTRIBUTES);
        
//TF2Items_SetFlags(hItem, OVERRIDE_ATTRIBUTES | PRESERVE_ATTRIBUTES); Ya this line ain't required as TF2Items_CreateItem already applies the flags.
    
new iAIndexes[16]
    new 
Float:flAValues[16]; 
    new 
iNumAttributes TF2II_GetItemNumAttributes(index);
    
TF2Items_SetNumAttributes(hItemiNumAttributes);
    if(
iNumAttributes 0
    {
        for(new 
0< (iNumAttributes 16 16 iNumAttributes); a++) 
        {
            
iAIndexes[a] = TF2II_GetItemAttributeID(indexa);
            
flAValues[a] = TF2II_GetItemAttributeValue(indexa);
            
TF2Items_SetAttribute(hItemaiAIndexes[a], flAValues[a] * multiply);
        }
    }
}

public 
Action:TF2Items_OnGiveNamedItem(clientString:classname[], iItemDefinitionIndex, &Handle:hItem)
{
    
MultiplyBy(clientiItemDefinitionIndexhItem10);
    return 
Plugin_Changed;

just that of course they have blacklist custom attributes etc but if you want just X10
WildCard65 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-26-2014 , 13:36   Re: How hard would it be to make a x10 plugin.
Reply With Quote #7

Honestly if you want to spend the time you could make a plugin that loops through every weapon and makes a config, then go from there, remove the item from the list if you want to black list, etc. Wouldnt be hard at all, hell most of the work is already done by arthurdead. Why they are keeping it private, probably because they didnt think of an easier way to do it and they are just using tf2items_manager to do it all.
Mitchell is offline
hamza47sohail
Senior Member
Join Date: Jan 2014
Old 02-26-2014 , 21:26   Re: How hard would it be to make a x10 plugin.
Reply With Quote #8

Quote:
Originally Posted by Mitchell View Post
Honestly if you want to spend the time you could make a plugin that loops through every weapon and makes a config, then go from there, remove the item from the list if you want to black list, etc. Wouldnt be hard at all, hell most of the work is already done by arthurdead. Why they are keeping it private, probably because they didnt think of an easier way to do it and they are just using tf2items_manager to do it all.
In my opinion that would make a very slow plugin. How many weapons are there And for the plugin to create a cfg for every single one and than go through each one to read it. I think it wont be any better than doing it in just 1 plugin.

Still can anyone give me an insight on how I can use arthurdeads code but use weapon indexes with it as well as blacklist.
__________________
The Server Is In CANADA GameTracker Is Being Weird

Last edited by hamza47sohail; 02-26-2014 at 21:30.
hamza47sohail is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-26-2014 , 22:22   Re: How hard would it be to make a x10 plugin.
Reply With Quote #9

Quote:
Originally Posted by hamza47sohail View Post
In my opinion that would make a very slow plugin. How many weapons are there And for the plugin to create a cfg for every single one and than go through each one to read it. I think it wont be any better than doing it in just 1 plugin.

Still can anyone give me an insight on how I can use arthurdeads code but use weapon indexes with it as well as blacklist.
You misunderstood. One plugin makes ONE config file with all the weapons and their attributes. You would only need to load this if any items are loaded, as it will append the new items to the bottom of the config.

The SECOND plugin is the one that replaces the attributes of each weapon with those that are in the config. just like tf2item_manager it will load the config and when an item is being given to a player it will adjust the attributes of the item.
Mitchell is offline
hamza47sohail
Senior Member
Join Date: Jan 2014
Old 02-27-2014 , 08:52   Re: How hard would it be to make a x10 plugin.
Reply With Quote #10

Quote:
Originally Posted by Mitchell View Post
You misunderstood. One plugin makes ONE config file with all the weapons and their attributes. You would only need to load this if any items are loaded, as it will append the new items to the bottom of the config.

The SECOND plugin is the one that replaces the attributes of each weapon with those that are in the config. just like tf2item_manager it will load the config and when an item is being given to a player it will adjust the attributes of the item.
Thats a better idea. So for the second plugin I can use tf2items or the giveweapon plugin but what about the first one.

How can I grab all the weapon list with the index values and put them in the correct format.
__________________
The Server Is In CANADA GameTracker Is Being Weird
hamza47sohail 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 04:45.


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