Allow module only in mining drills

Place to get help with not working mods / modding interface.
Gust
Burner Inserter
Burner Inserter
Posts: 18
Joined: Thu Nov 24, 2016 5:48 pm
Contact:

Allow module only in mining drills

Post by Gust »

Hi!

Question 1:
Can anyone advise me, how I can limit my newly-created module to be usable only in mining drills? "Limitation" parameter of the module does not work with mining, because mining is not a recipe. I tried to to create a separate module category but I do not see a way, how to limit it. Thanks!
I see that other buildings have allowed_effects parameter, but I cannot find it for mining drills and, most importantly, I do not plan to create new effect. I just want an OP productivity module, but only for drills.

Question 2:
Is it possible to create a mining drill entity with embedded Productivity effect?
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Allow module only in mining drills

Post by eradicator »

Q1: Impossible. I wish it was possible and i think i even made a request for it ages ago :/. I'd love that myself. Maybe it's time for someone to write a new request :P. Edit: See my post below.

Q2: Probably not.
Last edited by eradicator on Fri Jun 01, 2018 1:23 am, edited 1 time in total.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2174
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Allow module only in mining drills

Post by Ranakastrasz »

viewtopic.php?f=190&t=16952

I seem to recall playing this a while back, and it has modules which were heavily locked to recipes/machines, and has mining drill varients IIRC.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Allow module only in mining drills

Post by eradicator »

Looking at the vanilla code again. Huh, yea. You can indeed specify a list of allowed recipes for each module, (this should work nicely for my usecase, yay :D). I don't see anything that applies to mining drills (ore ore types :/) though, like the OP requested. Or anything that could limit based on the machine type (except ofc for the fact that recipes are linked to machine types).

Ofc...if you supply an empty limitation list, then all recipes are forbidden for a module, and the only thing that's left usable should be mining-drills and beacons (untested speculation, try a hidden dummy recipe if empty list doesn't work).
User avatar
TexugoMaldito
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Apr 10, 2018 2:25 am
Contact:

Re: Allow module only in mining drills

Post by TexugoMaldito »

Same issue here
I made some Massive mining drills ( mod name: TA miners ), but because their are very fast, i want to they accept only special modules, but i run into 2 problems, (1) i cant block normal modules without blocking my own modules, (2) my modules can be place in any assembly, miner, beacon or furnace.
The limitations works on recipes, but resources works on a different way.
malventano
Filter Inserter
Filter Inserter
Posts: 355
Joined: Thu Apr 27, 2017 4:31 pm
Contact:

Re: Allow module only in mining drills

Post by malventano »

TexugoMaldito wrote:Same issue here
I made some Massive mining drills ( mod name: TA miners ), but because their are very fast, i want to they accept only special modules, but i run into 2 problems, (1) i cant block normal modules without blocking my own modules, (2) my modules can be place in any assembly, miner, beacon or furnace.
The limitations works on recipes, but resources works on a different way.
For TA Miners I would recommend limiting to just efficiency modules (I agree with your stance that more speed is overkill).
Allyn Malventano
---
Want to improve fluid flow between pumps / across longer distances? Try my Manifolds mod.
User avatar
QGamer
Fast Inserter
Fast Inserter
Posts: 215
Joined: Fri Apr 14, 2017 9:27 pm
Contact:

Re: Allow module only in mining drills

Post by QGamer »

I have an inverted request: I would like to limit a module so it CAN'T be placed in mining drills. Again, the limitation doesn't work, because it's only for recipes.
Also, modules with a limitation can be placed in labs and electric furnaces (but only when the furnaces are not smelting anything outside the limitation, or not currently active).
"Adam fell that men might be; and men are, that they might have joy."
Post Reply

Return to “Modding help”