Reload mod(s)
-
- Burner Inserter
- Posts: 19
- Joined: Tue Aug 19, 2014 12:47 pm
- Contact:
Reload mod(s)
Control.lua is loaded whenever you start a game, but "static" things like recipes and items don't reload until you restart the game.
It takes me about 14 seconds to start Factorio, 2 of those are spent loading mods and the rest is just loading sprites. So even if there's a button to reload every single mod it would still save a bunch of time.
It takes me about 14 seconds to start Factorio, 2 of those are spent loading mods and the rest is just loading sprites. So even if there's a button to reload every single mod it would still save a bunch of time.
Re: Reload mod(s)
Reloading mods during runtime is definitely on a long range todo list, but it is more complicated than you say. Basically everything in factorio is a mod. Menu apperance, for example. And all sprites come from mods. So if you reloaded mods you would also have to reload all graphics (some tricks could be used to speed this up, but generally everything has to be reloaded). This is doable, but not simple.
- MagicLegend
- Long Handed Inserter
- Posts: 65
- Joined: Tue Dec 30, 2014 6:17 pm
- Contact:
Re: Reload mod(s)
But it would be superduper useful for every modder. Having to restart the game every time you redone the shadows of your object is a real nuisance...
Very good at pressing buttons.
Re: Reload mod(s)
what about reloading one single mod ?
reloading mods is usefull to test WIP mods, but as far as I know, when a modification is made, it is not on all mods
reloading mods is usefull to test WIP mods, but as far as I know, when a modification is made, it is not on all mods
Re: Reload mod(s)
As you would have to reload the graphics anyway, it wouldn't save any time.
If you are testing just the scripting of the mod, you don't need to restart the game (I believe).
If you are testing just the scripting of the mod, you don't need to restart the game (I believe).
Re: Reload mod(s)
Correct. Control.lua is re-loaded every time a game is loaded. That's 90% of what needs constant adjusting while modding.kovarex wrote:As you would have to reload the graphics anyway, it wouldn't save any time.
If you are testing just the scripting of the mod, you don't need to restart the game (I believe).
If you want to get ahold of me I'm almost always on Discord.
Re: Reload mod(s)
yeah i think a /modreload <modname> will be nice to have for development off mods
Re: Reload mod(s)
It's not possible unless the mod adds no prototypes and then at that point it's not needed.Maharaja wrote:yeah i think a /modreload <modname> will be nice to have for development off mods
The result of one mod loading changes the result of the next so you can't "hot reload" one mod without reloading all of them and at that point it's identical to restarting the game.
If you want to get ahold of me I'm almost always on Discord.
Re: Reload mod(s)
Is this information still current? Everything prior to that comment in this thread was from 2 years ago. I am not currently able to make control.lua changes take effect in game without restarting the game.Rseding91 wrote:Correct. Control.lua is re-loaded every time a game is loaded. That's 90% of what needs constant adjusting while modding.kovarex wrote:As you would have to reload the graphics anyway, it wouldn't save any time.
If you are testing just the scripting of the mod, you don't need to restart the game (I believe).
I am also not able to get un-zipped mods to work in 0.15 (not sure if they worked in 0.14 either).
What is the correct workflow to be able to update control.lua in a mod without having to exit all the way out of factorio to reload it?
Re: Reload mod(s)
Yes it's still correct. I use un-zipped mods all the time to test bugs/desyncs/develop mod code.sparr wrote:Is this information still current? Everything prior to that comment in this thread was from 2 years ago. I am not currently able to make control.lua changes take effect in game without restarting the game.Rseding91 wrote:Correct. Control.lua is re-loaded every time a game is loaded. That's 90% of what needs constant adjusting while modding.kovarex wrote:As you would have to reload the graphics anyway, it wouldn't save any time.
If you are testing just the scripting of the mod, you don't need to restart the game (I believe).
I am also not able to get un-zipped mods to work in 0.15 (not sure if they worked in 0.14 either).
What is the correct workflow to be able to update control.lua in a mod without having to exit all the way out of factorio to reload it?
Control.lua is re-loaded every time you load a save file.
If you want to get ahold of me I'm almost always on Discord.
Re: Reload mod(s)
Apologies for necro'ing an old thread, but since this is the top search hit for "factorio reload mod" and is in "Won't implement", I thought it worth pointing out that there is a function to simplify mod reloading. From the LuaGameScript docs:
reload_mods()
Forces a reload of all mods.
Note: This will act like saving and loading from the mod(s) perspective.
Note: This will do nothing if run in multiplayer.
Note: This disables the replay if replay is enabled.
So "/c game.reload_mods()" does the trick, as far as I'm concerned.
reload_mods()
Forces a reload of all mods.
Note: This will act like saving and loading from the mod(s) perspective.
Note: This will do nothing if run in multiplayer.
Note: This disables the replay if replay is enabled.
So "/c game.reload_mods()" does the trick, as far as I'm concerned.
Re: Reload mod(s)
That's just reloading control.lua - not reloading data.lua or anything in that stage.ignatio wrote: ↑Sat May 04, 2019 2:11 pm Apologies for necro'ing an old thread, but since this is the top search hit for "factorio reload mod" and is in "Won't implement", I thought it worth pointing out that there is a function to simplify mod reloading. From the LuaGameScript docs:
reload_mods()
Forces a reload of all mods.
Note: This will act like saving and loading from the mod(s) perspective.
Note: This will do nothing if run in multiplayer.
Note: This disables the replay if replay is enabled.
So "/c game.reload_mods()" does the trick, as far as I'm concerned.
If you want to get ahold of me I'm almost always on Discord.
Re: Reload mod(s)
If you are playing via Steam, the built in game relaunch functionality (used when there is a mod load error, or mods are updated) skips the steam cloud sync step, which can take many seconds sometimes. Those seconds would be saved with a relaunch button.
Re: Reload mod(s)
i have way to for convenience.
add dummy mod with do nothing, and every time need to reloading, toggle that mod.
change mod list make reloading.
why it has not reloading button
add dummy mod with do nothing, and every time need to reloading, toggle that mod.
change mod list make reloading.
why it has not reloading button