Inlaid UV-lamp

by Pi-C

Add compatibility with "Schall Lamp Contrast", "Inlaid Lamps Extended", and "Inlaid Lamps 2" to "Will-o'-the-Wisps". Mainly, the UV-lamp will be changed to an inlaid lamp that vehicles can drive over without harming it. Please note: For best results, only one of the inlaid lamp mods should be active!

Tweaks
2 years ago
0.17 - 1.1
194

g [Implemented] add Inlaid lamps 2

4 years ago

Can you add Inlaid lamps 2 as the old Inlaid Lamps Extended hasn't been updated.

4 years ago

I'll do this, but please be patient for a while! I've too many mods to maintain, can't do everything at once. :-)

4 years ago

Looks like the old mod finally got updated so I'll use that for now.

4 years ago

Currently working on new versions for Factorio 0.17 and 0.18. This was my very first mod, so I'm using the opportunity for a major code overhaul which will make it easier to add compatibility with new mods in the future. I'll probably upload over the weekend, perhaps even today. :-)

4 years ago

Sorry it took me so long. I was almost ready to update yesterday when I found a bug in my 0.17 testing installation: Some ingredients had been replaced with items from one of Bob's mods, and the ingredients were stored in another format than my mod expected, so things broke and I had to work on a converter (not that hard) and start testing again all over (that takes quite some time with different combinations of mods, normal/expensive mode, and 0.17/0.18 versions to get right).

Anyway, versions 0.17.4/0.18.2 are out now, so give it a try, please! Oh, and be sure to turn off "Inlaid Lamps Extended" before using "Inlaid Lamps 2" -- unless you want to be confused by duplicate entities! :-)

4 years ago

No Worries. Thanks for the update.

4 years ago

You're welcome!

4 years ago

Its work working now but this mod but it overrides the recipe changes from Krastorio 2 for the original Inlaid Lamps Extended. Inlaid Lamps 2 is keeps its default for some reason.

4 years ago

Do you have both "Inlaid Lamps Extended" and "Inlaid Lamps 2" active at the same time?

4 years ago

No I disabled Inlaid Lamps Extended. Inlaid Lamps 2 doesn't appear to be recognized by Krastorio 2 and Inlaid Lamps Extended which does get recognized gets overwritten to its default recipe when Inlaid UV-lamp is enabled.

4 years ago

I can't reproduce that, it actually also makes no sense! I change the recipe of the inlaid UV lamp by replacing the vanilla lamp with an inlaid lamp. Ingredients of other recipes are not hard-coded by this mod, it just takes the recipe data that are available, multiplies the amount for big inlaid lamps, and adds difficulty. However, I don't ever say anything like "replace electric-circuits with wooden circuit boards".

Actually, I'm surprised you even got the game loaded with K2! Starting the game with just Inlaid UV-lamps, Will-o'-the-wisps, the inlaid lamp mods, and Krastorio 2, the game crashed on start because Krastorio changes the format of ingredients from short to full format. So, my guess is you have some other mod running that reverted the changes Krastorio made and changed the format back from full to short.

Anyway, here's some logging output of this mod after the big-lamp recipes have been changed. I've started the game with both Inlaid Lamps Extended and Inlaid Lamps 2 active together, and doublechecked by also having each of these mods active without the other:

   2.353 Script @__InlaidUVLamp__/common.lua:38: InlaidUVLamp: Multiplied ingredients for 2x2 Flat Lamp by 4. (InlaidLampsExtended)
   2.353 Script @__InlaidUVLamp__/prototypes/recipe.lua:50: biglamp ingredients: {{amount = 4, name = "automation-core", type = "item"}, {amount = 12, name = "copper-cable", type = "item"}, {amount = 4, name = "iron-plate", type = "item"}}


   2.210 Script @__InlaidUVLamp__/common.lua:38: InlaidUVLamp: Multiplied ingredients for 2x2 Flat Lamp by 4. (InlaidLamps2)
   2.210 Script @__InlaidUVLamp__/prototypes/recipe.lua:50: biglamp ingredients: {{amount = 4, name = "automation-core", type = "item"}, {amount = 12, name = "copper-cable", type = "item"}, {amount = 4, name = "iron-plate", type = "item"}}

I'm not sure what ingredients you expected to see, but "automation-core" definitely is no vanilla item, so it must have been placed there by Krastorio 2.

4 years ago

Automation-core is a Krastorio 2 item so your correct there. Also I tried starting with just the mods you said and it did crash but adding Deadlocks Larger Lamps did allow it to load.

I'll disable Inlaid UV-lamps for now as this appears to be a really big edge case. Thank for looking into it anyway.

4 years ago

Did you try the latest version yet? It should fix the crash.

4 years ago

Yes that fixed the crash that happen when you don't load Deadlocks Larger Lamps.

However Deadlocks Larger Lamps appears to the cause of the issues as adding it to the small list of mods you stated reverts the recipe. Which is issue as I use the Larger lamps a lot in my base.

Unfortunately the mod is currently not maintained due to issues with Deadlock being overprotective with IR. So far no one has picked up the Larger Lamps mod but I suspect it would be only a matter of finding someone willing to pick it up. I know you got your hands full already with other mods so I will not ask you to maintain it.

4 years ago

OK, I've just installed Deadlock's lamp mod, and it really removes the automation-core. However, the solution is easier than editing Deadlock's mod: changing the order in which mods are loaded is all it takes!

I've just added a hidden dependency on Krastorio 2. This will make sure K2 gets loaded before this mod, so it has a chance to replace the ingredients of the inlaid lamps. A side effect of this change will be that the recipe for the vanilla lamps and Deadlock's large lamps will use glass. :-)

I'll upload the new version in a while. Just want to try if that also works with "Krastorio Legacy", so the people who still use Factorio 0.17 will also get the Krastorio ingredients.

4 years ago

Looks like it working thanks again.

New response