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

[TF2] Custom Weapons 3 (Beta 2)


Post New Thread Reply   
 
Thread Tools Display Modes
SirBlockles
Junior Member
Join Date: Mar 2017
Location: /home/muddy
Old 07-08-2020 , 15:33   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #251

Quote:
Originally Posted by nosoop View Post
The CW3 plugin interface has issues applying attributes to non-weapon entities. Had to make a note of that for Custom Attributes myself.

Not sure since actually using CW3 is out of my expertise, but you may need to do one of the following:
-snip-
I tried these out - using attributes over cw3_attributes didn't seem to help, and wearable_razorback is considered a null item.

HOWEVER, I did find a solution, at least in my specific use case (writing here in case anyone else wants a passive worn item):

Make the item a builder, and DO NOT include the weapon_is_passive attribute. If you keep the passive attribute, it switches the player from his primary to his melee constantly (since tf_weapon_builder is the weapon for the engy toolbox/spy sapper and proabably thinks you just built something), but this is not a problem if the weapon isn't passive.

As a result from using this, if the player tries using the weapon in this slot, the viewmodel will flash invisible for like a single game frame and his weapon won't change, and in third person their arms will twitch as they try to pull out a toolbox for a split second, but I've found that this effect is completely clientside and doesn't even show for anyone else. Also, when hauling an already-deployed building (but interestingly, not while placing one from scratch), the toolbox viewmodel is invisible, but not the building's blueprint.

The only downside aside from the minor visual bugs, is that a weapon equipped in this fashion eats mousewheel scrolls to switch weapon, meaning you have to scroll hard enough to "push past it." But, for people who use the keyboard to swap weapons, this shouldn't be a huge issue.

This method works for all classes except the Spy, who believes the weapon to be a Sapper.
__________________

Last edited by SirBlockles; 07-08-2020 at 15:33.
SirBlockles is offline
Send a message via Skype™ to SirBlockles
nosoop
Veteran Member
Join Date: Aug 2014
Old 07-09-2020 , 07:35   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #252

Quote:
Originally Posted by SirBlockles View Post
I tried these out - using attributes over cw3_attributes didn't seem to help, and wearable_razorback is considered a null item.
On further inspection it doesn't look like CW3 handles wearable_razorback correctly (it only has specific cases for wearable and wearable_demoshield). That would explain the null item issue; CW3 is rather dated.

Using the attributes section name with the wearable baseclass works for me on CW3, though, or at least I'm seeing the move speed penalty and no secondary weapon is showing up in the weapon buckets. Here's the config for reference.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
Old Bill
Junior Member
Join Date: Jun 2020
Old 07-16-2020 , 08:08   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #253

is there a way to use a game existing model but override its textures for a custom weapon? like make an Australium weapon instead of making the client redownload the model again just override the textures with the custom ones instead.
Old Bill is offline
Old Bill
Junior Member
Join Date: Jun 2020
Old 08-01-2020 , 10:29   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #254

Quote:
I made an attribute that would replace the projectile of a demoman's pipe with a custom one. It is just fine, the model path is passed from the weapon's configuration file and it sets the projectile to it but the strangest thing is that the bool variable that sets the attribute true never go false (or be destroyed with OnEntityDestroyed) it just stays true after you change the weapon.

https://pastebin.com/KZrRwNVv

I believe it has something to do with projectiles being created over and over so it messes up the index or something. Maybe it has something to do with, maybe EntIndexToEntRef???
Fixed, I needed to use iWeapon instead of iClient for the variable and used this function to check if the attribute is present

https://pastebin.com/c7Wi42a8

Last edited by Old Bill; 08-01-2020 at 22:10.
Old Bill is offline
DrCactus
Junior Member
Join Date: Mar 2013
Old 08-06-2020 , 05:17   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #255

Hello. I've run into a bit of a snag with my server and the plugin.
I've been trying to get custom view models for weapons working, but haven't had much success, and I just get very zoomed out stock models.

I understand we can't have world models, but it would be nice to have viewmodels for players. Also, is it possible to not make them zoomed out?

I am using the afterburner as a base, as well as the "firkin flamer" model
(this is only because these are the ones I have on hand at the moment, and just needed something quick to test out, and will be using a different model and make my own weapon later)

here is a slightly abbreviated version of Pryo_1_Afterburner.txt

Code:
"Test"
{
	"classes"
	{
		"pyro"	"0"
	}
	"baseclass"	"flamethrower"
	"baseindex"	"21"
	"nobots"	"1"
	"quality"	"6"
	"logname"	"test"
	"description"	"test"
	"attributes"
	{
		"damage penalty"
		{
			"plugin"	"tf2attributes"
			"value"	"0.5
		}
	}
	"viewmodel" // Custom viewmodel.
	{
		"modelname"		"models/weapons/c_models/c_firkin_flamer/c_firkin_flamer.mdl" // Location of the viewmodel file.
	}
}

Last edited by DrCactus; 08-06-2020 at 06:45.
DrCactus is offline
Old Bill
Junior Member
Join Date: Jun 2020
Old 08-09-2020 , 09:00   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #256

Quote:
Originally Posted by DrCactus View Post
Hello. I've run into a bit of a snag with my server and the plugin.
I've been trying to get custom view models for weapons working, but haven't had much success, and I just get very zoomed out stock models.

I understand we can't have world models, but it would be nice to have viewmodels for players. Also, is it possible to not make them zoomed out?

I am using the afterburner as a base, as well as the "firkin flamer" model
(this is only because these are the ones I have on hand at the moment, and just needed something quick to test out, and will be using a different model and make my own weapon later)

here is a slightly abbreviated version of Pryo_1_Afterburner.txt

Code:
"Test"
{
	"classes"
	{
		"pyro"	"0"
	}
	"baseclass"	"flamethrower"
	"baseindex"	"21"
	"nobots"	"1"
	"quality"	"6"
	"logname"	"test"
	"description"	"test"
	"attributes"
	{
		"damage penalty"
		{
			"plugin"	"tf2attributes"
			"value"	"0.5
		}
	}
	"viewmodel" // Custom viewmodel.
	{
		"modelname"		"models/weapons/c_models/c_firkin_flamer/c_firkin_flamer.mdl" // Location of the viewmodel file.
	}
}


Actually you can have both custom world and view models, but I think your problem is with the model itself. I believe the model you are trying to use has custom animations which are not supported. Only c_models are, which have just the (weapon body model)

PHP Code:

        
"viewmodel"
    
{
        
"modelname"        "path/path/path"
    
}
            
"worldmodel"
    
{
        
"modelname"        "path/path/path"
    

This one worked for me, https://steamcommunity.com/sharedfil.../?id=741236065

Last edited by Old Bill; 08-09-2020 at 09:05.
Old Bill is offline
DrCactus
Junior Member
Join Date: Mar 2013
Old 08-10-2020 , 18:48   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #257

Quote:
Originally Posted by Old Bill View Post
Actually you can have both custom world and view models, but I think your problem is with the model itself. I believe the model you are trying to use has custom animations which are not supported. Only c_models are, which have just the (weapon body model)

PHP Code:

        
"viewmodel"
    
{
        
"modelname"        "path/path/path"
    
}
            
"worldmodel"
    
{
        
"modelname"        "path/path/path"
    

This one worked for me, https://steamcommunity.com/sharedfil.../?id=741236065
Decided to give it a shot, and I still get the missing model issue, where the model is invisible.
This is the code I am currently using
Code:
"Test"
{
	"classes"
	{
		"pyro"	"0"
	}
	"baseclass"	"flamethrower"
	"baseindex"	"21"
	"nobots"	"1"
	"quality"	"6"
	"logname"	"afterburner"
	"description"	"test"
	"attributes"
	{
		"weapon_allow_inspect"
		{
			"plugin"	"tf2attributes"
			"value"		"1"
		}
	}
    "viewmodel"
    {
		"modelname"        "weapons/c_models/c_explothrower/c_explothrower.mdl"
    }
    "worldmodel"
    {
        "modelname"        "weapons/c_models/c_explothrower/c_explothrower.mdl"
    } 
}

Last edited by DrCactus; 08-10-2020 at 19:18.
DrCactus is offline
Old Bill
Junior Member
Join Date: Jun 2020
Old 08-11-2020 , 03:10   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #258

Quote:
Originally Posted by DrCactus View Post
Decided to give it a shot, and I still get the missing model issue, where the model is invisible.
This is the code I am currently using
Code:
"Test"
{
	"classes"
	{
		"pyro"	"0"
	}
	"baseclass"	"flamethrower"
	"baseindex"	"21"
	"nobots"	"1"
	"quality"	"6"
	"logname"	"afterburner"
	"description"	"test"
	"attributes"
	{
		"weapon_allow_inspect"
		{
			"plugin"	"tf2attributes"
			"value"		"1"
		}
	}
    "viewmodel"
    {
		"modelname"        "weapons/c_models/c_explothrower/c_explothrower.mdl"
    }
    "worldmodel"
    {
        "modelname"        "weapons/c_models/c_explothrower/c_explothrower.mdl"
    } 
}

World or view model?, please provide a screenshot too.
Old Bill is offline
RasputinFF2
Junior Member
Join Date: Feb 2019
Old 09-08-2020 , 23:22   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #259

Where can I download custom weapons?
__________________
Hey guys, just a boss creator passing by.
RasputinFF2 is offline
torridgristle
Junior Member
Join Date: Aug 2020
Old 09-22-2020 , 12:42   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #260

In game_sounds_weapons.txt there are sounds defined that use multiple sound files, is there a way to replace a sound that uses only one sound file with a sound that uses multiple randomly chosen sound files? Like the stock Revolver with the Enforcer?
torridgristle is offline
Reply


Thread Tools
Display Modes

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 08:50.


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