Garry's Mod

Garry's Mod

Proxy Color Tool
This topic has been locked
NotAKid  [developer] 16 Apr, 2020 @ 5:58pm
How To Add Support: [LOCKED]
Please use the wiki instead:
https://github.com/NotAKidOnSteam/Proxy-Color-Tool/wiki

---


Add a proxy to the end of your material file.
This tool was originally made for my vehicles but it works on anything as long as it has the proxy.

There are 6 proxies available to you.
  • ColorSlot1
  • ColorSlot2
  • ColorSlot3
  • ColorSlot4
  • ColorSlot5
  • ColorSlot6

In each one you must set a name with it in your vmt:
name "a name here (shows in tool menu)"

Example using the first color slot:
Proxies { ColorSlot1{ name "Primary Color" resultVar $color2 } }

Example with a preset color:

Proxies { ColorSlot5{ name "Leather Stitching" fcolor "0.1 0.5 0.3" resultVar $color2 } }

treat these color slots as actual slots
If you add ColorSlot2 to a material in your model and another material in your model also has ColorSlot2 defined, the name argument will fight each other and the material loaded last will always win.
Both materials will be affected by color so dont worry about that, but they arent considered seperate as they share the same proxy.

-----------------------

for mod makers that want to be able to save/set these colors

local ColorTable = {Color(255,255,255), Color(234,54,64)}
ent:SetProxyColor(ColorTable)

ent:GetProxyColor() -- returns ColorTable on both client and server
Last edited by NotAKid; 4 Apr, 2021 @ 6:23am
< >
Showing 1-15 of 21 comments
Jakob | KingPommes 20 Apr, 2020 @ 11:55pm 
How is mesh separation defined? How do I know how to only affect part of my mesh? Does it only work if it's a separate material on the model? So say I have a seat in a car that shared the same material as the rest of the model it works work?
This is promising btw :) I'm trying to find a solution to apply the same color customization you have with playermodels in the c menu to models in general for ages.
NotAKid  [developer] 21 Apr, 2020 @ 8:55am 
**snipped away as the addon updated and this was no longer true**
Last edited by NotAKid; 25 Jul, 2020 @ 7:51pm
TheRidiculousR 29 May, 2020 @ 6:17am 
i added the proxy thing to my .vmt files, though the menu still doesnt do anything
TheRidiculousR 29 May, 2020 @ 6:29am 
actually i dont see a model with the included material files either
NotAKid  [developer] 29 May, 2020 @ 6:53am 
Proxies { ColorSlot1{ name "Primary Color" resultVar $color2 } } }
You need a name in your vmt file for the tool to show it. If you can not click your model with the Proxy Color Tool and see the color slot in the menu, try restarting your game as sometimes proxies act up in gmod.
NotAKid  [developer] 29 May, 2020 @ 6:55am 
Does the model cause the tools menu to reload when clicked? I dont have enough information to properly help.
TheRidiculousR 29 May, 2020 @ 7:48am 
it does nothing at all, though on that random simfphys vechile thing it makes a sound, the menu still doesnt change either
TheRidiculousR 29 May, 2020 @ 7:53am 
basically i have created inkling hairstyles and i want to be able to colorize the gradient seperatly
i have the base texture, on top of that a gradient alphatexture with
Proxies {
ColorSlot1{
name "Gradient color"
resultVar $color2
}
}
}
and then another one for the spots too
NotAKid  [developer] 29 May, 2020 @ 7:55am 
Try on my GTAV Dukes. That model supports the tool.
The sound plays even if the model selected doesn't support it.
edit:
Would you be able to post the entire vmt file?
You can use [code] and [/code] to make code blocks.
Last edited by NotAKid; 29 May, 2020 @ 7:56am
TheRidiculousR 29 May, 2020 @ 7:56am 
Originally posted by NotAKid:
Try on my GTAV Dukes. That model supports the tool.
The sound plays even if the model selected doesn't support it.
thats even weirder because it doesnt play when i select my own model, IG i have stuff to fix
TheRidiculousR 29 May, 2020 @ 8:04am 
"UnlitGeneric" { "$basetexture" "models/theridiculousr/custom_hairstyles/octoling_bowlcut/spots" "$basetexture" "models/theridiculousr/custom_hairstyles/octoling_bowlcut/team_colour_5_nrm" "$additive" 1 "$translucent" 1 "$decal" 1 "$lightwarptexture" "models/theridiculousr/custom_hairstyles/inkling_lightwarp6" "$phong" "1" "$phongexponent" "0" "$phongboost" "0" "$phongfresnelranges" "[0 0 0]" "$halflambert" "0" // Rim lighting parameters "$selfillumfresnel" "3" "$selfillumfresnelminmaxexp" "[0 0 5]" "$selfillum" "1" "$selfillumtint_base" "[0.3 0.3 0.3]" "$blendtintbybasealpha" "1" "$blendtintcoloroverbase" "1" "$colortint_base" "{ 255 255 255}" "$colortint_tmp" "[0 0 0]" "proxies" { ColorSlot2{ name "spot colour" resultVar $color2 } "SelectFirstIfNonZero" { "srcVar1" "$colortint_tmp" "srcVar2" "$colortint_base" "resultVar" "$color2" } } }
NotAKid  [developer] 29 May, 2020 @ 8:06am 
"UnlitGeneric" { "$basetexture" "models/theridiculousr/custom_hairstyles/boy_mohawk/gradient" "$basetexture" "models/theridiculousr/custom_hairstyles/boy_mohawk/team_colour_4_nrm" "$additive" 1 "$translucent" 1 "$decal" 1 "$lightwarptexture" "models/theridiculousr/custom_hairstyles/inkling_lightwarp6" "$phong" "1" "$phongexponent" "0" "$phongboost" "0" "$phongfresnelranges" "[0 0 0]" "$halflambert" "0" // Rim lighting parameters "$selfillumfresnel" "3" "$selfillumfresnelminmaxexp" "[0 0 5]" "$selfillum" "1" "$selfillumtint_base" "[0.3 0.3 0.3]" "$blendtintbybasealpha" "1" "$blendtintcoloroverbase" "1" "$colortint_base" "{ 255 255 255}" "$colortint_tmp" "[0 0 0]" "Proxies" { // do these two proxies do anything in gmod? "ItemTintColor" { "resultVar" "$colortint_tmp" } "SelectFirstIfNonZero" { "srcVar1" "$colortint_tmp" "srcVar2" "$colortint_base" "resultVar" "$color2" } // i think these are for other source things like sfm ^^ "ColorSlot1" { name "Color Slot Name" resultVar $color2 } } }
NotAKid  [developer] 29 May, 2020 @ 8:07am 
That should be it, I am pretty sure with those two other proxies though that they dont work in gmod. Leaving them there is fine but that second one might fight the ColorSlot proxy for the $color2 variable. Try messing with those a bit.
TheRidiculousR 29 May, 2020 @ 8:14am 
it still does not work, does it matter if not all the materials have these colorslot proxies?
i will look at the material files in your car thing
Last edited by TheRidiculousR; 29 May, 2020 @ 8:14am
TheRidiculousR 29 May, 2020 @ 8:23am 
i removed the 2 lines above proxy and now it does show up
< >
Showing 1-15 of 21 comments
Per page: 1530 50