Mess
Newbie
- Joined
- Oct 11, 2004
- Messages
- 405
- Reaction score
- 0
I've been trying to do this for a while now and I'm still not having any luck. Decompiling the model itself might be wrong because if i try and recompile it straight away it fails... but anyway
This is the code...
When the model compiles the headcrab is no longer treated as a submodel and so won't detach from the zombie.
Can anyone show me what I am doing wrong/have a solution to the problem?
Any help much loved!
This is the code...
Code:
$cd "C:\Half-Life - Aftermath\modelsrc"
$modelname "Zombie/Classic.mdl"
$model "studio" "Zombie_reference.smd"
$lod 10
{
replacemodel "Zombie_reference" "lod1_Zombie_reference"
}
$lod 20
{
replacemodel "Zombie_reference" "lod2_Zombie_reference"
}
$lod 35
{
replacemodel "Zombie_reference" "lod3_Zombie_reference"
}
$lod 60
{
replacemodel "Zombie_reference" "lod4_Zombie_reference"
}
$lod 90
{
replacemodel "Zombie_reference" "lod5_Zombie_reference"
}
$shadowlod
{
replacemodel "Zombie_reference" "lod6_Zombie_reference"
}
$model "headcrab1" "UnknownModelName.smd"
$lod 10
{
replacemodel "UnknownModelName" "lod1_UnknownModelName"
}
$lod 20
{
replacemodel "UnknownModelName" "lod2_UnknownModelName"
}
$lod 35
{
replacemodel "UnknownModelName" "lod3_UnknownModelName"
}
$lod 60
{
replacemodel "UnknownModelName" "lod4_UnknownModelName"
}
$lod 90
{
replacemodel "UnknownModelName" "lod5_UnknownModelName"
}
$shadowlod
{
replacemodel "UnknownModelName" "lod6_UnknownModelName"
}
$model "headcrab1" "Headcrab_reference.smd"
$lod 10
{
replacemodel "Headcrab_reference" "lod1_Headcrab_reference"
}
$lod 20
{
replacemodel "Headcrab_reference" "lod2_Headcrab_reference"
}
$lod 35
{
replacemodel "Headcrab_reference" "lod3_Headcrab_reference"
}
$lod 60
{
replacemodel "Headcrab_reference" "lod4_Headcrab_reference"
}
$lod 90
{
replacemodel "Headcrab_reference" "lod5_Headcrab_reference"
}
$shadowlod
{
replacemodel "Headcrab_reference" "lod6_Headcrab_reference"
}
$poseparameter move_yaw -180.00 180.00 360.00
$cdmaterials "models\zombie_classic\"
$cdmaterials "models\headcrab_classic\"
[b]$texturegroup skinfamilies
{
{ "Zombie_Classic_sheet.vmt"
"headcrabsheet.vmt"
}
{ "Zombie_Classic_sheet2.vmt"
"headcrabsheet.vmt"
}
} [/b]$hboxset "default"
$hbox 2 "ValveBiped.Bip01_Spine1" -8.500 -3.840 -7.120 15.500 9.840 7.730
$hbox 4 "ValveBiped.Bip01_L_UpperArm" -1.000 -3.500 -2.500 11.000 3.500 2.500
$hbox 4 "ValveBiped.Bip01_L_Forearm" -0.500 -1.860 -1.900 10.500 3.110 2.360
$hbox 4 "ValveBiped.Bip01_L_Hand" 0.000 -1.780 -1.000 6.000 1.230 2.000
$hbox 5 "ValveBiped.Bip01_R_UpperArm" -1.000 -3.500 -2.500 11.000 3.500 2.500
$hbox 5 "ValveBiped.Bip01_R_Forearm" -0.500 -1.890 -1.600 10.500 3.090 2.660
$hbox 5 "ValveBiped.Bip01_R_Hand" 0.000 -1.780 -2.500 6.000 1.230 0.500
$hbox 6 "ValveBiped.Bip01_L_Thigh" 0.000 -4.000 -3.730 17.250 4.000 4.290
$hbox 6 "ValveBiped.Bip01_L_Calf" 0.000 -4.870 -3.540 17.250 3.180 2.630
$hbox 6 "ValveBiped.Bip01_L_Foot" -1.500 -2.000 -2.500 7.500 2.000 2.500
$hbox 7 "ValveBiped.Bip01_R_Thigh" 0.000 -4.000 -3.730 17.250 4.000 4.290
$hbox 7 "ValveBiped.Bip01_R_Calf" 0.000 -4.920 -3.120 17.250 3.250 2.650
$hbox 7 "ValveBiped.Bip01_R_Foot" -1.500 -2.000 -2.500 7.500 2.000 2.500
$hbox 1 "ValveBiped.HC_Body_Bone" -6.590 -5.000 -5.760 8.500 5.000 6.240
// Model uses material "Zombie_Classic_sheet.vmt"
// Model uses material "headcrabsheet.vmt"
[b]// Model uses material "Zombie_Classic_sheet2.vmt" [/b]
$attachment "headcrab" "ValveBiped.HC_Body_Bone" -4.49 -1.32 -0.02 rotate -0.00 20.25 29.25
$attachment "eyes" "ValveBiped.HC_Body_Bone" 0.00 0.00 0.00 rotate -0.00 0.00 -50.00
$attachment "head" "ValveBiped.HC_Body_Bone" 0.00 0.00 0.00 rotate -0.00 0.00 -50.00
$attachment "chest" "ValveBiped.Bip01_Spine4" -3.00 6.00 0.00 rotate 0.00 60.00 90.00
$attachment "maw" "ValveBiped.Bip01_Spine2" -0.00 8.00 0.00 rotate 0.00 90.00 90.00
$attachment "Blood_Left" "ValveBiped.Bip01_L_Finger2" -0.00 -0.00 0.00 rotate -0.00 -0.00 0.00
$attachment "Blood_Right" "ValveBiped.Bip01_R_Finger2" -0.00 -0.00 0.00 rotate 0.00 -0.00 0.00
$surfaceprop "zombieflesh"
$eyeposition 0.000 0.000 64.000
$illumposition 6.562 -2.972 31.757
$sequence Idle01 "Idle01" loop ACT_IDLE 1 fps 30.00
$animation a_WalkS "a_WalkS" loop fps 24.000000
$animation a_WalkSE "a_WalkSE" loop fps 24.000000
$animation a_WalkE "a_WalkE" loop fps 24.000000
$animation a_WalkNE "a_WalkNE" loop fps 24.000000
$animation a_walk1 "a_walk1" loop fps 24.000000
$animation a_WalkNW "a_WalkNW" loop fps 24.000000
$animation a_WalkW "a_WalkW" loop fps 24.000000
$animation a_WalkSW "a_WalkSW" loop fps 24.000000
$sequence walk "a_WalkS" loop ACT_WALK 1 fps 24.00 {
{ event AE_ZOMBIE_STEP_LEFT 5 }
{ event AE_ZOMBIE_STEP_RIGHT 15 }
{ event AE_ZOMBIE_SCUFF_LEFT 20 }
{ event AE_ZOMBIE_STEP_LEFT 28 }
{ event AE_ZOMBIE_STEP_RIGHT 38 }
{ event AE_ZOMBIE_SCUFF_LEFT 40 }
blendwidth 9
blend move_yaw -180.000000 180.000000
a_WalkSE a_WalkE a_WalkNE a_walk1 a_WalkNW a_WalkW a_WalkSW a_WalkS
}
$animation a_walk2 "a_walk2" loop fps 24.000000
$sequence walk2 "a_WalkS" loop ACT_WALK 1 fps 24.00 {
{ event AE_ZOMBIE_STEP_LEFT 7 }
{ event AE_ZOMBIE_SCUFF_RIGHT 10 }
{ event AE_ZOMBIE_STEP_RIGHT 21 }
{ event AE_ZOMBIE_STEP_LEFT 31 }
{ event AE_ZOMBIE_SCUFF_RIGHT 34 }
{ event AE_ZOMBIE_STEP_RIGHT 44 }
blendwidth 9
blend move_yaw -180.000000 180.000000
a_WalkSE a_WalkE a_WalkNE a_walk2 a_WalkNW a_WalkW a_WalkSW a_WalkS
}
$animation a_walk3 "a_walk3" loop fps 24.000000
$sequence walk3 "a_WalkS" loop ACT_WALK 1 fps 24.00 {
{ event AE_ZOMBIE_STEP_LEFT 7 }
{ event AE_ZOMBIE_STEP_RIGHT 18 }
{ event AE_ZOMBIE_SCUFF_LEFT 21 }
{ event AE_ZOMBIE_STEP_LEFT 32 }
{ event AE_ZOMBIE_STEP_RIGHT 40 }
{ event AE_ZOMBIE_SCUFF_LEFT 44 }
blendwidth 9
blend move_yaw -180.000000 180.000000
a_WalkSE a_WalkE a_WalkNE a_walk3 a_WalkNW a_WalkW a_WalkSW a_WalkS
}
$animation a_Walk4 "a_Walk4" loop fps 24.000000
$sequence walk4 "a_Walk4" loop ACT_WALK 1 fps 24.00 {
{ event AE_ZOMBIE_STEP_LEFT 4 }
{ event AE_ZOMBIE_STEP_RIGHT 16 }
{ event AE_ZOMBIE_STEP_LEFT 22 }
{ event AE_ZOMBIE_STEP_RIGHT 28 }
{ event AE_ZOMBIE_STEP_LEFT 43 }
{ event AE_ZOMBIE_STEP_RIGHT 49 }
{ event AE_ZOMBIE_STEP_LEFT 58 }
{ event AE_ZOMBIE_STEP_RIGHT 67 }
}
$sequence FireWalk "FireWalk" loop ACT_WALK_ON_FIRE 1 fps 30.00
$sequence FireIdle "FireIdle" loop ACT_IDLE_ON_FIRE 1 fps 30.00
$sequence attackA "attackA" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 5 }
{ event AE_ZOMBIE_ATTACK_RIGHT 25 }
}
$sequence attackB "attackB" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 5 }
{ event AE_ZOMBIE_ATTACK_RIGHT 25 }
}
$sequence attackC "attackC" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 5 }
{ event AE_ZOMBIE_ATTACK_LEFT 25 }
}
$sequence attackD "attackD" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 5 }
{ event AE_ZOMBIE_ATTACK_LEFT 25 }
}
$sequence attackE "attackE" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 5 }
{ event AE_ZOMBIE_ATTACK_BOTH 25 }
}
$sequence attackF "attackF" ACT_MELEE_ATTACK1 2 fps 30.00 {
{ event AE_ZOMBIE_ATTACK_SCREAM 5 }
{ event AE_ZOMBIE_ATTACK_BOTH 25 }
}
$sequence swatleftmid "swatleftmid" ACT_ZOM_SWATLEFTMID 1 fps 30.00 {
{ event AE_ZOMBIE_STARTSWAT 1 }
{ event AE_ZOMBIE_SWATITEM 9 }
}
$sequence swatrightmid "swatrightmid" ACT_ZOM_SWATRIGHTMID 1 fps 30.00 {
{ event AE_ZOMBIE_STARTSWAT 1 }
{ event AE_ZOMBIE_SWATITEM 9 }
}
$sequence swatleftlow "swatleftlow" ACT_ZOM_SWATLEFTLOW 1 fps 30.00 {
{ event AE_ZOMBIE_STARTSWAT 1 }
{ event AE_ZOMBIE_SWATITEM 15 }
}
$sequence swatrightlow "swatrightlow" ACT_ZOM_SWATRIGHTLOW 1 fps 30.00 {
{ event AE_ZOMBIE_STARTSWAT 1 }
{ event AE_ZOMBIE_SWATITEM 18 }
}
$sequence releasecrab "releasecrab" ACT_ZOM_RELEASECRAB 1 fps 30.00
$sequence physflinch1 "physflinch1" ACT_FLINCH_PHYSICS 1 fps 30.00
$sequence physflinch2 "physflinch2" ACT_FLINCH_PHYSICS 1 fps 30.00
$sequence physflinch3 "physflinch3" ACT_FLINCH_PHYSICS 1 fps 30.00
$sequence smashfall64 "smashfall64" fps 30.00 {
{ event AE_NPC_BODYDROP_HEAVY 10 }
{ event AE_NPC_BODYDROP_HEAVY 27 }
{ event AE_NPC_BODYDROP_HEAVY 37 }
{ event AE_ZOMBIE_GET_UP 75 }
}
$sequence slump_a "slump_a" loop fps 30.00
$sequence slumprise_a "slumprise_a" fps 30.00 {
{ event AE_NPC_LEFTFOOT 15 }
{ event AE_NPC_RIGHTFOOT 50 }
{ event AE_ZOMBIE_GET_UP 80 }
}
$sequence slumprise_a_attack "slumprise_a_attack" fps 30.00 {
{ event AE_NPC_LEFTFOOT 15 }
{ event AE_NPC_RIGHTFOOT 50 }
{ event AE_ZOMBIE_GET_UP 80 }
{ event AE_ZOMBIE_ATTACK_SCREAM 16 }
{ event AE_ZOMBIE_ATTACK_RIGHT 36 }
}
$sequence slumprise_a2 "slumprise_a2" fps 30.00 {
{ event AE_NPC_RIGHTFOOT 16 }
{ event AE_NPC_RIGHTFOOT 22 }
{ event AE_ZOMBIE_GET_UP 24 }
}
$sequence slump_b "slump_b" loop fps 30.00
$sequence slumprise_b "slumprise_b" fps 30.00 {
{ event AE_NPC_LEFTFOOT 13 }
{ event AE_NPC_RIGHTFOOT 27 }
{ event AE_ZOMBIE_GET_UP 57 }
}
$sequence Breakthrough "Breakthrough" fps 30.00
$sequence canal5await "canal5await" fps 30.00
$sequence canal5aattack "canal5aattack" fps 30.00
$animation mdldecompiler_delta.smd "mdldecompiler_delta.smd" fps 30
$sequence flinch1inDelta "flinch1inDelta" fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence flinch1inFrame "flinch1inFrame" fps 30.00
$sequence flinch1CoreDelta "flinch1CoreDelta" fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence flinch1OutFrame "flinch1OutFrame" fps 30.00
$sequence flinch1outDelta "flinch1outDelta" fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence flinch1 "flinch1" ACT_GESTURE_FLINCH_HEAD 1 fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence flinch2inDelta "flinch2inDelta" fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence flinch2inFrame "flinch2inFrame" fps 30.00
$sequence flinch2CoreDelta "flinch2CoreDelta" fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence flinch2OutFrame "flinch2OutFrame" fps 30.00
$sequence flinch2outDelta "flinch2outDelta" fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence flinch2 "flinch2" ACT_GESTURE_FLINCH_HEAD 1 fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence flinch3inDelta "flinch3inDelta" fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence flinch3inFrame "flinch3inFrame" fps 30.00
$sequence flinch3CoreDelta "flinch3CoreDelta" fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence flinch3OutFrame "flinch3OutFrame" fps 30.00
$sequence flinch3outDelta "flinch3outDelta" fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence flinch3 "flinch3" ACT_GESTURE_FLINCH_HEAD 1 fps 30.00 subtract mdldecompiler_delta.smd 0
$sequence Tantrum "Tantrum" loop ACT_ZOMBIE_TANTRUM 1 fps 30.00
$sequence WallPound "WallPound" loop ACT_ZOMBIE_WALLPOUND 1 fps 30.00 {
{ event AE_ZOMBIE_POUND 14 }
{ event AE_ZOMBIE_POUND 35 }
}
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
$ikchain rhand ValveBiped.Bip01_R_Hand knee 0.640 0.769 0.000
$ikchain lhand ValveBiped.Bip01_L_Hand knee 0.607 0.795 0.000
$ikchain rfoot ValveBiped.Bip01_R_Foot knee 0.545 -0.838 0.000
$ikchain lfoot ValveBiped.Bip01_L_Foot knee 0.518 -0.855 -0.000
$collisionjoints "phymodel.smd" {
$mass 100.0
$inertia 10.00
$damping 0.10
$rotdamping 3.00
$rootbone "valvebiped.bip01_pelvis"
$jointmerge "ValveBiped.Bip01_Pelvis" "ValveBiped.Bip01_Spine1"
$jointconstrain "valvebiped.bip01_spine2" x limit -44.00 44.00 0.20
$jointconstrain "valvebiped.bip01_spine2" y limit -39.00 39.00 0.20
$jointconstrain "valvebiped.bip01_spine2" z limit -32.00 50.00 0.20
$jointconstrain "valvebiped.bip01_r_clavicle" x limit -30.00 30.00 0.20
$jointconstrain "valvebiped.bip01_r_clavicle" y limit -46.00 46.00 0.20
$jointconstrain "valvebiped.bip01_r_clavicle" z limit -26.00 48.00 0.20
$jointconstrain "valvebiped.bip01_r_upperarm" x limit -39.00 39.00 0.20
$jointconstrain "valvebiped.bip01_r_upperarm" y limit -79.00 95.00 0.20
$jointconstrain "valvebiped.bip01_r_upperarm" z limit -93.00 28.00 0.20
$jointconstrain "valvebiped.bip01_l_clavicle" x limit -30.00 30.00 0.20
$jointconstrain "valvebiped.bip01_l_clavicle" y limit -46.00 46.00 0.20
$jointconstrain "valvebiped.bip01_l_clavicle" z limit -26.00 48.00 0.20
$jointconstrain "valvebiped.bip01_l_upperarm" x limit -30.00 30.00 0.20
$jointconstrain "valvebiped.bip01_l_upperarm" y limit -95.00 84.00 0.20
$jointconstrain "valvebiped.bip01_l_upperarm" z limit -86.00 26.00 0.20
$jointconstrain "valvebiped.bip01_l_forearm" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_l_forearm" z limit -149.00 4.00 0.20
$jointconstrain "valvebiped.bip01_l_hand" x limit -55.00 55.00 0.20
$jointconstrain "valvebiped.bip01_l_hand" y limit -55.00 55.00 0.20
$jointconstrain "valvebiped.bip01_l_hand" z limit -55.00 55.00 0.20
$jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_forearm" z limit -149.00 4.00 0.20
$jointconstrain "valvebiped.bip01_r_thigh" x limit -12.00 12.00 0.20
$jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 75.00 0.20
$jointconstrain "valvebiped.bip01_r_thigh" z limit -97.00 32.00 0.20
$jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 126.00 0.20
$jointconstrain "valvebiped.bip01_r_foot" x limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_r_foot" y limit -25.00 6.00 0.20
$jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 0.20
$jointconstrain "valvebiped.bip01_l_thigh" x limit -12.00 12.00 0.20
$jointconstrain "valvebiped.bip01_l_thigh" y limit -73.00 6.00 0.20
$jointconstrain "valvebiped.bip01_l_thigh" z limit -93.00 30.00 0.20
$jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_l_calf" z limit -8.00 126.00 0.20
$jointconstrain "valvebiped.bip01_l_foot" x limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_l_foot" y limit -19.00 19.00 0.20
$jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 0.20
$jointconstrain "valvebiped.bip01_r_hand" x limit -55.00 55.00 0.20
$jointconstrain "valvebiped.bip01_r_hand" y limit -55.00 55.00 0.20
$jointconstrain "valvebiped.bip01_r_hand" z limit -55.00 55.00 0.20
}
the bold text is what i've changed/ added. But now when i compile the model i get this:
Working on "mdldecompiler.qc"
SMD MODEL C:\Half-Life - Aftermath\modelsrc/Zombie_reference.smd
SMD MODEL C:\Half-Life - Aftermath\modelsrc/lod1_Zombie_reference.smd
SMD MODEL C:\Half-Life - Aftermath\modelsrc/lod2_Zombie_reference.smd
SMD MODEL C:\Half-Life - Aftermath\modelsrc/lod3_Zombie_reference.smd
SMD MODEL C:\Half-Life - Aftermath\modelsrc/lod4_Zombie_reference.smd
SMD MODEL C:\Half-Life - Aftermath\modelsrc/lod5_Zombie_reference.smd
Processing $shadowlod
SMD MODEL C:\Half-Life - Aftermath\modelsrc/lod6_Zombie_reference.smd
SMD MODEL C:\Half-Life - Aftermath\modelsrc/UnknownModelName.smd
ERROR: Model can only have one $shadowlod and it must be the last lod in the .qc
(118) : end
ERROR: Aborted Processing on 'Zombie/Classic.mdl'
When the model compiles the headcrab is no longer treated as a submodel and so won't detach from the zombie.
Can anyone show me what I am doing wrong/have a solution to the problem?
Any help much loved!