Problem with custom models

Discussion in 'Mapping Questions & Discussion' started by honeymustard, Jul 2, 2010.

  1. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    698
    Positive Ratings:
    273
    I've recompiled one of the rocks with a new texture, using the exact same settings as it had when decompiled. It shows up fine in Hammer and in the Model Viewer, but in game it doesn't show up. However, it does when I set it to prop_dynamic. I get these errors in the compile log:

    Error! To use model "models/pl_boundary/rock003d.mdl"
    with prop_static, it must be compiled with $staticprop!
    Error loading studio model "models/pl_boundary/rock003d.mdl"!

    However, as I said, I compiled the model using the previous settings, which do use $staticprop. The QC is as follows:

    Code:
    $modelname "pl_boundary\rock003d.mdl"
    $model "Body" "rock003_reference.smd"
    $lod 85
     {
      replacemodel "rock003_reference" "lod1_rock003_reference"
    }
    $cdmaterials "pl_boundary/"
    $texturegroup skinfamilies
    {
    	{ "rock003d.vmt" }
    }
    $hboxset "default"
    $hbox 0 "static_prop" -105.552  -201.264  -0.000  105.432  201.264  234.546
    // Model uses material "rock003d.vmt"
    $surfaceprop "dirt"
    $illumposition -0.060 0.000 117.273
    $sequence idle "idle" fps 30.00
    $collisionmodel "phymodel.smd" {
    
    	$concave
    	$mass 80.0
    	$inertia 1.00
    	$damping 0.00
    	$rotdamping 0.00
    }
     
  2. eyefork

    eyefork L3: Member

    Messages:
    130
    Positive Ratings:
    94
    You need to add the $staticprop command to your qc file.
    Code:
    $modelname "pl_boundary\rock003d.mdl"
    $model "Body" "rock003_reference.smd"
    $staticprop   // LIKE THIS
    $lod 85
     {
      replacemodel "rock003_reference" "lod1_rock003_reference"
    }
    $cdmaterials "pl_boundary/"
    $texturegroup skinfamilies
    {
    	{ "rock003d.vmt" }
    }
    $hboxset "default"
    $hbox 0 "static_prop" -105.552  -201.264  -0.000  105.432  201.264  234.546
    // Model uses material "rock003d.vmt"
    $surfaceprop "dirt"
    $illumposition -0.060 0.000 117.273
    $sequence idle "idle" fps 30.00
    $collisionmodel "phymodel.smd" {
    
    	$concave
    	$mass 80.0
    	$inertia 1.00
    	$damping 0.00
    	$rotdamping 0.00
    }
     
    • Thanks Thanks x 1
  3. Mick-a-nator

    aa Mick-a-nator

    Messages:
    640
    Positive Ratings:
    314
    Your qc doesn't actually contain "$staticprop". I think you're looking at "$hbox 0 "static_prop"..." which is something completely different (in fact, I don't think you need it at all unless the model has bones, I certainly have never needed it) it is just pat out by the decompiler.

    eyefork is ninja, but you need to explain to him the problem ;)

    EDIT: the decompiler isn't actually all that great at getting the qc right. A number of times I've had to re-write the qc manually, leaving out any unnecessary code, to get it to work. I mean, it is a good thing to refer to, but don't rely on it being 100% right all the time.
     
    • Thanks Thanks x 1
    Last edited: Jul 2, 2010
  4. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    698
    Positive Ratings:
    273
    Right, thanks guys! I wasn't aware that the decompiler wasn't always 100% right. Will bear that in mind in future.
     
  5. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    698
    Positive Ratings:
    273
    edit: nevermind, I fixed it.
     
    Last edited: Jul 5, 2010