Voidcraft Quality Runes

by DemonX3

Supercharge your void gambling with void quality!

Content
a month ago
2.0 - 2.1
1.18K
Manufacturing

i Compatibility Improvements

a month ago
(updated a month ago)

I noticed a few things that could probably be improved to make this mod work better with Voidcraft. I silently patched some of this stuff in 2.8 and before, but I took that code out because this mod hadn't updated yet. It probably would be better here, anyway.

First of all, you don't have to copy voidcraft_recipe and you probably shouldn't so you're always using the most up-to-date version. You can just replace the whole function (in modules.lua) with

local voidcraft_recipe = VOIDCRAFT.voidcraft_recipe

Here's some code that can go right after to make the rune costs consistent with the other Voidcraft runes:

local vcc = require("__Voidcraft__.prototypes.costs")
local qual_rune_outcome = { "dx3-voidcraft-quality-module", "carbon", "runestone" }
local qual_rune_time = vcc.prod_rune
local no_qual_rune_coherence = false
if (settings.startup["s6x-no-random-rune"].value) then
    qual_rune_outcome = "dx3-voidcraft-quality-module"
    qual_rune_time = vcc.prod_rune_slow
    no_qual_rune_coherence = true
end

The actual line where you create the recipe can use these variables (also note the change in its order)

    voidcraft_recipe({subgroup="voidcraft-modules", prefix = "__VoidcraftQualityRunes__", no_coh = no_qual_rune_coherence, img = "void-quality-module-1", advanced = true}, qual_rune_outcome, "vax-xd", qual_rune_time, "s6x-runic-conjuring", {0.86, 0.14, 0.23}),

And finally, here's how to add support for void flux and coherence. This can go at the very end of modules.lua:

data:extend({
    VOIDCRAFT.fluxize(data.raw.recipe["s6xvc-void-quality-module-1"])
})
if (not no_qual_rune_coherence) then
    data:extend({
        VOIDCRAFT.coherize(data.raw.recipe["s6xvc-void-quality-module-1"])
    })
end

I hope this is helpful!

a month ago

Oh, thanks a lot. Didn't expect you here.

New response