Voidcraft: Planetary Compatibility

by Mouseas

Adds recipies and technology unlocks to Voidcraft so it can work with various planet mods.

Content
4 months ago
2.0
799
Factorio: Space Age Icon Space Age Mod
Mining Fluids Manufacturing

g Cool idea!

5 months ago

I was recently putting together a multi-planet modpack and really wanted to include voidcraft but thought it would be too wild to randomly throw in the mix.

Super interested to see where this goes ! Haven't actually even got to modded planets yet though so i don't even know what I'm worried about, but its cool to see someone already working on something of this sorts!

5 months ago

💜 I'm adding voidcrafting recipes for basic materials specific to planets in mods I'm using and enjoying. I'll add more mods as I try them out. Currently on the todo list are Terra Palus and Cerys.

5 months ago

Very nice. Thank you for doing this!

5 months ago

Oh hey, I just ran into a small problem with Tenebris and Voidcraft; the Bioluminescent electric furnaces don't smelt prismite ore. I'd like to fix that in a way that also applies to modded electric furnaces, but the way Tenebris makes machines take no energy is by changing their entity.energy_source.type to "void" (ironically enough), which it does for both fuel- and electric-powered furnaces. Any suggestions?

5 months ago

Support has been added in Voidcraft 1.4.15, you can now set allow_prismite_smelting.
For example:
data.raw.furnace["my-new-furnace"].allow_prismite_smelting = true

5 months ago

So then I just need to add that to bioluminescent furnaces? Hmm, but that still doesn't differentiate between burner and electric. Would the order in which Tenebris and Voidcraft load make a difference, ie the prismite smelting recipe gets added after the bioluminescent entities are generated? Hmmm...I'll keep poking at it.

If I've got your ear, Voidcraft makes some assumptions about what folders icons are kept in that other mods don't respect. I've gotten around this by editing the recipe after it comes back from your code, but it'd be a lot easier with a few changes to your code. As it is currently written, if the icon isn't in the graphics/icons directory for items, or graphics/icons/fluids directory for fluids, I have to edit the output. It'd be helpful if I could pass in the full path to an image.

In prototypes/voidcrafting.lua, in the voidcraft_recipe function, around line 136, it uses xinfo.img as its first choice over base_item when naming the recipe id. It should only use the img string for the image and not also use it in the recipe name. In my case it's a problem because I can't pass in something like "items/neodymium-ore" because then Factorio gets handed an invalid recipe name with / in it.

5 months ago
(updated 5 months ago)

Sorry, I don't understand what you're asking. Setting allow_prismite_smelting to true on a furnace's prototype makes that furnace able to smelt prismite ore into prismite plates, regardless of its energy source or anything else. You can use whatever criteria you want to determine whether you want to set the variable or not. Load order shouldn't matter because Voidcraft doesn't do anything with it until data-updates, so if you set it in data, you're fine. If something else isn't working I'll probably need more specific information on what.

Anyway, I added xinfo.midpath to Voidcraft 1.4.16, which allows you to change the default "/graphics/items/" into whatever you want, so you should just be able to pass this and Voidcraft's automatically generated paths should work better. Alternatively, you might want to consider using xinfo.icopy which avoids a lot of these sorts of icon path issues by grabbing the icon directly from the base item's prototype. You can set icopy to whatever table in data.raw you want to look for the icon in: this is usually "item" but it can vary depending on what exactly you're copying.

I concede that img is probably poorly named given that it specifies more than an image, but it'd be a pretty big breaking change to change it so I'd rather not. Hopefully the features described above make it not a problem anymore, though.

5 months ago
(updated 5 months ago)

(Double posted, feel free to delete this)

5 months ago

Oooohoho I wish I'd noticed xinfo.icopy sooner, that's way easier! Between that and adding xinfo.midpath, I think that solves my recipe icon problems, thanks!

And by adding allow_prismite_smelting = true to the vanilla electric furnace prototype, the bioluminescent variant picked it up, that's that fixed too

New response