SMD Compiling?

So, after a while and some video tutorials I was finally able to make my first SMD’s with Maya, But when I tried to compile them with StudioMDL I get this:

http://dl.dropbox.com/u/4249868/CMDthingy.JPG

I think the problem might derive from the QC file which I had to write from scratch… First time aswell.


$modelname "K:\Chair.mdl"

$scale 1
$surfaceprop "metal"
$keyvalues { "prop_data" { "base" "Wooden.Large" } }
$body "Model" "Chair"
$sequence idle "Chair_idle" loop fps 1

$surfaceprop "metal"

$keyvalues {"prop_data" {"base" "metal.medium" }}

$collisionmodel "chair_phys-smd {
 // mass in kilograms

	$concave
	$mass 2.0
}

Please tell me if there’s anything wrong with the QC file or you know a way to solve this.

I am also trying to make a physics object.

$modelname is the name/location of the compiled file relative to your game/mod directory…
For example:

$modelname skybox/mountains/mountain1

would result in mountain1.mdl being placed in models/skybox/mountains/

Also, you do not need to have “.mdl” at the end for it to work.

Well, I guess that fixes one issue, but the one that stops the compiling still stands.


ERROR: Keyvalue block missing matching braces.

That probberly because you have two different versions of the same command, you only need one of the $keyvalue commands you have there as they are both propdata.

A good place to look when you have errors is here: http://kathar.net/hl2modding/errors.php

Well, after you said that I noticed a couple of other duplicated commands.
Now that those are cleared, I’m faced with another error:


ERROR: k:\maya\smd\chair.gc<7>: - bad command

I think it might point towards my BAT file which is compiling it.


"C:\Program Files (x86)\Steam\steamapps\afromana\sourcesdk\bin\orangebox\bin\studiomdl.exe" "K:\Maya\SMD\Chair.smd"
pause

The page you linked me to explained the error message, but not any way to solve this specific problem.

Also, when making this, I was following a tutorial which was mainly made for Maya 7, I might have done something wrong myself aswell.

Sorry for being such a bother, but Ive been trying for about 2 years to get Maya modeling working in Source.

I’d recommend using GUI Studio MDL Compiler instead. Works much better.

Where may I find this amazing tool?

Edit: Nevermind, I found it

Edit again: It seems that it gives me the same error, must be my QC file.

This is my current QC file:


$modelname "Chair"

$scale 1
$body "body" "Chair.smd"
$sequence idle "Chair_idle.smd" loop fps 1
$surfaceprop "metal"
$keyvalues {"prop_data" {"base" "metal.medium" } }

$collisionmodel "Chair_phy.smd {
 // mass in kilograms

	$concave
	$mass 2.0
}

Any obvious faults in it?

You’ve got no $cdmaterials path.

It still thinks something is a bad command.

Change


$collisionmodel "Chair_phy.smd {
 // mass in kilograms

	$concave
	$mass 2.0
}

to


$collisionmodel "Chair_phy.smd" {

	$concave
	$mass 2.0
}

[editline]01:09PM[/editline]

also delete this crap


$keyvalues {"prop_data" {"base" "metal.medium" } }

The warning about the missing DLL can be fixed by adding the flag “-nop4” to the command line.

$keyvalues { “prop_data” { “base” “metal.medium” } }

Add spaces in front of the brackets. I’ve noticed the compiler throwing hissy fits otherwise. Might fix it. Though it depends if you need prop date or not. If it isn’t crucial I’d cut it out completely.

1st of all, removing the comment does absolutely nothing.

2nd, he already said he removed the duplicate commands.

He corrected the collision model path missing a quotation mark, though.

I think Sparkwire meant get rid of it completely.

I don’t even know why you would need to use that unless you’re using custom prop data.

Try this and see if it works.


$modelname "props/chair.mdl"
$cdmaterials "models\props"
$body        "body"    "chair.smd"
$surfaceprop "metal"
$collisionmodel "chair_phy.smd" {

    $mass 1.0
    $inertia 3.00
    $concave
}


This will create a model in your game/models/props directory.