Making a Black Mesa Mod: Difference between revisions
MyGamepedia (talk | contribs) (SH is the file that use Linux users to launch a Black Mesa mod.) |
MyGamepedia (talk | contribs) |
||
(14 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{cleanup|improve formatting with {{{t|path}} and Software templates, links<br>Separate the manual into Linux and Windows parts, or indicate which steps may be the same/different<br>Can be worded better... (rewrite sections) }} | |||
{{pov}} | |||
{{back | Black Mesa Level Creation}} | {{back | Black Mesa Level Creation}} | ||
{{Tutorial Skill Level | skill=3}} | {{Tutorial Skill Level | skill=3}} | ||
Line 7: | Line 9: | ||
==Creating a mod== | ==Creating a mod== | ||
Head to the local variation of C:\Program Files (x86)\Steam\steamapps\common\Black Mesa then create a folder with the mod's name, and modders can name it anything they want. Examples like: "MyMod" | |||
===Setting up the files=== | |||
==Setting up the files | |||
Navigate into the directory and create the following folders and subfolders: | Navigate into the directory and create the following folders and subfolders: | ||
* resource | * resource | ||
Line 19: | Line 20: | ||
* ui | * ui | ||
{{Note|Use a program like {{vPKEdit|4}} to extract the files from VPK}} | |||
{{Note|Use a program like | Now open {{code|bms_misk_dir.vpk}} located in {{code|Black Mesa/bms/}} | ||
==Setting up the chapters | Take the following files: | ||
Create a scripts/chapter_manifest.txt inside | {{codeBlock|<nowiki> | ||
It should be something like this: Edit it to replace with | resource | ||
< | |-- clientscheme.res | ||
|-- gamemenu.res | |||
</nowiki>}} | |||
Add these files in the same directories as the mod, for example: MyMod/resource/... | |||
Also take {{ent|dynlightscript.txt}} located in {{code|Black Mesa/bms/cfg/}} | |||
{{Warning|These files are essential for the mod, if you do not have .res files, UI will break, and dynlightscript.txt is needed for dynamic light effects like fire and battery props.}} | |||
==Setting up the chapters== | |||
Create a scripts/chapter_manifest.txt inside the newly created scripts folder | |||
It should be something like this: Edit it to replace with the map names / the number of chapters that exist | |||
{{codeBlock|<nowiki> | |||
"chapter_manifest.txt" | "chapter_manifest.txt" | ||
{ | { | ||
Line 33: | Line 48: | ||
} | } | ||
</ | </nowiki>}} | ||
Next up create a blackmesa.json file inside myfirstmod/campaigns/, | Next up create a blackmesa.json file inside myfirstmod/campaigns/, it can be modified to perfection. | ||
< | {{codeBlock|<nowiki> | ||
{ | { | ||
{ | { | ||
Line 66: | Line 81: | ||
} | } | ||
} | } | ||
</ | </nowiki>}} | ||
{{Note|The imageSource path is relative to the ui/images folder of | {{Note|The imageSource path is relative to the ui/images folder of the mod and example would be "image://game/ui/campaign/images/chapter1.png"}} | ||
Make sure to replace each #key in the file with the corresponding one in | Make sure to replace each #key in the file with the corresponding one in the corresponding localization file (See the next step) | ||
==Setting up the text for chapters | ==Setting up the text for chapters== | ||
Create a myfirstmod_english.txt in myfirstmod/ | Create a myfirstmod_english.txt in myfirstmod/resource/ | ||
It should look something like this, modify it to | It should look something like this, modify it to perfection | ||
< | {{codeBlock|<nowiki> | ||
"lang" | "lang" | ||
{ | { | ||
Line 88: | Line 103: | ||
} | } | ||
} | } | ||
</ | </nowiki>}} | ||
{{warning|<u>'''This file must be saved in a Unicode format.'''</u>}} | {{warning|<u>'''This file must be saved in a Unicode format.'''</u>}} | ||
{{note|For windows save as '''UTF-16 LE''' In Notepad, under <code>Save As...</code>, this is equivalent to choosing <code>unicode</code> for the <code>Encoding</code> option at the bottom of the dialog.}} | {{note|For windows save as '''UTF-16 LE''' In Notepad, under <code>Save As...</code>, this is equivalent to choosing <code>unicode</code> for the <code>Encoding</code> option at the bottom of the dialog.}} | ||
==Creating the gameinfo.txt file | ==Creating the gameinfo.txt file== | ||
Now | Now modders will need to create the gameinfo file inside the main folder. | ||
Use the following one as a template and modify it to | Use the following one as a template and modify it to perfection: | ||
< | {{codeBlock|<nowiki> | ||
"GameInfo" | "GameInfo" | ||
{ | { | ||
Line 180: | Line 195: | ||
} | } | ||
} | } | ||
}</ | }</nowiki>}} | ||
==Creating the BAT file | ==Creating the BAT file== | ||
Create a file, call it something like myfirstmod.bat | Create a file, call it something like myfirstmod.bat | ||
< | This is so {{windows|4}} users can launch the mod. | ||
{{codeBlock|<nowiki> | |||
@echo off | @echo off | ||
if exist "%~dp0\bms.exe" ( | if exist "%~dp0\bms.exe" ( | ||
Line 192: | Line 208: | ||
start "" "%~dp0\..\..\..\..\common\Black Mesa\bms.exe" -game myfirstmod %* | start "" "%~dp0\..\..\..\..\common\Black Mesa\bms.exe" -game myfirstmod %* | ||
) | ) | ||
</ | </nowiki>}} | ||
Also create one for the people who want to launch with oldgameui: | Also create one for the people who want to launch with oldgameui: | ||
< | {{codeBlock|<nowiki> | ||
@echo off | @echo off | ||
if exist "%~dp0\bms.exe" ( | if exist "%~dp0\bms.exe" ( | ||
Line 203: | Line 219: | ||
start "" "%~dp0\..\..\..\..\common\Black Mesa\bms.exe" -game myfirstmod -oldgameui %* | start "" "%~dp0\..\..\..\..\common\Black Mesa\bms.exe" -game myfirstmod -oldgameui %* | ||
) | ) | ||
</ | </nowiki>}} | ||
==Creating the SH file | ==Creating the SH file== | ||
Create a file, call it something like myfirstmod.sh | Create a file, call it something like myfirstmod.sh | ||
< | This is so {{linux|4}} users can launch the mod. | ||
{{codeBlock|<nowiki> | |||
#!/bin/sh -e | #!/bin/sh -e | ||
steam -applaunch 362890 -game myfirstmod $@ | steam -applaunch 362890 -game myfirstmod $@ | ||
</nowiki>}} | |||
</ | |||
Also create one for the people who want to launch with oldgameui: | Also create one for the people who want to launch with oldgameui: | ||
{{codeBlock|<nowiki> | |||
< | |||
#!/bin/sh -e | #!/bin/sh -e | ||
steam -applaunch 362890 -game myfirstmod -oldgameui $@ | steam -applaunch 362890 -game myfirstmod -oldgameui $@ | ||
</nowiki>}} | |||
==Final polish== | |||
This should be just enough to get the mod working, the modders will need to add things like sound manifests, models etc aswell. | |||
modders could customize the UI further, for example by changing the colors or the actual layout by editing the .qml inside ui/ of bms_misc_dir.vpk[[Category:Modding]] | |||
[[Category:Glossary]] | |||
[[Category:Tutorials]] | |||
Latest revision as of 12:03, 30 January 2025



Separate the manual into Linux and Windows parts, or indicate which steps may be the same/different
Can be worded better... (rewrite sections)

Skill Level
This tutorial expects you to have this amount of knowledge within the topic to follow along smoothly. | |||||
---|---|---|---|---|---|
Novice | Familiar | Competent | Proficient | Expert |
This article will discuss the creation of a Black mesa mod
Creating a mod
Head to the local variation of C:\Program Files (x86)\Steam\steamapps\common\Black Mesa then create a folder with the mod's name, and modders can name it anything they want. Examples like: "MyMod"
Setting up the files
Navigate into the directory and create the following folders and subfolders:
- resource
- scripts
- mapsrc
- mapsrc/instances
- campaigns
- ui


Now open bms_misk_dir.vpk located in Black Mesa/bms/
Take the following files:
Add these files in the same directories as the mod, for example: MyMod/resource/...
Also take dynlightscript.txt located in Black Mesa/bms/cfg/

Setting up the chapters
Create a scripts/chapter_manifest.txt inside the newly created scripts folder It should be something like this: Edit it to replace with the map names / the number of chapters that exist
Next up create a blackmesa.json file inside myfirstmod/campaigns/, it can be modified to perfection.

Make sure to replace each #key in the file with the corresponding one in the corresponding localization file (See the next step)
Setting up the text for chapters
Create a myfirstmod_english.txt in myfirstmod/resource/ It should look something like this, modify it to perfection


Save As...
, this is equivalent to choosing unicode
for the Encoding
option at the bottom of the dialog.Creating the gameinfo.txt file
Now modders will need to create the gameinfo file inside the main folder. Use the following one as a template and modify it to perfection:
Creating the BAT file
Create a file, call it something like myfirstmod.bat
This is so Windows users can launch the mod.
Also create one for the people who want to launch with oldgameui:
Creating the SH file
Create a file, call it something like myfirstmod.sh
This is so Linux users can launch the mod.
Also create one for the people who want to launch with oldgameui:
Final polish
This should be just enough to get the mod working, the modders will need to add things like sound manifests, models etc aswell.
modders could customize the UI further, for example by changing the colors or the actual layout by editing the .qml inside ui/ of bms_misc_dir.vpk