Exclude entity from mining productivity

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 254
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Exclude entity from mining productivity

Post 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.
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.

Buy me a coffee

Qon
Smart Inserter
Smart Inserter
Posts: 2120
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Exclude entity from mining productivity

Post 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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3140
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Exclude entity from mining productivity

Post 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
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 320
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: Exclude entity from mining productivity

Post 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 :)
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

curiosity
Filter Inserter
Filter Inserter
Posts: 326
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Exclude entity from mining productivity

Post 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?

User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 254
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Re: Exclude entity from mining productivity

Post 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.
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.

Buy me a coffee

curiosity
Filter Inserter
Filter Inserter
Posts: 326
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Exclude entity from mining productivity

Post 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?

User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 254
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Re: Exclude entity from mining productivity

Post 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.
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.

Buy me a coffee

Post Reply

Return to “Modding interface requests”