Page 2 of 3
Re: Ammo Indicator
Posted: 2013-07-21 09:31
by Mats391
[R-DEV]Moszeusz6Pl wrote:Color is controlled by BF2 engine. You could have it controlled by some if statement, which is what I'm going to look into after 1.0.
I tried using PrimaryAmmoRed -Green -Blue but that turns red already when ammo is under 30%, which is too early imo.
Also i wasnt happy with the last indicator. I dont like that it covers 25-1 bullets left with 1 state, i think it should be more accurate towards the end as its easier to count bullets then.
So i made it like this:

Re: Ammo Indicator
Posted: 2013-07-21 10:36
by AfterDune
If this is for HMG, it's fine. But if you have less bullets, it gets too accurate.
Re: Ammo Indicator
Posted: 2013-07-21 10:52
by 40mmrain
I like red orchestra 2's little ability to pop off your mag and see what's left in it, then reattaching it.
IS it possible to have some kind of key binding that lets you make this appear in your hud just for a moment? As to simulate checking your map.
Re: Ammo Indicator
Posted: 2013-07-21 10:54
by Moszeusz6Pl
Yes it is

Re: Ammo Indicator
Posted: 2013-07-21 11:39
by Mats391
[R-DEV]AfterDune wrote:If this is for HMG, it's fine. But if you have less bullets, it gets too accurate.
Imo its fine, remember i meant this for open magazines/belts where you can see the bullets. For enclosed mags it should be way less accurate, if its realistic at all.
This is how latest looks with 30round mag (e.g. g36 with transperant mag) and 75round (Mg3)

Re: Ammo Indicator
Posted: 2013-07-24 22:41
by Mats391
I tried to make the indicator only show up when changing weapons or pressing a certain button, but had no luck with both. So instead my solutions were either when you press capslock or when you reload. The reloading makes it look abit like checking ammo and since you will (maybe)cancle the reload you will switch weapons anyway
Code: Select all
hudBuilder.createSplitNode IngameHud AmmoIndicatorHud
hudBuilder.setNodeShowVariable PrimaryAmmoShow
hudBuilder.setNodeLogicShowVariable EQUAL GuiIndex 61
rem hudBuilder.setNodeLogicShowVariable AND MapFullSizeAndSpawnShow 1
hudBuilder.setNodeLogicShowVariable AND PrimaryReloadTimeShow 1
hudBuilder.setNodeInTime 0
hudBuilder.setNodeOutTime 1.5
rem Frame
hudBuilder.createPictureNode AmmoIndicatorHud AmmoIndicatorFrame 760 580 16 32
hudBuilder.setPictureNodeTexture Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorFrame.dds
hudBuilder.setNodeColor 0.82353 0.82353 0.70196 1
rem Main Bar rough Indicator
hudBuilder.createBarNode AmmoIndicatorHud AmmoIndicatorBar1 0 761 581 8 16
hudbuilder.setBarNodeTexture 1 Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorBar1.dds
hudBuilder.setBarNodeTexture 0 Ingame/GeneralIcons/empty.tga
hudBuilder.setBarNodeSnap 6
hudBuilder.setBarNodeValueVariable PrimaryAmmo
hudBuilder.setNodeColor 0.82353 0.82353 0.70196 1
rem Sub Bar for more precision at end
hudBuilder.createBarNode AmmoIndicatorHud AmmoIndicatorBar2 0 761 581 8 16
hudbuilder.setBarNodeTexture 1 Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorBar2.dds
hudBuilder.setBarNodeTexture 0 Ingame/GeneralIcons/empty.tga
hudBuilder.setBarNodeSnap 2
hudBuilder.setBarNodeValueVariable PrimaryAmmo
hudBuilder.setNodeColor 0.82353 0.82353 0.70196 1
Re: Ammo Indicator
Posted: 2013-07-25 00:11
by Heavy Death
Bluedrake42 wrote:for things like AR, this would be awesome.
HOWEVER. It would also be cool if this ONLY showed when you re-equip your weapon
That way you can check how much ammo is left, but you have to go through the deploy/arm animation first
This would kindof simulate taking out a mag and checking the ammo/weight
Great addition. Make it fade away after a second or two from selecting. if you want to re-chehk, re select the weapon.
Re: Ammo Indicator
Posted: 2013-07-25 07:03
by Moszeusz6Pl
Don't worry about showing this bar only when button is pressed. We already have something planned for this.
Re: Ammo Indicator
Posted: 2013-07-25 07:44
by ghostfool84
Looks like a nice idea and i like the icons. May it be used in Assault Rifles with transparent mag like the G36 too?
edit: Note to myself: First read the whole thread, then answer 8[
Re: Ammo Indicator
Posted: 2013-07-25 08:52
by Frontliner
Mats391 wrote:Imo its fine, remember i meant this for open magazines/belts where you can see the bullets. For enclosed mags it should be way less accurate, if its realistic at all.
This is how latest looks with 30round mag (e.g. g36 with transperant mag) and 75round (Mg3)

I don't like the way the 2nd ammo box shows over half full and goes down to 8/30 and 19/75, it can really throw you off when it's such a mismatch between indication and actual ammo. What instead I would propose is going
30-26 75-61
25-16 60-38
15-6 37-16 (just a quick note in regards to the G36 mag, the rounds start being covered by the magazine socket once you have less than 6, so right there it's not really a made up number).
5-1 15-1
But you can't really control what the displayed numbers are, can you?
Re: Ammo Indicator
Posted: 2013-07-25 09:32
by Moszeusz6Pl
We only thing we can control is size of one step, we can't make one step smaller and other bigger.
Re: Ammo Indicator
Posted: 2013-07-25 09:41
by Frontliner
I guess that means number of rounds/4 then. I was primarily concerned about the indicator for over half full, but I guess that'll do.
Re: Ammo Indicator
Posted: 2013-07-25 11:31
by Roque_THE_GAMER
would be more interesting if you press some button and had an animation of you checking the ammunition.
Re: Ammo Indicator
Posted: 2013-07-25 11:46
by Moszeusz6Pl
Animation of checking ammunition is hardcoded.
Re: Ammo Indicator
Posted: 2013-12-23 13:13
by Mats391
Bump
Since i was never satisfied with the previous dial of this i went back and did another one.

The numbers shown are the percentages.
In this i tried to get around the step limit the bar node forces onto you. To achieve this i created multiple bar nodes that overlap. In total this uses 6 textures with total size 4kB and 5 bar nodes.
Code:
Code: Select all
hudBuilder.createSplitNode IngameHud AmmoIndicatorHud
hudBuilder.setNodeShowVariable PrimaryAmmoShow
rem Frame
hudBuilder.createPictureNode AmmoIndicatorHud AmmoIndicatorFrame 760 580 10 18
hudBuilder.setPictureNodeTexture Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorFrame.dds
hudBuilder.setNodeColor 0.82353 0.82353 0.70196 1
rem Indicator 1 100-87.5 part1 and 12.5-6.25 part1
hudBuilder.createBarNode AmmoIndicatorHud AmmoIndicatorBar1_1 0 761 581 8 16
hudbuilder.setBarNodeTexture 1 Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorBar1_1.dds
hudBuilder.setBarNodeTexture 0 Ingame/GeneralIcons/empty.tga
hudBuilder.setBarNodeSnap 1
hudBuilder.setBarNodeValueVariable PrimaryAmmo
rem hudBuilder.setNodeColor 0.82353 0.82353 0.70196 1
rem Indicator 1 100-87.5 part2 and 12.5-6.25 part2
hudBuilder.createBarNode AmmoIndicatorHud AmmoIndicatorBar1_2 0 761 582 8 16
hudbuilder.setBarNodeTexture 1 Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorBar1_2.dds
hudBuilder.setBarNodeTexture 0 Ingame/GeneralIcons/empty.tga
hudBuilder.setBarNodeSnap 1
hudBuilder.setBarNodeValueVariable PrimaryAmmo
rem hudBuilder.setNodeColor 0.82353 0.82353 0.70196 1
rem Indicator 1 100-87.5 part3
hudBuilder.createBarNode AmmoIndicatorHud AmmoIndicatorBar1_3 0 761 583 8 16
hudbuilder.setBarNodeTexture 1 Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorBar1_3.dds
hudBuilder.setBarNodeTexture 0 Ingame/GeneralIcons/empty.tga
hudBuilder.setBarNodeSnap 1
hudBuilder.setBarNodeValueVariable PrimaryAmmo
hudBuilder.setNodeColor 0.82353 0.82353 0.70196 1
rem Indicator 2 87.5-62.5
hudBuilder.createBarNode AmmoIndicatorHud AmmoIndicatorBar2 0 761 583 8 16
hudbuilder.setBarNodeTexture 1 Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorBar2.dds
hudBuilder.setBarNodeTexture 0 Ingame/GeneralIcons/empty.tga
hudBuilder.setBarNodeSnap 6
hudBuilder.setBarNodeValueVariable PrimaryAmmo
hudBuilder.setNodeColor 0.82353 0.82353 0.70196 1
rem Indicator 3 62.5-37.5
hudBuilder.createBarNode AmmoIndicatorHud AmmoIndicatorBar3 0 761 583 8 16
hudbuilder.setBarNodeTexture 1 Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorBar3.dds
hudBuilder.setBarNodeTexture 0 Ingame/GeneralIcons/empty.tga
hudBuilder.setBarNodeSnap 10
hudBuilder.setBarNodeValueVariable PrimaryAmmo
hudBuilder.setNodeColor 0.82353 0.82353 0.70196 1
rem Indicator 4 37.5-12.5
hudBuilder.createBarNode AmmoIndicatorHud AmmoIndicatorBar4 0 761 583 8 16
hudbuilder.setBarNodeTexture 1 Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorBar4.dds
hudBuilder.setBarNodeTexture 0 Ingame/GeneralIcons/empty.tga
hudBuilder.setBarNodeSnap 14
hudBuilder.setBarNodeValueVariable PrimaryAmmo
hudBuilder.setNodeColor 0.82353 0.82353 0.70196 1
Re: Ammo Indicator
Posted: 2013-12-23 13:33
by AfterDune
I like it

.
But is it my monitor, or is it quite hard to distinguish the two colors of the mag?
And what does it look like if the last image is an empty mag, with just a red border?
Re: Ammo Indicator
Posted: 2013-12-23 14:20
by UTurista
Mats391 wrote:Bump
Since i was never satisfied with the previous dial of this i went back and did another one.

The numbers shown are the percentages.
Nice but I would say 3 levels would be enough,
- Mag "Feels Heavy" -[100 - 80]
- Mag used -[79 - 21]
- Mag "Feels light" -[20 - 0]
Re: Ammo Indicator
Posted: 2013-12-23 14:39
by Rabbit
Hmmm, I have to say I think its a bit to much color wise. As an idea, point of reference, the US mil uses a verbal color system for status and amounts when in combat, which might be something to take into account.
Green- full functioning, total amount still held
Yellow- About 60%-40% functioning, 60%-40% still held
Red- Less and 40%-1% functioning, Less and 40%-1% held
Black- Inoperable, Nothing still held.
Re: Ammo Indicator
Posted: 2013-12-23 14:41
by Rudd
O_turista_portugues wrote:Nice but I would say 3 levels would be enough,
- Mag "Feels Heavy" -[100 - 80]
- Mag used -[79 - 21]
- Mag "Feels light" -[20 - 0]
I'd go with this, also addresses the colour issue since Used and Light would be red, and feels heavy wouldn't even need a colour
good work Mats, well done

Re: Ammo Indicator
Posted: 2013-12-23 17:16
by Mats391
[quote=""'[R-DEV"]AfterDune;1969753']I like it

.
But is it my monitor, or is it quite hard to distinguish the two colors of the mag?
And what does it look like if the last image is an empty mag, with just a red border?[/quote]
There is only one colour for the mag, the second one is the forum background as the mag gets more transperant. Here it is with screens taken from ingame + red frame for empty mag:
[quote="O_turista_portugues""]Nice but I would say 3 levels would be enough,
- Mag "Feels Heavy" -[100 - 80]
- Mag used -[79 - 21]
- Mag "Feels light" -[20 - 0]
[/quote]
I created this one with open magazines/belts/boxes in mind and i think with those you get a bit more accuracy. I will make one with less levels.