Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
Simple Weapon Weight System (Vscript)
   
Award
Favorite
Favorited
Unfavorite
Game Content: Weapons, Scripts
Game Modes: Single Player, Co-op
File Size
Posted
Updated
55.584 KB
23 May @ 11:38pm
24 May @ 9:03am
2 Change Notes ( view )

Subscribe to download
Simple Weapon Weight System (Vscript)

In 1 collection by kurochama
Useful "Side-Dish" Mods (Especially for Bots)
47 items
Description
Yeah, I know that there's already a weapon weight script mod. I simply just wanted to make my own version, in simpler ways based on methods I know :D . I used Fatigue System as the base for this mod, as I was inspired by one of the fatigue mode that slows down the movement speed there.


List of features available on "simple weapon weight system.txt" cfg file:
  1. weapon_weight_user: Which type of survivors will apply weapon weight system (bots only/ players only/ all).

  2. weapon_weight_mode: Which is applied (Auto/ Manual mode).

  3. weaponname_weight: Each of these features represents the weight of each weapon. The value can be in decimals/ floats. Min value is 1, max= 70 (moving very slowly like a snail :D). Notes: When the value is set to 3, the movement speed is already slow enough, so adjust the value in decimals instead if you want to only modify the speed slightly, like 1.15, 1.25, 1.34 etc.


Mechanisms on "Simple Weapon Weight System":
  • Each gun has its own weight based on the value set on the cfg file.

  • The weapon weight is applied based on the "weapon_weight_mode".

  • If "weapon_weight_mode" is set to "Auto Mode", a think timer will be used to regularly check the gun that the survivor is holding whether the movement slowdown matches the value or not. If it's not, the timer will change it to match the value.

  • If "weapon_weight_mode" is set to "Manual Mode", the weapon weight will be checked the moment a survivor fire the gun for the first time. If the movement slowdown doesn't match the value, it will be adjusted to match the value after firing.

  • This weapon weight also affects the jumping range. It means that by holding m60, even if you do some bunny hops, your bhop speed is way slower than those who are bhopping with only smgs or pistols. So, if you play some custom campaigns that requires some parkours, it's better to switch to pistol or melee.

  • Available chat command:
    Chat Command
    Effects
    check weight
    - Checks the current weapon weight.
    - Only available on "weapon_weight_mode = 0"


Q: "Can this be used together with 'Fatigue System' mod?"
A: "Yes, but fatigue mode is set to 'Movement Slowdown' & fatigue point hits 0, the movement slowdown on 'Fatigue System' may override the movement slowdown on this mod. But it won't affect when the fatigue point is above 0."
Q: "What makes it different from the already existing mod with similar weapon weight features?"
A: "I don't know exactly, but I just made this mod with as simple ways as possible by using a netprops that affects friction. I love simple things, so I made it that way instead hehehe..."


So, this mod can become an alternative for weapon weight mod if you want to experience how weapon weight on Counter Strike feels like.


NOTES:
  • Animated previews will be added later when I'm online again.
  • As I'm not familiar enough with weapon weight in real life or real data on Counter strike, each default weight value on the cfg file was set based only on simple tests during plays, with only m60, grenade launcher & chainsaw having more weight than others weapon did. So, you can set the weight value on the cfg file as you like to match the real weapon weight of each weapon you're familiar with on other games.
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