mdldecompiler.exe and weapon rotation

B

blazertailgunner

Guest
It's a known issue in mdldecompiler.exe that, from the readme file:

There are still known issues with rotations on weapons and delta animations

I am currently modifying the weapon smg1. Everything works fine except the weapon lost it's information regarding where it is to be drawn on the screen, in first person view. Everything else is perfectly intact, including animations.

Does anyone happen to know a way to fix this? Perhaps a place I enter the coordinates for the default viewmodel?
 
Some0ne said:
in the QC file add "rotate -90" after each sequence.

didn't quite work out. It added a strange zoom when in hlmv. Do you happen to have a copy of a working .qc file for the smg1 I could take a look at?
 
post your QC and ill change it with fixed rotation. but i suspect you'll get other problems with it anyway. weapon model decompiling has problems.
 
Some0ne said:
post your QC and ill change it with fixed rotation. but i suspect you'll get other problems with it anyway. weapon model decompiling has problems.

sure thing, the original .qc came as follows:

-------------------------------------------------------
$cd "C:\Documents and Settings\JohnnyG\Desktop\ssfiles"
$modelname "weapons/v_smg3.mdl"
$model "studio" "Smg1_reference.smd"
$cdmaterials "models\Weapons\V_hand\"
$cdmaterials "models\Weapons\V_smg1\"
// Model uses material "v_hand_sheet.vmt"
// Model uses material "texture5.vmt"
// Model uses material "texture4.vmt"
// Model uses material "v_smg1_sheet.vmt"
$attachment "muzzle" "ValveBiped.muzzle" 0.00 2.75 6.50 rotate 0.00 0.00 0.00
$attachment "1" "ValveBiped.eject" 0.00 2.90 0.00 rotate -10.00 -180.00 0.00
$surfaceprop "default"
$illumposition 17.271 -1.154 -16.696
$sequence idle01 "idle01" loop ACT_VM_IDLE 1
$sequence fire01 "fire01" ACT_VM_PRIMARYATTACK 1 fps 30.00 node Fire {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
}

$sequence fire02 "fire02" ACT_VM_RECOIL1 1 fps 30.00 node Fire {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
}

$sequence fire03 "fire03" ACT_VM_RECOIL2 1 fps 30.00 node Fire {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
}

$sequence fire04 "fire04" ACT_VM_RECOIL3 1 fps 30.00 node Fire {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
}

$sequence altfire "altfire" ACT_VM_SECONDARYATTACK 1 fps 30.00 node Fire
$sequence draw "draw" ACT_VM_DRAW 1 fps 30.00 node Ready
$sequence reload "reload" ACT_VM_RELOAD 1 fps 30.00 node Ready
$sequence dryfire "dryfire" ACT_VM_DRYFIRE 1 fps 30.00 node Fire
$sequence idletolow "idletolow" ACT_VM_LOWERED_TO_IDLE 1 fps 30.00 transition Ready Low
$sequence lowtoidle "lowtoidle" ACT_VM_IDLE_TO_LOWERED 1 fps 30.00 transition Low Ready
$sequence lowidle "lowidle" loop ACT_VM_IDLE_LOWERED 1 fps 30.00 node Low
-----------------------------------------------------------------

but honesly everthing else seems to work fine. animations in hlmv and weapon sounds and characteristics are are intact. just this one problem :thumbs:
 
here is your QC with the rotation commands and i also fixed the "$modelname" and "$cdmaterials" lines so that it will replace the smg1 in hl2.
im not sure if iv put the rotate commands in the right place but try it and if it doesnt work tell me and il correct it.
also note, you are likely to get errors about the attachments. if you do just remove the "$attachment" lines.

Code:
$cd "C:\Documents and Settings\JohnnyG\Desktop\ssfiles"
$modelname "weapons\v_smg1\v_smg1.mdl"
$model "studio" "Smg1_reference.smd"
$cdmaterials "Weapons\V_hand\"
$cdmaterials "Weapons\v_smg1\"
// Model uses material "v_hand_sheet.vmt"
// Model uses material "texture5.vmt"
// Model uses material "texture4.vmt"
// Model uses material "v_smg1_sheet.vmt"
$attachment "muzzle" "ValveBiped.muzzle" 0.00 2.75 6.50 rotate 0.00 0.00 0.00
$attachment "1" "ValveBiped.eject" 0.00 2.90 0.00 rotate -10.00 -180.00 0.00
$surfaceprop "default"
$illumposition 17.271 -1.154 -16.696
$sequence idle01 "idle01" loop ACT_VM_IDLE 1 rotate -90
$sequence fire01 "fire01" ACT_VM_PRIMARYATTACK 1 fps 30.00 rotate -90 node Fire {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
} 

$sequence fire02 "fire02" ACT_VM_RECOIL1 1 fps 30.00 rotate -90 node Fire {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
} 

$sequence fire03 "fire03" ACT_VM_RECOIL2 1 fps 30.00 rotate -90 node Fire {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
} 

$sequence fire04 "fire04" ACT_VM_RECOIL3 1 fps 30.00 rotate -90 node Fire {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
} 

$sequence altfire "altfire" ACT_VM_SECONDARYATTACK 1 fps 30.00 rotate -90 node Fire 
$sequence draw "draw" ACT_VM_DRAW 1 fps 30.00 rotate -90 node Ready 
$sequence reload "reload" ACT_VM_RELOAD 1 fps 30.00 rotate -90 node Ready 
$sequence dryfire "dryfire" ACT_VM_DRYFIRE 1 fps 30.00 rotate -90 node Fire 
$sequence idletolow "idletolow" ACT_VM_LOWERED_TO_IDLE 1 fps 30.00 rotate -90 transition Ready Low 
$sequence lowtoidle "lowtoidle" ACT_VM_IDLE_TO_LOWERED 1 fps 30.00 rotate -90 transition Low Ready 
$sequence lowidle "lowidle" loop ACT_VM_IDLE_LOWERED 1 fps 30.00 rotate -90 node Low
good luck
 
still rotated 90 degrees on the Y axis. i tryed moving around the 'rotate -90' into various spots, with no luck. any other ideas? thanks for the ongoing help :thumbs:
 
try this:

Code:
$cd "C:\Documents and Settings\JohnnyG\Desktop\ssfiles"
$modelname "weapons\v_smg1.mdl"
$model "studio" "Smg1_reference.smd"
$cdmaterials "weapons\V_hand\"
$cdmaterials "weapons\v_smg1\"
// Model uses material "v_hand_sheet.vmt"
// Model uses material "texture5.vmt"
// Model uses material "texture4.vmt"
// Model uses material "v_smg1_sheet.vmt"
$attachment "muzzle" "ValveBiped.muzzle" 0.00 2.75 6.50 rotate 0.00 0.00 0.00
$attachment "1" "ValveBiped.eject" 0.00 2.90 0.00 rotate -10.00 -180.00 0.00
$surfaceprop "default"
$illumposition 17.271 -1.154 -16.696
$sequence idle01 "idle01" loop ACT_VM_IDLE 1 rotate -90
$sequence fire01 "fire01" ACT_VM_PRIMARYATTACK 1 fps 30.00 node Fire rotate -90 {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
} 

$sequence fire02 "fire02" ACT_VM_RECOIL1 1 fps 30.00 node Fire rotate -90 {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
} 

$sequence fire03 "fire03" ACT_VM_RECOIL2 1 fps 30.00 node Fire rotate -90 {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
} 

$sequence fire04 "fire04" ACT_VM_RECOIL3 1 fps 30.00 node Fire rotate -90 {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "0" }
} 

$sequence altfire "altfire" ACT_VM_SECONDARYATTACK 1 fps 30.00 node Fire rotate -90
$sequence draw "draw" ACT_VM_DRAW 1 fps 30.00 node Ready rotate -90
$sequence reload "reload" ACT_VM_RELOAD 1 fps 30.00 node Ready rotate -90
$sequence dryfire "dryfire" ACT_VM_DRYFIRE 1 fps 30.00 node Fire rotate -90
$sequence idletolow "idletolow" ACT_VM_LOWERED_TO_IDLE 1 fps 30.00 transition Ready Low rotate -90
$sequence lowtoidle "lowtoidle" ACT_VM_IDLE_TO_LOWERED 1 fps 30.00 transition Low Ready rotate -90
$sequence lowidle "lowidle" loop ACT_VM_IDLE_LOWERED 1 fps 30.00 node Low rotate -90
 
bullseye! kinda... :p

The .qc file above worked great, but the weapon was facing at me instead of away, so once i changed all the rotations from -90 to just 90, everythig was perfect!

the only problem being now, it seems to have lost the texture information. i'm getting the checkerboard now. I even reverted back to an old .qc where the textures were fine, but now they're lost too. any ideas as to how this could have happened?

thanks alot s0meone, consider my initial question solved. :thumbs:
 
nevermind, i'll answer that!

$cdmaterials "weapons\V_hand\"
$cdmaterials "weapons\v_smg1\"

should be

$cdmaterials "models\weapons\V_hand\"
$cdmaterials "models\weapons\v_smg1\"

that got lost in the transition


thanks again!
 
oh, that must be because i changed the $cdmaterials line to fit what it should be
but i guess you must have put the textures somewhere else. if you are wanting to replace the "smg1" in hl2 (same applies for hl2dm) then put the textures in "half-life 2\hl2\materials\weapons\v_smg1" and use my QC file and they it should work.
 
Back
Top