2016年5月3日火曜日

How to fix .qc/smd files for NMRiH

Test environment

Windows10
NMRIH ver1.09.6

Get Playermodel from Garry's mod

http://steamcommunity.com/workshop/browse/?appid=4000&requiredtags%5B%5D=Model&p=1

select playermodel→subscrbe
→Run Garry's mod→Download playermodel automatically
  C:\Program files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\addons\
    .gma

・Unpack .gma

  (A) GMA EXTRACTOR.exe

       (1) Download https://www.herdprotect.com/gmadconvgui.exe-6df5383a939aa7ce8b99326de9e8674739a83238.aspx
       (2) Run
       (3) Convert a Single File
       (4) Select .gma

  (B) gmad.exe

       (1) C:\Program files (x86)\Steam\steamapps\common\GarrysMod\bin\gmad.exe
       (2) Drag .gma to gmad.exe

Edit files

■Delete File/Directory

lua (Directory)
info.txt

■Edit .qc

・Comment-out

$MaxEyeDeflection
$BoneMerge
$ProceduralBones
$Attachment
$IncludeModel
$BoneMerge
$jigglebone { ~ }

・add

$attachment "weapon_bone" "ValveBiped.weapon_bone" 0 0 0 rotate 0 0 0
$attachment "weapon_bone_left" "ValveBiped.weapon_bone_left" 0 0 0 rotate 0 0 0
$attachment "eyes" "ValveBiped.Bip01_Head1" 4 -4 0 rotate 0 10 0
$attachment "2" "ValveBiped.Bip01_Head1" 0 0 0 rotate 0 0 0
$attachment "head" "ValveBiped.Bip01_Head1" 0 0 0 rotate 0 0 0

$includemodel "player/sdk_player_shared.mdl"

$hboxset "sdk"
$hbox 2 "ValveBiped.Bip01_Pelvis" -7.75 -3 -6.6 7.75 3 4.9
$hbox 6 "ValveBiped.Bip01_L_Thigh" 3.5 -3.9 -3.9 19.5 3.1 3.1
$hbox 6 "ValveBiped.Bip01_L_Calf" 1.52 -3.37 -3.25 16.51 3.63 3.25
$hbox 6 "ValveBiped.Bip01_L_Foot" -1 -1.3 -2 5 2.7 2
$hbox 6 "ValveBiped.Bip01_L_Toe0" -3.2 -1.45 -2 3.8 1.05 2
$hbox 7 "ValveBiped.Bip01_R_Thigh" 3.5 -3.9 -3.1 19.5 3.1 3.9
$hbox 7 "ValveBiped.Bip01_R_Calf" 1.52 -3.37 -3.25 16.51 3.63 3.25
$hbox 7 "ValveBiped.Bip01_R_Foot" -1 -1.3 -2 5 2.7 2
$hbox 7 "ValveBiped.Bip01_R_Toe0" -3.2 -1.45 -2 3.8 1.05 2
$hbox 2 "ValveBiped.Bip01_Spine" -0.45 -3 -7 4.05 7 7
$hbox 2 "ValveBiped.Bip01_Spine1" -0.9 -3 -7 4.1 8 7
$hbox 2 "ValveBiped.Bip01_Spine2" -0.5 -3.9 -7.5 7.5 7.1 7.5
$hbox 2 "ValveBiped.Bip01_Spine4" -0.2 -2.8 -7.5 3.8 5.2 7.5
$hbox 1 "ValveBiped.Bip01_Neck1" 0.5 -3.7 -2.5 3.5 1.3 2.5
$hbox 1 "ValveBiped.Bip01_Head1" -1.3 -5.15 -3 7.7 3.15 3
$hbox 4 "ValveBiped.Bip01_L_UpperArm" -3 -2.05 -2.45 13 2.45 2.05
$hbox 4 "ValveBiped.Bip01_L_Forearm" -0.4 -2 -2.8 11.2 2.2 1.8
$hbox 4 "ValveBiped.Bip01_L_Hand" 0 -1.65 -1.45 5 0.35 2.05
$hbox 5 "ValveBiped.Bip01_R_UpperArm" -3 -2.05 -2.05 13 2.45 2.45
$hbox 5 "ValveBiped.Bip01_R_Forearm" -0.4 -1.9 -1.8 11.2 2.1 2.4
$hbox 5 "ValveBiped.Bip01_R_Hand" 0 -1.65 -2.05 5 0.35 1.45
$hboxset "sdk_no_arms"
$hbox 2 "ValveBiped.Bip01_Pelvis" -7.75 -3 -6.6 7.75 3 4.9
$hbox 6 "ValveBiped.Bip01_L_Thigh" 3.5 -3.9 -3.9 19.5 3.1 3.1
$hbox 6 "ValveBiped.Bip01_L_Calf" 1.52 -3.37 -3.25 16.51 3.63 3.25
$hbox 6 "ValveBiped.Bip01_L_Foot" -1 -1.3 -2 5 2.7 2
$hbox 6 "ValveBiped.Bip01_L_Toe0" -3.2 -1.45 -2 3.8 1.05 2
$hbox 7 "ValveBiped.Bip01_R_Thigh" 3.5 -3.9 -3.1 19.5 3.1 3.9
$hbox 7 "ValveBiped.Bip01_R_Calf" 1.52 -3.37 -3.25 16.51 3.63 3.25
$hbox 7 "ValveBiped.Bip01_R_Foot" -1 -1.3 -2 5 2.7 2
$hbox 7 "ValveBiped.Bip01_R_Toe0" -3.2 -1.45 -2 3.8 1.05 2
$hbox 2 "ValveBiped.Bip01_Spine" -0.45 -3 -7 4.05 7 7
$hbox 2 "ValveBiped.Bip01_Spine1" -0.9 -3 -7 4.1 8 7
$hbox 2 "ValveBiped.Bip01_Spine2" -0.5 -3.9 -7.5 7.5 7.1 7.5
$hbox 2 "ValveBiped.Bip01_Spine4" -0.2 -2.8 -7.5 3.8 5.2 7.5
$hbox 1 "ValveBiped.Bip01_Neck1" 0.5 -3.7 -2.5 3.5 1.3 2.5
$hbox 1 "ValveBiped.Bip01_Head1" -1.3 -5.15 -3 7.7 3.15 3

・Paste $jigglebone into .qc file

  Make .qci file by jigglebone-decompile.exe
    Drag .mdl to jigglebone-decompile.exe
  paste contents of .qci into .qc

■Edit physics.smd / reference.smd

・Replace

ValveBiped.Anim_Attachment_LH
ValveBiped.weapon_bone_left

ValveBiped.Anim_Attachment_RH
ValveBiped.weapon_bone




0 件のコメント:

コメントを投稿