参考教程

准备

1.下载所需文件

2.在steam安装blender 将版本改为daily3.3

3.打开blender,接着打开编辑->偏好设置->插件->安装,之后安装下载压缩包内blender插件

  • 记得安装玩插件要启用

4.打开压缩包内的撬棍,在设置游戏中第一项改为Garry’s Mod,下面填写你的游戏路径

5.在撬棍的编译中也改为Garry’s Mod

6.安装压缩包内的strawberry-perl-5.38.2.2-64bit.msi与npp.8.6.9.Installer.x64.exe

正文

1.在撬棍中选择解包,选择你要解包的模型文件,点击解包

2.接着撬棍选择反编译,选择你解包的模型文件->models->survivors->xxx.mdl,之后反编译到一个文件夹(暂时命名为文件夹1)

3.打开blender->文件->导入->Source Engine,选择刚刚反编译出了的smd

  • 注意如果有多个smd文件选择其中之一即可,最好是包括手臂的

4.选择右下角叫sence的快捷方式,在Export Format选择SMD,Export Path选xx\strawberry-perl-5.38.2.2-64bit\player_female_skeleton,之后点导出(选第一项)

5.将你导出的文件重命名为proportions.smd,运行gmodtext.bat

6.复制proportions.smd与Ref.smd到文件夹1->xx_aims(该文件夹内记得删除原有的文件)

7.将文件夹1内任意smd文件复制到xx_aims内

8.用notepad++打开文件夹1内的xx.qc文件,删除

1
2
3
4
5
6
7
8
9
10
11
12
$animation "a_proportions_corrective_animation" "survivor_namvet_anims\a_proportions_corrective_animation.smd" {
}
…………………………
……………………
$sequence "proportions" {
"a_proportions"
autoplay
predelta
fadein 0.2
fadeout 0.2
hidden
}

9.选择notepad++的查找,查找weapon,整行删除所以带有weapon的代码,然后保存

10.复制

1
2
3
4
5
6
7
8
9
$sequence reference "ba_iroha_anims/ref.smd" fps 1

$animation "a_proportions" "ba_iroha_anims/proportions.smd" subtract "reference" 0

$sequence "ragdoll" "ba_iroha_anims\modall.smd" {
fps 30
"ACT_DIERAGDOLL" 1
}
$sequence "proportions" "a_proportions" predelta autoplay

到中间删除的代码

11.复制文件夹1中xxx_anims,替换ba_iroha_anims,同时将proportions.smd改为你复制的xxx_anims中的smd

12.替换qc文件中

1
2
3
4
5
6
7
8
9
$includemodel xxxxxxx

$keyvalues
{
qc_path
{
"value" "nekomdl v 0.5.0"
}
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
$includemodel "f_anm.mdl"

$collisionjoints "需要更改_physics.smd"
{
$mass 40
$inertia 10
$damping 0.05
$rotdamping 0.01
$rootbone " "

$jointrotdamping "ValveBiped.Bip01_Pelvis" 3

$jointmassbias "ValveBiped.Bip01_R_Thigh" 7
$jointrotdamping "ValveBiped.Bip01_R_Thigh" 7
$jointconstrain "ValveBiped.Bip01_R_Thigh" x limit -25 25 0
$jointconstrain "ValveBiped.Bip01_R_Thigh" y limit -10 15 0
$jointconstrain "ValveBiped.Bip01_R_Thigh" z limit -60 25 0

$jointmassbias "ValveBiped.Bip01_R_Calf" 4
$jointconstrain "ValveBiped.Bip01_R_Calf" x limit -10 12 0
$jointconstrain "ValveBiped.Bip01_R_Calf" y limit -5 5 0
$jointconstrain "ValveBiped.Bip01_R_Calf" z limit -10 115 0

$jointmassbias "ValveBiped.Bip01_L_Thigh" 7
$jointrotdamping "ValveBiped.Bip01_L_Thigh" 7
$jointconstrain "ValveBiped.Bip01_L_Thigh" x limit -25 25 0
$jointconstrain "ValveBiped.Bip01_L_Thigh" y limit -15 10 0
$jointconstrain "ValveBiped.Bip01_L_Thigh" z limit -60 25 0

$jointmassbias "ValveBiped.Bip01_L_Calf" 4
$jointconstrain "ValveBiped.Bip01_L_Calf" x limit -12 10 0
$jointconstrain "ValveBiped.Bip01_L_Calf" y limit -5 5 0
$jointconstrain "ValveBiped.Bip01_L_Calf" z limit -10 115 0

$jointrotdamping "ValveBiped.Bip01_L_Foot" 2
$jointconstrain "ValveBiped.Bip01_L_Foot" x limit -10 10 0
$jointconstrain "ValveBiped.Bip01_L_Foot" y limit -20 20 0
$jointconstrain "ValveBiped.Bip01_L_Foot" z limit -20 21 0

$jointmassbias "ValveBiped.Bip01_Spine1" 8
$jointconstrain "ValveBiped.Bip01_Spine1" x limit -10 10 0
$jointconstrain "ValveBiped.Bip01_Spine1" y limit -16 16 0
$jointconstrain "ValveBiped.Bip01_Spine1" z limit -20 30 0

$jointmassbias "ValveBiped.Bip01_Spine2" 9
$jointconstrain "ValveBiped.Bip01_Spine2" x limit -10 10 0
$jointconstrain "ValveBiped.Bip01_Spine2" y limit -10 10 0
$jointconstrain "ValveBiped.Bip01_Spine2" z limit -20 20 0

$jointmassbias "ValveBiped.Bip01_R_Clavicle" 4
$jointrotdamping "ValveBiped.Bip01_R_Clavicle" 6
$jointconstrain "ValveBiped.Bip01_R_Clavicle" x limit -12 12 0
$jointconstrain "ValveBiped.Bip01_R_Clavicle" y limit -8 8 0
$jointconstrain "ValveBiped.Bip01_R_Clavicle" z limit 0 15 0

$jointmassbias "ValveBiped.Bip01_R_UpperArm" 5
$jointrotdamping "ValveBiped.Bip01_R_UpperArm" 5
$jointconstrain "ValveBiped.Bip01_R_UpperArm" x limit -15 20 0
$jointconstrain "ValveBiped.Bip01_R_UpperArm" y limit -40 32 0
$jointconstrain "ValveBiped.Bip01_R_UpperArm" z limit -80 25 0

$jointmassbias "ValveBiped.Bip01_L_Clavicle" 4
$jointrotdamping "ValveBiped.Bip01_L_Clavicle" 6
$jointconstrain "ValveBiped.Bip01_L_Clavicle" x limit -12 12 0
$jointconstrain "ValveBiped.Bip01_L_Clavicle" y limit -8 8 0
$jointconstrain "ValveBiped.Bip01_L_Clavicle" z limit 0 15 0

$jointmassbias "ValveBiped.Bip01_L_UpperArm" 5
$jointrotdamping "ValveBiped.Bip01_L_UpperArm" 5
$jointconstrain "ValveBiped.Bip01_L_UpperArm" x limit -15 20 0
$jointconstrain "ValveBiped.Bip01_L_UpperArm" y limit -40 32 0
$jointconstrain "ValveBiped.Bip01_L_UpperArm" z limit -80 25 0

$jointmassbias "ValveBiped.Bip01_L_Forearm" 4
$jointrotdamping "ValveBiped.Bip01_L_Forearm" 4
$jointconstrain "ValveBiped.Bip01_L_Forearm" x limit -40 15 0
$jointconstrain "ValveBiped.Bip01_L_Forearm" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Forearm" z limit -120 10 0

$jointconstrain "ValveBiped.Bip01_L_Hand" x limit -25 25 0
$jointconstrain "ValveBiped.Bip01_L_Hand" y limit -35 35 0
$jointconstrain "ValveBiped.Bip01_L_Hand" z limit -50 50 0

$jointmassbias "ValveBiped.Bip01_R_Forearm" 4
$jointrotdamping "ValveBiped.Bip01_R_Forearm" 4
$jointconstrain "ValveBiped.Bip01_R_Forearm" x limit -40 15 0
$jointconstrain "ValveBiped.Bip01_R_Forearm" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Forearm" z limit -120 10 0

$jointconstrain "ValveBiped.Bip01_R_Hand" x limit -25 25 0
$jointconstrain "ValveBiped.Bip01_R_Hand" y limit -35 35 0
$jointconstrain "ValveBiped.Bip01_R_Hand" z limit -50 50 0

$jointmassbias "ValveBiped.Bip01_Head1" 2
$jointrotdamping "ValveBiped.Bip01_Head1" 3
$jointconstrain "ValveBiped.Bip01_Head1" x limit -50 50 0
$jointconstrain "ValveBiped.Bip01_Head1" y limit -20 20 0
$jointconstrain "ValveBiped.Bip01_Head1" z limit -26 30 0

$jointrotdamping "ValveBiped.Bip01_R_Foot" 2
$jointconstrain "ValveBiped.Bip01_R_Foot" x limit -10 10 0
$jointconstrain "ValveBiped.Bip01_R_Foot" y limit -20 20 0
$jointconstrain "ValveBiped.Bip01_R_Foot" z limit -20 21 0
}

13.回到blender导入strawberry-perl-5.38.2.2-64bit->需要更改_physics.smd,之后按tab,框选 需要更改_physics.smd 的手臂后按Ctrl+L,之后按G调整位置到你模型的手臂位置,最后以smd导出 需要更改_physics.smd

14.导出的 需要更改_physics.smd 重命名为英文,之后在qc文件 的需要更改_physics.smd 修改为你的文件名,然后保存

15.打开撬棍选择编译,选择你的qc文件,输出到另一个文件夹(暂时命名为文件夹2)

  • 可能会出现0 0 0 1的报错,直接删除哪些代码后的0 0 0 1就行

16.打开文件夹2->models->survivors,将里面的文件加一个wj_的前缀

17.将qc文件的

1
$includemodel "f_anm.mdl"

改为

1
2
3
4
$includemodel "humans/female_gestures.mdl"
$includemodel "humans/female_postures.mdl"
$includemodel "humans/female_shared.mdl"
$includemodel "humans/female_ss.mdl"

保存后重新编译

17.将编译出了的文件加个npc_的前缀

18.删除你一开始解包的文件夹中models除了weapons的其他文件夹

19.将将文件夹2->models复制到一开始解包的文件夹中

20.将xx\strawberry-perl-5.38.2.2-64bit\lua复制到你一开始解包的文件夹中

21.重命名lua->aytrun->需要修改.lua为你的模型名,打开

22.替换模型名字为你的模型名之后玩家模型,npc模型,手模看自己的修改之后保存即可

23.最后复制一开始解包的文件夹到gmod->garrysmod->addons就结束了

问题

  • 手模的拇指不正常,这个你只能去gmod找一些相似的手摸,用这个模型手模的骨骼替换你自己手摸的骨骼来解决,或自己制作(当然我也不会制作手模)