Opened 6 years ago
Closed 3 years ago
#4881 closed defect (fixed)
Start Mods button only works as intended when saving the mods
Reported by: | elexis | Owned by: | Silier |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 25 |
Component: | Core engine | Keywords: | |
Cc: | Patch: | Phab:D3592 |
Description
The mod selection screen has a button to save the mods and one to start the mods.
So the user might assume that the mods could be launched without saving the configuration too if theere is no dialog asking for the changes to be saved before 'starting' them.
The code also looks like it intends to launch the selected mods without saving:
function startMods() { // always sort mods before starting sortMods(); Engine.SetMods(["mod"].concat(g_modsEnabled)); Engine.RestartEngine(); }
But it doesn't actually work, tested on svn, a22, a21 and a19 (while confirming that the mod attempted to start can be started after saving).
That RestartEngine
call goes straight to restart_engine()
of main.cpp
.
It sets quit
to true which means the frame rendering infinite loop in the main thread is left. restart
had been set to true which means that the same process is going to reinitialize everything. So it ought to be supported to restart without saving.
RunGameOrAtlas
Change History (11)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
No matter which set of mods is enabled, no matter if there is a user.cfg entry for enabled mods, doesn't work for me on my unix machine. Even more wondering why then.
comment:3 by , 6 years ago
Milestone: | Backlog |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Just remove all currently enabled mods, then start mods, you should be greeted by the mod selection screen again (since that is what happens if you don't have any mods). If it doesn't check for local changes that could break this.
comment:4 by , 6 years ago
Ive tested all sets of mods, including the empty set.
Ive removed my user.cfg
, tested with clean svn code, with a22, with a21, even with a19 code and always get the same result.
I guess I can derive the origin through the c++ code.
comment:5 by , 6 years ago
But have you tried it in svn? (That is, what I tested...)
Edit: also worked in A22. Just to clarifiy: The way in comment:1 just enables the mod temporarily for the run after the restart.
comment:6 by , 6 years ago
I have stated that in the ticket description, repeated it in comment 4. I can upload a screencast if you guys don't believe me ._.
comment:8 by , 6 years ago
Milestone: | → Backlog |
---|---|
Summary: | Start Mods button only works when saving the mods → Start Mods button only works as intended when saving the mods |
The launching part works - but the list of enabled mods doesn't show the list of enabled mods, but only the list that is present in the config.
Confirm in alpha 22 for instance by disabling the public mod, clicking on launch mods, then seeing the public mod in the list of enabled mods again. Notice the public mod is not currently enabled by pressing F9 and typing warn(uneval(Engine.GetEngineInfo));
.
comment:9 by , 6 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
comment:10 by , 3 years ago
Milestone: | Backlog → Alpha 25 |
---|---|
Owner: | set to |
Patch: | → Phab:D3592 |
Status: | reopened → new |
Hmm, works for me.
I just do (without mods enabled): click on a mod -> click on enable -> click start mods. Then the game restarts and the mod is enabled for this run.