Open rzkyif opened 2 years ago
Thanks for posting the detailed explanation. I think FindFirstChangeNotificationW
doesn't work well under MO2.
We can rewrite WaitForNextUpdate
to poll filesystem periodically instead of waiting for the event.
We should discuss this problem with MO2 authors. Maybe they know if we can get FindFirstChangeNotificationW
to work in this case.
Severity
Major. A crucial error that indicates a deviation from business logic or disrupts the program, but doesn't have a vital impact on the app.
Priority
Medium. Anything that negatively affects the user experience.
Description
For users who use Mod Organizer 2, Skyrim Platform only watches certain plugin files and setting files for hot-reloading:
Platform/Plugins
folder of the first mod in the mod list that includes aPlatform/Plugins
folder.Platform/PluginsDev
folder of the first mod in the mod list that includes aPlatform/PluginsDev
folder.For the above conditions, the
Overwrite
folder is also counted as a mod. Because it is always the last mod in the mod list, if any mod before it includes aPlatform/Plugins
folder, then plugin files and setting files in it'sPlatform/Plugins
folder will not be watched for hot-reloading. This also applies forPlatform/PluginsDev
folders.The above conditions apply even if the first mod in the mod lists that includes a
Platform/Plugins
orPlatform/PluginsDev
folder has those folders as empty folders. When it's like this, plugin files and setting files in every mod after it will also not be watched for hot-reloading.OS
Windows
OS version
10
Skyrim version
1.5.97
SKSE version
2.0.20
client commit''s hash
83cccd6d5b91149f45ab0169b30087fac56cfae6
server commit''s hash
N/A
Videocard model
Geforce GTX 1050 Ti
Steps to reproduce
Say we have four mods (A, B, C, and D) and an Overwrite folder with the following structure and the same order in the mod list:
Expected result
Editing any of the following files should initiate plugin hot-reloading:
/A/Platform/Plugins/A-settings.txt
/C/Platform/Plugins/C.js
/C/Platform/Plugins/C-settings.txt
/D/Platform/PluginsDev/D.js
/D/Platform/PluginsDev/D-settings.txt
/Overwrite/Platform/Plugins/X.js
Actual result
Editing the following files actually initiates plugin hot-reloading:
/A/Platform/Plugins/A-settings.txt
(because A is the first mod that includes aPlatform/Plugin
folder)While editing the following files doesn't initiate any plugin hot-reloading:
/C/Platform/Plugins/C.js
(because C is the second mod that includes aPlatform/Plugin
folder)/C/Platform/Plugins/C-settings.txt
(because C is the second mod that includes aPlatform/Plugin
folder)/D/Platform/PluginsDev/D.js
(because D is the second mod that includes aPlatform/PluginDev
folder)/D/Platform/PluginsDev/D-settings.txt
(because D is the second mod that includes aPlatform/PluginDev
folder)/Overwrite/Platform/Plugins/X.js
(because Overwrite is the third mod that includes aPlatform/Plugin
folder)Note that after plugin hot-reloading is actually initiated (e.g. by editing
A-settings.txt
), all of the files above are detected and loaded by Skyrim Platform.