Need some help with modeling

Well I need help with modeling, but this is for my friend taconinja since his internet is not working.
He asked me to post this.

He needs help with whatever that is.

Tell him this:

That isn’t how StudioMDL looks for files. First of all, you shouldn’t put your .smd files and .qc in those folders. That’ll end up confusing you. Leave them in an easy-to-access folder like C:/Models/Stickman.

You’ll want to take advantage of the variable “$cd”. This means “compile directory”, and points the compiler towards where it should look for the .smd references. In the above case, you’d set “$cd” to “C:/Models/Stickman/”.

$modelname just tells the compiler what to name the compiled model, and it’s relative to the “models/” directory of any game. StudioMDL will place the compiled .mdl file based on your Source SDK Game Configuration - that’s the “current game” in the Source SDK window.

So if your current game configuration is “Half-Life 2” and your $modelname is “models/stickman.mdl”, it’ll put it in the wrong place:

steamapps/yourname/half life 2/hl2/models/models/stickman.mdl

Remember that $modelname is relative to the “models” directory.

You should get rid of all slashes in your .smd names. That’ll confuse the compiler a lot. Also, remember that for simple collision models you can just fill in the name of your reference .smd instead of making a collision .smd and it’ll generate a collision model.

Here’s a revised .qc script. Note that any line with // will be ignored by the compiler, you can copy/paste the whole thing.



$cd "C:/Models/Stickman/" //Will look for all .smd files in C:/Models/Stickman/
$modelname "stickman.mdl" //Will place the model in root/models/stickman.mdl
$cdmaterials "models/stickman" //Will look for materials in root/materials/models/stickman/

$scale 1.0
$surfaceprop "Metal"

$body "Body" "stickman.smd" //Will look for C:/Models/Stickman/stickman.smd

$sequence "idle" "stickman.smd" fps 30 //Will look for C:/Models/Stickman/stickman.smd

$collisionmodel "stickman_collision.smd" //Will look for C:/Models/Stickman/stickman_collision.smd
{
$mass 40
}


$cd stands for change directory, just like windows command line. It changes the active directory. Technically, you could change the active directory several times within the file, if your files were located all over the place, or you could alternately place the long location of the file without any cd commands, like


$modelname "stickman.mdl" 
$cdmaterials "models/stickman"

$scale 1.0
$surfaceprop "Metal"

$body "Body" "C:/Models/Stickman/stickman.smd"

$sequence "idle" "C:/Models/Stickman/stickman.smd" fps 30

$collisionmodel "C:/Models/Stickman/stickman_collision.smd"
{
$mass 40
}

Alright, thank you ALL for your help, I’ve gotten the model into HL2 engine, but, it’s untextured and isn’t a ragdoll. I know you’re probably thinking “Wow, he’s trying to make a ragdoll without doing it right? Idiot.” I have the bones jointed to the parts of the model I want, and it’s HL2 bones. I went to put that in my FPSB thread, but my internet died (FP went down first, so I had to resort to FPSB, then my router took a tumble.)
What would I have to change in the QC to:
A: Make it jointed on the boned (Ragdoll),
B: Make it textured (I have stickman.vtf and stickman.vmt both in c:/models/stickman)

Also, a thanks to uber for posting this.

Also, here’s a little proof of me kind of knowing what I’m going.

The textures have to go in C:/Program Files/Steam/steamapps/username/game/materials/models/stickman., and joints don’t have spaces in but underscores ( _ ).

So, should I rename all the bones in the model viewer, or what? (I’m EXTREMELY new to this…)

Bones can have spaces in their names.

[editline]05:50PM[/editline]

To make it a ragdoll, instead of $collisionmodel, use $collisionjoints.

Then you can set the joint constraints in the model viewer tab “physics”, then “generate qc” and paste the constraints into your qc.

Well, I did the "$collisionjoints thing, and tested it, and it WAS a ragdoll, but a lot of it was disconnected from the body, and when I shot it to move it, the game crashed ( :byodood: ) . I don’t quite know what you mean with the second part of your directions, though, because I’m a RETARD.