Skip to content

Creating New Server‐Side Mods

data-bomb edited this page Jan 28, 2025 · 19 revisions

Creating new server-side mods for Silica servers requires establishing the editor, gathering the necessary references from Cpp2IL, and ensuring the separate build targets (.NET 6.0 for Silica Listen Servers and .NET Standard 2.1 for Silica Dedicated Servers) are accomodated.


Windows Development Environment

  1. Install Visual Studio
  2. Download the Mod Template
  3. Place the Mod Template in the Visual Studio templates directory (e.g., %USERPROFILE%\Documents\Visual Studio 2022\Templates\ProjectTemplates)
  4. Create a new Project using the Silica Mod template
  5. Gather all references ( see below )
  6. Build using the Build Solution option

macOS Development Environment

  1. Install VSCode or VSCodium

Tip

For VSCodium, click to show all release assets to reveal the .dmg files for macOS

  1. Install the .NET SDK
  2. Download the Mod Template
  3. Unzip the Mod Template and open Si_HelloWorld.cs in the editor
  4. Gather all references ( see below )
  5. Build using the Terminal dotnet build command

Gather References

  1. Clone the Silica repository
  2. Copy the include\ directory from the Silica repository into your local environment at the same level as your new Silica Mod project
-repos
--Silica Mod Project 1
--include
  1. Download QList.dll and place it in the include\ directory
  2. Create an include\net6.0\ directory
  3. Download FixNullableAttribute.dll and place it in the include\net6.0\ directory
  4. Purchase and download the Silica game
  5. Install MelonLoader: Follow Step 2 through Step 7 of the Listen Server Setup Instructions
  6. Launch Silica and wait for the game to reach the Main Menu then exit
  7. Navigate to your Silica game directory and copy the following files into the include\net6.0\ directory

Note

For game versions v0.8.122 or later substitute the Il2CppSilicaCore.dll file for the Assembly-CSharp.dll file.

MelonLoader\net6\0Harmony.dll
MelonLoader\net6\Il2CppInterop.Runtime.dll
MelonLoader\Il2CppAssemblies\Assembly-CSharp.dll
MelonLoader\Il2CppAssemblies\Il2Cppcom.rlabrecque.steamworks.net.dll
MelonLoader\Il2CppAssemblies\Il2Cppmscorlib.dll
MelonLoader\Il2CppAssemblies\UnityEngine.CoreModule.dll
MelonLoader\Il2CppAssemblies\UnityEngine.dll
MelonLoader\Il2CppAssemblies\UnityEngine.InputLegacyModule.dll
MelonLoader\Il2CppAssemblies\UnityEngine.PhysicsModule.dll
  1. Create an include\netstandard2.1\ directory
  2. Download the Silica Dedicated Server tool from Steam
  3. Install MelonLoader: Follow Step 2 through Step 6 of the Dedicated Server Setup Instructions
  4. Download the launch.bat script and place it into the root of the Silica Dedicated Server directory
  5. Double-click launch.bat and wait for the server to completely initialize before exiting
  6. Navigate to your Silica Dedicated Server directory and copy the following files into the include\netstandard2.1\ directory

Note

For game versions v0.8.122 or later substitute the SilicaCore.dll file for the Assembly-CSharp.dll file.

MelonLoader\net35\0Harmony.dll
MelonLoader\net35\MelonLoader.dll
Silica_Data\Managed\com.rlabrecque.steamworks.net.dll
Silica_Data\Managed\Assembly-CSharp.dll
Silica_Data\Managed\UnityEngine.CoreModule.dll
Silica_Data\Managed\UnityEngine.dll
Silica_Data\Managed\UnityEngine.InputLegacyModule.dll
Silica_Data\Managed\UnityEngine.PhysicsModule.dll

Loading the Mods

Once you've built a DLL for your mod then place it in the server/game directory's Mods sub-directory and then launch the server. Don't forget that you'll also need to add the Si_AdminMod.dll (from the Silica repo's Releases) in the Mods sub-directory.


Troubleshooting

If you see any red stream across the console when you start the server then this indicates some type of error occurred. Unfortunately, each time a new line is added to the server console it moves the console down to the latest message, so it can be easy to miss these messages. Review the log files to diagnose problems:

(Server/Game Directory)\MelonLoader\Latest.log
%USERPROFILE%\Documents\Silica\Server_*.log

If you need any further help then stop by the Silica Modder's Discord server.