Raised This Month: $ Target: $400
 0% 

[TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)


Post New Thread Reply   
 
Thread Tools Display Modes
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 09-27-2015 , 14:21   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #621

There is an attribute to block default minigun sounds.

I can probably add support for replacing all sorts of sounds but that'll come over time.

http://imgur.com/ahw7dD7



Also I've added support for giving Self Made quality to specific steam IDs. By default you can specify up to 5 per weapon. To increase that you'd need to recompile.


Also yeah, any weapon with modified clip size attributes that lower the clip tend to start with more clip than their max as they'll start with the default clip size of the base weapon - the getmaxclip gamedata would just make things easier on everyone. "mag" would overwrite it.

(Why is it mag and not clip...?)
__________________

Last edited by Chdata; 09-27-2015 at 14:27.
Chdata is offline
Theray070696
Senior Member
Join Date: Sep 2014
Old 09-27-2015 , 16:11   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #622

Quote:
Originally Posted by Chdata View Post
There is an attribute to block default minigun sounds.

I can probably add support for replacing all sorts of sounds but that'll come over time.

http://imgur.com/ahw7dD7



Also I've added support for giving Self Made quality to specific steam IDs. By default you can specify up to 5 per weapon. To increase that you'd need to recompile.


Also yeah, any weapon with modified clip size attributes that lower the clip tend to start with more clip than their max as they'll start with the default clip size of the base weapon - the getmaxclip gamedata would just make things easier on everyone. "mag" would overwrite it.

(Why is it mag and not clip...?)
I just looked at your github, the weapon description that's appearing is the weapon that killed you. The version you forked has a bug, I added a check for it only displaying when an enemy kills you, but I derped and made it show only when you kill yourself. It's fixed in the main branch.
__________________

Last edited by Theray070696; 09-27-2015 at 16:11.
Theray070696 is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 09-27-2015 , 16:22   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #623

Quote:
Originally Posted by Chdata View Post
Also I've added support for giving Self Made quality to specific steam IDs.
Also do-able via the "quality" option I added in back in Beta 3. Although with that option, it'd be Self-Made for everyone who equips the weapon....but you could always just add a "flag" for the weapon and restrict it that way.

Your thing is good for if we wanted to toss in our Steam IDs so that any weapons we give ourselves on any servers become Self-Made (might as well force-add the self-made sparkle particle attribute as well)

Last edited by 404UserNotFound; 09-27-2015 at 16:23.
404UserNotFound is offline
Theray070696
Senior Member
Join Date: Sep 2014
Old 09-27-2015 , 18:40   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #624

Quote:
Originally Posted by abrandnewday View Post
Also do-able via the "quality" option I added in back in Beta 3. Although with that option, it'd be Self-Made for everyone who equips the weapon....but you could always just add a "flag" for the weapon and restrict it that way.

Your thing is good for if we wanted to toss in our Steam IDs so that any weapons we give ourselves on any servers become Self-Made (might as well force-add the self-made sparkle particle attribute as well)
I think he means the weapon maker can put a steamid for whoever made the weapon. For the Matador, it would be me, mecha, and whoever did the model. It could also be used to show who had the original idea or who suggested the weapon.
__________________
Theray070696 is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 09-27-2015 , 22:43   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #625

Quote:
Originally Posted by abrandnewday View Post
Also do-able via the "quality" option I added in back in Beta 3. Although with that option, it'd be Self-Made for everyone who equips the weapon....but you could always just add a "flag" for the weapon and restrict it that way.

Your thing is good for if we wanted to toss in our Steam IDs so that any weapons we give ourselves on any servers become Self-Made (might as well force-add the self-made sparkle particle attribute as well)
I forgot to explain that my version overwrites the quality setting, thus I already knew about it. It's to give only the people involved in creating it, Self-Made quality, while other people get whatever the "quality" key is set to.

I didn't force the sparkle, because some people might do stuff like

http://advancedweaponiser.wikia.com/...he_Lifestealer

I'd attribute The Matador to Mecha (coder / probably came up with it) and Ritz (the modeler) but not the porter from aw2->cw2 just cause I don't intend to label my steamID over every bit of copy-paste work I do myself. (At least for any aw2 stuff I make myself).




By the way for people making custom attribute plugins, it's probably a lot better to

g_iThisWeaponHasACustomAttribute[MAXPLAYERS + 1][5]; // [iClient][iSlot]

than to

g_iWephascust[2049]; // [iWeapon]

Code:
stock GetSlotFromPlayerWeapon(iClient, iWeapon)
{
    for (new i = 0; i <= 5; i++)
    {
        if (iWeapon == GetPlayerWeaponSlot(iClient, i))
        {
            return i;
        }
    }
    return -1;
}


public Action:TF2_CalcIsAttackCritical(iClient, iWeapon, String:szWeaponNAme[], &bool:bResult)
{
    new iSlot = GetSlotFromPlayerWeapon(iClient, iWeapon);
    if (g_iSniperCombo1016[iClient][iSlot] > 0)
    {
        g_iSniperComboHit1016[iClient][iSlot] = false;

        new Handle:hData;
        WritePackCell(hData, iClient);
        WritePackCell(hData, iSlot);
        RequestFrame(Frame_Attribute_1016_Expire, hData);
    }
}

public Frame_Attribute_1016_Expire(any:Pack)
{
    ResetPack(Handle:Pack);
    new iClient = ReadPackCell(Handle:Pack);
    new iSlot = ReadPackCell(Handle:Pack);
    CloseHandle(Handle:Pack);

    if (!g_iSniperComboHit1016[iClient][iSlot])
    {
        g_iSniperCombo1016[iClient][iSlot] = 0;
    }
}
For attributes that affect specifically "Sniper Rifle Charge" or "Any cloak property" or "Any shield property"

Don't even make it a 2D array, you just need g_iSrifleChargeAttr[MAXPLAYERS + 1];

Since sniper rifle charge is something that is exclusive to primary weapons.


I've only looked at basic/custom-attributes which indexes by 2049, at least.
__________________

Last edited by Chdata; 09-27-2015 at 22:49.
Chdata is offline
crafting
Senior Member
Join Date: May 2014
Location: Somewhere on Earth
Old 09-28-2015 , 00:15   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #626

Quote:
Originally Posted by The655 View Post
Also,mediguns has sounds?
When you heal someone... people have made custom healing sounds
crafting is offline
Theray070696
Senior Member
Join Date: Sep 2014
Old 09-28-2015 , 00:20   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #627

Quote:
Originally Posted by Chdata View Post
I forgot to explain that my version overwrites the quality setting, thus I already knew about it. It's to give only the people involved in creating it, Self-Made quality, while other people get whatever the "quality" key is set to.

I didn't force the sparkle, because some people might do stuff like

http://advancedweaponiser.wikia.com/...he_Lifestealer

I'd attribute The Matador to Mecha (coder / probably came up with it) and Ritz (the modeler) but not the porter from aw2->cw2 just cause I don't intend to label my steamID over every bit of copy-paste work I do myself. (At least for any aw2 stuff I make myself).




By the way for people making custom attribute plugins, it's probably a lot better to

g_iThisWeaponHasACustomAttribute[MAXPLAYERS + 1][5]; // [iClient][iSlot]

than to

g_iWephascust[2049]; // [iWeapon]

Code:
stock GetSlotFromPlayerWeapon(iClient, iWeapon)
{
    for (new i = 0; i <= 5; i++)
    {
        if (iWeapon == GetPlayerWeaponSlot(iClient, i))
        {
            return i;
        }
    }
    return -1;
}


public Action:TF2_CalcIsAttackCritical(iClient, iWeapon, String:szWeaponNAme[], &bool:bResult)
{
    new iSlot = GetSlotFromPlayerWeapon(iClient, iWeapon);
    if (g_iSniperCombo1016[iClient][iSlot] > 0)
    {
        g_iSniperComboHit1016[iClient][iSlot] = false;

        new Handle:hData;
        WritePackCell(hData, iClient);
        WritePackCell(hData, iSlot);
        RequestFrame(Frame_Attribute_1016_Expire, hData);
    }
}

public Frame_Attribute_1016_Expire(any:Pack)
{
    ResetPack(Handle:Pack);
    new iClient = ReadPackCell(Handle:Pack);
    new iSlot = ReadPackCell(Handle:Pack);
    CloseHandle(Handle:Pack);

    if (!g_iSniperComboHit1016[iClient][iSlot])
    {
        g_iSniperCombo1016[iClient][iSlot] = 0;
    }
}
For attributes that affect specifically "Sniper Rifle Charge" or "Any cloak property" or "Any shield property"

Don't even make it a 2D array, you just need g_iSrifleChargeAttr[MAXPLAYERS + 1];

Since sniper rifle charge is something that is exclusive to primary weapons.


I've only looked at basic/custom-attributes which indexes by 2049, at least.
I guess I can throw an attribute in rays attributes which will add the sparkle for the maker, should only need to check quality and apply the particle attribute. Of course, the weapon maker will have to add the attribute to the weapon.
__________________

Last edited by Theray070696; 09-28-2015 at 00:21.
Theray070696 is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 09-28-2015 , 01:45   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #628

Quote:
Originally Posted by crafting View Post
When you heal someone... people have made custom healing sounds
That might be due to client-side mods like VPKs in /tf/custom. That can't be affected by the server (or so I don't think it can).
Potato Uno is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 09-28-2015 , 09:09   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #629

probably i'll pr the stuff I've done after I add translations stuff
__________________
Chdata is offline
Theray070696
Senior Member
Join Date: Sep 2014
Old 09-28-2015 , 09:31   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #630

Quote:
Originally Posted by Chdata View Post
probably i'll pr the stuff I've done after I add translations stuff
Cool, be sure you have the latest commits from the main branch, backup your work and use a program to check differences.
__________________
Theray070696 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:43.


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