Decompiling new source models


BERSERK3R
11-28-2007, 12:14 PM
I am not sure if DODS files have problems decompiling correctly, but when I am decompiling Team Fortres 2 models with the mdl decompiler i get the error "error loading model".

Is there any manual way or fix to DEcompile those models?

pedroleum
11-28-2007, 12:24 PM
yeah, you need to extract the models from the .gcf, open the mdl file in a hex editor (such as notepad++ (http://notepad-plus.sourceforge.net/de/site.htm))
and change one character:

original tf2 model (doesn't decompile) -> first line in the mdl
http://img136.imageshack.us/img136/6425/20071128201848ba6.png

original dod-model (does decompile) -> first line in the mdl
http://img136.imageshack.us/img136/8431/20071128201842oa3.png

so you have to change "IDSTO" to "IDST,"
then save it and you will be able to decompile that model with cannonfodder....


source: http://www.hl-improvement.com/forums/index.php?topic=8126.0

.

BERSERK3R
11-28-2007, 01:10 PM
Sorry but this does not work.
It seems that at least 2 v_weapon models already have IDST in it, but still get the error " cannot load model".

This is where I got lost...

EDIT:
(This is what i see when I edit the file)
IDST.[null][null][null]P8ôweapons\v_models\v_flamethrower_pyro.mdl

pedroleum
11-29-2007, 03:51 AM
cannot confirm atm. but i'll try this evening... playermodels decompiled just fine. but for now, change to hex mode and change the . to a , so it sais IDST, not IDST.

BERSERK3R
11-29-2007, 01:01 PM
cannot confirm atm. but i'll try this evening... playermodels decompiled just fine. but for now, change to hex mode and change the . to a , so it sais IDST, not IDST.

Dude thanks, I havn't noticed that small detail :eek: !
It seems to work now!

Trp. Jed
11-29-2007, 02:35 PM
<nerdmode>

Just in case you care - what you're doing is altering the model version ID inside the MDL header when you edit that character. EP1 models were version 44, TF2 et.al are version 46. You can see this if you drag the MDL onto my MDLTexInfoTool in the properties dump.

Anway, "," = 44 in decimal and "." = 46. So all you're doing is altering the MDL signature so that the decompiler will accept it.

</nerdmode>

BERSERK3R
11-29-2007, 02:46 PM
<nerdmode>

Just in case you care - what you're doing is altering the model version ID inside the MDL header when you edit that character. EP1 models were version 44, TF2 et.al are version 46. You can see this if you drag the MDL onto my MDLTexInfoTool in the properties dump.

Anway, "," = 44 in decimal and "." = 46. So all you're doing is altering the MDL signature so that the decompiler will accept it.

</nerdmode>
Thanks a lot Jed!

pedroleum
11-29-2007, 03:01 PM
nerd...

BERSERK3R
12-01-2007, 02:01 PM
Now decompiling works...another problem arises...

When I am compiling (StudioCompiler) a model I get a "Can't load MaterialSystem.dll"
Ep1, Dods, Tf2 all contain the file by default.

I did some research on google but all possible fixes were before ep1,tf2 engine, but I couldn't really get a working solution from this.

It's strange cause I never had any problem but I do since the newest SDK.

pedroleum
12-01-2007, 04:58 PM
i haven't looked for a solution, maybe there is one... but if you compile with "-engine ep1" as a sdk-launch option and you set everything on dod:s for compiling, then you can copy the just generated model-files from the dod-folder to the tf2 folder. it works just fine for me.

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.