-
Notifications
You must be signed in to change notification settings - Fork 10
Modding Tutorial
Note: These tutorials are made only for the Ultimate Edition mod and only explain how to add a stuff! These tutorials don't explain programming on the Blitz3D.
Description of the functions, variables, and codes you can find here: http://chipmunkplayer.free.fr/help/command_list_2d_cat_2.htm
-
First, download the Blitz3D TSS itself.
Download link: https://github.com/ZiYueCommentary/Blitz3D/releases/tag/v1.132
-
Run the installer, or extract the zip file in any folder.
-
When the Blitz3D TSS was installed, go to the folder where you installed it.
-
After, copy all
.decls
from the game directory touserlibs
folder in your Blitz3D TSS folder.
-
Run the
Blitz3D TSS.exe
. -
Find the Program tab:
- Run program - Compiles the code and runs the program.
- Run program again - Compiles the code and runs the latest program.
- Check for errors - Check the code for errors.
- Create Executable - Creates an exe file for running the program.
- Program Command Line - Specify a program-readable startup parameter.
- Debug Enabled? - Turns on the debug panel. The debug panel is used to find any errors while the program is running.
- Not Address Large Aware? - Allows the program to use 4GB instead of 2GB RAM. This should be useful for 64-bit OS. Note that this config does not work fine, please instead with 4GB Patch.
-
Download the Ultimate Edition mod assets in Github.
UET_DEV
is the latest dev branch. -
Unzip to any folder.
-
Open the
Game.bb
file. This file is the main file for compiling the game. You should compile only this file!The Blitz3D TSS opens
.bb
files only, and.bb
file is a file containing a source code. -
Try to compile and run the program.
-
Find the "Program" tab. Check if the "Debug Enabled?" is turned on.
-
Compile and run the program. You should see the debug window.
-
If you get an error, the debug window will show you a line where this error is located. It should be like this:
Note: This lesson doesn't explain how to use the mapping applications!
-
Download the mapping applications.
- 3D World Studio - can be used only on Windows 7 and lower.
- CBRE-EX - program designed specifically for SCP - Containment Breach.
-
Create the room and export it as
.rmesh
file into theGFX\map\
folder. The lightmap files will be created automatically. -
Go to
Data
folder, find and open therooms.ini
file. -
Let's look at the following example:
[cont2_409] Descr = SCP-409's containment chamber. Mesh Path = cont2_409.rmesh Shape = 2 Commonness = 0 DisableDecals = 1 Large = 1 Zone1 = 2
-
cont2_409 - the room name.
-
Descr - description of the room. Used in Map Creator.
-
Mesh Path - path to the room file. Use the file name only.
-
Shape - the room has 5 different shapes:
- 1 - the room has one door leading to the room.
- 2 - the room has two doors leading to the room.
- 2C - the room has two doors leading to the room, but looks like a corner.
- 3 - the room has three doors leading to the room.
- 4 - the room has four doors leading to the room.
-
Commonness - room spawns chance.
0
is a minimum value, and it is used for spawning the room only one time.100
is a maximum value. -
DisabledDecals - disable the random decals inside the room.
-
Large - marks the room as a large room. Used for map generation algorithm.
-
Zone1 - a zone where the rooms can be spawned. The game has three zones:
- 1 - the room will be spawned inside the Light Containment Zone.
- 2 - the room will be spawned inside the Heavy containment Zone.
- 3 - the room will be spawned inside the Entrance Zone.
The rooms spawned outside the map don't have "Zone1" parameter. Also you can use "Zone2" parameter. This parameter allows the room to spawn inside two zones at the same time.
-
DisableOverlapCheck - turns off the overlap checking. Used for map generation algorithm.
[room ambience] Ambience0 = SFX\Ambient\Room ambience\rumble.ogg Ambience1 = SFX\Ambient\Room ambience\lowdrone.ogg Ambience2 = SFX\Ambient\Room ambience\pulsing.ogg Ambience3 = SFX\Ambient\Room ambience\ventilation.ogg Ambience4 = SFX\Ambient\Room ambience\drip.ogg Ambience5 = SFX\Alarm\Alarm1.ogg Ambience6 = SFX\Ambient\Room ambience\895.ogg Ambience7 = SFX\Ambient\Room ambience\fuelpump.ogg Ambience8 = SFX\Ambient\Room ambience\Fan.ogg Ambience9 = SFX\Ambient\Room ambience\servers1.ogg
[room ambience] parameter is used for adding an ambience sound for the room.
-
-
For spawning assets inside the room, go to the
Source Code
folder and find theRooms_Core.bb
file. This file contains all the necessary functions and variables for the map. -
Find the
FillRoom()
function. This function spawns assets inside the room. Example for adding assets:Case r_cont2_860_1 ;[Block] ; ~ Doors to observation room d.Doors = CreateDoor(r, r\x + 928.0 * RoomScale, r\y, r\z + 640.0 * RoomScale, 0.0, False, DEFAULT_DOOR, KEY_MISC, Str(Rand(1000, 9999))) d.Doors = CreateDoor(r, r\x + 928.0 * RoomScale, r\y, r\z - 640.0 * RoomScale, 0.0, True, DEFAULT_DOOR, KEY_MISC, Str(Rand(1000, 9999))) d\MTFClose = False ; ~ Doors to SCP-860-1's door itself d.Doors = CreateDoor(r, r\x + 416.0 * RoomScale, r\y, r\z - 640.0 * RoomScale, 0.0, False, DEFAULT_DOOR, KEY_CARD_3) d.Doors = CreateDoor(r, r\x + 416.0 * RoomScale, r\y, r\z + 640.0 * RoomScale, 0.0, False, DEFAULT_DOOR, KEY_CARD_3) ; ~ SCP-860-1's door d.Doors = CreateDoor(r, r\x + 184.0 * RoomScale, r\y, r\z, 0.0, False, WOODEN_DOOR, KEY_860) d\Locked = 1 : d\DisableWaypoint = True r\RoomDoors.Doors[0] = d ; ~ The forest If (Not I_Zone\HasCustomForest) fr.Forest = New Forest r\fr = fr GenForestGrid(fr) PlaceForest(fr, r\x, r\y + 30.0, r\z, r) EndIf it.Items = CreateItem("Document SCP-860-1", "paper", r\x + 1158.0 * RoomScale, r\y + 250.0 * RoomScale, r\z - 17.0 * RoomScale) RotateEntity(it\Collider, 0.0, r\Angle, 0.0) EntityParent(it\Collider, r\OBJ) CreateCustomCenter(r, r\x + 927.0 * RoomScale, r\z) ;[End Block]
-
If the room has
Commonness = 0
, then you should find theCreateMap()
function. Find these lines and make something similar respecting the shape of the room and position. Don't use the same positions.; ~ [LIGHT CONTAINMENT ZONE] Local MinPos% = 1, MaxPos% = Room1Amount[0] - 1 MapRoom(ROOM1, 0) = "cont1_173" SetRoom("cont1_372", ROOM1, Floor(0.1 * Float(Room1Amount[0])), MinPos, MaxPos) SetRoom("cont1_005", ROOM1, Floor(0.3 * Float(Room1Amount[0])), MinPos, MaxPos) SetRoom("cont1_914", ROOM1, Floor(0.35 * Float(Room1Amount[0])), MinPos, MaxPos) SetRoom("cont1_205", ROOM1, Floor(0.5 * Float(Room1Amount[0])), MinPos, MaxPos) SetRoom("room1_archive", ROOM1, Floor(0.6 * Float(Room1Amount[0])), MinPos, MaxPos) MapRoom(ROOM2C, 0) = "room2c_gw_lcz" MinPos = 1 MaxPos = Room2Amount[0] - 1 MapRoom(ROOM2, 0) = "room2_closets" SetRoom("room2_test_lcz", ROOM2, Floor(0.1 * Float(Room2Amount[0])), MinPos, MaxPos) SetRoom("cont2_427_714_860_1025", ROOM2, Floor(0.2 * Float(Room2Amount[0])), MinPos, MaxPos) SetRoom("room2_storage", ROOM2, Floor(0.3 * Float(Room2Amount[0])), MinPos, MaxPos) SetRoom("room2_gw_2", ROOM2, Floor(0.4 * Float(Room2Amount[0])), MinPos, MaxPos) SetRoom("room2_sl", ROOM2, Floor(0.5 * Float(Room2Amount[0])), MinPos, MaxPos) SetRoom("cont2_012", ROOM2, Floor(0.55 * Float(Room2Amount[0])), MinPos, MaxPos) SetRoom("cont2_500_1499", ROOM2, Floor(0.6 * Float(Room2Amount[0])), MinPos, MaxPos) SetRoom("cont2_1123", ROOM2, Floor(0.75 * Float(Room2Amount[0])), MinPos, MaxPos) SetRoom("room2_js", ROOM2, Floor(0.85 * Float(Room2Amount[0])), MinPos, MaxPos) SetRoom("room2_elevator", ROOM2, Floor(0.9 * Float(Room2Amount[0])), MinPos, MaxPos) MapRoom(ROOM2C, Floor(0.5 * Float(Room2CAmount[0]))) = "cont2c_066_1162_arc" MapRoom(ROOM3, Floor(Rnd(0.2, 0.8) * Float(Room3Amount[0]))) = "room3_storage" MapRoom(ROOM4, Floor(0.3 * Float(Room4Amount[0]))) = "room4_ic"