F4 xSE
This mod allows the F4SE plugin to be preloaded before the game is initialized.
About this mod Machine translation
This mod allows the F4SE plugin to be preloaded before the game is initialized.
Original address:
Prefix:
Visual C++ 2015, 2017, 2019, 2022 Redistributable Package:
What does it do?
Allows F4SE plugins to be preloaded before game initialization.
Do I need to do this? Are there any benefits to doing this?
No! You don't need this unless a mod specifically says you must. There is no benefit in having this information for no reason. As of this writing, this is only required when using PrivateProfileRedirector F4 or Buffout 4. Otherwise there is no other reason to use a preloader. It allows mods to edit game code before the game runs the code.
Note: Starting with the Fallout 4 NG update, F4SE plug-ins have the option to use the preload method built into the new F4SE version (F4SEPlugin_Preload export function). Please refer to the F4SE modding instructions you installed to confirm that you really need this preloader.
How does it work?
The game automatically loads the library WinHTTP.dll, preloads the plugin, and then redirects all function calls to the original WinHTTP.dll file in the system directory.
Install
Place WinHTTP.dll and xSE PluginPreloader.xml in your root directory (where Fallout4.exe is located), not in the Data folder. If you are using F4SE, make sure to run it with the -forcesteamloader command line option.
uninstall
Delete the installed files in the game folder. Any mods that rely on this will not work properly.
Configuration
The preloader is implemented as a proxy for WinHTTP.dll and is therefore incompatible with any mods that alter that DLL (I couldn't find any). In this case you need to rename the WinHTTP.dll of another module to something else and specify the new real DLL in the xSE PluginPreloader.xml file. See the XML file for more detailed instructions.
Notice!
Enter the xSE PluginPreloader.xml file. If the default loading method does not work, change the loading method to OnThreadAttach or OnProcessAttach.
- If you use Vortex to install the mod, use the Engine Injector installation method (DINPUT for older versions of Vortex) to install the mod.
To change the loading method, edit the value of the "Name" attribute in the XML file.
For example, if you need to set it to "OnThreadAttach" or "ImportAddressHook", you can edit this section like this.
User Q&A
Q: Will this affect performance or have any disadvantages?
A: No issues have been noticed so far.
Q: Is it compatible with ENB?
Answer: Yes.
Q: Is ENB compulsory?
Answer: No. Has anyone actually asked this question?
Q: Will there be any problems if the F4SE plug-in is loaded at different times?
Answer: Only F4SE plug-ins that contain special files indicating that they want to be loaded in advance will be preloaded. You should not create this file manually. The plugin author will decide and include the file with their mod i it must be loaded that way.
Question: I encountered the problem that the plug-in is not preloaded. It should be preloaded!
A: Locate the file xSE PluginPreloader.log in your game directory and upload it to your problem report. I'll try to find out what the problem is.
Questions and Answers for Mod Authors
Q: How can I load plugins before the game initializes?
Answer: Assume that your plug-in name is MyPlugin.dll and it is in Data/F4SE/Plugins. Then you create a text file named MyPlugin_preload.txt in Data/F4SE/Plugins. The content of the file does not matter.
Q: How is the plug-in loaded?
Answer: The WinHTTP.dll loader will call your plug-in's LoadLibrary before the game is initialized. It does not call F4SEPlugin_Query or F4SEPlugin_Load, which are called later by F4SE itself. This means that you must complete what you need to do in the DllMain method before the game is initialized. You can also export a function named Initialize (signature is void (__cdecl*) (void), i.e. no parameters, no return value, C calling convention) to call later.
Question: F4SE later calls LoadLibra …
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- There is no universal mod manager for this game: some mods replace game files directly, some go into a game-specific Mods folder, and some need a game-specific community loader or tool first — follow the bundled readme.
- Place the files exactly as the readme says; mods with listed dependencies need those installed too.
- Launch the game to confirm it loaded; some games require enabling mods in settings or an in-game mod menu.
Install locations vary a lot between games and mods — the bundled readme is the most reliable guide.