HL2 Compile Toolkit

Some0ne

Newbie
Joined
Dec 14, 2004
Messages
296
Reaction score
0
This is a programme i made which does all the compiling needed- textures, models, copying, everything- to get models to work ingame in hl2 and mods.

there are options to select which allow you to do parts of the compile if you need not do all of it. there are also some other extra things in the programme such as open qc file, or open vmt files.
this enables you to do everything from within the programme, provided you've entered your steamapps/username directory, and the model name.

all you have to do for this to work is make a certain folder and place all the files needed for the compile into it and then the programme does everything from there.

this is only a BETA version and you may(are quite likely to) encounter problems.
if so then please notify me of any problems, or if you have any other comments then you can email me at:
[email protected]
or you can just reply to this post

PLEASE READ THE 'HOW TO USE.TXT' BEFORE USING IT

here's teh link:


HL2 Compile Toolkit
 
Sounds cool, will it work with max files or does it only work for XSI?
 
you have to convert the max files(xsi or whatever) to .smds
but from there it does the rest.
il consider adding this if i find out that its working at the moment.

could you please post if youve tried it, even if you havent had any problems. just so i know how its getting on.

thanks
 
To be honest i wont be able to do much with it at the moment because i cant get hold of the SDK, but i got XSI installed as well just for importing and exporting stuff so when i get my sdk stuff sorted out ill give it a go.
 
im not sure. but i dont think you need sdk installed. provided you can get your model files to .smds then you should be able to do it.

i thought more people would be interested in this because i thought a lot of people were making custom models for hl2. its a shame no-one has taken notice because if my programme works then its a big time saver, as well as being more simple.
 
ok this is a little more information on what to do with the programme.

make sure you read the 'how to use.txt' but here is an outline of what you have to do:

extract this anywhere and then make a folder in the 'model_compiling_files' folder within its installation directory.
name this folder the same name as your model.
then put all the files that you need (tga's smd's and qc) into it.

ensure that in your qc file the $modelname command is set to "'your_model_name'\'your_model_name'.mdl".
and that $cdmaterials is set to "'your_model_name'"
this step is vitally important. if the qc file has this wrong then the model will not compile.

finally run the programme and enter your steam/username directory, which game its for and the model name into the opening window. then select the 'run compile script' option, hit next and choose the options in there as you need them.
 
It doesn't work for me, the compile window pops up and go away half a second later, do you use some sort of switch to make it disapear? I don't find any compiled model in the compiled_model_files folder or in the game directory.
 
firstly make sure you've done everything it says in the 'how to use.txt'. and i stress the part about the qc file.

here is an update in which the compile window will pause at the end to allow you to read any errors. give this ago and tell me what it says is wrong.
also tell me which options you are selecting to compile with.

here's the updated link:

HL2 Compile Toolkit v1.0.2 BETA
 
It still doesn't stop so I pressed the pause button as fast as you can say rabbit:

I use the run compile script/compile model option.

Ok I replaced all the files from the new version and I now get something different and it stops.
 
Last edited:
so the last section of your post is with the new version?

it looks like you havent entered your steamapps directory nor your modelname.
i tried compiling with just the compile model option and it worked for me.
try it again and make sure you enter the correct information into the opening window. and make sure steam is running :p

and what do these two lines mean in english?:
Le fichier spécifié est introuvable.
Le chemin d'accès spécifié est introuvable.

thanks for trying my programme, this is very helpful to me :)
 
I entered my steamapps and the modelname. Where do you save those informations? In the registry?
 
Last edited:
they are saved in a text file but you need not worry about that. you just change them from inside the programme.

when you try it do you get any message just above the "MODEL COMPILING COMPLETE" line, apart from the 'cannot be found' errors?
 
I've been trying to compile my model for a while now with no luck. I still have problems when I use your program but maybe you can help me.
The dos window gives me this:

C:\>set toolkit_dir=F:\HL2_Compile_Toolkit
CREATING MODEL FOLDERS...
COPYING MODEL FILES...
F:\HL2_Compile_Toolkit\model_compiling_files\smallbox\smallbox.smd
F:\HL2_Compile_Toolkit\model_compiling_files\smallbox\smallbox_idle.smd
2 file(s) copied.
F:\HL2_Compile_Toolkit\model_compiling_files\smallbox\smallbox.qc
1 file(s) copied.
COMPILING MODEL...
Unable to find gameinfo.txt. Solutions:

1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir
2. Run vconfig to specify which game you're working on.
3. Add -game <path> on the command line where <path> is the directory that gamei
nfo.txt is in.
Unable to find gameinfo.txt. Solutions:

1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir
2. Run vconfig to specify which game you're working on.
3. Add -game <path> on the command line where <path> is the directory that gamei
nfo.txt is in.


MODEL COMPILING COMPLETE
COPYING COMPILED MODEL FILES TO 'F:\HL2_Compile_Toolkit/COMPILED_MODEL_FILES/sma
llbox'...
F:\programs\Valve\Steam\SteamApps\netwarriordan\sourcesdk\hl2_sample_content\mod
els\smallbox\*.*
The system cannot find the file specified.
0 file(s) copied.
Press any key to continue . . .
 
Hi Some1,
tnx for that litle prog,

but i got the error message:
"unable the find gameinfo.txt"

got the error in for the texture and the model,

tnx again for your help
:)


edit: SAME AS ABOVE :)
 
ok iv looked into that quickly and i think iv fixed it.

HL2 Compile Toolkit v103 BETA

try that out and report back:)

thanks alot guys for trying the programme. i can asure you that when i get it working for you, it is an easier and faster way of compiling.
just bear with me until it works
 
Thanks for making a program that will make my life easier for me.
I got another error this time.

The system cannot find the path specified.
The system cannot find the path specified.
CREATING MODEL FOLDERS...
The syntax of the command is incorrect.
The syntax of the command is incorrect.
COPYING MODEL FILES...
The system cannot find the file specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
MODEL COMPILING COMPLETE
COPYING COMPILED MODEL FILES TO '/COMPILED_MODEL_FILES/'...
The syntax of the command is incorrect.
The system cannot find the path specified.
Press any key to continue . . .
 
ok that looks like you've just extracted the new version ontop of the old one. which leaves over a few files from the old one, which will affect the new one. what you need to do is delete the old version and then extract the new one. or just extract the new one to a different location.

try doing that and tell me what happens.
 
Hi some1,
think i got a prob with the .qc file

the error i got this time:
" ERROR: could not load file 'IDLE.smd' "

and after it abord the process,
the texture compile corect now,

my file are name :

badboy.qc
badboy.smd (model)
badboy_ske.smd (skeleton)
badboy_phy (physic)
badboy.tga

and my .qc look like that(after i took your simple):
Code:
$modelname "badboy\badboy.mdl"

$cdmaterials "badboy\"
$surfaceprop "default"
$scale 1.0

$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$eyeposition 0.000000 0.000000 0.000000

//reference mesh(es)
$body studio "badboy"


// 5 hit box(es)
$hbox 0 "Bone03" -2.317084 -2.666587 -1.415279 1.261858 0.000000 1.302325
$hbox 0 "Bone01" -1.750000 -8.563282 -1.000000 1.960000 0.030000 1.250000
$hbox 0 "Bone_Lefthand" -1.580000 -2.940000 -0.670000 1.450000 0.000000 1.010000
$hbox 0 "Bone04" -2.060000 -8.550000 -0.970000 1.670000 0.060000 1.280000
$hbox 0 "Bone26" -13.653684 -2.634464 -0.670000 1.500000 11.081972 6.252576

// 8 animation sequence(s)
$sequence "idle" "ACT_VM_IDLE" 1 "idle" fps 12 
$sequence "draw" "ACT_VM_DRAW" 1 "draw" fps 45 
$sequence "stab" "ACT_VM_HITCENTER" 1 "stab" fps 35 
$sequence "stab_miss" "ACT_VM_MISSCENTER" 1 "stab_miss" fps 40 
$sequence "midslash1" "ACT_VM_MISSCENTER" 1 "midslash1" fps 55 
$sequence "midslash2" "ACT_VM_MISSCENTER" 1 "midslash2" fps 55 

// End of QC script.

think i realy need help on the .qc file


plz and tnx again :)
 
my sample qc was just to show the $modelname line and $cdmaterials line. you were not supposed to copy the rest of it lol.

the error you are getting is because the compiler is looking for the sequence smd file, "idle.smd" but it doesnt exist and so cannot find it.

i dont know how much you know about model compiling and qc scripts but you will need to edit the sequence part of the qc to fit in with your model.

what is your model? is it a replacement weapon or a model for a map?
if its a replacement then you will need to include several different sequences to fit in with that weapon. but if it is a custom model for a map then it can have any number of sequences you like, it must have at least 1.
 
also you dont need these lines:

$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$eyeposition 0.000000 0.000000 0.000000

and you dont need those hitbox lines as they are. although you may need your own if you model is fairly complicated.
 
ok,tnx some1,

its the 1st model i make , i have done 3 map for hl1 a long time ago)

well in xsi, i create(from the create tab) a male model, modif the model a bit(but not to mutch,i want to test the compiling and geting it in the game 1st) i then open the valve Biped Guide place all in place ,
Create Rig From Guide and corect the weight map Envelopie,
the model as a uv map that i modif in ps and save as .tga

that about where i'm, i eport the 3 .smd

so you mean i have to add animation too,loll,

ps: while im here do you know a good tut on animation :)


plz and tnx alot again
 
Your right. I did extract over the old one. I reinstalled it and it worked. I ran it and my model compiled for the first time. :D My model showed up as nothing in the model viewer but I assume something is wrong in the qc file or the smd. I can't thank you enough for this program. But maybe now you can help troubleshoot the problem.
 
1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir
2. Run vconfig to specify which game you're working on.
3. Add -game <path> on the command line where <path> is the directory that gamei
nfo.txt is in.
Unable to find gameinfo.txt. Solutions:

1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir
2. Run vconfig to specify which game you're working on.
3. Add -game <path> on the command line where <path> is the directory that gamei
nfo.txt is in.


MODEL COMPILING COMPLETE
COPYING COMPILED MODEL FILES TO ...
 
Last edited:
Ti133700N-
i cant see why this is happening because gameinfo.txt is being copied to the your steam directory.

could you tell me what you have entered for your steamapps/username directory?

Lepetitprince-
that is even a bit beyond me since iv never compiled a rig before. is this a player model your making?
i dont think you need to do anything in the QC about the 'rig' itself but if it is a player model then you will need MANY animations for it. and i would really advise doing something simpler to test the compiling.

just start by trying to compile a box with a texture on it. this is the qc code you could use for it:

// QC Script
$modelname "box\box.mdl"

$cdmaterials "box\"
$surfaceprop "default"
$scale 1.0

$body studio "box_ref"

$sequence idle "box_ref" fps 1

$Mass 100
$Concave

// End of QC script.

the reason for "box_ref" which is model, as the sequence, is because if your 'idle' sequence is doing absolutely nothing then you could just use a model smd to get this affect. saves you making an 'idle.smd'

-NetWarriorDan
post the code of your QC file and one of your VMT files.
 
C:\Program Files\Valve\Steam\SteamApps\[username]
 
Last edited:
just to check what version are you using?

you can look in the how to use.txt to find out.
 
This is the stuff in the VMT file:
"LightmappedGeneric"
{
"$baseTexture" "smallbox/smallbox"
"$surfaceprop" "metal"

}



The stuff in the QC file:
$modelname "smallbox\smallbox.mdl"
$body "Body" "F:\HL2_Compile_Toolkit\model_compiling_files\smallbox\smallbox.smd"
$cdmaterials "smallbox\"
$surfaceprop "wood"
$sequence idle "smallbox_idle"
$collisionmodel "smallbox.smd" {


$concave

$mass 5.0

$inertia 1.00

$damping 0.00

$rotdamping 0.00

}
 
netwarriordan-
change your VMT file to read:

"VertexLitGeneric"
{
"$baseTexture" "smallbox/smallbox"
"$surfaceprop" "metal"
"$model" 1
}

lightmappedgeneric is for textures for maps. if it is for a model then it is vertexlitgeneric.

also change the "body" line of the QC to:

$body "Body" "smallbox.smd"

is your model ment ot be a physics or ragdoll model?

ti133700n-
this problem is more of a challenge to me. im going to look into the code and i will come up with a replacement file for you to try soon enough:)
 
Ti133700N-

place the batch file within the attached zip into:
"'your hl2 toolkit dir'\bin\batch files\"

then try compiling just the model and tell me what happens.
 
I've made the changes but this didn't fix the problem. My model is ment to be a normal physics prop.
 
do you want to post this on valve ERC + hl2modcentral? it would be good to put it on there too
 
C:\>set toolkit_dir=C:\...\Desktop\HL2_Compile_

C:\>Toolkit v103 BETA\HL2_Compile_Toolkit
 
Last edited:
Ti133700N-
do the same thing with this attached file

dassbaba im waiting until im happy with it and it is no longer BETA before i release it everywhere. but i will do once im finished.
btw have you tried the program?

netwarriordan-
try taking out the inertia, damping and rotdamping lines in your qc file.
 
It's better... lol
I think your prog has problems creating folders, it might not try to create to the right directory. I have nothing in my compiled_model_files folder.

COMPILING MODEL...
Unable to find gameinfo.txt. Solutions:

1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir
2. Run vconfig to specify which game you're working on.
3. Add -game <path> on the command line where <path> is the directory that gamei
nfo.txt is in.
Unable to find gameinfo.txt. Solutions:

1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir
2. Run vconfig to specify which game you're working on.
3. Add -game <path> on the command line where <path> is the directory that gamei
nfo.txt is in.


MODEL COMPILING COMPLETE
COPYING COMPILED MODEL FILES TO ..
 
Last edited:
what does this mean?:
Impossible de créer le répertoire ou le fichier.

the folders which are not being created is not the real problem here, it seems they r being denied access which i think is because you've put the program in documents and settings(dont ask me why).

but what im trying to solve is why it cant find gameinfo.txt. version1.0.3 of the program was to solve this problem as it did for the others. but why it doesnt work on yours is beyond me at the moment.
 
ok i got another batch file for you to try. do the same as you did with the rest with this one.

sorry about this although this is really helping me to get rid of more bugs in the scripts. thanks
 
C:\>set toolkit_dir=C:\HL2_Compile_Toolkit

Unable to find gameinfo.txt. Solutions:

1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir
2. Run vconfig to specify which game you're working on.
3. Add -game <path> on the command line where <path> is the directory that gamei
nfo.txt is in.
Unable to find gameinfo.txt. Solutions:

1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir
2. Run vconfig to specify which game you're working on.
3. Add -game <path> on the command line where <path> is the directory that gamei
nfo.txt is in.


MODEL COMPILING COMPLETE
COPYING COMPILED MODEL FILES TO ...
 
Last edited:
right i know whats wrong. its because your compiling for hl2 and i just realised that there is no hl2_sample_content like there is for the other games. so im going to have to do some major script rewriting to solve this. i might take a while to do this because im about to reinstall windows.
if you want your model then compile it for counter strike but choose copy to mod folder and input the hl2 folder desired.
 
Back
Top