This page applies to any SPT version
In order to write client mods for SPT (or any other Unity game with BepInEx) you will need to know how to program in C#. See the resources section to get started if you are new to programming.
Download Visual Studio.Available at the top, then click Install under Visual Studio Community 2022.Workloads tab until you see Game development with Unity. Check the box next to that workload, and click Install in the bottom right.Assets section, and select either dn-spy-net-win32.zip or dn-spy-net-win64.zip depending on your system.C:\dnSpy folder, then drag the contents of the zip you downloaded into that folder.dnSpy.exe and create a shortcut, then place it on your desktop.[spt install folder]/Development .
Mono version of BIE 5.X of Unity Explorer. Install it like any other client mod.[spt install folder]/BepInEx/config and open BepInEx.cfg, set LogChannels = all and Enabled = true under the [Logging.Console] section. This will cause the BepInEx console to launch when you launch SPT. All logging done in your mod will appear in this console.We do this so we can study the Tarkov source code to see what we may want to change, as well as where to change it. I suggest creating a Visual Studio project to contain the decompiled source. Fortunately, dnSpy has the ability to do this for us!
SPT400_assembly .File > Open and navigate to this path: [game folder]/EscapeFromTarkov_Data/Managed, select the Assembly-CSharp.dll file and click Open.Assembly-CSharp.dll file is open, you should see it in dnSpy. You can look through the code inside dnSpy if you prefer, but I suggest creating a Visual Studio project to hold it. You can do so by going to File > Export to Project… then selecting the folder we created in step 1.Assembly-CSharp.sln in the project folder dnSpy created to do so.You can use CTRL + Shift + F to search the entire solution for code. Go ahead and try and search for something like “Jump” or “Door” to see what you can dig up!
Use this template > Create a new repository button at the top right of the example repo’s GitHub page.Code > Download ZIP.
SPTClientModExamples to your new mod name:
SPTClientModExamples and replace ll with your new mod name.SPTClientModExamples and replace all with your new mod name.Look in is set to Entire solutionFind field, enter: SPTClientModExamplesReplace field, enter your new mod nameReplace All in bottom right, click yes if promptedBuild > Build Solution or press F6 to build your mod. If your project solution is correctly placed in YourSPTInstall/Development, the compiled plugin should be automatically copied into BepInEx/plugins, so all you should have to do is build and launch the game to test.To those who have helped me learn all this shiz and gave me feedback on this doc, you guys ROCK. Thank you so much!
DrakiaXYZ
Cj
Arys
Kiki
mpstark
Tyfon