Garry's Mod

Garry's Mod

Simple Weapons: Base
 This topic has been pinned, so it's probably important
TankNut  [developer] 16 Jun, 2022 @ 7:41pm
Feature suggestions
Suggestions for new features go here.

Remember that this base is meant to focus on simplicity above everything. If your suggestion includes things like 3D2D scopes, attachments or anything like it then don't bother.
< >
Showing 1-15 of 89 comments
CollChuuk 16 Jun, 2022 @ 11:12pm 
Alright, so here are my suggestions ...

>> General
> Compatibility with this addon addon
> Compatibility with this addon addon . Dropping weapons causes the following errors [pastebin.com]. (Password: WBMtqUixhD)

>> Weapons
> The attaching of a suppressor decreasing the damage output of a weapon.
> Dramatic bullet spread on sniper rifles when not scoped in.

>> Server side
> An option to disable the FOV change when raising and lowering equipped weapons.
> A slider to change the speed between raising and lowering equipped weapons.
> An option to "penalize" players for shooting while moving (Something like temporarily increasing spread)
> Option to disable alternate weapon modes (like suppression and burst fire)

Looking back, wow, this a lot. You don't have to implement all or any of this as this is your addon and stuff. I honestly just want to see this grow into something great. I guess what I did was write out my dream weapon base.
TankNut  [developer] 17 Jun, 2022 @ 6:12am 
Originally posted by CollChuuk:
> Compatibility with this addon addon

Compatibility is handled exclusively on their end, I couldn't add it even if I wanted to.

Originally posted by CollChuuk:
> Compatibility with this addon addon . Dropping weapons causes the following errors [pastebin.com]. (Password: WBMtqUixhD)

Technically a bug, fixed it.

Originally posted by CollChuuk:
> The attaching of a suppressor decreasing the damage output of a weapon.
> Dramatic bullet spread on sniper rifles when not scoped in.

Will consider it.

Originally posted by CollChuuk:
> An option to disable the FOV change when raising and lowering equipped weapons.

Somewhat torn on this, both in terms of whether I like the idea and whether it should be a client or server option.

Originally posted by CollChuuk:
> A slider to change the speed between raising and lowering equipped weapons.

Raising/lowering times are per-weapon at the moment, I'll probably make it global first rather than introducing it as a modifier because of how small the differences are between different weapons (at most 0.2 seconds)

Originally posted by CollChuuk:
> An option to "penalize" players for shooting while moving (Something like temporarily increasing spread)

Will consider it.

Originally posted by CollChuuk:
> Option to disable alternate weapon modes (like suppression and burst fire)

Not sure? On one hand I can kind of see wanting to disable suppressors but if I just implement it as-is then you'd end up disabling scopes as well.

A separate toggle might work, or an optional pack that includes suppressed/unsuppressed only versions of the M4A1/USP-S
CollChuuk 17 Jun, 2022 @ 7:59pm 
Understandable, thanks for the responses.

Originally posted by TankNut:
Not sure? On one hand I can kind of see wanting to disable suppressors but if I just implement it as-is then you'd end up disabling scopes as well.

A separate toggle might work, or an optional pack that includes suppressed/unsuppressed only versions of the M4A1/USP-S

Oh. Probably should have specified what I meant by that. I was only referring to the alt firing types. Like the FAMAS burst fire (though honestly, that should be its default) or the Glock's burst fire. Suppressors and Scoping are like core weapon functions. Also, I would like to thank you for making the only CSS weapon pack that adds a suppressor to the world model when the player switches to it. It's a detail many skip out on.

Oh, and while I have you, how do you feel about damage falloff (excluding sniper rifles)
Last edited by CollChuuk; 17 Jun, 2022 @ 8:00pm
TankNut  [developer] 17 Jun, 2022 @ 8:58pm 
Originally posted by CollChuuk:
how do you feel about damage falloff (excluding sniper rifles)

Damage falloff is something I'll have to think about, while I like the idea I'm not really sure on how I'd go about implementing it in a way that feels good to use and doesn't add a dozen new variables to configure.
Gumalang 19 Jun, 2022 @ 4:19am 
Can you add please the option when you can`t reload when running
RENDERMODE_NONE 20 Jun, 2022 @ 3:39pm 
Originally posted by TankNut:
Originally posted by CollChuuk:
how do you feel about damage falloff (excluding sniper rifles)

Damage falloff is something I'll have to think about, while I like the idea I'm not really sure on how I'd go about implementing it in a way that feels good to use and doesn't add a dozen new variables to configure.


You could add a callback function to the bullet (assuming you're using the FireBullets method), get the distance the bullet traveled from
(tr.HitPos - tr.StartPos):Length()
and have a DamageFalloff variable that you multiply the distance by and a MinimumDamage variable that caps how much the damage can fall off.
Something like this:
math.max( (tr.HitPos - tr.StartPos):Length() * self.DamageFalloff, self.MinimumDamage)
Not the fanciest way of implementing it, but it's simple and should work, which seems to fit what you're going for.
Last edited by RENDERMODE_NONE; 20 Jun, 2022 @ 3:40pm
TankNut  [developer] 20 Jun, 2022 @ 5:20pm 
Originally posted by Gumalang:
Can you add please the option when you can`t reload when running

Done

Originally posted by RENDERMODE_NONE:
You could add a callback function to the bullet (assuming you're using the FireBullets method), get the distance the bullet traveled from and have a DamageFalloff variable that you multiply the distance by and a MinimumDamage variable that caps how much the damage can fall off.

It's not really the code implementation I'm worried about but moreso the design bits.

Like this is some of the things I'm thinking about right now:
  • Minimum damage should probably be a global setting as a percentage, no reason to have it on a per-weapon basis (should make it able to be overwritten though, maybe make it a function we shove into the weapon callback by default)
  • Should damage dropoff be tried to spread? (As in condense both into a single 'range' variable that determines the distance for both the spread and the point at which damage starts to drop off)
  • How quickly should the damage decrease? Separate range or tie it to like... 1.5x the weapon's range?
utsunomiya1 21 Jun, 2022 @ 3:21pm 
an option to disable left mouse button weapon raise, making it only possible to aim/raise using right mouse button

a hold/toggle option for weapon raise

an option to make your weapon automatically lower as you reload
TankNut  [developer] 21 Jun, 2022 @ 8:13pm 
Damage falloff is in now, did a pretty sizable rework of how spread works in general.

The tl;dr for anyone that's curious:

The spread variable has been replaced with three new ones, Range, Accuracy and AccuracyRef.

Range determines the distance (in units) at which the weapon will do 100% of it's damage, as well as controlling the falloff together with the falloff distance option.

Accuracy and AccuracyRef controls the spread of the weapon with Accuracy setting the distance at which the weapon will hit a sphere with a diameter of AccuracyRef units

Taking some example values:
SWEP.Primary.Damage = 11 SWEP.Primary.Range = 1000 SWEP.Primary.Accuracy = 500 SWEP.Primary.AccuracyRef = 12

A weapon with these values will be able to accurately hit bodyshots at 1000 units, accurately hit headshots at half that distance and (with default settings) only deals about 2 damage at 3400+ units.

To make setting these values easier I've added a debug menu that's activated by setting developer to 1 while in singleplayer.
Last edited by TankNut; 22 Jun, 2022 @ 6:50am
76561199060275815 22 Jun, 2022 @ 6:33am 
I would like to have a feature to allow for Aim down sights instead of zooming
TankNut  [developer] 22 Jun, 2022 @ 6:46am 
Originally posted by ✪Neeko✪:
I would like to have a feature to allow for Aim down sights instead of zooming

Not happening, sorry.
76561199060275815 22 Jun, 2022 @ 12:50pm 
awww , oh well
Last edited by ehab69420; 22 Jun, 2022 @ 12:50pm
CollChuuk 22 Jun, 2022 @ 5:32pm 
Originally posted by TankNut:
Damage falloff is in now, did a pretty sizable rework of how spread works in general.

The tl;dr for anyone that's curious:

The spread variable has been replaced with three new ones, Range, Accuracy and AccuracyRef.

Range determines the distance (in units) at which the weapon will do 100% of it's damage, as well as controlling the falloff together with the falloff distance option.

Accuracy and AccuracyRef controls the spread of the weapon with Accuracy setting the distance at which the weapon will hit a sphere with a diameter of AccuracyRef units

Taking some example values:
SWEP.Primary.Damage = 11 SWEP.Primary.Range = 1000 SWEP.Primary.Accuracy = 500 SWEP.Primary.AccuracyRef = 12

A weapon with these values will be able to accurately hit bodyshots at 1000 units, accurately hit headshots at half that distance and (with default settings) only deals about 2 damage at 3400+ units.

To make setting these values easier I've added a debug menu that's activated by setting developer to 1 while in singleplayer.

Ay, this sounds pretty nice, can't wait to get home and try em.
TankNut  [developer] 22 Jun, 2022 @ 5:44pm 
I wouldn't get your hopes up because I'm thinking of changing things up a third time.

The short version is that after a bunch of thinking about it I've kind of come to the conclusion that doing damage falloff this way is... not great?

Or at least it's not very intuitive, range values are kind of arbitrary and there's no real way to get feedback on it like you get with weapon spread.


I'm currently playing around with copying CS:GO's method and if that ends up working better I'll switch to that, otherwise I'm not sure.

Edit:

It worked better.
Last edited by TankNut; 22 Jun, 2022 @ 6:57pm
CollChuuk 23 Jun, 2022 @ 8:21pm 
Originally posted by TankNut:
I wouldn't get your hopes up because I'm thinking of changing things up a third time.

The short version is that after a bunch of thinking about it I've kind of come to the conclusion that doing damage falloff this way is... not great?

Or at least it's not very intuitive, range values are kind of arbitrary and there's no real way to get feedback on it like you get with weapon spread.


I'm currently playing around with copying CS:GO's method and if that ends up working better I'll switch to that, otherwise I'm not sure.

Can confirm, it was iffy. Will tryout the new changes.
< >
Showing 1-15 of 89 comments
Per page: 1530 50