Page 1 of 1

Exclude entity from mining productivity

Posted: Wed Dec 13, 2023 8:00 am
by KiwiHawk
Request
I would like to be able to create `mining-drill` prototype that is not affected by mining productivity. It shouldn't be listed in the bonuses gui or in the tooltip for Mining Productivity research.
Background
In the upcoming version of Angel's Refining, we are adding a new Offshore Pump that can be affected by modules. For when players need very large quantities of water. We are doing this by spawning a resource and swapping out the placed custom `offshore-pump` for our `mining-drill` entity.

We don't want mining productivity to apply to this entity. There doesn't seem to be any way of achieving this currently.

Re: Exclude entity from mining productivity

Posted: Wed Dec 13, 2023 8:21 am
by Qon
KiwiHawk wrote:
Wed Dec 13, 2023 8:00 am
Background
In the upcoming version of Angel's Refining, we are adding a new Offshore Pump that can be affected by modules. For when players need very large quantities of water. We are doing this by spawning a resource and swapping out the placed custom `offshore-pump` for our `mining-drill` entity.

We don't want mining productivity to apply to this entity. There doesn't seem to be any way of achieving this currently.
You could make it an assembler type prototype with a water recipe instead.

Re: Exclude entity from mining productivity

Posted: Wed Dec 13, 2023 9:22 am
by Bilka
Now, not to say that this request wouldn't have other usecases. But when I read "we are adding a new Offshore Pump that can be affected by modules" I kind of expect a request for module slots for offshore pumps, not something related to mining drills :D

Re: Exclude entity from mining productivity

Posted: Wed Dec 13, 2023 10:53 am
by Stringweasel
I was looking into this for Biter Power as well where I didn't want the Egg Extractors to be affected by mining productivity. I left it be though, because thematically it still works in my case, it just made scaling the "mining rate" harder. If possible I would still change it back to a flat rate.

(I could probably do it with a fixed recipe assembler, but I didn't want to deal with the managing of it. And there was some other reasons that I can't remember now)

So a +1 from me :)

Re: Exclude entity from mining productivity

Posted: Wed Dec 13, 2023 12:10 pm
by curiosity
What if you made the miner reject the productivity effect? It's not like productivity makes any sense in an offshore pump. Would it ignore the mining bonus then?

Re: Exclude entity from mining productivity

Posted: Thu Dec 14, 2023 4:50 am
by KiwiHawk
Qon wrote:
Wed Dec 13, 2023 8:21 am
You could make it an assembler type prototype with a water recipe instead.
Yes, I know. Except for productivity, the mining drill prototype better matches what we want though. Quoting from the person who did the work on the Heavy offshore pump:
  • More realistic tooltip
  • Stays close to how base game operates
  • A pump is UPS friendlier (doesn't require crafting calculations)
  • Doesn't have the 1 recipe/tick issue
  • Pipe output is more fluid rather than a burst every time a recipe finishes
curiosity wrote:
Wed Dec 13, 2023 12:10 pm
What if you made the miner reject the productivity effect? It's not like productivity makes any sense in an offshore pump. Would it ignore the mining bonus then?
Excluding "productivity" from allowed_effects just controls productivity modules. We already have it set to reject those. This doesn't stop the entity being affected by mining productivity research.

Re: Exclude entity from mining productivity

Posted: Thu Dec 14, 2023 11:47 am
by curiosity
KiwiHawk wrote:
Thu Dec 14, 2023 4:50 am
Excluding "productivity" from allowed_effects just controls productivity modules. We already have it set to reject those. This doesn't stop the entity being affected by mining productivity research.
That seems like a bug to me. Mining productivity bonus is a productivity effect, I think it's reasonable to expect it not apply to entities that don't accept productivity effects. Have you tried reporting it?

Re: Exclude entity from mining productivity

Posted: Thu Dec 14, 2023 11:58 am
by KiwiHawk
curiosity wrote:
Thu Dec 14, 2023 11:47 am
That seems like a bug to me. Mining productivity bonus is a productivity effect, I think it's reasonable to expect it not apply to entities that don't accept productivity effects. Have you tried reporting it?

While that would allow me to do what I want in the specific case I talked about, it does seems correct to me. Ideally I would like the flexibility of allowing prod modules, mining productivity, both, or neither! From the documentation:
A list of module effects, or just a single effect. Modules with other effects cannot be used on the machine. This means that both effects from modules and from surrounding beacons are restricted to the listed effects. If allowed_effects is set to nil, the machine cannot be affected by modules or beacons.

Re: Exclude entity from mining productivity

Posted: Thu May 16, 2024 8:05 pm
by jurgy
+1 for the proposal.

My mod, Canal Excavator, uses stone ore to simulate the process of digging a canal, but I don't want players to infinitely replace the canals with landfill and extract more from it than it would cost. Productivity bonuses make this much harder to implement.