Exclude entity from mining productivity

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 279
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: 2164
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.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
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: 419
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
My Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby
Official Contributor to Space Exploration
curiosity
Filter Inserter
Filter Inserter
Posts: 515
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: 279
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: 515
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: 279
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
jurgy
Burner Inserter
Burner Inserter
Posts: 10
Joined: Wed Feb 27, 2019 5:55 pm
Contact:

Re: Exclude entity from mining productivity

Post 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.
Honktown
Smart Inserter
Smart Inserter
Posts: 1045
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Exclude entity from mining productivity

Post by Honktown »

Why not:

Code: Select all

base_productivity

Type: float
Default: 0
Productivity bonus that this machine always has. Values below 0 are allowed, however the sum of the resulting effect together with modules and research is limited to be at least 0%, see Types/Effect#productivity. 
?

It's a sloppy, but giving it -37.267 would do the job, no?
I have mods! I guess!
Link
curiosity
Filter Inserter
Filter Inserter
Posts: 515
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Exclude entity from mining productivity

Post by curiosity »

I think, you'd need to give it more than that. Mining productivity is unlimited.
protocol_1903
Fast Inserter
Fast Inserter
Posts: 133
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Exclude entity from mining productivity

Post by protocol_1903 »

+1
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Post Reply

Return to “Modding interface requests”