recipe enabled=false but still going on start??

Place to get help with not working mods / modding interface.
mystic
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Jan 24, 2026 4:16 am
Contact:

recipe enabled=false but still going on start??

Post by mystic »

as said in title,
recipie is:

Code: Select all


local cobaltSolution = table.deepcopy(data.raw['fluid']['water'])
cobaltSolution.base_color = CobaltColor
cobaltSolution.visualization_color = CobaltColor
cobaltSolution.flow_color = CobaltColor
cobaltSolution.icons = {{
    icon=  cobaltSolution.icon,
    icon_size = cobaltSolution.icon_size,
    tint= CobaltColor
}}
cobaltSolution.default_temperature = 1495
cobaltSolution.max_temperature = 2000
cobaltSolution.name = 'cobalt-solution'
cobaltSolution.localised_name = 'Cobalt Solution'
cobaltSolution.auto_barrel = false

local MeltCobalt = {
    type = 'recipe',
    enabled = false,
    name = 'melt-cobalt',
    localised_name = 'Cobalt Melting',
    category = 'thermal',
    energy_required = 0.1,
    ingredients = {
        {type='item', name='cobalt', amount=3}
    },
    results={{type='fluid', name='cobalt-solution', amount=200}}
}
data:extend{cobaltSolution, MeltCobalt}
And the tech that should unlock it is

Code: Select all

local CobaltProcessing = {
    type='technology',
    prerequisites={'thermo-plant'},
    icons= {{
        icon=data.raw['item']['iron-ore'].icon,
        icon_size = data.raw['item']['iron-ore'].icon_size,
        tint={r=0.2, g=0.3, b=0.7}
    }},

    name = 'cobalt-processing',
    localised_name = "Cobalt Processing",

    unit = {
        time=30,
        ingredients={
            {"automation-science-pack", 1},
            {'logistic-science-pack', 1},
            {'chemical-science-pack', 1}
        },
        count=200
    },

    effects = {
        {type='unlock-recipe', recipe='melt-cobalt'},
        {type='unlock-recipe', recipe='cobalt-dust'},
        {type='unlock-recipe', recipe='cobalt-gear'},
        {type='unlock-recipe', recipe='cobalt-girder'}
    }
But it's always enabled, I have no idea

(If is Helpfull)
In my data.lua file i have

Code: Select all

require('file that the tech is in')
--more requirements 
require('file that the recipe is in')
I cant figure this out at all
User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 610
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: recipe enabled=false but still going on start??

Post by Silari »

Are you testing this in a new game or loading a saved game? Saved game would keep the previous setting unless technology effects are reset are for the force, so if you had it enabled during testing then changed it to not enabled, it would still show available in the save.
mystic
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Jan 24, 2026 4:16 am
Contact:

Re: recipe enabled=false but still going on start??

Post by mystic »

tested it in a new game every time, and when I made a test recipe that is disabled it didn''t show up
mystic
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Jan 24, 2026 4:16 am
Contact:

Re: recipe enabled=false but still going on start??

Post by mystic »

Fixed it!, no idea how, just resaved the files and it started working properly??
Post Reply

Return to “Modding help”