[Tutorial] The complete guide to decompiling and recompiling models!

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
What are you trying to recompile? Also, post your QC.
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Code:
$cd "C:\Program Files (x86)\Steam\SteamApps\e_spy\team fortress 2\tf\models\sawmill_stairsb"
$modelname "props_forest\sawmill_stairsb.mdl"
$model "body" "sawmill_stairs_reference.smd"
$cdmaterials "models\props_forest\"
$hboxset "default"
$hbox 0 "static_prop" -108.619  -119.336  -81.207  120.619  204.336  135.206
// Model uses material "sawmill_wood.vmt"
// Model uses material "sawmill_bolts.vmt"
$surfaceprop "wood"
$illumposition 6.000 42.500 27.000
$sequence idle "idle" fps 30.00
$collisionmodel "phymodel.smd" {

	$concave
	$mass 1.0
	$inertia 1.00
	$damping 0.00
	$rotdamping 0.00
}

No need to rename the SMDs, only the model name.
 

Peterm

Banned
Jun 1, 2009
171
8
if any1 see's this when it came to skinning a model i got this error

Created command line: "C:\Program Files\Steam\steamapps\broadwey\sourcesdk\bin\orangebox\bin\studiomdl.exe" -game "c:\program files\steam\steamapps\broadwey\team fortress 2\tf" -nop4 -nox360 "C:\Users\Mac\Desktop\Rock001burnt skin\mdldecompiler.qc"

qdir: "c:\users\mac\desktop\rock001burnt skin\"
gamedir: "c:\program files\steam\steamapps\broadwey\team fortress 2\tf\"
g_path: "C:\Users\Mac\Desktop\Rock001burnt skin\mdldecompiler.qc"
Building binary model files...
Working on "mdldecompiler.qc"
SMD MODEL C:\Users\Mac\Desktop\Rock001burnt skin/rock001_reference.smd
SMD MODEL C:\Users\Mac\Desktop\Rock001burnt skin/lod1_rock001_reference.smd
SMD MODEL C:\Users\Mac\Desktop\Rock001burnt skin/idle.smd
Lod 1: vertexes: 2020 (305 new)
---------------------
writing c:\program files\steam\steamapps\broadwey\team fortress 2\tf\models/props_recompiled\rock001.mdl:
Error opening c:\program files\steam\steamapps\broadwey\team fortress 2\tf\models/props_recompiled\rock001.mdl! (Check for write enable)
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Have you created the folder 'props_recompiled' in your 'tf/models' folder?
 

Peterm

Banned
Jun 1, 2009
171
8
ok i've done this what i've been trying to do is you know on hammer on a prop_static you get a skins tab im trying to create an extra 1 of them any1 help cuz i've recompiled adding the line for materials do i have to move the mdl to props_mining (it's rock 001
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Erm, your model and texture should be in unique folders. For example, not props_mining or any folder that is a part of the game but props_yourcustomfolder.
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Wherever you've pointed your $cdmaterials to.

For example, if you have $cdmaterials "models\props_yourfolder/" then you would create 'props_yourfolder' under 'tf/materials/models'.
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Your file structure confuses me. Why don't you put the material for the model in a folder of the same name instead of using prop_mining?