• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Empty Shell Casings

living

Active member
Apr 1, 2015
29
1
So after playing around in the config files I was able to make the empty shell casings persistent after using ShellEjectLifetime= X.000000

Nothing new here, however I noticed that the shells disappear upon weapon switching. What line, if there is one, needs to be changed in order to cause the shells to stay even after switching weapons? The most I found was how to make them last longer, not about the issue I'm having.

I'm trying to go for that whole "WWI mountains of empty artillery shells" look.
 
  • Like
Reactions: eckojay
I've done a fair bit of digging myself for this. I haven't been lucky enough to find the code that disables this feature.
The odd thing is that spent magazines seem to persist after weapon switch while shells do not.

I would recommend looking in the /src folder in the killing floor 2 directory to see what classes there are and how they can be modified. Maybe you'll have more luck than me.

I imagine it's a small piece of code somewhere. I would appreciate if a developer had some insight into this as I imagine it's not difficult to change, just difficult to find.
 
  • Like
Reactions: living
Upvote 0
eckojay;n2277106 said:
I would recommend looking in the /src folder in the killing floor 2 directory to see what classes there are and how they can be modified. Maybe you'll have more luck than me.

Yeah I'm messing around in the SRC folder right now and found the KFMuzzleFlash UC file and it holds most of the information about the shell ejections. There may be more found in objects or something but I'm not a coder so all this is Chinese to me.

Thanks for the reply, good to know(well, not good) that someone has the same issue as me and knows what I'm talking about.
 
Upvote 0
I only had a quick look, but it looks like when you swap weapons, it detaches the KFWeaponAttachment from your SkeletalMeshComponent. KFWeaponAttachment.DetachFrom() calls KFMuzzleFlash.DetachMuzzleFlash(), which in turn calls SkeletalMeshComponent.DetachComponent(), passing in the particle system for the ejected shells. Unfortunately SkeletalMeshComponent.DetachComponent() is native, so I can't tell what it does, but I'm assuming it probably removes all of the ejected shells. The magazines aren't handled here, which might be why they persist. I haven't looked at where they are handled.

To make searching for specific strings in the Src directory easier, I suggest using a program such as grepWin.

If you're not a modder, you're probably going to have a hard time fixing this, as you'd need to create a mod (as far as I can tell).
 
  • Like
Reactions: living
Upvote 0
Pharrahnox;n2277186 said:
If you're not a modder, you're probably going to have a hard time fixing this, as you'd need to create a mod (as far as I can tell).

damn that's what I was afraid of. I mean I guess no better time to learn modding and coding than the present. Or maybe I'll just hope and pray someone at TWI looks at this and goes "yeah, that's a great idea" and does it themself. Maybe if I git gud I can add some other things I was thinking about like dripping blood from the splatter textures on the ceilings or something.
 
Upvote 0
living;n2277199 said:
Maybe if I git gud I can add some other things I was thinking about like dripping blood from the splatter textures on the ceilings or something.

Are you me? This is pretty much the exact other thing I wanted to add to this game myself or have tripwire add. Weird.

Best of luck with both of these. I'd love to know if you manage to get any of it working. Might re-visit the code myself to see what I can do
 
Upvote 0