Voidcraft

by S6X

Conjure items from nothingness using energy and a bit of magic. Or sufficiently advanced technology, who really knows?

Content
a month ago
2.0
11.1K
Logistics Mining Fluids Manufacturing

b Alternate recipes missing in 1.0.8

9 months ago

After updating from 1.0.7 to 1.0.8, I have lost the ability to use the void flux and coherence variants of the recipes. Their tabs no longer appear in the voidworks, existing voidworks show that the "recipe [is] not researched", but Factoriopedia does not list a research for them.

9 months ago
(updated 9 months ago)

Well, I don't know what went wrong... but I do know how to fix it!

I added a console command to 1.0.9, /vc_fix_recipes and the recipes should come back.

9 months ago

It's so weird that there's still no native way to have a recipe require multiple prerequisites.

So that worked, and I can tell you what went wrong, because I can replicate it.
"The game resets recipes and technologies any time mods, prototypes, or startup settings change"

Since you're unlocking them programmatically, there's no technology unlocking them, and so they're getting reset to locked. Any, and every, time any of those things happen. Add a mod to the save? Gone. Remove a mod from the save? Gone. Change a startup setting? Gone.
Unfortunately, I don't have a good solution to offer you outside of having that command available.

9 months ago

There actually is supposed to be a solution, an event called on_configuration_changed, that is specifically designed to handle this very situation, and Voidcraft makes use of it. I instantly knew how to fix your problem because I got bit by the same thing early in development, when I was constantly adding new features, and that's when I learned about on_configuration_changed and added it to the mod. So the mystifying part to me is that something in the configuration changed that didn't cause on_configuration_changed to get called. Possibly a bug in Factorio itself, but I don't think we have enough information to write a useful bug report.

9 months ago
(updated 9 months ago)

Ah, that's good info -- another mod I have is calling reset_technology_effects() when that event fires, which is.. totally overriding you. I'll file a bug report with them, because that's entirely redundant in the first place, but I guess you could also solve it on your end by also handling on_technology_effects_reset.

EDIT: Hmm, removing the mod in question didn't fix it, but, indeed, adding this handler did.

script.on_event(defines.events.on_technology_effects_reset, force_unlock_variants)

I guess there's multiple mods doing the same pointless thing.

9 months ago

Thanks, I've added this to the next version.

6 months ago

I'm trying to write a mod for myself that adds voidcrafting recipes for basic resources of the planet Maraxsis from the mod of the same name. I've added the recipes I wanted, but it's not generating the flux and coherence alternates. I tried /vc_fix_recipes and it didn't make any visible difference. Am I missing something, like adding an item/recipe category?

Also, if once I've got it working you want to add it as a compatibility script, I'd be happy to share. It's probably better off as a part of Voidcraft than as its own mod. And I'll probably do one for Tenebris, and any other planet mods I try and enjoy.

6 months ago

The flux and coherence versions aren't automatically created, but Voidcraft provides an easy API for you to do so.

Here's some example code, which assumes all of your newly created recipes are in a table called my_new_recipes.

local fluxized_recipes = {}
local coherized_recipes = {}
for r, rd in pairs(my_new_recipes) do
    rd.vc_fluxize = true
    rd.vc_coherize = true
    table.insert(fluxized_recipes, VOIDCRAFT.fluxize(rd))
    table.insert(coherized_recipes, VOIDCRAFT.coherize(rd))
end
data:extend(fluxized_recipes)
data:extend(coherized_recipes)
6 months ago

That did the trick, thanks!

5 months ago

Do you have a github? I've seen that you've added some mod compatibilities. Could I submit a pull request to add mod compatibilities to Voidcraft to avoid having them be in their own mods?

5 months ago

The mod compatibility I've done so far has been one-line fixes or features added to interface with mods that I personally like to use, like Scrappy Industry. If you want to add a bunch of recipes for Maraxis, Tenebris, and the like, I feel like that should be its own mod. I don't use those planets and, to be totally blunt, I don't want the responsibility of maintaining something like that.

5 months ago

Fair enough.

New response