Broken vending machine

Mystic Monkey

L5: Dapper Member
Jan 24, 2011
224
12
For my map I'm trying to reskin a vending machine I got from GMod.
Importing things from GMod, texture and all is usually no problem. But when I try to reskin it it's usually hit or miss whenever it'll work or not.

I'm sure I've done everything right and properly addressed the .qc, .smd and .vmt files...
Code:
$ModelName "mystic_monkey\vending_machine\dispenser.mdl"

$StaticProp

$BodyGroup "Body"
{
    studio "dispenser_reference.smd"
}

$LOD 100
{
    replacemodel "dispenser_reference.smd" "dispenser_reference_lod1.smd"
}

$SurfaceProp "plastic_barrel"

$Contents "solid"

$MaxEyeDeflection 90

$CDMaterials "models\mystic_monkey\vending_machine\"

$TextureGroup "skinfamilies"
{
    { "chaos_cola" }
    { "chaos_soda" }
}

$CBox 0 0 0 0 0 0

$BBox -21.661 -26.375 -48.285 21.423 26.334 48.293


$Sequence "idle" {
    "dispenser_anims\idle.smd"
    fadein 0.2
    fadeout 0.2
    fps 30
}

$CollisionModel "dispenser_physics.smd"
{
    $mass 600
    $inertia 1
    $damping 0
    $rotdamping 0
    $rootbone " "
    $concave

}

$KeyValues
{
    prop_data
    {
        "base" "Metal.Large"
    }
}
...but I don't know why it's not working.
Untitled.png

I had the same problem with another object with a custom skin, it too had a broken texture. So I decided to just delete it and re-imported it again and that time around it functioned properly but I did not know what I did right that time.

Am I missing some small detail I should be doing?
 

Mystic Monkey

L5: Dapper Member
Jan 24, 2011
224
12
All I did was copy-paste the original vending machine .vtf and .vmt, change the .vtf and re-address the $basetexture in .vmt.
Code:
"VertexLitGeneric"
{
   "$basetexture" "models/mystic_monkey/vending_machine/dispenser"
   "$surfaceprop" "metal"

   "$envmap" "env_cubemap"
   "$envmaptint" "[ .5 .5 .5]"
   "$envmapcontrast" "1.1"
   "$envmapsaturation" "[1 1 1]"
}
I figured maybe something is broken in the $env- commands and tried it without them, given a non-shiny vending machine would be fine, but thats still broken.

Just to clarify my models are in:
E:\Steam\steamapps\common\Team Fortress 2\tf\models\mystic_monkey\vending_machine
and the required materials are in
E:\Steam\steamapps\common\Team Fortress 2\tf\materials\models\mystic_monkey\vending_machine

I'm positive I addressed the .qc and .vmt right.

*Edit- I tried it with \ instead of /, still doesn't work.
 
Last edited:

Litronom

L1: Registered
Oct 22, 2016
12
2
Try the following:
-Open your dispenser.vtf with VTFEdit
-Go to "Tools" -> "Create VMT File"
-Use "VertexlitGeneric" as the shader and have everything unticked -> Create
-Save it as "chaos_cola.vmt"
-Check again in hlmv.exe
-If it shows up now, add the other parameters to your vmt
 

Mystic Monkey

L5: Dapper Member
Jan 24, 2011
224
12
Thank you. Through that I figured out what I did wrong.

I thought $basetexture was suppose to be addressed for the model itself when it should be addressing the .vtf file. I normally don't make that mistake but for some reason I overlooked it.
 
Last edited: