Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 08-09-2014 , 02:49   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #231

Quote:
Originally Posted by Mr.Bro View Post
While working on some custom attributes I came across something on this page (pointed out by BlueRaja):
https://sm.alliedmods.net/api/index....ad=file&id=25&
Quote:
Both GetMaxClients() and MaxClients are only available once the map is loaded, and should not be used in OnPluginStart().
Which is done so in basic-attributes.sp, is there cause for concern?
It's there in OnPluginStart for late-loads/reloads.

If the plugin isn't late-loaded, MaxClients will be 0 (and no clients will be connected), so that loop won't do anything. However, if the plugin is (re)loaded afterwards, if any clients are in-game, they'll get hooked for the plugin's hooks (TakeDamage(+Post), TraceAttack)
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
_pHabb
Senior Member
Join Date: Jul 2013
Location: GetCountry(pHabb);
Old 08-09-2014 , 02:56   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #232

version for cs:go created?)
_pHabb is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 08-09-2014 , 03:09   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #233

No, sorry. I still want to do it, but really, both versions of the plugin are sort of a mess right now. Again, I could just release it, and possibly have someone else (better-minded at CS than I) maintain it...but ech. It's really half-assed.

I've got a little plan to clean up the TF2 version before the next release and hopefully, that will make the plugin neat enough to finally create the CS/Any version. ...Probably just CS, as I've thought about it, and it might get messy, having one plugin with weapons/attributes for multiple games. Maybe.
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
Viktor_smg
New Member
Join Date: Aug 2014
Old 08-11-2014 , 16:03   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #234

Hmm...I'm not sure if this is known,or just me,but it seems that I can't get something to work.I tried to make a rocket launcher work as a secondary.At first it was ok,but then I couldn't pull it out.Even disguising it as a sticky launcher didn't help!
Code:
"APM launcher"
{
    "classes"
    {
        "demoman"    "1"
    }
    "baseclass"        "rocketlauncher"
    "baseindex"        "20"
    "description"            "Launcher mines.Aerial ones.Not actually proy,but still,good enough."
        "ammo"                  "50" 
        "mag"                   "1"   
    "attributes"
    {
                 "damage bonus"
                 {
                  plugin "tf2attributes"
                  value "20.0"
                 }
                 "Projectile speed decreased"
                 {
                  plugin "tf2attributes"
                  value "0.0"
                 }
                 "Blast radius increased"
                 {
                  plugin "tf2attributes"
                  value "0.0"
                 }
    }
}
Viktor_smg is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 08-11-2014 , 18:25   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #235

Unfortunately, classnames (baseclass) have to match the slot they're designed to be in, if you want players to be able to easily use them. Rocket launchers always have to be primary weapons. If it isn't, then the only way you can use it (as far as I know) is by typing "use tf_weapon_rocketlauncher" in console every time you want to switch to it.

The Valve attribute "override projectile type" used to let you fire a projectile of your choice out of pretty much anything that wasn't melee weapons...but I don't think it works anymore, aside from wherever Valve's using it
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
Viktor_smg
New Member
Join Date: Aug 2014
Old 08-12-2014 , 06:56   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #236

Aww...Thanks anyways for the info.
Also,I have bad news.It seems that the override projectile works.Or at least for me?XD
I successfully replaced a flaregun's projectile as "2.0",or,rockets,so to speak.And it worked.No weapon switch problems,nothing.It does seem to work.Thanks anyways!
Edit:It appears that the server crashes somewhat frequently when it comes to that sort of weapons...I couldn't find any error logs about it either D:
Edit2:This seems to crash the server:
Spoiler

However,it works kinda randomly,as it doesn't always do so...

Last edited by Viktor_smg; 08-12-2014 at 11:14.
Viktor_smg is offline
Mr.Orion
Senior Member
Join Date: Apr 2012
Location: In my microwave.
Old 08-12-2014 , 13:25   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #237

Quote:
Originally Posted by Viktor_smg View Post
Spoiler
So, that's a Direct Hit with the baseclass of a Sticky Bomb Launcher that throw Rockets... Well, I may have an idea of the problem... xD


EDIT: Message from Abrandnewday(404) at MechaTheSlag (old) :
Be careful when using this attribute, as certain weapon/projectile combinations crashed my server when I tested them, such as a Stickybomb Launcher that shot Righteous Bison particles. This is a very touchy attribute, so be careful.

Last edited by Mr.Orion; 08-12-2014 at 13:28.
Mr.Orion is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 08-12-2014 , 16:54   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #238

If that attribute still works, then that's great news
Quote:
Originally Posted by Mr.Orion View Post
EDIT: Message from Abrandnewday(404) at MechaTheSlag (old) :
Be careful when using this attribute, as certain weapon/projectile combinations crashed my server when I tested them, such as a Stickybomb Launcher that shot Righteous Bison particles. This is a very touchy attribute, so be careful.
Oh wow, I never even noticed who posted that post on there.
But yeah, it's true; a number of projectiles fired from a sticky launcher (due to its charge mechanic, most likely) will cause a crash when you fire them. This is also true for certain other weapon types, I believe. However, trying out other projectiles on "standard"-firing weapons, like shotguns, miniguns, and rocket launchers, should be safe from crashes. Projectiles that won't work (due to the weapon's lack of a charge ability) will simply drop at your feet.
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
Mr.Orion
Senior Member
Join Date: Apr 2012
Location: In my microwave.
Old 08-15-2014 , 22:09   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #239

So, here it is, I've done the FULL LIST (or not) of attributes that can be made (from AW2, my head and what I saw).

I'm gonna update it when if I find new attributes, there's some of AW2 that I don't wrote in this list because I thought they were useless.
Also, sorry for the typos and if you can't read anything.

Attributes list


Have a .

Last edited by Mr.Orion; 08-16-2014 at 08:59.
Mr.Orion is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 08-16-2014 , 00:35   Re: [TF2] Custom Weapons 2 (Beta 2, Mar 12 2014)
Reply With Quote #240

Quote:
Originally Posted by MasterOfTheXP View Post
If that attribute still works, then that's great news
Oh wow, I never even noticed who posted that post on there.
But yeah, it's true; a number of projectiles fired from a sticky launcher (due to its charge mechanic, most likely) will cause a crash when you fire them. This is also true for certain other weapon types, I believe. However, trying out other projectiles on "standard"-firing weapons, like shotguns, miniguns, and rocket launchers, should be safe from crashes. Projectiles that won't work (due to the weapon's lack of a charge ability) will simply drop at your feet.
Yeah I posted that. I used to help out with high quality weapon images for AW2 before I had a falling out with Mecha. I also experimented with attributes a fair bit.

I've gotta update my list of override projectile type IDs because theres new stuff.
404UserNotFound 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 12:28.


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