3.5 KiB
Warning
This tutorial has not been updated in a long time and may contain errors and incorrect informations.
Requirements:
You will need these requirements in order to successfully create your mod.
- VSCodium
- SP-Tarkov server
- A little bit of logic
Why making my changes as a mod ?
By using a mod for your changes, it make it easier for you to manage your edits, and avoid any issue with base DB files. That's for this reason we recommend you to make it as mod, for not overwritting base files. It will avoid you to loose them when you upgrade your server too.
The main topic.
Well, modding is simple : Overwritting loaded files by the one you added to your mod without editing the default one located in ServerDir/db/
.
- Create your mod folder, the name need to match like this : author-name-Version depending on what you put in the server.config.json.
- In this mod folder, create a file called mod.config.json and put the following code in :
{
"name": "NameOfTheMod",
"author": "AuthorOfTheMod",
"license": "License",
"version": "1.0.0",
"dependencies": {},
Some explanations :
Note that you now have 3 main "folders". src,res,db:
src is made for adding scripts mods to the game, everything that is in /src/ folder. res is made for adding or editing games images (traders images for example), everything that is in /res/ folder. db is made for edit or add servers items, quest, locale and so on, everything that is in /db/ folder.
As you can see, there's the filepath for each moddable part, we will edit this part when we have edited what we want, for our case, it's an item. I want to edit my sicc item case to have more slots, the item ID is : 5d235bb686f77443f4331278. So i copy the file 5d235bb686f77443f4331278.json
in ServerDir/db/items
and i paste it in ServerDir/user/mods/Author-MyModName-version/db/items/
. The file path must be the same as where you copy the file you want to mod.
- I open my file up with any IDE, i prefer VScodium personnaly, and make my changes. After that i save and close the file.
- Now that i edited my file, i go back to my mod.config.json and i go into the items brackets for adding my item. For me it will looks like this :
- Save your mod.config.json and start the server. It should recache and your mod is working ! Good job comrade !
License
It's important to tell which license your mod uses, as this also tells other modders what they can do with your work. Do you use a license? If none, set this to MIT (which basically says that others can use your work for anything but you are not responsible if you break something in your mod). If you do, set this to the short code of your license (MPL-2.1 instead of Mozilla Public License 2.1).
The end
Good job, you made your first mod for SP-Tarkov, all other parts to be modded work the same way. Just reproduce it with the desired part !
Thanks
Thanks to @InNoHurryToCode for making modding possible on SP-Tarkov !
Tutorial made by : Sorata-Senpai
Official links
Guilded link: https://www.guilded.gg/senkospub