material modify control example map

material modify control example map 2022-03-28

Cyberen

L3: Member
Mar 30, 2021
143
30

TF2CutContent

Banned
Nov 26, 2010
59
82
Could this entity be used to target a players currently equipped weapon and change the war paint texture to a completely custom one? I'm thinking more in the realm of doing this via a SourceMod plugin but this map is a good testbed to get a handle on how the entity works. I'm just not sure how the warpaints system works and if it's even possible to do custom warpaints via server plugins or not.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Could this entity be used to target a players currently equipped weapon and change the war paint texture to a completely custom one?
material_modify_control can only control the variables and properties of a material which uses the MaterialModify proxy, and the vast majority of TF2 materials do not use it, including all weapons and other props. You would need to supply a custom material in the map which included the proxy, but this entity is not really meant to be used to change the basetexture itself. I don't believe it's possible to affect a paintkit/warpaint in a material file, and I believe it's a property of the weapon entity. To affect it you would likely need to use a SourceMod plugin or extension. I suggest you visit the Allied Modders Discord.
 

TF2CutContent

Banned
Nov 26, 2010
59
82
material_modify_control can only control the variables and properties of a material which uses the MaterialModify proxy, and the vast majority of TF2 materials do not use it, including all weapons and other props. You would need to supply a custom material in the map which included the proxy, but this entity is not really meant to be used to change the basetexture itself. I don't believe it's possible to affect a paintkit/warpaint in a material file, and I believe it's a property of the weapon entity. To affect it you would likely need to use a SourceMod plugin or extension. I suggest you visit the Allied Modders Discord.
1. I created the AM discord.
2. I'm not in it anymore as I got banned for one too many "political" discussions (oops!)
3. I know sourcemod plugins very well as it is, but the warpaints system is one thing that not many know about, not even in the AM discord. I doubt even an extension (different from a plugin) would have any success at making custom warpaints possible.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Oh, are you 404? I didn't realise you'd changed your name.

It's a bit out of my ability range at the moment, but the plugin TF Econ Data appears to have a native for getting a weapon's possible paintkit definition indexes. If they use indexes then I suspect it would only be possible to have custom paints if the weapon models and materials were also custom. I say that in the hope that someone far more knowledgable will prove me wrong.
 

TF2CutContent

Banned
Nov 26, 2010
59
82
Oh, are you 404? I didn't realise you'd changed your name.

It's a bit out of my ability range at the moment, but the plugin TF Econ Data appears to have a native for getting a weapon's possible paintkit definition indexes. If they use indexes then I suspect it would only be possible to have custom paints if the weapon models and materials were also custom. I say that in the hope that someone far more knowledgable will prove me wrong.
Yeah that's me. Not using the "404" name anymore, retired it. Just going by TF2CutContent now in hopes that it'll bring more attention to TCRF and what we've got going on over there. I'm mostly out of the TF2 community entirely at this point but obviously I've ended up back here after a while of being inactive which kind of proves me wrong about quitting the community, but oh well.

And yeah I've already prior made my own fake warpaint granting plugin in a similar vein to Skials' fake items. Making a plugin to give yourself fake warpainted weapons was easy enough for the first set of warpaint weapons since those had their own item indexes. The newer ones don't use that same initial setup and instead use an entirely different system, but it was still possible to generate fake versions of those newer warpainted weapons as well. So in closing, giving yourself fake "official" warpaints is definitely possible, I know that much for certain. Using custom textures for your own custom warpaints though, that's a whole other can of worms. I know the new warpaints are handled via attributes that are assigned but I'm not sure if it's possible to inject a custom texture into the list of existing warpaints to have it be "usable".

And I'd like to think that I'm that "more knowledgeable" person but to be fair there's way smarter people out there like mastercoms. I do know the engine pretty well though. Pretty well enough to be able to discern (in most cases) if something is possible or not.
 
Last edited:

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Thanks for the information; I didn't know there were two systems. That's a bit disappointing; I'd expect Valve to have used one system for both, or move the old paints to the new way of doing things. Odd!

Custom warpaints sounds like it would be a good selling point for community servers.