How to Add/Edit Skins for SWEPS?

I’m trying to add some more pickaxes to the Stranded Gamemode, and I ran into a few problems.
I’m not that familiar with lua, but I can understand the basic code.

Every tier of pickaxes has their own respective lua file, containing the model details and specifications on the pickaxe.
But they don’t have their own texture file. I was confused on how they were actually getting their textures, but I realized each pickaxe had a different SWEP.Skin Number.

My first thought was of course where are the skins located and how I can add more, but… That just led me to more confusion.

Here is a snippet of the code




AddCSLuaFile()


SWEP.Slot = 3
SWEP.SlotPos = 1


SWEP.Base = "gms_base_weapon"
SWEP.PrintName = "Steel Pickaxe"
SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl"
SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl"


SWEP.Purpose = "Effective mining tool"
SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface"


SWEP.HoldType = "melee"


SWEP.Primary.Damage = 10
SWEP.Primary.Delay = 1
SWEP.UseHands = true
SWEP.Skin = 2




I did some snooping around in the files tho, and found the .vtf and .vmt files (Know how to edit these well), and I know they’re linked up to the actual model files, but I’m not too sure how.
I also googled how to access .mdl files, and various places told me I can use any ASCII text editor to look around in them, but that only gave me plenty of random symbols and gibberish.

I know I’m probably doing something terribly wrong, and it’s an easy fix, But I honestly have no clue what to do at this point.

So my main question is, how do I add more skins to models/sweps?

Thanks

You cannot add skins to any models without recompiling the model.

Could it not be done with model:SetMaterial?

Only if the model has ONE texture. In this case it does, so you are lucky.

Isn’t there is some hacky was to do it with 3D2D?

Recompiling the model just to get more skins is stupid anyway. A simpler way would be:

IMaterial:SetTexture("$basetexture", “path/to/texture”)

Unless I’m not getting something here.

That would override existing skins. The best way to do this in this particular case, is to do Ent:SetMaterial()

So how would I go about adding it to the code?
I can’t imagine it would just be


AddCSLuaFile()

SWEP.Slot = 3
SWEP.SlotPos = 1

SWEP.Base = "gms_base_weapon"
SWEP.PrintName = "Steel Pickaxe"
SWEP.ViewModel = "models/weapons/c_gms_pickaxe.mdl"
SWEP.WorldModel = "models/weapons/w_gms_pickaxe.mdl"

SWEP.Purpose = "Effective mining tool"
SWEP.Instructions = "Primary fire: Mine from a rock or rocky surface"

SWEP.HoldType = "melee"

SWEP.Primary.Damage = 10
SWEP.Primary.Delay = 1
SWEP.UseHands = true
Ent:SetMaterial(path/to/texture)