Left 4 Dead 2

Left 4 Dead 2

Simple Weapon Weight System (Vscript)
16 Comments
Pemarces273 5 Jul @ 8:51am 
is it possible to make it work for consumables too?
kouga 20 Jun @ 7:35am 
@kurochama, that feature of getting up from ledges does exist in self revive mod! but the loading bar does not, alas. since im not as knowledgeable about coding as you, im afraid i wont be much help with regards to that just yet.
kurochama  [author] 20 Jun @ 6:28am 
@Kouga , if it's just to spam or hold certain button to stand up instantly or cancel special infected's pounce, that won't be difficult to make. However, what I want from "self revive" is like when other survivor presses E on the incapped/ hanging survivor, but instead of other survivor doing that, the incapped/ hanging survivor presses E by himself, triggers loading bar & then stands up by himself. So, as I still haven't found a way for this, probably I'll focus on other projects first.
Јамеѕ 19 Jun @ 7:26pm 
Okay, thank you.
kouga 19 Jun @ 6:35pm 
honestly 2) is the most important but i have no idea if its possible for vscript. please do let me know. and there are other features i would like to add but i feel like these are core defining features for it to be comparable to Scuffle plugin functionality.
kouga 19 Jun @ 6:35pm 
@kurochama hey i dont know where we had this conversation specifically so sorry if im bringing it up here...but i remember you mentioning trying out a get up while incapped mod but couldnt figure out button detection (?). have you taken a look at both Struggle to Escape (Complete Edition) as well as Self-Revive for the code on how to figure that out?

actually its partly a request on my end because it would be nice to have those mods be on the level of the Scuffle plugin. as such here are key tasks for that:
1) have them combined into one mod
2) instead of only holding shove or crouch respectively for 3 seconds, make to so we have to repeatedly spam JUMP or SHOVE to get up.
4) make it configurable which infected we can break free from
5) when breaking free of grab, stagger the infected but add a chance to kill them. this prevents a chance of being stunlocked by repeteadly being grabbed by the same or different infected
kurochama  [author] 19 Jun @ 5:55pm 
@Јамеѕ , that "main" doesn't belong to this mod. Only that "WeaponWeightSystem" is from this mod. It doesn't spam, as it's triggered only if the weight value of the gun is different from the value on the cfg file (usually only when switching to lighter/ heavier gun). If the value is the same, it will stop checking.
& there's also the alternative mode via event function if you don't like the mode via timer. Set "weapon_weight_mode" to 1. This one is triggered manually when a survivor shoots with the gun that has different weight. For example, if you have m60 & pistol & you shoot with pistol, when you switch to m60, you can still run fast, until you shoots with m60.
Јамеѕ 19 Jun @ 5:41pm 
Does this get spammed in the console for anyone else AND make their game lag? "
SCRIPT PERF WARNING --- "__RunGameEventCallbacks" ran long at 2.530503ms
SCRIPT PERF WARNING --- "main" ran long at 1.888850ms
SCRIPT PERF WARNING --- "main" ran long at 1.849595ms
SCRIPT PERF WARNING --- "main" ran long at 1.851288ms
SCRIPT PERF WARNING --- "WeaponWeightSystem" ran long at 2.996201ms
SCRIPT PERF WARNING --- "main" ran long at 2.060237ms
SCRIPT PERF WARNING --- "main" ran long at 1.913527ms
SCRIPT PERF WARNING --- "main" ran long at 1.976497ms
SCRIPT PERF WARNING --- "main" ran long at 1.657840ms
SCRIPT PERF WARNING --- "WeaponWeightSystem" ran long at 2.803203ms
SCRIPT PERF WARNING --- "main" ran long at 1.835298ms
SCRIPT PERF WARNING --- "main" ran long at 1.909880ms
SCRIPT PERF WARNING --- "main" ran long at 1.903348ms
SCRIPT PERF WARNING --- "WeaponWeightSystem" ran long at 2.808723ms"
kurochama  [author] 17 Jun @ 8:22pm 
@birdLover8968 , probably that can be done even without making a new one, like, there's "weapon_weight_mode" up there. I can simply add a new mode that applies the heaviest gun as the main weight. However, there's at least one side effect for this. If this mode is applied, your jump range will also be affected (imagine jumping forward when in the water vs jumping forward normally on the ground).
birdLover8968 17 Jun @ 7:02pm 
Huh. Do you take requests? Because I'd love a version where it's based off of the heaviest weapon you're holding
kurochama  [author] 17 Jun @ 6:30pm 
@birdLover8968 , it's based on what you're holding. So if you switch to lighter weapons, you can move faster than when holding a heavy weapon.
birdLover8968 17 Jun @ 5:46pm 
Is this based on what you're holding, or is it just based on the heaviest item you have on you?
kouga 24 May @ 11:46pm 
what i had in mind is the first one because there are already mods for switching to other items while incapacitate but none yet for picking items up.
kurochama  [author] 24 May @ 11:14pm 
@Kouga , if it's to pick items on the ground, maybe it's still possible. But if it's to freely switch to other item during incapacitation, I think the easiest way would be editing weapon scripts to allow all items & weapons to be used during incapacitation.
kouga 24 May @ 9:16pm 
woah. definitely gonna mess around with this when i can. do you think you can make a mod that lets you pick up items and weapons while incapacitated?
Unsants 24 May @ 11:48am 
:chainsaw: :health: