Creating SpawnIcons

From GMod Wiki

Jump to: navigation, search

Contents

How to create spawnicons for garrysmod

Around the last big update in January where GMod moved to the new source engine, you are able to create spawnicons for SWEPs,SENTs and Vehicles. This article shows you how to create those using PhotoShop

Getting started

Get VTFEdit. You may need the .NET Framework too but it's all explained on that website. After you installed it, you can open vtf files in Photoshop.

Creating an icon

For an icon to work, you need two files: The actual texture (the vtf) and the materials-file (vmt) which is simply just a textfile. Both need to be placed in /materials/vgui/entities of your garrysmod directory and should have the name of the SENT/SWEP/Vehicle you code.

Let's say, your coding a SENT called watermelon. This needs you to create two empty textfiles in /materials/vgui/entities with the following names: 'watermelon.vtf' and watermelon.vmt. The content for the watermelon.vmt has to be the following:

"UnlitGeneric" 
{ 
	"$basetexture"		"vgui/entities/watermelon" 
	"$vertexcolor" 		1 
	"$vertexalpha" 		1 
	"$nolod" 			1 
}

Please note the correct path in that textfile using "watermelon" and slashes (/) instead of backslashes (\).

After we created both files, we are going to create the actual logo with Photoshop. Therefore open the watermelon.vtf with Photoshop. It will ask you to select a size. Please insert 128 px for height and 128 px for width.

Now you can create/insert an image.

Saving the Icon

After you created and have chosen to save that image as a vtf file, you will see a popup asking you for several options. Sure, you could just press "OK", but this results into saving the texture with irrelevant data which just will increase it's size for nothing.

Therefore, please chose the following options. It will result into a filesize of 8.07 KB with a really good image quality.

Vtf edit.png

Note, that these two checkboxes in "Flags" are the only one which have to be checked.

I don't have Photoshop

That's no problem at all. Use Paint.NET (google it) and get the VTF Plugin (on the same page like the photoshop-addon). The settings are basically the same.

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox