Question about modding in Barotrauma

#1
Hi there!

I saw that anybody could, if they wanted, download the game's sources in order to make mods. So I was wondering how it would work. After searching for a bit I think I understood that editing the source code will allow me to create a new executable and then using a ContentPack I'd be able to choose which executable I want to use. (Correct me if I'm wrong)

However the bits I don't really understand is how it would work with the SteamWorkshop for example and how a player could install this mod. Also how would it work in the file structure? Everything should be put inside the Mods folder or should it be "merged" with the rest of the game files?

Thank you!

Re: Question about modding in Barotrauma

#2
Hi and welcome to the forums!

You only need the source code if you want to create a mod that does something more complex than adding new items, submarines, monsters, missions or other things that are configured in XML files inside the game folder. For instance, if you wanted to modify some of the core gameplay mechanics or create a completely new mission type, you might have to edit the source code, but you can still do a lot of things without having to touch it.

Shépardéon wrote:However the bits I don't really understand is how it would work with the SteamWorkshop for example and how a player could install this mod. Also how would it work in the file structure? Everything should be put inside the Mods folder or should it be "merged" with the rest of the game files?
Yep, that's pretty much how it works! You go inside the Mods folder, create a folder for your own mod (so the files don't get mixed up with other mods you have in the folder), and put your new files in there. Then you need to create a "Content package", which is basically a file that tells the game what your mod contains (for example, "a character file in the path Mods/MyCthulhuMod/Cthulhu.xml"). You can find instructions for creating a content package in the Barotrauma wiki. Once that's done and you've tested the mod and made sure it works as intended, you can go to the Workshop menu, select the Publish tab, select your new content package and upload it to the Workshop.