[0.16.22] clamp_position breaks artillery range research

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

[0.16.22] clamp_position breaks artillery range research

Post by bobingabout »

I was told that to make min_range work on my weapon, I needed to add the clamp_position flag to the ammo.
viewtopic.php?f=23&t=57269

To note: the weapon shoots base game artillery ammo, as well as 3 types of my new artillery ammo, so to make the weapon work properly, I had to add clamp_position to base game artillery ammo too.

It worked, but now it breaks the artillery cannon/wagon
viewtopic.php?f=51&t=54612&start=140#p342138

I tested this myself, I did some research into range, and my parked artillery wagon started shooting off to outside my base, only to fall short and land inside my base.

Mod is Bob's Warfare https://mods.factorio.com/mods/Bobingabout/bobwarfare
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.16.22] clamp_position breaks artillery range research

Post by posila »

This is bug, because I think range update is not limited to artillery, but I wonder why do you wish to use artillery-projectile in tank guns? Artillery-projectile type was created specifically to optimize drawing them on minimap and to give them ability to scan chunks. Neither of the abilities does seem very usefull when player is shooting on short distances from tank, so I think normal projectile type might be more suitable for your purposes.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.16.22] clamp_position breaks artillery range research

Post by bobingabout »

Before you even added the artillery wagon/cannon to base game, I added an artillery weapon for my tank, which by coincidence had the same ammo category.

I had 2 options... rename my ammo category to make them difference, or embrace the ability to use my ammo in new base game artillery weapons, and base ammo in my weapons.
I chose the second option.

the min_range issue has been there for a while, wheybags told me how to fix it. But to fix it for my tank, I had to add tags to all related ammo, which includes the base game artillery ammo.

Fixing that issue caused this new issue, as detailed above.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.16.22] clamp_position breaks artillery range research

Post by posila »

I am mainly asking because people often want to do something, it doesn't work, they come up with workaround, that doesn't work either, so they file a bug report about the workaround not working (i.e. stream not being able to shoot single particle, cluster grenade not being possible to setup to work as normal grenade, ...)

I have looked through the code and could see that range modifier is specific only to artillery turrets. That sucks, because I can't get correct range in generic way from the shooter, I have to test for artillery. So, for 0.16 I will test for artillery turret/wagon and make it ignore clamp_position flag. That means your change will still work and artillery range bonus will be fixed.

I think for 0.17 we could add proper support for min range for manual shooting. The game doesn't have it, because we didn't want player not being able to shoot when swarmed by biters. Instead when players panic and try to shoot under their feet, the game will overshoot but hopefully flying projectile or AoE on impact will kill something. So ProjectileTriggerDelivery has its own min_range property which ArtilleryProjectileTriggerDelivery doesn't have, clamp_position was added so that handheld flamethrow can still shoot to max range while player is targeting too far.

In my opinion, enabling vanilla artillery shells for tanks is like enabling cannon shells for handheld machine gun :)

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.16.22] clamp_position breaks artillery range research

Post by Optera »

posila wrote:In my opinion, enabling vanilla artillery shells for tanks is like enabling cannon shells for handheld machine gun :)
Unless Bob is talking about armored self propelled artillery.
Image

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.16.22] clamp_position breaks artillery range research

Post by bobingabout »

Optera wrote:
posila wrote:In my opinion, enabling vanilla artillery shells for tanks is like enabling cannon shells for handheld machine gun :)
Unless Bob is talking about armored self propelled artillery.
I'm not, but that kind of vehicle was what I was thinking of.
think of it as how the tank cannon works now, but bigger and more powerful. it doesn't shoot as far as the base game artillery weapons, but will still shoot as far as you can aim while zoomed out at maximum, but I still don't want the weapon blowing the tank up because you shoot at yourself.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Post Reply

Return to “Resolved Problems and Bugs”