non-modular entities and modules

Place to get help with not working mods / modding interface.
Post Reply
Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

non-modular entities and modules

Post by Honktown »

I tried making a small mod for myself, to add modules to boilers (note: name = "boilers", not heat exchangers) so I could see the results. Would efficiency generate less power, or be more effective? etc...

Unfortunately after trying a bunch of different methods to add modules, permitted effects, etc to boilers, it just doesn't want to work (no module slots ever come up, and beacons can't effect it). I even tried adding a crafting group (smelting), but it refused to accept that either. I know certain things like radar can't be affected by modules, so I figured I'd ask if anyone else had an idea or came across non-modular buildings being affected by modules.
I have mods! I guess!
Link

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: non-modular entities and modules

Post by Deadlock989 »

Any entity which doesn't have a module_specification property won't support modules and will never receive module effects from beacons etc. This includes boilers.
Image

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: non-modular entities and modules

Post by Honktown »

Deadlock989 wrote:
Thu Oct 03, 2019 9:55 am
Any entity which doesn't have a module_specification property won't support modules and will never receive module effects from beacons etc. This includes boilers.
I tried those things. I tried all the things:

Code: Select all

      module_inventory_size = 4,
      module_specification = {
        module_slots = 4,
        max_entity_info_module_icons_per_row = 4,
        max_entity_info_module_icon_rows = 1,
        module_info_icon_shift = {0, 0.8}
    },
    allowed_effects = {"consumption", "speed", "productivity", "pollution"},
I even tried giving it an empty crafting_categories table. To make sure the mod was being read I change the hp - so I know the re-definition was loading. I stole max_entity_info bits from labs, since for whatever reason their module specification is different.
I have mods! I guess!
Link

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: non-modular entities and modules

Post by Deadlock989 »

Honktown wrote:
Mon Oct 07, 2019 6:01 am
I tried those things. I tried all the things:
You've misunderstood.

If the entity doesn't support a property then adding it to the prototype will achieve nothing.

Boilers just won't work with modules no matter what you do. That's the game engine.

If you can't see module_specification on the list of supported properties for a prototype - for example - then that entity type can't support modules and nothing you fiddle with in Lua will ever change that.

Modules works in crafting machines (i.e. assemblers and furnaces), labs, drills, and from memory nothing else.
Image

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: non-modular entities and modules

Post by Honktown »

Deadlock989 wrote:
Mon Oct 07, 2019 8:33 am
Honktown wrote:
Mon Oct 07, 2019 6:01 am
I tried those things. I tried all the things:
You've misunderstood.

If the entity doesn't support a property then adding it to the prototype will achieve nothing.

Boilers just won't work with modules no matter what you do. That's the game engine.

If you can't see module_specification on the list of supported properties for a prototype - for example - then that entity type can't support modules and nothing you fiddle with in Lua will ever change that.

Modules works in crafting machines (i.e. assemblers and furnaces), labs, drills, and from memory nothing else.
That's what I figured, but I was hoping there wasn't such "safety" with it. Many other moddable games use an "if property exists, apply it" without checking the consequences. I wanted to see if increasing boiler power consumption/speed could increase power generation, or make free fuel with productivity, etc.
I have mods! I guess!
Link

User avatar
mat1k
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Sat Dec 22, 2018 8:48 am
Contact:

Re: non-modular entities and modules

Post by mat1k »

You could search Modding interface requests section and see if it has been requested. If not you could ask and see if they will consider adding module support to boilers.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: non-modular entities and modules

Post by darkfrei »

Is it possible to make the boiler with the furnace prototype?

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: non-modular entities and modules

Post by Honktown »

darkfrei wrote:
Tue Oct 08, 2019 10:17 am
Is it possible to make the boiler with the furnace prototype?
There was another topic someone made - a request to change the unit conversion of water->steam, and I realized a half-solution: make an oil-jack like machine that takes water and produces steam, and is a burner. Anything with a fixed and hidden recipe would work technically, like the rocket silo.

I think if I wanted to make a modular boiler I would do that, and it would work as a normal machine would be expected to (using efficiency modules would be kinda fun). Part of the idea of this was seeing what would happen in the "boiler logic" if you did unintended things, but there could be use cases for having a boiler with a module slot. (speed for more power but worse fuel conversion, efficiency for fuel conservation and pollution though it'd be broken gameplay-wise).
I have mods! I guess!
Link

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: non-modular entities and modules

Post by darkfrei »

Honktown wrote:
Thu Oct 10, 2019 7:43 pm
There was another topic someone made - a request to change the unit conversion of water->steam, and I realized a half-solution: make an oil-jack like machine that takes water and produces steam, and is a burner. Anything with a fixed and hidden recipe would work technically, like the rocket silo.
I saw you idea and I like it. The pumpjack is actually a mining drill, that can be placed on special ore - oil patches. So the mod is actually about geothermal energy: you must fine the hot point, place here the heating exchanger and put the water inside and steam as output. It can be also unlimited as oil.

Actually it's close to the https://mods.factorio.com/mod/HydraulicPumpjacks

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2420
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: non-modular entities and modules

Post by BlueTemplar »

Well, there's https://mods.factorio.com/mod/Geothermal , but it uses an assembler for the conversion...
Image
(A nice side-effect is that you can barrel the geothermal fluid, and it will still work fine when unbarelled... at 15°C?)
BobDiggity (mod-scenario-pack)

Post Reply

Return to “Modding help”