Small Upgrades to Projectile API.
Posted: Sun May 31, 2026 5:37 pm
So I've run into a bit of a small snag for projectile weapon modding. Two to be precise.
Having a projectile_deviation_modifier for a weapons attack parameters would unlock a large amount of potential for the weapon system would be the bare minimum of what I am asking for, but also having a range_modifier, a speed_deviation_modifier, and a speed_modifier for interacting with projectile that is set by the ammo would be ideal.
That way we could have each of these projectile attributes be derived as projectile_base*weapon modifier, instead of the current system where either the weapon or the ammo sets up a projectile parameter set that fully overrides the other. Its four potential multiplications for a universe of flexibility.
Inverses of this where the weapon sets the projectile, but the ammunition modifies these qualities would be useful for a flamethrower class weapon but I can say its probably a lot less necessary for these to exist, as its seldom in the vanilla game or mods that I see a weapon defining the projectile like this and converting these to the ammo sets the projectile and the weapon modifies the projectile is a trivial operation... Weapon set projectiles are mostly in the realm of weapons that use a fluid, or energy to attack.
Only reason i could see this being useful is the odd case where this is somehow far more easily optimised, since ammunition does already have parameters for altering a weapons reload delay, fire rate, and other such parameters. So this may be a more useful flow to you but I'm just the API requester, I shouldn't be worrying so much about your implementation here as I already have. This flow just seems very marginally less flexible than the reverse flow of weapons carrying these four modifiers and ammunition carrying the projectiles base parameters.
For hitscan instant weapons, you have the option of holding shift for friendly fire and just shooting to avoid friendly fire. For projectiles there is only modes for always allowing friendly fire, or never allowing it. It would be nice if there was a mode that allowed a projectile to respond to the players inputs like a hitscan only weapon.
(And possibly an inverted mode, which mostly would be useful for say, an ammunition type that is primarily intended for use with turrets but still has use in player equipped weapons. Since it can be a desirable quality for turrets that they specifically will hit walls and other obstacles since this encourages interesting engineering and design goals to defences, but the player interface of being able to shoot carefully is still valuable gameplay wise especially in modpacks that only allow for projectile weapons. Gameplay wise the inverted mode would be unintuitive, but this has its own funny consequences that make this at least worth investigating.)
So I place high value on being able to projectile-ify the player weapons due to having often needed to play with people with bad internet, yet currently the consequences are many and being able to reach a more consistent equilibrium with vanilla gameplay using projectile based weapons would be nice.
But also projectile weapons are just fun. Enjoyable. Your parameters for projectile effects are extremely robust and so really at most you would only need 3-4 parameters more for a perfect, and practically unlimited expandability to the weapon system where any idea is viable. You can build weapons whose effects feel borderline magical/spell like because of how much a projectile is allowed to do.
Currently weapon mods get around these issues with projectiles by having practically every weapon use its own unique ammo class, this creates large amounts of menu bloat and a system with better cross mod compatibility and a more simple/generic/factorio like approach would unlock a lot of creativity especially when it comes to hybrid modpacks that try to reconcile a wide variety of content mods.
Weapon parameters for multiplying ammunition based projectiles accuracy/range.
Notably, that certain projectile parameters cannot be modified by the weapon if the ammunition sets its own custom projectiles. Namely, direction_deviation, speed_deviation, starting_speed, and range. There is situation where one can override the other (I just got done having a broken computer so its been a little while since I tested if the magazines projectile or the weapons projectile overrides in this case, but I swear I remember the projectiles on the ammo overriding the weapons paremeters,) but there is no way for a weapon to apply custom parameters that multiply a projectiles characteristics so you could say, have multiple weapons that share a ammo types but use its statistics in certain specific ways that gives each weapon a character to it.Having a projectile_deviation_modifier for a weapons attack parameters would unlock a large amount of potential for the weapon system would be the bare minimum of what I am asking for, but also having a range_modifier, a speed_deviation_modifier, and a speed_modifier for interacting with projectile that is set by the ammo would be ideal.
That way we could have each of these projectile attributes be derived as projectile_base*weapon modifier, instead of the current system where either the weapon or the ammo sets up a projectile parameter set that fully overrides the other. Its four potential multiplications for a universe of flexibility.
Inverses of this where the weapon sets the projectile, but the ammunition modifies these qualities would be useful for a flamethrower class weapon but I can say its probably a lot less necessary for these to exist, as its seldom in the vanilla game or mods that I see a weapon defining the projectile like this and converting these to the ammo sets the projectile and the weapon modifies the projectile is a trivial operation... Weapon set projectiles are mostly in the realm of weapons that use a fluid, or energy to attack.
Only reason i could see this being useful is the odd case where this is somehow far more easily optimised, since ammunition does already have parameters for altering a weapons reload delay, fire rate, and other such parameters. So this may be a more useful flow to you but I'm just the API requester, I shouldn't be worrying so much about your implementation here as I already have. This flow just seems very marginally less flexible than the reverse flow of weapons carrying these four modifiers and ammunition carrying the projectiles base parameters.
A consistent friendly fire mode with hitscan weapons.
The second topic I'd like to bring up is much more minor, and only is something I've noticed for consistencies sake.For hitscan instant weapons, you have the option of holding shift for friendly fire and just shooting to avoid friendly fire. For projectiles there is only modes for always allowing friendly fire, or never allowing it. It would be nice if there was a mode that allowed a projectile to respond to the players inputs like a hitscan only weapon.
(And possibly an inverted mode, which mostly would be useful for say, an ammunition type that is primarily intended for use with turrets but still has use in player equipped weapons. Since it can be a desirable quality for turrets that they specifically will hit walls and other obstacles since this encourages interesting engineering and design goals to defences, but the player interface of being able to shoot carefully is still valuable gameplay wise especially in modpacks that only allow for projectile weapons. Gameplay wise the inverted mode would be unintuitive, but this has its own funny consequences that make this at least worth investigating.)
Why?
The key reason I bring this up was I've found for playing online with players with high ping/very weak internet connection, this game runs almost perfectly, but the target scan of hitscan/target locked weapons has notable difficulties in that it is the only network function that seemingly causes high amounts of delay/latency/frame loss. Projectile weapons do not have this frame loss/lagginess to them, just a delay to firing, which in my friends words is a lot less frustrating than the game being unable to keep its frames up when they are in danger and needing to fire their weapons.So I place high value on being able to projectile-ify the player weapons due to having often needed to play with people with bad internet, yet currently the consequences are many and being able to reach a more consistent equilibrium with vanilla gameplay using projectile based weapons would be nice.
But also projectile weapons are just fun. Enjoyable. Your parameters for projectile effects are extremely robust and so really at most you would only need 3-4 parameters more for a perfect, and practically unlimited expandability to the weapon system where any idea is viable. You can build weapons whose effects feel borderline magical/spell like because of how much a projectile is allowed to do.
Currently weapon mods get around these issues with projectiles by having practically every weapon use its own unique ammo class, this creates large amounts of menu bloat and a system with better cross mod compatibility and a more simple/generic/factorio like approach would unlock a lot of creativity especially when it comes to hybrid modpacks that try to reconcile a wide variety of content mods.