Garry's Mod

Garry's Mod

170 ratings
[CW 2.0] Ammo Weight HUD
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun, Realism
File Size
Posted
Updated
38.224 KB
23 Oct, 2017 @ 3:22pm
26 Oct, 2017 @ 10:13pm
4 Change Notes ( view )

Subscribe to download
[CW 2.0] Ammo Weight HUD

Description
TLDR: This mod counts and weighs all the CW 2.0 Ammo you are currently holding for the weapons you currently have and displays it on screen in PUBG style bar. Ammo weights are realistic. For example, a 5.56x45mm cartridge weighs around 12.3 grams. If you can carry 10kg(22lbs) of ammo, that’s around 810 rounds. Of course you could also mix and match other ammos to get to 10kg in any combination. There are options to change your run speed depending on how much ammo you are carrying among other things. Like with all my mods the display and settings are completely customizable for your own preference in the options panel. AND like with all my mods they don’t or weren’t designed to work in multiplayer.

Here a link to my 20 minute long, trash voice over video of all the features.
https://youtu.be/Z9LdYEsFI6I

IMPORTANT THINGS AND COMMON QUESTIONS
  • THIS PROBABLY WON’T WORK IN MULTIPLAYER. Probably. I don’t play multiplayer but I’m pretty sure it won’t work as intended becuase I didn't design it that way. Sorry! It might work who knows. Give it a shot if you want and let me know. I can't because I have no friends.
  • This only counts ammo for CW 2.0 weapons, nothing else. And only the weapons you currently have.
  • Ammo weights are only accurate for base CW 2.0 ammo calibers and a few common others since I can’t know all the ammo calibers for custom weapons. All unknown ammo types will weigh 18.0 grams. 9mm weighs 11.9g and 7.62x51mm weigh 25.5g for comparison.
  • There is a slight spacing issue with the Inside-Outside orientation when bar dimensions are larger. Working on a fix. Unfortunately, I can’t split pixels in half.
  • If Do On Full is set to 1 and you are overburdened then switch to Do On Full 2, you will still be slowed until you try to get more ammo or become not overburdened.
  • If you Do On Full is set to 2, it will max out your weight slightly below your target weight. It won’t let you get too close due to there being some glitches where it would be a couple grams over still. Most likely due to rounding. The larger amount of ammo you pick up the larger the buffer will be when it takes ammo away to keep you underweight.
  • If Do on Full is set to 2 and you are picking ammo for another weapon while full, it will take the ammo from the gun you are currently using. If you don’t have any ammo to take away it will find the next gun you are carrying to take away ammo from. If the only other ammo type to take away is that ammo you are picking up, it won’t let you pick any more up. It is slightly possible that you may still get overburdened. If so either try to pick up again it should go down. Or shoot. Usually, it will put you one bullet over if at all. I'm currently working on fine-tuning Do On Full 2.
  • If you see a patern or have any ideas to the glitch with being overburdened while Do On Ful is set to 2. Please let me know. That's my main focus right now. It will be fixed in the upcomming weeks hopefully.
  • If Do on Full is set to 2 you may see that you cant pick up any more ammo and the display isn’t full. That’s because one or two more rounds of that ammo type would put you over, you can, however, grab some more ammo of a lighter type like 5.7x28mm.
  • Read the descriptions in the options panel.
  • If you use my Life-Line mod, it will be in the same spot by default.
  • This is not perfect so please report any bugs or feature/ideas. I’m working on adding animations to it.
  • My weapons pack that uses custom ammo types is not out yet. It will be out pretty soon though. Probably.
  • If you like this give it a thumbs up. It motivates me to work more on this and provide more feautures.

Features:
  • 6 orientations: Top/Bottom, Bottom/Top, Right/Left, Left/Right. In/Out, Out/In
  • Full-color control: You can make the border and bars any color/transparency you want. You can also make them fade between two colors depending on how much weight you have. So you can have the bars be white when empty and red when full. In addition, you can make each individual bar color represent how full you are. So bars at the bottom will be white and the bars at the end will be red.
  • Full Size/Position Control: You can change everything about the display using the settings. You can change the number of bars, bar height, width, divide, and the outline divide and size. All sizes work with all orientations. You can move the display anywhere on screen using the offsets.
  • 4 Speed Effect Options: First is to apply an “overburdened speed” when the max weight is reached or surpassed. Second is to linearly decrease your speed down to a given speed when full and then stay at that speed(set the overburdened speed to the full speed). Third is the same as above but you will go at the “overburdened” speed when full. Fourth is keep slowing down the more weight you gain. Read the options panel for more details since these are seperate commands.
  • Realistic Ammo Weights: (CW 2.0) Ammo weights are correct to real world equivalent. This does not include magazine weight though. So 70% realistic I guess but magazines don’t weigh a ton. You can set it to not allow you to pick up any more ammo if you are full too.
  • Performance Friendly Option: There is an option to change the interval between ammo counts. By default ammo is counted every server tick but this can be tough on slow computer. So you can enter your own interval. But it will be less responsive.
  • 3 Max Weight Effects: First is to there to be no penalty for being overburdened. Second, is to use an overburdened speed or the degradation effects. Third is to limit the amount of ammo you can pick up, preventing you from being overburdened.
  • Max Weight Sound: You can enable a sound to be played when max weight is reached or surpassed. You can chose your own sound to use.
  • BUG FREE! Haha JK. Seriously though report bugs if any. It should work fine though. I test my stuff as best I can but this one is pretty hard to test 100%.

Potential Features: Let me know if you think any of these are good ideas
  • Make the outline fadable like the individual bar fade? Or stick with a single color fade?
  • Play an empty sound. When you run out of ammo?
  • Drop the ammo that you couldn't carry in the form of boxes on the ground?
  • Be able to change the color of the bars that are over max? Right now they are red and flash?
  • Animations? How should the animations look? Options?

P.S. If you want to change the dimentions/settings to something other than what I limited them to in the options panel, you can use the console commands. The server ones start with "sv_aw_" and the HUD ones start with "cl_awhud_" keep in mind that you may get unexpected behavior if you use values outside of the ones I limited it to in the menu.

Credits:
Code: Me
CW 2.0: Our lord and savior: Spy
Weapons: From my pack that is not out yet. I did not make the models.
Gloves: Bucker Gloves redone by me.
Map: gm_freespace13
91 Comments
<[MIA]>.GEN.P!KE.ARMY  [author] 17 Feb, 2021 @ 1:46pm 
It's the battlefield 4 hud.

https://steamproxy.net/sharedfiles/filedetails/?id=222403838

I made some changes to it tho.
AlexGuy 17 Feb, 2021 @ 9:53am 
What is the HUD you're using?
Spicy T 13 Jun, 2019 @ 6:27pm 
thanc.
<[MIA]>.GEN.P!KE.ARMY  [author] 12 Jun, 2019 @ 7:31pm 
Bring up the normal game menu (where you spawn stuff) and on the right side under "Options>P!KE>Ammo Weight Options" You can see all the options there. There are screen shots up to at the end.
Spicy T 12 Jun, 2019 @ 5:32pm 
@<[MIA]>.GEN.P!KE.ARMY wait what is the command to pull up the menu?
Spicy T 12 Jun, 2019 @ 5:30pm 
aight thanks i'll try that
<[MIA]>.GEN.P!KE.ARMY  [author] 10 Jun, 2019 @ 11:16pm 
If you are subscribed and enabled and the HUD is enabled in the menu, then it should be in the bottom center of the screen. Make sure you have CW 2.0 installed and you have a weapon and ammo equipped. You can try messing with the position offsets in the menu to see if it somehow positioned itself off-screen.

But unfortunately I can only really help more if there are LUA errors in the console for this addon. Or else I can't really help or identify the problem, there are just too many variables to consider.
Spicy T 9 Jun, 2019 @ 4:13pm 
why is it not showing up? I enabled the HUD. am i just stupid or did i miss somethin ??????
Blazbo Babbins 12 Sep, 2018 @ 10:16pm 
not working op
come on big guy
<[MIA]>.GEN.P!KE.ARMY  [author] 30 Aug, 2018 @ 1:03pm 
Again, the only way I can help is if you provide me with any errors that this addon threw in the console. If there are none then you have conflicts with your other addons.

I would disable addons that have HUD elements and see if that resolves the problem.

I'm not responding to anything else unless you give me LUA errors.