Left 4 Dead 2

Left 4 Dead 2

评价数不足
Left 4 Dead 2 Weapon Mod: Swap Replacement
由 Artillery Rain 制作
* IMPORTANT : My method is different with guides from famous and proper modder of Source games, and shouldn't be used as a reference to learn modding.
Be mindful when publishing stuffs, and respect original creator.

I want to make it fast and simple but then it will leave more question than answer, so i will explain base on my knowledge. Once you understand it, it's very easy.

If you haven't watched the first video of this series , please visit https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2976858941

Please watch video below. Leave a comment if there is anything you need to ask.

BluePaintball : If encountering animation looping glitch when picking the gun, removing the addlayer "look_poses" from the idle sequence might solve the issue. I learned this from MrFuneral's guide.
   
奖励
收藏
已收藏
取消收藏
Video ( please turn on subtitle )
( just me fulfilling my friend's request )
Now this is a complicated mod.
https://www.youtube.com/watch?v=ZHOAmxzps-I
20 条留言
Artillery Rain  [作者] 1 月 28 日 上午 5:25 
You can correct that by replacing those ikrule lines which this:

ikrule "lhand" touch "acr_main"
ikrule "rhand" touch "acr_main"
Artillery Rain  [作者] 1 月 28 日 上午 5:23 
There's little information in these $sequence. However here is what i thought could be the problem:

ERROR: requested out of range frame on animation "@shoot1" : 16 (16)

The log mentioned "@shoot1" which is (probably) a line like this:
$animation "@shoot1" "v_rif_sg552_anims\@shoot1.smd" ikrule "lhand" ... range 0 0 20 20 ... ikrule "rhand" ... range 0 0 20 20 ...

However that @shoot1.smd possibly has 16 frames instead of 20, and ikrule range is 0 0 20 20 which is bigger than 16. That caused error.
something something house 1 月 28 日 上午 2:16 
$sequence "shoot1_layer" {
"v_rif_sg552_anims\shoot1_layer.smd"
activity "ACT_VM_PRIMARYATTACK_LAYER" 1
delta
{ event AE_CL_CREATE_PARTICLE_BRASS 2 "weapon_shell_casing_rifle_fp" }
{ event AE_MUZZLEFLASH 0 "1" }
{ event AE_CL_CREATE_PARTICLE_EFFECT 0 "muzzle_sparks_rifle follow_attachment muzzle_flash" }
{ event AE_CL_CREATE_PARTICLE_EFFECT 0 "muzzle_sparks_rifle follow_attachment muzzle_flash" }
{ event AE_CL_CREATE_PARTICLE_EFFECT 0 "muzzle_sparks_pistol follow_attachment muzzle_flash" }
{ event AE_CL_CREATE_PARTICLE_EFFECT 0 "muzzle_smoke_sniper follow_attachment muzzle_flash" }
{ event AE_CL_CREATE_PARTICLE_EFFECT 0 "muzzle_smoke_sniper_extra follow_attachment muzzle_flash" }
{ event AE_CL_CREATE_PARTICLE_EFFECT 0 "weapon_muzzle_flash_sparks6 follow_attachment muzzle_flash" }
{ event AE_CL_CREATE_PARTICLE_EFFECT 0 "muzzle_randsparks follow_attachment muzzle_flash" }
fadein 0.08
fadeout 0.2
}
something something house 1 月 28 日 上午 2:16 
$sequence "shoot1" {
"v_rif_sg552_anims\shoot1.smd"
activity "ACT_VM_PRIMARYATTACK" 1
fadein 0.2
fadeout 0.2
snap
fps 30
ikrule "lhand" touch "acr_main" contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 20 20 target 1
ikrule "rhand" touch "acr_main" contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 20 20 target 0
}
something something house 1 月 28 日 上午 2:16 
hmm ok thanks for the heads up ill follow it your instruction
heres the shoot $sequence im currently having a little trouble with
i will paste it in the comment
Artillery Rain  [作者] 1 月 27 日 下午 11:29 
All animation (as well as sequence) have a number of frame, that error occurs because there are parameters trigger after animation ends (a.k.a out of range), could be ikrule or effects (particle, sound, etc...)
For example if your animation "@shoot1" has 16 frame but ikrule range is 0 0 100 100 then it's out of range
something something house 1 月 24 日 下午 8:29 
Hi i want to replace the XM29 oicw from the scar to SG552 but when i follow all your steps i get the error saying
ERROR: requested out of range frame on animation "@shoot1" : 16 (16)
in the compile log
Artillery Rain  [作者] 2023 年 8 月 23 日 上午 10:54 
I think i always overlook that glitch (when using other's mod) and i myself don't use "look_poses" in any of my mod.
Thanks for your discovery.
BluePaintball 2023 年 8 月 23 日 上午 9:36 
A suggestion, if encountering animation looping glitch when picking the gun, removing the addlayer "look_poses" from the idle sequence might solve the issue. I learned this from MrFuneral's guide.
BluePaintball 2023 年 8 月 8 日 下午 4:52 
Alrighty, thanks again.