[Rseding91] [0.16.7] MODDING: furnace allowed_effects incorrect

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Mon Aug 25, 2014 12:37 am

[Rseding91] [0.16.7] MODDING: furnace allowed_effects incorrect

Post by DaCyclops » Tue Dec 26, 2017 7:25 am

Performing the 0.16 update to my Modular Charge Packs mod, and decided I wanted to add a specific module for use with my modded Furnace (the Charger).
However, once getting it ingame, it refused to be placed in the modded furnace. the normal "X can not be used in Y" error.

To set the scene, my Chargers had the following tag:
allowed_effects = {"speed", "pollution"},
(multiple times I copied the line from the regular furnace, and deleted what I didn't need)
The modules had variations on the following code:

Code: Select all

    type = "module",
    name = "chargepack-enhanced-electrodes-2",
    icon = "__ModularChargePacks__/graphics/electrode-module-2.png",
    icon_size = 32,
    flags = {"goes-to-main-inventory"},
    subgroup = "chargepacks",
    category = "electrodes",
    tier = 2,
    order = "d[chargepack]-c[enhanced-electrodes-2]",
    stack_size = 50,
    default_request_amount = 10,
    effect =
      pollution = {bonus = 0.25},
      speed = {bonus = 0.30}
    limitation = {"chargepack-small-fullycharged-normal"
    limitation_message_key = "enhanced-electrodes-only-in-rapid-charger"
(You can also see the full code at that point over on GitHub if you want to see what ive done. I am going to release the mod with the modules tech-enabling disabled)

After some exploring, I was able to notice the following:
  • by default, all Modules refused to enter the Charger. I could place them in a regular furnace when it was NOT working.
  • If I added the normal allowed_effects for a furnace to the Charger, it works fine.
  • I tried removing the Limitations, no change to Charger
  • I tried removing the Consumption from base speed-module, still refused to go in the Charger, but would go in a regular furnace.
  • removing all allowed_effects but Speed from the Charger, refused all modules.
  • switched the charger to ONLY allowed_effects of "consumption", and suddenly the speed-module without consumption wanted to go in.
  • charger with allowed_effects of "consumption" and "pollution" did not accept my modules, but did accept the base modules.
  • tested regular allowed_effects list again, worked everything.
  • tried allowed_effects = {"speed", "consumption", "pollution"}, and it suddenly accepted my modules, as well as base speed and efficiency modules.
As far as I can tell, the games detection of allowed_effects (at least on the furnace) is inconsistent. It really doesn't matter much in vanilla (as the only modules are Speed+Consumption, Consumption, or All 4) but different modded modules could be affected. I will admit, I did NOT try the same situation in an Assembly Machine prototype.

(And before anyone asks, no, I cant just make the module effect consumption. The consumption of the Chargers is VERY specific to use the correct amount of power from your network to charge the Chargepacks.)

Factorio Staff
Factorio Staff
Posts: 9977
Joined: Wed Jun 11, 2014 5:23 am

Re: [0.16.7] MODDING: furnace allowed_effects incorrect

Post by Rseding91 » Wed Dec 27, 2017 4:03 pm

Thanks for the report. It's now fixed for the next version of 0.16.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users