Hi, me again, I really appreciate the mod and that you found a way to implement my request surrounding the creation of distinct items! The mod works great for vanilla ammo types, but I've encountered a failure to load when this mod and a couple others are enabled at the same time, depending upon startup settings.
When loaded alongside the mod Modular Turrets (https://mods.factorio.com/mod/scattergun_turret), and the "Keep stack sizes" setting is disabled (that is, the default selection) Factorio throws the following error:
"Failed to load mods: Error while running setup for recipe prototype "w93-slowdown-magazine" (recipe): Recipe item-product "w93-slowdown-magazine" is not stackable but has a max count of 9."
Enabling the "Keep stack sizes" setting allows the game to load, and all ammo types, including new ones added by Modular Turrets, have the expected bottomless functionality.
When loaded alongside the mod doeWorks Rocket Artillery (https://mods.factorio.com/mod/doeworks-deer), and the "Keep stack sizes" setting is disabled (the default), Factorio throws a similar error:
"Failed to load mods: Error while running setup for recipe prototype "dw-deer-uncrating-basic" (recipe): Recipe item-product "dw-deer-ammo-basic" is not stackable but has a max count of 12."
Both of these mods have unusual methods for creating the ammunition that my intuition tells me are the source of this: the slowdown ammo in Modular Turrets is crafted in batches of 9 using 9 piercing magazines and 1 slowdown capsule so that the mod author can allow players to consume slowdown capsules more economically, while the Rocket Artillery mod has a recipe for packing 12 of the rockets into a crate and unpacking those 12 rockets all at once, as a bulk logistics solution. While I am admittedly a layperson in programming in general and with regard to Lua, I was able to edit the above recipes and eliminate the startup failure by reducing the product count to 1 for the slowdown ammo and simply commenting out the crate recipes.
Additionally, when Rocket Artillery is loaded alongside this mod and the startup setting "Keep original" is enabled, Factorio throws the following error:
"Failed to load mods: unlimited-ammo/data-final-fixes.lua:99: attempt to index local 'unlimitedRecipe' (a nil value)
stack traceback:
unlimited-ammo/data-final-fixes.lua:99: in main chunk"
I don't have any inspiration as to what might cause this error.
Both mods can be loaded alongside this one with Keep stack size enabled and Keep original disabled, and the bottomless functionality works for all ammo then present.
I don't present this wall of text as an accusation that any of this is your fault - both of the relevant mods have ammunition recipes that you couldn't have been expected to anticipate nor do you have any obligation to provide handling of the recipes in non-stacking mode when a functional option is available. Though now that I think about it - again from the perspective of someone with the barest ability to even parse Lua - would a possible solution to the stack size failure be to perform a search of every recipe that results in an ammo item, and force the product count of those recipes to 1?
In any event, I apologize for the wall of text and hope the information I've provided about the unlimitedRecipe nil failure is helpful in some capacity. Your mod is great and very elegant, so it responding poorly to circumstances outside of the designed use case is hardly a fault against your work.