Garry's Mod

Garry's Mod

43 betyg
Simple Customizable SMG
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun, Roleplay
Filstorlek
Lades upp
1.829 KB
3 jan, 2019 @ 14:19
1 ändringsnotis ( visa )

Abonnera för att ladda ner
Simple Customizable SMG

I 1 samling av Constable Reginald
Simple Customizable Weapons
8 artiklar
Beskrivning
An extremely customizable gun (using CSS's MP5) with console variables and sliders for fun, gameplay, experimentation, and learning for those new to lua scripting! (I still am, as there are far more options I want to get working, see below)

What this does:
  • Select the damage each bullet transmits. Pew pew! ("smg_dmg")

  • Select the spread, given by the Vector (x/100, x/100, 0). Never miss, or fire like a potato. ("smg_spread")

  • Select how fast the gun fires with rounds per minute (RPM). If set to 0, fire as quickly as you can click. As the formula for this is 60/RPM, I suggest either 0, or 60 (one shot per second) or significantly higher. I believe at most you can fire is 30 shots per second, which is why the slider is capped at 1800RPM ("smg_rpm")

  • Choose the amount of force the bullet does when it kills a target, this unit is expressed in kg * inches per second ("smg_force") Valve uses realistic grains and speeds to calculate how much force, but then add an exaggeration multiplier of 3.5 so that even pistols make ragdolls jerk around, so see what you like. This will require a restart as this creates its own ammo.

  • Adds the CS font for accurate kill icon, as well as the ability to completely customize the color of the kill icon. Or, for a surprise, set the variables ("smg_killicon*") to -1 to randomize the kill icon color per session (yes, the ability to randomize none, one, or all four parameters of the color structure).

  • Right-click introduces "bullet time" (not really, you're moving slower too) so you can get those satisfying headshots and see just how far your overly powered bullet sends the target flying. Right-click again (if you've set it low, you may have to hold it) to restore time back to normal ("smg_bullettime").

What this DOESN'T do:
  • Adhere to realistic bullet inventory. The clip would not accurately count, even when trying to "feed" the swep vanilla bullets while firing my custom bullets, the clip would stay "0" while the full count of ammo went down with each shot. It was weird, and I'm too dumb or too lazy to figure it out currently. I'm still hoping I can fix it to bring some more realism for those that want it.

  • "View punch" and recoil. I don't like the idea of coming up with some arbitrary formulas that might succeed in acheiving those, but is still "made up" and is based on rules that I ultimately have to decide on. View punch isn't valid on NPCs, which is where I'd eventually like to steer this anyhow.

  • Due to limitations within the SWEP structure itself, you can not change the force multiplier employed by the swep to extremely high numbers. Therefore, this weapon creates its own ammo within the game to fix that, but as a result, you're required to restart your session if you're changing the bullet force.

  • Have spawn icons. Apparently it's as easy as just throwing .png in vgui/entities, but I wanted this addon as light as possible. If it required anything outside of what I could type, I wasn't about to do it.

  • Have weapon select icons. I thought this could be done with finding the proper font like I did with the kill icon. I either couldn't figure it out and gave up, or forgot to fully try and research to see if I could figure it out on my own.

  • Coding for NPCs. I wish I knew, it's the one thing I've wanted to do since discovering I could make my own SWEPs, and extracting others that have has gotten me nowhere near closer to figuring it out. Maybe one day. Or someone smarter than me can build upon this and make it better.

The rest:

Pistol (Damage, Force, Spread, RPM, BulletTime)


Automatics (Damage, Force, Spread, RPM, BulletTime)


Close-Range (Damage, Pellets, Force, Spread, RPM, BulletTime)


Long-Range (Damage, Force, Zoom FOV, Spread, RPM, BulletTime)

2 kommentarer
Constable Reginald  [skapare] 27 jul, 2022 @ 1:47 
Context menu
Grandpa Major 8 jun, 2022 @ 12:39 
How do you edit it?