Looking for help on how to make changes to the file "constants.lua"

Place to get help with not working mods / modding interface.
Hoochie
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Jan 01, 2025 5:11 am
Contact:

Looking for help on how to make changes to the file "constants.lua"

Post by Hoochie »

Hi guys!
I'm looking for help with the following:
There is a mod that changes the rules of electric poles, and in the mod folder there is a file "constants.lua" that changes some connection rules:

Code: Select all

constants.EG_WIRE_CONNECTIONS = {
    ["small-electric-pole"] = {
        ["small-electric-pole"] = true,
        ["medium-electric-pole"] = true,
        ["small-iron-electric-pole"] = true
    },
    ["medium-electric-pole"] = {
        ["small-electric-pole"] = true,
        ["medium-electric-pole"] = true,
        ["small-iron-electric-pole"] = true
    },
}
The list is longer, I indicated it as an example.

Is it possible to make changes to this part of the code, via the file "data-final-fixes.lua" or "data-updates.lua"? I can't figure out how to do this.
What is this for?
When the mod is updated, all values ​​are also set to the original ones, but I change some rules for connecting electric poles for myself, and so that after updating the mod, every time I don't have to change this file manually ("constants.lua"), I would like to just throw the file "data-final-fixes.lua" or "data-updates.lua" into the folder with the mod, and continue playing :)
Natha
Filter Inserter
Filter Inserter
Posts: 259
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

Re: Looking for help on how to make changes to the file "constants.lua"

Post by Natha »

No, you can't access variables inside other mods
Post Reply

Return to “Modding help”