FSModTool guide - robot9706/FSSE GitHub Wiki

FSModTool

FSModTool is a tool intended for modders, it has basic features to prepare files for modding, install mods with control over the process, check modded assembly metadata and find signatures for hooks. There are two versions: the GUI and the command line.

GUI version

The GUI version is the "FSModTool.exe" in the toolset. This tool can also use the "fsse.cfg" created by the Windows version of FSSE. This file can contain the installation locations of different platforms of the game (if it's setup correctly, FSSE "Settings" menu). If the settings are correct instead of browsing the "Assembly-CSharp.dll" you will get an option to select it from a list (based on the platforms).

The tool has multiple tabs:

  • PrepareDLL: This tab is used to prepare the "Assembly-CSharp.dll" for modding. This means every class and method are changed to public, and a public property for each private field will be generated. So modders can access everything they might need.
  • Metadata: This tab can be used to read the patch metadata from a patched assembly, this includes the patcher version and a list of methods which are hooked to FSLoader.
  • Patcher: This tab can be used to hook methods to FSLoader, settings can also be saved to presets which is useable by the command line version for development.
  • Signatures: This tab can be used to find signatures of different methods. These signatures are required for the "Hook" attribute.

Patcher tab:

  • Patched assembly: The input file of the patcher, this is the prepared dll done using the "Prepare DLL" tab. (Preparing is only required once per FalloutShelter version)
  • FSLoader.dll: The path to the "FSLoader.dll".
  • Reference folder: Path to the folder which contains the dependecies of the "Assembly-CSharp.dll".
  • Output: The patched output file.
  • Patch files: A list of mods which hooks will be patched in the input file.

This tab is basically used to hook methods in the game to the FSLoader so mods will be able to use it. Hooking is only required when new methods are required to be hooked to FSLoader. The input file can be an assembly which has hooked methods too, in this case only the new hooks will be patched, so basically the input and output files can be the "Assembly-CSharp.dll" in the "Managed" folder (this can speed up mod development speed).

Command line version

This is the "FSModToolCMD.exe" in the toolset. The tool has a built in parameters guide ("FSModToolCMD.exe ?"). The basic usage is: "FSModToolCMD.exe [command] {command parameters} {additional parameters}".

The following commands are available:

  • "prepare [input file] [output file]". This is the same as the "Prepare DLL" tab in the GUI version.
  • "patch [parameters]". This is the same as the "Patcher" tab in the GUI version.
Parameter Description
-in=[input file] Specifies an input file (a prepared Assembly-CSharp.dll).
-out=[output file] The patched output file.
-ref=[reference folder] The folder which contains the dependencies of "Assembly-CSharp.dll" (usually the original "Managed" folder).
-fsloader=[FSLoader.dll] The path to the FSLoader.dll.
-mod=[mod dll] Path to a mod dll which is needed to be installed. This parameter can be used multiple times. The FSLoader.dll is automatically added to the mod dlls list.
-preset=[preset file] Load a GUI preset file and overwrite parameters which are already set (but adding new mods using the "-mod" parameter is still possible).

Example: "FSModTool.exe patch -in=C:\Mod\Patched.dll -out=C:\Mod\Out.dll -ref=C:\FS\Managed -fsloader=C:\Mod\FSLoader.dll -mod=C:\Mod\MyMod.dll".

The only additional parameter is "-silent", if this parameter is used no progress report and error reporting will be printed to the command line.