How "chance to not consume ammo" works (Explanation)

That's good information, you've explain it very well!
 
How did you get this knowledge, exactly? I was under the impresssion the chance to not consume ammo was additive.
 
All the above only works if there is an INDEPENDENT roll for every chance slot, buff, reforge ( there is no ammo reforge but dps reforge). If things get ADDED or SUBSTRACTED it gets messier because as we all know that changing the order in an only * operation doesnt matter but it starts to matter when there are *+,*- or */ operations.

For ammo consumption, each modifier is independent and multiplied, to the best of my knowledge
For damage, there are a few different categories, that are additive internally but multiplied by each other. You have Weapon Reforge, Shroomite Hats, and Other Armor+Buffs+Accessories+Accessory Reforges (OABAAR for short).
When calculating DPS, total crit chance (from all sources, including base crit, weapon reforges, and Shroomite hats) is effectively another multiplier on damage.
Also when calculating DPS, you have to factor in Use Time (use time is how many frames it takes to use an item, and there are 60 frames a second; this is regardless of how many FPS you get. For some reason, most items on the official wiki have their listed use time 1 frame greater than their actual use time).

So, say we have an Unreal Megashark, full Shroomite Armor with Mask (stealth is being ignored, but is part of OABAAR), Sniper Scope, Celestial Stone, Celestial Shell, and two other Accessories with no bonuses to damage or crit; all Accessories are Menacing. We also have the Well Fed and Ammo Box buffs. I ignore the damage bonus from the bullets for this calculation, to make it simpler.

We get a 68% chance to NOT consume ammo (calcs have been done before)
Damage is 25 (base Megashark damage) * 115% (Unreal) * 115% (Shroomite Mask) * 155% (OABAAR). This comes out to about 51 (the possible error is because I don't know when the game rounds; I assumed it waits until the end).
To get the average damage dealt, we have to factor in the 48% crit chance (crits deal double damage). Thus, average damage on a hit is 51 * 148%, 75 damage. (note that Defense is applied before the double damage from a crit).
The Unreal Megashark's Use Time is 6, meaning it can be used 10 times a second.
Thus, our average DPS (with 0 damage bullets) is 750 and our average APS is 3.2.

For the damage from ammo, I believe you apply the +% damage boosts from Shroomite Hats, and OABAAR and then round. You add this damage to the weapon damage after all +% damage boosts to it, and then use the weapon's crit chance (ignore the ammo's crit chance completely). I am not certain of this though.
 
So, you didn't get this idea from me? Meh
 
How did you get this knowledge, exactly? I was under the impresssion the chance to not consume ammo was additive.
The problem of additive and multiplicative methods was presented. A little thinking and some previous experience in game coding and/or logic and/or probability gave me the idea of different checks, performed one after the other. My theory was silently backed up from other people, and the concept made huge sense (and in-game it looked well enough), so I created a thread to spread the information. Then my math was wrong but it was fixed.

If you want go even further with ammo-saving, then use Clockwork Assault Rifle.
That is the gun's mechanic, of course; to fire 3 bullets per one. The phantasm also fires up to 4 arrows per shot, plus aditional ghostly arrows, so it's still at the top in efficiency if you factor in the amount of projectiles fired.

you got your first ammo box over 3 years ago? WAT?
1.2.3 was released about a year ago
I had this weird but convincing feeling that I had used the Ammo Box during 1.1, just as I did with the Crystal Ball. Well, I still have been wondering how ammo saving works since 1.1, because that is when I arrived to the game, and the Minishark/Megashark and hardmode armors I saw all had this "chance to not consume ammo" stat.

My mistake.
 
Last edited:
Nope, for the game its all the same. A 500/1000 is the same as 1/2.
And its 50/100 not 100/50.

Yeah I was thinking the same later today. It was early, my brain was still on pause
6UNeEeE.png

[DOUBLEPOST=1437930283,1437930190][/DOUBLEPOST]
Calculating something minor like this is peanuts for a computer, even when firing a ridiculously fast gun like the SDMG.

The fact that this is true (because it is) still amazes me. There's SO MANY things calculated in-game every SECOND, you'll be amazed if you even knew.
A5PqYhE.gif
 
Created an account simply for this mathematical conversation. I wanted to educate you all on how to simplify this but it has already been said already :(:(.

I just checked the gamepedia and calculating the tip (from gamepedia information ) gives an 1 - 0.34*0.8*0.75*0.8 = 83,68% chance to not consumme ammo, without the box, and 86.944 % with the box.

Simplifing the matters through calculating the chance to actually use ammo instead of not using ammo is the way to go, but that has already been said so, yeh.

If somebody is interested in putting it in more graphical words: For every item there is, the game rolls a number and ONLY if EVERY roll fails than ammo gets consumed.


Random facts:

1 Magic Quiver = 20 %
+ Potion = 34 %
+ Box = 48.8 %

Vortex Beater = 66% ( actually i wondering if they mean 2/3 instead of .66 and the tooltip is mismatched )
+ Potion = 72.8 %
+ Box = 78.24%
+ Breastplate = 83.68 %
+ Headgear = 86.944 %

As you can see 20% chance to not consume ammo later effectively translates into an 3% increase, which is not that big.

You cant achieve 100% btw, like never. All chances are handled pretty much the same except 0% and 100 %

All the above only works if there is an INDEPENDENT roll for every chance slot, buff, reforge

It all comes down to how the game is coded.

/In response to another user/
A 500/1000 is the same as 1/2.
And its 50/100 not 100/50.
Thanks for your contribution, anyways. Everything I quoted from your post matters to me, and I already knew (and hopefully was well explained in the OP as well). However, I now added some of the scaling you mentioned to the main post, since that seems useful to put things into perspective. Thanks for the idea!
 
Looks like I'm a bit late to this thread, but I guess I'll throw this in anyway. I've had this information on my wiki user page for a while. I'm pretty sure the math is the same as in the top post here, but I would like to bring up one point:
It is periodically reported that armor can only give one bonus. This means that though the Chlorophyte Helmet and Shroomite Breastplate both have their own 20% chances, they will not stack to 36% and you will have only a 20% chance if you wear both. If true (confirmation needed), this puts the full Adamantite and Hallowed sets, and the Vortex Breastplate, as the best ammo-saving armors on the PC version, and the Titan armor as the best on other versions.
This information came from /r/terraria, though I don't have the exact source post on hand. Based on tests that I did a while back, it seems to be true. It might be outdated as of 1.3.0.1, though? I don't have a ranged character on hand to do more tests with. :/
 
Thanks for your contribution, anyways. Everything I quoted from your post matters to me, and I already knew (and hopefully was well explained in the OP as well). However, I now added some of the scaling you mentioned to the main post, since that seems useful to put things into perspective. Thanks for the idea!

You are welcome.

Just to clarify this, I actually dont have a a clue how Terraria works because i didnt look into the code. Looking into the code is the only sure way to clarify this.

Facts:
Through gaming experience we all know its NOT simply additive. Vortex + Headgear + Box = 106% chance not to consume ammo, but it still uses up some bullets now and then.

So for all people out there trying to figure out how this works: There is no way to really know how this works without looking into the code. The developers could have set up ANY CRAZY FORMULA they liked. BUT my cross game experience and experience with Terraria tells me that % gets calculated like i described above, because its actually a way which gets almost always used like that.
Another big point is how the developers tell us what the items are actually doing. Because they actually want to give out information we actually are capable of understanding. The way is: " 66% not to consume ammo" or " 20% not to consume ammo ". IN MY EXPERIENCE when things get advertised like that the formula behind is an INDEPENDENT role for each "chance" which is exactly the way i wrote it. On one hand we get some useful information what the item is doing and on the other hand the Multiplikation method keeps it from getting too overpowered or break the game. Just imagine a 100% evasion rate or an 100% block chance or 100% chance of not getting detected ( which broke The Elder Scrolls: Oblivion for me)

So again: No inisight into the code, no EXACT knowledge how it works ( besides the fact we 100% know its not pure additive). It usually gets coded that way is what i can guarantee you because its actually a good mathemtical Operation and it does its job very well.
 
No, we're pretty sure it works as explained in the main post.

@W1K can probably look up the code for it, if you're having doubts.

If not, then I'm a fool.



Looks like I'm a bit late to this thread, but I guess I'll throw this in anyway. I've had this information on my wiki user page for a while. I'm pretty sure the math is the same as in the top post here, but I would like to bring up one point:

This information came from /r/terraria, though I don't have the exact source post on hand. Based on tests that I did a while back, it seems to be true. It might be outdated as of 1.3.0.1, though? I don't have a ranged character on hand to do more tests with. :/
Yeah, I knew and I clarified that this information was already known by various people, but it wasn't clear who got it first. I didn't take anything from your wiki page, though, since I didn't even know of its existence. Don't worry. I can see you put a lot of work into it, still, so good job.

The armor not stacking doesn't really make much sense, but it'd need further investigation.
Also, I totally missed the Candy Corn Rifle having an ammo usage reduction bonus. Thanks!
 
Too much read for so much laziness but I can confirm the mechanic explained is exactly as it is. All the math later on is what I didn't deeply bother checking, but it's fairly basic statistics.
 
Looks like I'm a bit late to this thread, but I guess I'll throw this in anyway. I've had this information on my wiki user page for a while. I'm pretty sure the math is the same as in the top post here, but I would like to bring up one point:
It is periodically reported that armor can only give one bonus. This means that though the Chlorophyte Helmet and Shroomite Breastplate both have their own 20% chances, they will not stack to 36% and you will have only a 20% chance if you wear both. If true (confirmation needed), this puts the full Adamantite and Hallowed sets, and the Vortex Breastplate, as the best ammo-saving armors on the PC version, and the Titan armor as the best on other versions.
This information came from /r/terraria, though I don't have the exact source post on hand. Based on tests that I did a while back, it seems to be true. It might be outdated as of 1.3.0.1, though? I don't have a ranged character on hand to do more tests with. :/
I just went and tested this in the current version, and it seems to be true.

Method:
Start with 1000 sand and fire a sandgun against a wall until empty, then collect sand.

Results:
With Shroomite Breastplate I recovered 1281 sand.
With Shroomite Breastplate + Chlorophyte Helmet I recovered 1264 sand.

I assume it's just chance that the second test actually gave a lower yield, but it certainly looks like the second armor bonus isn't helping.
 
I just went and tested this in the current version, and it seems to be true.

Method: Start with 1000 sand and fire a sandgun against a wall until empty, then collect sand.

Results:
With Shroomite Breastplate I recovered 1281 sand.
With Shroomite Breastplate + Chlorophyte Helmet I recovered 1264 sand.

I assume it's just chance that the second test actually gave a lower yield, but it certainly looks like the second armor bonus isn't helping.
Something for a bug report.


Too much read for so much laziness but I can confirm the mechanic explained is exactly as it is. All the math later on is what I didn't deeply bother checking, but it's fairly basic statistics.
Just W1K being W1K. Thanks W1K.
 
I just checked it myself. The issue with them is, they both use the same bool. For non-nerds, this means one bonus basically overlaps the other, which means they do not stack. Guess we can call this a bug.
 
Just for reference; a "bool" or boolean variable is a value that can either be True or False; 1 or 0. What I understand (and guess) from your comment is that the boolean only checks for one armor piece, since the game is only able to think "he has an ammo reduction armor piece equipped" (1) or "he doesn't have an ammo reduction armor piece equipped" (0). Thus, the first armor piece the game finds counts for the ammo usage reduction, and no more armor checks are performed.
Is this right, W1K?
 
Just for reference; a "bool" or boolean variable is a value that can either be True or False; 1 or 0. What I understand (and guess) from your comment is that the boolean only checks for one armor piece, since the game is only able to think "he has an ammo reduction armor piece equipped" (1) or "he doesn't have an ammo reduction armor piece equipped" (0). Thus, the first armor piece the game finds counts for the ammo usage reduction, and no more armor checks are performed.
Is this right, W1K?
Simply, there's only one variable handling the 20% ammo reduction, both armors set the same variable to true. As a result, only one armor gets counted.
 
Simply, there's only one variable handling the 20% ammo reduction, both armors set the same variable to true. As a result, only one armor gets counted.
With that in mind, does the game check for which piece of your armor has the highest value and use that? Or...?
 
With that in mind, does the game check for which piece of your armor has the highest value and use that? Or...?
No, it's simply the fact there is only one variable for the 20% chance. Other chances have their own variables, which stack with each others. It's only these two specific pieces of armor that do not stack.
 
No, it's simply the fact there is only one variable for the 20% chance. Other chances have their own variables, which stack with each others. It's only these two specific pieces of armor that do not stack.
Does that mean only shroomite breastplate and chlorophyte helmet don't stack with each other? Do other bonuses not stack with each other because of this bug? Vortex Breastplate has a 25% saving chance, does it stack with the helmet?

I'm raising questions because you were kind of unspecific as to what items you were exactly replying to.
 
Does that mean only shroomite breastplate and chlorophyte helmet don't stack with each other? Do other bonuses not stack with each other because of this bug? Vortex Breastplate has a 25% saving chance, does it stack with the helmet?

I'm raising questions because you were kind of unspecific as to what items you were exactly replying to.
As long as the chance is different, it does properly stack with any of the other two. Only shroomite breastplate and chlorophyte helmet don't stack with each others as they both provide the same bonus.
 
Back
Top Bottom