Samrux
Santa Claus
It's a question that has been baffling me ever since I first joined Terraria, more than three years ago. You see, there are various items in Terraria that give a specified "chance to not consume ammo". The Minishark and Megashark both have an innate reduced ammo usage (33% savings and 50% savings, respectively), but this percentage can be stacked with other bonuses, such as the Ammo Box, a potion, and ranger armor. The real question has always been; "How do these bonuses stack?"
Now, here comes a problem: If these bonuses were added together (50 + 20 + 20 + 20) it would be very easy to reach over 100% ammo reduction, rendering the user with infinite ammunition.
It is no different if we try and calculate the bonus by multiplying them together (0.5 x 1.2 x 1.2 x 1.2); it is still very easy to go over 100% ammo reduction.
Of course, we know from testing that this isn't the case, since ammunition is always consumed no matter how many bonuses we stack! So the chance to not to consume ammo definitely can't go over 100% in the current version of Terraria. So how is the chance calculated? How can we optimize our chances to not consume ammunition?
The answer relies on probabilities and statistics. You see, the bonuses are not calculated together directly, but are rather put one after the other in different "checks". Here is an example: Imagine you are using the following ammo-reducing items:
The game first checks the Megashark. There is a 50% chance of not consuming that bullet, so RNG will create a number between 1 and 100. If it is 50 or lesser, the bullet is preserved instantly. If it is 51 or greater, the game tries to check the next ammo-reducing item.
The Shroomite Breastplate has a 20% chance to not consume ammo. So RNG, again, creates a number between 1 and 100. If it is 20 or lesser, the bullet is preserved instantly this time. If it is 21 or greater, the game checks the next item.
Again, a number is generated for our Ammo Box. If it is 20 or less, the bullet is preserved. If it instead is 21 or more, and since we don't have any more items to help us, the bullet is consumed regardless. If the bullet is consumed, it means that the calculation has bypassed all our different "ammo defenses".
This can be exampled with an analogy. Imagine a castle with several layers of walls protecting it. To enter the castle, you'd need to break through the first wall, then the second, then the third. But if at any point you failed to break any of the walls, then you wouldn't be able to reach the castle. Every wall is equivalent to a chance to not consume ammo, and reaching the castle would signify consuming the ammo.
Concluding the idea: For the bullet to have been consumed, it had to avoid being stopped by all the item's percentages separately; the megashark, the breastplate, and the ammo box. If all items failed to preserve the bullet one after the other, and we have no more items reducing our ammo usage, the ammunition is consumed.
So, the game goes item by item when calculating when to and when not to use your ammo
...but how can this be calculated, as a real, final percentage? Using probabilities!
>100% is akin to 1, 50% to 0.5, 10% to 0.1, and so on.
>To know the chance of something not happening, we first need to know the chance of it actually occurring, and subtract that from 1 (the total).
>To know the chance of several events happening together, we multiply the chances of those individual events with each other.
- There is a 0.5 chance (1 - 0.5) to consume ammo with the Megashark.
- There is a 0.8 chance (1 - 0.2) to consume ammo with the Shroomite Breastplate
- There is a 0.8 chance (1 - 0.2) to consume ammo with the Ammo Box
- Since all of those events have to occur together, one after the other, for the ammo to not be consumed, we multiply them: 0.5 x 0.8 x 0.8 = 0.32 (32% is the chance to use the ammo)
- Finally, to convert this from consuming to preserving ammo, we do 1 - 0.32 = 0.68
Compared to adding or multiplying chances together directly, only 68% is actually not very much of an improvement.
1 - (0.5 x 0.75 x 0.8 x 0.8 x 0.8) =
1 - (0.5 x 0.75 x 0.8 x 0.8 x 0.8) = 80.8% chance to not consume ammo
Which turns an extra 5% from the improved breastplate, an added 20% from the potion, and another added 20% from the helmet, into a total 22% increase from our previous 68%. It sure goes up (specially compared to our initial 50%), but keep in mind that to save more and more ammo, you have to put more and more work into it. In general, the potion buff is the hardest to keep active, since it requires a constant supply of materials (and farming for them). If you take that into account, you'll get more satisfying results!
Here is an amazing online calculator you can use yourself. You can paste the calculations used in this post directly into it, or try your own combinations.
For reference, here is a table with all the possible sources of reduced ammo usage. They can all be stacked with each other. However:
- Logically, you can't equip more than a single helmet, breastplate, or leggings at the same time. Similarly, you can only use one weapon at a time.
- If you have the Chlorophyte Helmet and the Shroomite Breastplate both equipped at the same time, only one of them will be counted, and the other, ignored. This is a fault in the game's coding. The Vortex Breastplate doesn't have this issue, and stacks properly with the Chlorophyte Helmet (as far as we are aware of).
The final question now is: What is the absolute maximum chance not to consume ammo in Terraria? That honor goes to the Phantasm, with a 66% innate reduction and access to the Magic Quiver:
1 - (0.34 x 0.75 x 0.8 x 0.8 x 0.8 x 0.8) =
1 - (0.34 x 0.75 x 0.8 x 0.8 x 0.8 x 0.8) = 89.55% chance to save ammo
The way additional items affect the final percentage is clearly showcased in this following list, complementing our previous "math" section, and for easy comparison:
- Phantasm Alone = 66% chance to not consume ammo (base)
- Phantasm + Vortex Armor = 75% chance to not consume ammo (9% increase)
- Phantasm + Vortex + 1 other item = 80% chance (5% increase)
- Phantasm + Vortex + 2 other items = 84% chance (4% increase)
- Phantasm + Vortex + 3 other items = 87% chance (3% increase)
- P. + V. + 3 other items + Magic Quiver = 90% chance (3% increase)
- S.D.M.G alone = 50% chance to not consume ammo (base)
- S.D.M.G. + Vortex Armor = 63% chance (13% increase)
- S.D.M.G. + Vortex + 1 other item = 70% chance (7% increase)
- S.D.M.G. + Vortex + 2 other items = 76% chance (6% increase)
- S.D.M.G. + Vortex + 3 other items = 81% chance (5% increase)
- Tactical Shotgun alone = 0% (no base bonus)
- Tactical Shotgun + Vortex Armor = 25% chance to not consume ammo (25% increase)
- Tactical Shotgun + Vortex + 1 other item = 40% chance (15% increase)
- Tactical Shotgun + Vortex + 2 other items = 52% chance (12% increase)
- Tactical Shotgun + Vortex + 3 other items = 62% chance (10% increase)
- Tsunami + Vortex + 3 other items + Magic Quiver = 69% chance (7% increase)
Replace Phantasm with Vortex Beater for same results, but ignore the quiver.
Replace Tactical Shotgun or Tsunami for any other ranged weapon without innate savings, for same results.
(Results are rounded up or down accordingly)
If you want to spend the lowest possible amount of ammo, grab a Phantasm or Vortex Beater, and some Vortex Armor (breastplate included). That will put you at about 75% chance to not consume ammo. Having the Ammo Box and Ammo Reservation Potion buffs active at all times will add another 10% to that, which might or not be worth the hassle, depending on your opinion.
The added chance to save ammunition is much more noticeable in weapons that don't naturally get a bonus, though; making the ammo box and potion raise your chances to save ammo from 25% to 40%.
However, while the Chlorophyte Helmet (and Magic Quiver, for bows only) further reduce your chances of consuming ammunition, they might also hinder your DPS. And remember that one of the best ways to save ammo is to kill things quickly!
Concluding Note:
Having the numbers and facts in front of you, it is for you to decide if putting work into saving ammo will be worth it. What will take you more time; putting effort into obtaining ammo, or into saving it? And will lowering your DPS actually increase the amount of ammo you use overall, breaking the point?
You could also ignore this thread altogether, and use an endless musket pouch or endless quiver, instead
Many thanks to the Official Terraria Wiki for providing the exact percentage values, and all the item images inside this post.
The calculations and conclusions present in this post were first theorized by me, and supported by other sources (users) on several different places across a large span of Terraria's history. Finally and definitely, the method explained in this post was confirmed by looking at the game's code.
And Thank you for reading.
Disclaimer: This post was my attempt at making a comprehensible and updated thread about the subject, open for any user of the forum to see and easily access. This post contains PC-exclusive content, but no console-exclusive content. This post, in its entirety, was written and organized by me, but I am merely providing the reader with the information. Please notice I was not the first to theorize or discover this information. Mistakes in my math were corrected by users in this thread: Thanks! An additional thanks to W1K for confirming the veracity of this thread's claims.