Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
Left 4 Dead 2 Weapon Mod: Swap Replacement
By 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://steamhost.cn/steamcommunity_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.
   
Award
Favorite
Favorited
Unfavorite
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 Comments
Artillery Rain  [author] 28 Jan @ 5:25am 
You can correct that by replacing those ikrule lines which this:

ikrule "lhand" touch "acr_main"
ikrule "rhand" touch "acr_main"
Artillery Rain  [author] 28 Jan @ 5:23am 
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 28 Jan @ 2:16am 
$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 28 Jan @ 2:16am 
$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 28 Jan @ 2:16am 
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  [author] 27 Jan @ 11:29pm 
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 24 Jan @ 8:29pm 
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  [author] 23 Aug, 2023 @ 10:54am 
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 23 Aug, 2023 @ 9:36am 
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 8 Aug, 2023 @ 4:52pm 
Alrighty, thanks again.