*This post is being edited a lot since well… I keep adding more stuff…
Over the past year, I’ve been making weapons in lua just for my own hobby. Because I felt that even for a game that runs on an engine about 16 years old, there is still a lot of potential.
This weapon base uses a bunch of little tricks to give an experience in which I would call, close enough to realism as it can be on source engine.
When I first started on this, I wanted it to be completely unique in what it can offer, and try to make it feel as if you are playing a triple A game or something…
Shared lua based viewpunch system (Using tick to fps smoothing & prediction for sv/cl support)
Shared weapon movement system (Aka, the bullet goes in the direction of where the gun is pointing, literally, using tick to fps smoothing & prediction for sv/cl support)
Green = Direction of where the bullet should go
Red = Same as green but affected by weapon’s FOV (used to determine if the weapon is correctly setup to compensate the FOV for on-point aiming)
Scope system using some wacky vector manipulation and all kinds of stuff (I swear the source code looks like I got drunk on a friday night)
Sights which follows the laws of how sights should work (I think)
Look at how the reticle renders on top of the gun but not on top of the sight itself
A bullet ballistic system, like… Mathematically done…
Aka → Damage is affected by velocity is affected by water, air, wind (require stormfox), gravity, surfaces and etc
Attachments where you can modify even the bullet system itself. (I some what created cyberpunk 2077 smart bullets, idk why, I got drunk when I did it)
A REALLY customizable attachment system.
I suggest looking at “Effects” and “Conditions” as it explains what I mean by “customizable”
On pastebin, since the doc is too big to be pasted here.
And my not so great UI for the base…
But to make it better I included a cat so enjoy that atleast.
And some more shinanigans
Stuff I used from other creators,
Weapon Models - FA:S 2.0
Optics and Sights - FA:S 2.0/TFA’s [AT] models
Muzzle Effects - FA:S 2.0