SCP: Containment Breach Multiplayer

SCP: Containment Breach Multiplayer

Not enough ratings
[SCP:CB M] How to make your simple «Replacer»?
By Klad'Man
This will describe the creation of add-ons and its further publication.
The manual does not contain detailed scripting documentation!
2
   
Award
Favorite
Favorited
Unfavorite
Let's started
Greetings to everyone who needs this guide now. Who exactly? For some people who want to make their own "Mod Pack" which will change: models, textures and sounds.

Before we start, I want to say: this guide is just a translation of the Russian manual, therefore there may be some mistakes. i recommend you to go to the official website, where you can find more detailed information about the development of addons.

Here: https://scpcb-wiki.herokuapp.com/en/home

In this guide, you will learn:
- Pack creation and writing of its content.
- Preparing files for retexture.
- Writing a simple .GS file for compilation.
- Publishing the Pack itself.

Let's start with the first step
1st stage - Preparation
All we need is the tools with which we will work, since the developers specially left these tools in the root folder of the game.

In this folder "SteamWorkshopUploader" contains the tools we need:
1. ScriptsCompiler compiles .GS files.
2. WorkshopContent contains future Packs.
3. SteamWorkshopUploader.exe name speaks for itself. (Uploading addons / Packs)

In the first step, we need to open "SteamWorkshopUploader.exe".
A window will open for us in which your future "mod packs" will be displayed in the left edge.

In the lower left corner, you can create a new Mod Pack and indicate its name in the text box.

I will call the upcoming Pack "BatEveryDay".

Soo we need to decide in advance on the content of our pack.
You already figured out what to do, right?

When you clicked on the "Create Item" button, a sort of another part of the window will appear.
Also, you ALREADY created a page in the Workshop.
In this window we need:
  • Indicate an image (avatar, icon, etc.).
  • Specify the name of the mod pack.
  • Provide a description.
  • Specify Tags (Textures, Sounds, Models)
  • Specify the type of visibility (I advise you to set Private for a start).
  • In the text box "Enter change note" you indicate the change (for example: first version, bug fix, adding something.).

In my case, I filled it in like this:

Now there is a new folder in the «WorkshopContent» folder with the name you entered in the lower left corner earlier. There is also a new file «[Name] .workshop.json».

Your folder(for example BatEveryDay), roughly speaking, is an archive with textures, sounds, models and scripts. (In my case, only with textures)

Because my archive is a substitute for battery textures, then I can just simply drop the files into this folder without any problems, however, this is not convenient if you will create large mod packs. I recommend creating folders for sorting or whatever is more convenient for you. And so, I just created a Textures folder to store future textures.

These textures will replace the original textures found in the game folder.

Let's move on to the second stage.
2nd Stage - Writing the GS file
In short: the 2nd stage is just an indication of the files A to replace B with the help of code (or script) and for compilation in the .GSC format, which should be in our package.

Without a .GSC file, your Mod Pack will not work.

Go to the "ScriptsCompiler" folder and create a file with any name with the ".GS" format.
When the file will be created: right-click> edit (or open with ...).

An example of an open document window:

WARNING! To avoid compilation problems, it will be necessary to prescribe #playerscript. at the top of the GS script.

Now we need to indicate what I wrote above, namely, indicate the path of A and B.

It should be written like this:
RedirectFile("[ORIGINAL FILE PATH - A]", getscriptpath()+"\[NEW FILE PATH - B]")

Example with replacing the texture:
RedirectFile("GFX\items\Battery\Battery 9V.jpg", getscriptpath()+"\Textures\Battery 9V.jpg")

When you are sure that your .GS "script" with the specified paths is ready, save and proceed to compilation of the file.

To compile the file, we need to open "compiler.exe", and write the command "compile [NAME].gs" (GS file must be located in the same folder with the program). If you wrote something wrong, the program will tell you why and for what reason. And if all is well, then the program will write "Compiled to [NAME] .gsc".

When the .GSC file is ready, then we need to upload it to our mod pack:

IMPORTANT: do not add other files like readme.txt to the mod pack, otherwise the game will not start (but you can put that another folder in mod pack).

If you wanna make something better then use offisial site for that:
https://scpcb-wiki.herokuapp.com/en/home
3rd stage - Check mod Pack
To check the mod pack you need to copy files from your pack, and put it in the "workshop/youraddons". "workshop" folder which is located in the root folder of the game.

Then, start the game.
You must make sure that the mod pack works correctly and everything suits you.

When you are sure that your mod pack is ready, you can proceed to the 4th stage.
4th stage - Publication
Congratulations on your new "Mod Pack", if you made it of course...

In the last step we will need "SteamWorkShopUploader.exe" again.
When you open the program, you need to select your mod in the right corner and make sure that everything is correctly written and does not violate the principles of the Steam community.

About the "Tags" text box:
If your mod is a retexture, then write "Textures", but if your mod also changes sounds and models, then write "Textures, Models, Sounds". It is important that each tag is spelled correctly and sealed.

Now you, for sure, want to publish your mod pack? Well then, to do this, click "Submit [MOD NAME]" and preferably indicate "change" in the appropriate text field.

If everything went well, then you should see this inscription:

Now this mod pack should be displayed in your workshop:

The End
This is the end of this tutorial. Hope I helped you!

It's worth saying that it is a simple matter to checkout your mod pack in the Steam Workshop, therefore it does not require any clarification. When you finally make the page, do not forget to open access to all people so that it can be displayed in the Workshop.
Something goes wrong?
Q: Problem with compilation: "execution functions in the main block do not work."
A: Add #playerscript to the top of the GS script.

If your mod does not work for some reason:
1. The path is written incorrectly. Perhaps the file path is case sensitive (Example: the folder is called "Textures" but the path is specified as "textures").
2. The modpack is placed incorrectly in the "workshop" mod.

There is also a backup in the "workshop" folder, it contains files that have been successfully replaced.
Those. if kneel.ogg was successfully replaced, it will be in the Backup folder.
36 Comments
Mariuszwrona 4 Jun @ 10:16am 
Now nothing, everything works good tutorial:eli:
Klad'Man  [author] 28 May @ 2:38pm 
whats wrong?
Mariuszwrona 28 May @ 11:37am 
nice tutorial but i cant make a GS file pls help
Sexavier Willy Jorkerson 22 Sep, 2024 @ 4:02am 
thanks, already switched to gsIndexer but still thanks
Klad'Man  [author] 22 Sep, 2024 @ 3:46am 
Add #playerscript at the top of the GS script.
Sexavier Willy Jorkerson 21 Sep, 2024 @ 12:15pm 
also it gives out several erorrs like "(line blank, column blank) execute functions wil lnot work in block wont work" when trying to compile
heres the script im trying to compile
RedirectFile("GFX\guns\P90_Viewmodel.b3d", getscriptpath()+"\ModGFX\pewpew\P90_Viewmodel.b3d")
RedirectFile("GFX\guns\p90_Tex_0005_1.jpg", getscriptpath()+"\ModGFX\pewpew\p90_Tex_0005_1.jpg")
RedirectFile("GFX\guns\p90_Tex_0006_1.jpg", getscriptpath()+"\ModGFX\pewpew\p90_Tex_0006_1.jpg")
RedirectFile("SFX\Guns\P90\shoot_in_01.ogg", getscriptpath()+"\ModSFX\pewpew\pee90\shoot_in_01.ogg")
Sexavier Willy Jorkerson 21 Sep, 2024 @ 12:07pm 
the wiki page doesnt work
GhostSynth 10 Aug, 2024 @ 1:40pm 
I forgot to checkmark "Subscribe to thread" so I didn't get the notification for this until two weeks later I come back to the page. :aushrug::Sadclot:
GhostSynth 10 Aug, 2024 @ 1:38pm 
I figured it out. Yeah all I had to do was copy the folder from Workshop content, then take its ID from the share button, which in this case was "2988033935." I gave this mod a new icon now because the old one had bad lighting and only showed the top of his head coming out the ground.
Klad'Man  [author] 30 Jul, 2024 @ 7:51pm 
It could have been written more simply but I'm too lazy to devote too much time to it :aurip: