Studio MDL "unknown model option $cdmaterials"

In process of long work over headhack, i faced a problem without exit.

$cd “C:\Documents and Settings\Admin\Рабочий стол\assassin\alyxnude”
$modelname “Diana\Diana.mdl”
$model “GMOD_Alyx_Nude” “Diana.smd” {
flexfile “mdldecompiler_expressions.vta” {
flex “upper_right” frame 1
flex “lower_right” frame 2
flex “upper_left” frame 3
flex “lower_left” frame 4
flexpair “AU1” 1.0 frame 5
flexpair “AU2” 1.0 frame 6
flexpair “AU4” 1.0 frame 7
flexpair “AU1AU2” 1.0 frame 8
flexpair “AU12” 1.0 frame 9
flexpair “AU15” 1.0 frame 10
flexpair “AU17” 1.0 frame 11
flexpair “AU10” 1.0 frame 12
flexpair “AU10S” 1.0 frame 13
flex “AU16” frame 14
flexpair “AU6” 1.0 frame 15
flexpair “AU9” 1.0 frame 16
flexpair “AU25” 1.0 frame 17
flexpair “AU18” 1.0 frame 18
flexpair “AU22” 1.0 frame 19
flexpair “AU20” 1.0 frame 20
flex “AU32” frame 21
flex “AU24” frame 22
flex “AU38” frame 23
flex “AU31” frame 24
flexpair “AU26” 1.0 frame 25
flexpair “AU27” 1.0 frame 26
flexpair “AU13” 1.0 frame 27
flex “AU50” frame 28
flex “AU51” frame 29
flex “AU52” frame 30
flex “AU53” frame 31
flex “AU53WIDE” frame 32
flex “AU53OPEN” frame 33
flex “AU54” frame 34
flex “AU55” frame 35
flex “AU56” frame 36
flex “upper_right” frame 38
flex “lower_right” frame 40
flex “upper_left” frame 42
flex “lower_left” frame 44
}
eyeball righteye ValveBiped.Bip01_Head1 -1.340 -2.930 65.150 eyeball_r 1.000 4.000 pupil_r 0.700
eyeball lefteye ValveBiped.Bip01_Head1 1.350 -2.930 65.150 eyeball_l 1.000 -4.000 pupil_l 0.700
// If you uncomment the following lines the eyes will be closed
// I’m including it anyway in case anyone wants to experiment
// eyelid upper_right “mdldecompiler_expressions.vta” lowerer 38 -0.340000 neutral 38 0.240000 raiser 38 0.290000 split 0.1 eyeball righteye
// eyelid lower_right “mdldecompiler_expressions.vta” lowerer 40 -0.240000 neutral 40 -0.250000 raiser 40 -0.160000 split 0.1 eyeball righteye
// If you uncomment the following lines the eyes will be closed
// I’m including it anyway in case anyone wants to experiment
// eyelid upper_left “mdldecompiler_expressions.vta” lowerer 42 -0.340000 neutral 42 0.240000 raiser 42 0.290000 split -0.1 eyeball lefteye
// eyelid lower_left “mdldecompiler_expressions.vta” lowerer 44 -0.240000 neutral 44 -0.250000 raiser 44 -0.160000 split -0.1 eyeball lefteye
mouth 0 “mouth” ValveBiped.Bip01_Head1 0.000 1.000 0.000
flexcontroller eyelid right_lid_raiser “range” 0.000 1.000
flexcontroller eyelid left_lid_raiser “range” 0.000 1.000
flexcontroller eyelid right_lid_tightener “range” 0.000 1.000
flexcontroller eyelid left_lid_tightener “range” 0.000 1.000
flexcontroller eyelid right_lid_droop “range” 0.000 1.000
flexcontroller eyelid left_lid_droop “range” 0.000 1.000
flexcontroller eyelid right_lid_closer “range” 0.000 1.000
flexcontroller eyelid left_lid_closer “range” 0.000 1.000
flexcontroller eyelid blink “range” 0.000 1.000
flexcontroller brow right_inner_raiser “range” 0.000 1.000
flexcontroller brow left_inner_raiser “range” 0.000 1.000
flexcontroller brow right_outer_raiser “range” 0.000 1.000
flexcontroller brow left_outer_raiser “range” 0.000 1.000
flexcontroller brow right_lowerer “range” 0.000 1.000
flexcontroller brow left_lowerer “range” 0.000 1.000
flexcontroller nose right_cheek_raiser “range” 0.000 1.000
flexcontroller nose left_cheek_raiser “range” 0.000 1.000
flexcontroller nose wrinkler “range” 0.000 1.000
flexcontroller nose dilator “range” 0.000 1.000
flexcontroller mouth right_upper_raiser “range” 0.000 1.000
flexcontroller mouth left_upper_raiser “range” 0.000 1.000
flexcontroller mouth right_corner_puller “range” 0.000 1.000
flexcontroller mouth left_corner_puller “range” 0.000 1.000
flexcontroller mouth right_corner_depressor “range” 0.000 1.000
flexcontroller mouth left_corner_depressor “range” 0.000 1.000
flexcontroller mouth chin_raiser “range” 0.000 1.000
flexcontroller mouth lower_lip “range” 0.000 1.000
flexcontroller mouth right_cheek_puffer “range” 0.000 1.000
flexcontroller mouth left_cheek_puffer “range” 0.000 1.000
flexcontroller mouth sneer_left “range” 0.000 1.000
flexcontroller mouth poorgirl “range” 0.000 1.000
flexcontroller mouth pukeup “range” 0.000 1.000
flexcontroller mouth pukedown “range” 0.000 1.000
flexcontroller mouth smile “range” 0.000 1.000
flexcontroller mouth smilewide “range” 0.000 1.000
flexcontroller mouth smileopen “range” 0.000 1.000
flexcontroller mouth disgust “range” 0.000 1.000
flexcontroller mouth angry “range” 0.000 1.000
flexcontroller mouth ping “range” 0.000 1.000
flexcontroller phoneme right_part “range” 0.000 1.000
flexcontroller phoneme left_part “range” 0.000 1.000
flexcontroller phoneme right_puckerer “range” 0.000 1.000
flexcontroller phoneme left_puckerer “range” 0.000 1.000
flexcontroller phoneme right_funneler “range” 0.000 1.000
flexcontroller phoneme left_funneler “range” 0.000 1.000
flexcontroller phoneme right_stretcher “range” 0.000 1.000
flexcontroller phoneme left_stretcher “range” 0.000 1.000
flexcontroller phoneme bite “range” 0.000 1.000
flexcontroller phoneme presser “range” 0.000 1.000
flexcontroller phoneme tightener “range” 0.000 1.000
flexcontroller phoneme jaw_clencher “range” 0.000 1.000
flexcontroller phoneme jaw_drop “range” 0.000 1.000
flexcontroller phoneme mouth_stretch “range” 0.000 1.000
flexcontroller head head_rightleft “range” 0.000 1.000
flexcontroller head head_updown “range” 0.000 1.000
flexcontroller head head_tilt “range” 0.000 1.000
flexcontroller eyes eyes_updown “range” 0.000 1.000
flexcontroller eyes eyes_rightleft “range” 0.000 1.000
flexcontroller body body_rightleft “range” 0.000 1.000
flexcontroller chest chest_rightleft “range” 0.000 1.000
flexcontroller head head_forwardback “range” 0.000 1.000
flexcontroller gesture gesture_updown “range” 0.000 1.000
flexcontroller gesture gesture_rightleft “range” 0.000 1.000
localvar upper_right_raiser
%upper_right_raiser = ( right_lid_raiser * (( 1.000 - ( right_lid_droop * 0.800)) * (( 1.000 - right_lid_closer) * ( 1.000 - blink))))
localvar upper_right_neutral
%upper_right_neutral = (( 1.000 - ( right_lid_droop * 0.800)) * (( 1.000 - right_lid_raiser) * (( 1.000 - right_lid_closer) * ( 1.000 - blink))))
localvar upper_right_lowerer
%upper_right_lowerer = ( right_lid_closer + ( blink * ( 1.000 - right_lid_closer)))
localvar upper_left_raiser
%upper_left_raiser = ( left_lid_raiser * (( 1.000 - ( left_lid_droop * 0.800)) * (( 1.000 - left_lid_closer) * ( 1.000 - blink))))
localvar upper_left_neutral
%upper_left_neutral = (( 1.000 - ( left_lid_droop * 0.800)) * (( 1.000 - left_lid_raiser) * (( 1.000 - left_lid_closer) * ( 1.000 - blink))))
localvar upper_left_lowerer
%upper_left_lowerer = ( left_lid_closer + ( blink * ( 1.000 - left_lid_closer)))
localvar lower_right_raiser
%lower_right_raiser = ( right_lid_closer + ( blink * ( 0.500 * ( 1.000 - right_lid_closer))))
localvar lower_right_neutral
%lower_right_neutral = (( 1.000 - right_lid_closer) * (( 1.000 - ( 0.500 * blink)) * (( 1.000 - ( right_lid_tightener * 0.500)) * ( 1.000 - ( right_cheek_raiser * 0.250)))))
localvar lower_right_lowerer
%lower_right_lowerer = 0.000
localvar lower_left_raiser
%lower_left_raiser = ( left_lid_closer + ( blink * ( 0.500 * ( 1.000 - left_lid_closer))))
localvar lower_left_neutral
%lower_left_neutral = (( 1.000 - left_lid_closer) * (( 1.000 - ( 0.500 * blink)) * (( 1.000 - ( left_lid_tightener * 0.500)) * ( 1.000 - ( left_cheek_raiser * 0.250)))))
localvar lower_left_lowerer
%lower_left_lowerer = 0.000
%AU1R = ( right_inner_raiser * (( 1.000 - right_outer_raiser) * ( 1.000 - right_lowerer)))
%AU1L = ( left_inner_raiser * (( 1.000 - left_outer_raiser) * ( 1.000 - left_lowerer)))
%AU2R = ( right_outer_raiser * (( 1.000 - right_inner_raiser) * ( 1.000 - right_lowerer)))
%AU2L = ( left_outer_raiser * (( 1.000 - left_inner_raiser) * ( 1.000 - left_lowerer)))
%AU1AU2R = ( right_inner_raiser * ( right_outer_raiser * ( 1.000 - right_lowerer)))
%AU1AU2L = ( left_inner_raiser * ( left_outer_raiser * ( 1.000 - left_lowerer)))
%AU4R = right_lowerer
%AU4L = left_lowerer
%AU6R = right_cheek_raiser
%AU6L = left_cheek_raiser
%AU9R = wrinkler
%AU9L = wrinkler
%AU38 = dilator
%AU13R = right_cheek_puffer
%AU13L = left_cheek_puffer
%AU10SR = sneer_left
%AU10SL = sneer_left
%AU50 = poorgirl
%AU51 = pukeup
%AU52 = pukedown
%AU53 = smile
%AU53WIDE = smilewide
%AU53OPEN = smileopen
%AU54 = disgust
%AU55 = angry
%AU56 = ping
localvar right_open
%right_open = ( smile + (( right_part * ( 1.000 - smile)) + ( right_puckerer + ( right_funneler + (( right_upper_raiser * 0.500) + ( lower_lip * 0.500))))))
localvar left_open
%left_open = ( smile + (( left_part * ( 1.000 - smile)) + ( left_puckerer + ( left_funneler + (( left_upper_raiser * 0.500) + ( lower_lip * 0.500))))))
localvar right_lip_suppressor
%right_lip_suppressor = (( 1.000 / %right_open) * (( 1.000 - presser) * ( 1.000 - bite)))
localvar left_lip_suppressor
%left_lip_suppressor = (( 1.000 / %left_open) * (( 1.000 - presser) * ( 1.000 - bite)))
%AU10R = ( right_upper_raiser * ( right_upper_raiser * ( 0.500 * %right_lip_suppressor)))
%AU10L = ( left_upper_raiser * ( left_upper_raiser * ( 0.500 * %left_lip_suppressor)))
%AU25R = ( right_part * (( right_part * %right_lip_suppressor) * ( 1.000 - smile)))
%AU25L = ( left_part * (( left_part * %left_lip_suppressor) * ( 1.000 - smile)))
%AU18R = ( right_puckerer * 1.500)
%AU18L = ( left_puckerer * 1.500)
%AU22R = ( right_funneler * 1.500)
%AU22L = ( left_funneler * 1.500)
%AU17R = ( chin_raiser * (( 1.000 - ( jaw_drop * 0.500)) * (( 1.000 - bite) * (( 1.000 - ( 0.600 * ( %AU25R + ( %AU18R + %AU22R)))) * ( 1.000 - smile)))))
%AU17L = ( chin_raiser * (( 1.000 - ( jaw_drop * 0.500)) * (( 1.000 - bite) * (( 1.000 - ( 0.600 * ( %AU25L + ( %AU18L + %AU22L)))) * ( 1.000 - smile)))))
localvar right_depressor_suppressor
%right_depressor_suppressor = (( 1.000 / (( %AU18R * 0.800) + (( %AU22R * 0.800) + ( %AU17R + ( bite + ( right_corner_puller + ( right_stretcher + right_corner_depressor))))))) * (( 1.000 - ( jaw_drop * 0.500)) * ( 1.000 - ( smile * 0.500))))
localvar left_depressor_suppressor
%left_depressor_suppressor = (( 1.000 / (( %AU18L * 0.800) + (( %AU22L * 0.800) + ( %AU17L + ( bite + ( left_corner_puller + ( left_stretcher + left_corner_depressor))))))) * (( 1.000 - ( jaw_drop * 0.500)) * ( 1.000 - ( smile * 0.500))))
%AU15R = ( right_corner_depressor * ( right_corner_depressor * %right_depressor_suppressor))
%AU15L = ( left_corner_depressor * ( left_corner_depressor * %left_depressor_suppressor))
localvar right_corner_suppressor
%right_corner_suppressor = (( 1.000 / (( %AU18R * 0.800) + (( %AU22R * 0.800) + ( %AU17R + ( bite + ( right_corner_puller + ( right_stretcher + right_corner_depressor))))))) * (( 1.000 - ( jaw_drop * 0.500)) * ( 1.000 - smile)))
localvar left_corner_suppressor
%left_corner_suppressor = (( 1.000 / (( %AU18L * 0.800) + (( %AU22L * 0.800) + ( %AU17L + ( bite + ( left_corner_puller + ( left_stretcher + left_corner_depressor))))))) * (( 1.000 - ( jaw_drop * 0.500)) * ( 1.000 - smile)))
%AU12R = ( right_corner_puller * ( right_corner_puller * %right_corner_suppressor))
%AU12L = ( left_corner_puller * ( left_corner_puller * %left_corner_suppressor))
%AU20R = ( right_stretcher * ( right_stretcher * %right_corner_suppressor))
%AU20L = ( left_stretcher * ( left_stretcher * %left_corner_suppressor))
%AU32 = bite
%AU24 = ( presser + (( 1.000 - presser) * tightener))
%AU31 = ( jaw_clencher * ( jaw_clencher / ( jaw_clencher + jaw_drop)))
%AU26R = jaw_drop
%AU26L = jaw_drop
%AU27R = mouth_stretch
%AU27L = mouth_stretch
%AU16 = ( lower_lip * (( lower_lip * ( 0.250 * ( %right_lip_suppressor + %left_lip_suppressor))) * ( 1.000 - ( 0.500 * ( %AU27R + %AU27L)))))
localvar mouth
%mouth = (( %AU27R * 0.500) + (( %AU27L * 0.500) + (( %AU22R * 0.350) + (( %AU22L * 0.350) + (( %AU18R * 0.250) + (( %AU18L * 0.250) + (( %AU25R * 0.350) + (( %AU25L * 0.350) + (( %AU32 * 0.500) + ( %AU16 * 0.400))))))))))

$cdmaterials “C:\Documents and Settings\Admin\Рабочий стол\Diana\materials\models\Diana_Face”
$cdmaterials “models hespectator\assassin3”
$mostlyopaque
$attachment “eyes” “ValveBiped.Bip01_Head1” 2.72 -3.33 -0.01 rotate 0.00 -80.10 -90.00
$attachment “nose” “ValveBiped.Bip01_Head1” 1.70 -5.30 0.00 rotate 0.00 -80.00 -90.00
$attachment “mouth” “ValveBiped.Bip01_Head1” 0.20 -4.90 -0.00 rotate 0.00 -80.00 -90.00
$attachment “amulet” “ValveBiped.Bip01_Spine4” 0.30 5.00 -0.00 rotate -0.00 90.00 90.00
$attachment “chest” “ValveBiped.Bip01_Spine4” -4.00 4.00 -0.00 rotate -0.00 83.00 90.00
$attachment “hips” “ValveBiped.Bip01_Pelvis” 0.00 -0.00 -0.00 rotate -90.00 -90.00 0.00
$attachment “lefthand” “ValveBiped.Bip01_L_Hand” 3.50 -0.50 0.00 rotate -0.00 -0.00 0.00
$attachment “righthand” “ValveBiped.Bip01_R_Hand” 3.50 -0.50 0.00 rotate -0.00 -0.00 0.00
$attachment “pouch1” “ValveBiped.Bip01_Pelvis” 5.50 1.00 2.00 rotate -90.00 -90.00 0.00
$attachment “pouch2” “ValveBiped.Bip01_Pelvis” 6.50 0.50 -2.00 rotate -90.00 -90.00 0.00
$attachment “physgun_attachment” “ValveBiped.physgun_attachment” -0.00 -0.00 -0.00 rotate -90.00 -90.00 0.00
$attachment “emp_LH” “ValveBiped.Anim_Attachment_LH” 0.00 0.00 5.00 rotate -90.00 -90.00 0.00
$attachment “emp” “ValveBiped.Bip01_Spine” 0.00 0.00 0.00 rotate -90.00 -90.00 0.00
$attachment “Emp_Holster” “ValveBiped.Bip01_Spine” -0.00 1.60 0.00 rotate -1.00 0.00 90.00
$eyeposition 0.000 0.000 65.000
$illumposition 0.000 1.165 34.341
$sequence ragdoll “ragdoll” ACT_DIERAGDOLL 1 fps 30.00

$mass 60.0
$inertia 5.00
$damping 0.01
$rotdamping 1.50
$rootbone "valvebiped.bip01_pelvis"
$jointmerge "ValveBiped.Bip01_Pelvis" "ValveBiped.Bip01_Spine1"

$jointconstrain "valvebiped.bip01_r_thigh" x limit -50.00 48.00 0.01
$jointconstrain "valvebiped.bip01_r_thigh" y limit -19.00 70.00 0.01
$jointconstrain "valvebiped.bip01_r_thigh" z limit -79.00 73.00 0.01

$jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_r_calf" z limit 0.00 133.00 0.01

$jointconstrain "valvebiped.bip01_l_thigh" x limit -39.00 39.00 0.01
$jointconstrain "valvebiped.bip01_l_thigh" y limit -59.00 23.00 0.01
$jointconstrain "valvebiped.bip01_l_thigh" z limit -84.00 66.00 0.01

$jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_l_calf" z limit 0.00 131.00 0.01

$jointconstrain "valvebiped.bip01_l_foot" x limit -23.00 23.00 0.01
$jointconstrain "valvebiped.bip01_l_foot" y limit -28.00 28.00 0.01
$jointconstrain "valvebiped.bip01_l_foot" z limit -46.00 46.00 0.01

$jointconstrain "valvebiped.bip01_spine2" x limit -48.00 48.00 0.01
$jointconstrain "valvebiped.bip01_spine2" y limit -26.00 26.00 0.01
$jointconstrain "valvebiped.bip01_spine2" z limit -39.00 68.00 0.01

$jointconstrain "valvebiped.bip01_r_upperarm" x limit -64.00 64.00 0.01
$jointconstrain "valvebiped.bip01_r_upperarm" y limit -26.00 122.00 0.01
$jointconstrain "valvebiped.bip01_r_upperarm" z limit -122.00 50.00 0.01

$jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_r_forearm" z limit -149.00 1.00 0.01

$jointconstrain "valvebiped.bip01_l_upperarm" x limit -64.00 64.00 0.01
$jointconstrain "valvebiped.bip01_l_upperarm" y limit -122.00 28.00 0.01
$jointconstrain "valvebiped.bip01_l_upperarm" z limit -100.00 59.00 0.01

$jointconstrain "valvebiped.bip01_l_forearm" x limit 0.00 0.00 0.01
$jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_l_forearm" z limit -140.00 0.00 0.01

$jointconstrain "valvebiped.bip01_l_hand" x limit -68.00 68.00 0.01
$jointconstrain "valvebiped.bip01_l_hand" y limit -37.00 41.00 0.01
$jointconstrain "valvebiped.bip01_l_hand" z limit -44.00 70.00 0.01

$jointconstrain "valvebiped.bip01_head1" x limit -20.00 20.00 0.00
$jointconstrain "valvebiped.bip01_head1" y limit -25.00 25.00 0.00
$jointconstrain "valvebiped.bip01_head1" z limit -13.00 30.00 0.00

$jointconstrain "valvebiped.bip01_r_hand" x limit -75.00 93.00 0.01
$jointconstrain "valvebiped.bip01_r_hand" y limit -37.00 32.00 0.01
$jointconstrain "valvebiped.bip01_r_hand" z limit -48.00 66.00 0.01

$jointconstrain "valvebiped.bip01_r_foot" x limit -23.00 23.00 0.01
$jointconstrain "valvebiped.bip01_r_foot" y limit -23.00 23.00 0.01
$jointconstrain "valvebiped.bip01_r_foot" z limit -35.00 57.00 0.01

}

Result:

qdir: “c:\documents and settings\admin\Рабочий стол\diana”
gamedir: “D:\GAMES\Steam\steamapps\icvaicjrus\sourcesdk\bin\ep1\bin”
g_path: “mdldecompiler”
Working on “mdldecompiler.qc”
SMD MODEL C:\Documents and Settings\Admin\Рабочий стол\assassin\alyxnude/Diana.smd
VTA MODEL C:\Documents and Settings\Admin\Рабочий стол\assassin\alyxnude/mdldecompiler_expressions.vta
ERROR: c:\documents and settings\admin\Рабочий стол\diana\mdldecompiler.qc(213): - unknown model option “$cdmaterials”
ERROR: Aborted Processing on ‘Diana\Diana.mdl’

Eurgh - seriously code tags exist for a reason.

Apart from that you probably have a missing bracked somewhere. I’m not going to look trough it in a normal post though.

Thank you.