Garry's Mod

Garry's Mod

Simple Weapons: Base
 Denne tråd er blevet fastgjort, så den er sikkert vigtig
TankNut  [udvikler] 16. juni 2022 kl. 19:41
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.
< >
Viser 1-15 af 89 kommentarer
CollChuuk 16. juni 2022 kl. 23:12 
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  [udvikler] 17. juni 2022 kl. 6:12 
Oprindeligt skrevet af CollChuuk:
> Compatibility with this addon addon

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

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

Technically a bug, fixed it.

Oprindeligt skrevet af 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.

Oprindeligt skrevet af 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.

Oprindeligt skrevet af 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)

Oprindeligt skrevet af CollChuuk:
> An option to "penalize" players for shooting while moving (Something like temporarily increasing spread)

Will consider it.

Oprindeligt skrevet af 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. juni 2022 kl. 19:59 
Understandable, thanks for the responses.

Oprindeligt skrevet af 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)
Sidst redigeret af CollChuuk; 17. juni 2022 kl. 20:00
TankNut  [udvikler] 17. juni 2022 kl. 20:58 
Oprindeligt skrevet af 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. juni 2022 kl. 4:19 
Can you add please the option when you can`t reload when running
RENDERMODE_NONE 20. juni 2022 kl. 15:39 
Oprindeligt skrevet af TankNut:
Oprindeligt skrevet af 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.
Sidst redigeret af RENDERMODE_NONE; 20. juni 2022 kl. 15:40
TankNut  [udvikler] 20. juni 2022 kl. 17:20 
Oprindeligt skrevet af Gumalang:
Can you add please the option when you can`t reload when running

Done

Oprindeligt skrevet af 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. juni 2022 kl. 15:21 
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  [udvikler] 21. juni 2022 kl. 20:13 
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.
Sidst redigeret af TankNut; 22. juni 2022 kl. 6:50
76561199060275815 22. juni 2022 kl. 6:33 
I would like to have a feature to allow for Aim down sights instead of zooming
TankNut  [udvikler] 22. juni 2022 kl. 6:46 
Oprindeligt skrevet af ✪Neeko✪:
I would like to have a feature to allow for Aim down sights instead of zooming

Not happening, sorry.
76561199060275815 22. juni 2022 kl. 12:50 
awww , oh well
Sidst redigeret af ehab69420; 22. juni 2022 kl. 12:50
CollChuuk 22. juni 2022 kl. 17:32 
Oprindeligt skrevet af 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  [udvikler] 22. juni 2022 kl. 17:44 
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.
Sidst redigeret af TankNut; 22. juni 2022 kl. 18:57
CollChuuk 23. juni 2022 kl. 20:21 
Oprindeligt skrevet af 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.
< >
Viser 1-15 af 89 kommentarer
Per side: 1530 50