Build automation tool designed to speed up testing and cooking Gothic & Gothic 2 NotR mods
This project was developed primarily for the purpose of assisting the SoulFire team with the development of The Chronicles of Myrtana.
Tool available in English , Polish and Slovak .
Let's start with some background: the Gothic Mod Build Tool is kind of a breakthrough in Gothic modding, because it is one of the few successful attempts to create a build system which fully automates the process that was previously done manually, every modder had to manually compile assets like textures, meshes and animations and send them to their co-modders. Now, working with version control systems is possible, because each modder has the same version of assets at the same time and at any time can launch the game without need to build a .mod and not run into errors or discrepancies due to a lack of or mismatching assets.
This tool serves two very important purposes, to merge and to compile everything. It uses external tool for updating dialogs subtitles but also launches the Gothic game executable and compiles assets like 3D models and animations ingame with appropriate game settings.
There are 4 modes of use:
On a mid-range PC with an HDD, a no sounds build of a huge addon The Chronicles of Myrtana with around 300 MB of worlds, 800 MB of textures, 150 MB of animations and 3D models, takes about 9 - 10 minutes. Similar time with a full test (subtract about a half minute of packing the .mod).
The most important features of the tool are finalized. Currently around 30 modders in SoulFire team are using this tool everyday and various problems are being reported and fixed on ongoing basis.
Milestone for 1.0 version is set to January 1, 2020.
Latest stable release | Latest unstable release | Unstable development (dev branch) |
---|---|---|
Download latest version of the tool. The installer will install GMBT to %APPDATA%\GMBT
and add this path to %PATH%
variable.
.NET Framework 4.7 is required to run the tool.
A clean installation of vanilla Gothic or Gothic 2 Night of the Raven on your PC. You must have a COMPLETELY clean copy of game, with no mods, textures packs and other such.
Of course, you can also install SystemPack if you have problems with the game.
After installation, you can run the Gothic copy ONLY via GMBT. Of course, you can use eg. Spacer, but you have to complete a full test before (the scripts have to be compiled because Spacer needs eg. GOTHIC.DAT
and CAMERA.DAT
).
Next you have to do configuration and run the tool with the command you want (usage guide).
You have to configure a YAML config:
Title of modification using for example as default VDF volume comment.
Path to game root directory, eg. relative path (
..\..
) or absolute (C:\Program Files\JoWood\Gothic 2 Gold Edition
)
Minimal version of GMBT required to run the project. Eg. v0.14.1
Paths to assets directories which have to be placed in
_work/Data
directories. You have to prepare right structure inside these directories (same as in_work/Data
: <dir>\Anims, <dir>\Scripts and so on).
Exclude files from merging. Only files paths, not directories and wildcarts.
Name (not path) of ZEN, eg. NEWWORLD.ZEN
Path to save .mod file.
VDF volume comment.
Available special characters:
- %%N - new line
- %%D - date and time in UTC
Include some files or directories (wildcarts enabled) to VDF. Path's root is game root, eg.
_work\Data\Scripts\Content\*.d
Exclude some files or directories (wildcarts enabled) from VDF. Path's root is game root, eg.
_work\Data\Worlds\Test\*.zen
Keys of GOTHIC.INI you want to override when running test or build.
Syntax: ['section.key', 'value'] or 'section.key': 'target', eg. '
GAME.playLogoVideos' : '0'
Optional files and directories you want to install.
Syntax: [source, target] or source: target
Below is an example files structure and configuration used in The Chronicles of Myrtana project. Also, the same structure you can see in the example project.
Our developers have to clone modification repository to _Work
directory, so their local repository is located in _Work/TheChroniclesOfMyrtana
. We have a complex structure for our files. There are four directories:
mdk-overrides
We have got this config in root of the local repository (_Work/TheChroniclesOfMyrtana/.gmbt.yml
).
projectName: The Chronicles of Myrtana
gothicRoot: ..\..
modFiles:
assets:
- mdk
- mdk-overrides
- thirdparty
- mod
defaultWorld: KM_WORLD.ZEN
modVdf:
output: ..\..\Data\ModVDF\KM.mod
comment: Gothic 2 - The Chronicles of Myrtana (%%D)%%N(C) 2018 SoulFire
exclude:
- _work\Data\Worlds\KM_SUBZENS\*
gothicIniOverrides:
- 'GAME.playLogoVideos' : '0'
- 'SKY_OUTDOOR.zSkyDome' : '1'
As you can see, there are only relative paths because this file is in our remote Git repository and every collaborator does not have to configure everything by themselves. And this is the main idea of this tool, to enable easy collaboration in version control systems and large teams.
At this moment the only way to use the tool is command line interface. GUI application is planned, but below you can find simple examples of Windows Batch files.
Parameter | Description | Default value |
---|---|---|
-L <en|pl|sk>, --lang=<en|pl|sk> |
Set language of console output. Available: English (en ), Polish (pl ) and Slovak (sk ). |
Control Panel -> Regional Settings |
--help |
Print short descriptions of parameters. | N/A |
-V <level>, --verbosity=<level> |
Set verbosity level of console output. Levels: quiet|minimal|normal|detailed|diagnostic. | normal |
test
& spacer
& build
& compile
& pack
)Parameter | Description | Default value |
---|---|---|
-C <path>, --config=<path> |
Path of a config file. Guide how to configure this file is here. | .gmbt.yml in working directory |
test
& spacer
& build
& compile
)Parameter | Description | Default value |
---|---|---|
--zspy=<none|low|medium|high> |
Level of zSpy logging. | none |
--zspy-filter=<all|fatal|fault|warning|information> |
Filter level of zSpy messages | all |
test
& build
)Parameter | Description | Default value |
---|---|---|
--noupdatesubtitles |
Do not update (convert to OU.csl) of dialogues subtitles. | N/A |
--show-duplicated-subtitles |
Print duplicated subtitles. | N/A |
--additional-gothic-parameters |
Additional Gothic parameters, eg. --additional-gothic-parameters=-nomenu -zwindow |
N/A |
test
& spacer
)Parameter | Description | Default value |
---|---|---|
--noaudio |
Run game/Spacer without any audio. | N/A |
test
& compile
)Parameter | Description | Default value |
---|---|---|
-F, --full |
Full test/compilation mode. Information about modes is here. | N/A |
--merge=<none|all|scripts|worlds|sounds> |
Merge option. Enter eg. scripts if you just want to debug scripts and do not want to copy all assets every time. Also, nice option to use is scripts,worlds if you want to debug some changes only related to scripts and worlds. |
all |
-R, --reinstall |
Reinstall before start. | N/A |
build
& pack
)Parameter | Description | Default value |
---|---|---|
-O <file>, --output=<file> |
Path of VDF volume (.mod ) output. |
Set in config file |
--nopacksounds |
Do not to pack sounds (WAVs) to mod package. | N/A |
--comment |
Set or override comment of VDF. | Set in config file |
test
Starts test.
Parameter | Description | Default value |
---|---|---|
-W <zen>, --world=<zen> |
Run game in a specific world. | Set in config file |
--windowed |
Run game in window. | N/A |
--ingametime=<hh:mm> |
Ingame time. Syntax: hour:minute, eg. 15:59. |
N/A |
--nodx11 |
If D3D11-Renderer for Gothic is installed, this command allows you to temporarily disable this wrapper. | N/A |
--nomenu |
Run game without menu showing (starts a new game immediately). | N/A |
-D, --devmode |
Dev mode of game (marvin mode). | N/A |
build
Starts a .mod build.
compile
Starts compilation.
pack
Packs a .mod volume.
spacer
Starts Spacer.
Parameter | Description | Default value |
---|---|---|
--maxfps |
Maximum framerate. | N/A |
update
Updates the tool.
Parameter | Description |
---|---|
-F, --force |
Download and update even if it is up to date. |
--no-confirm |
Do not ask for download. |
Example Batch scripts are also in example project.
Below are some examples used developing The Chronicles of Myrtana project:
GMBT_QuickTest.bat
gmbt test --windowed --noaudio
GMBT_QuickTest_ScriptsDebug.bat
You can run something like this if you are debbuging scripts only and you do not want to copy all assets every time. Gothic is running windowed, without audio and without main menu.
gmbt test --windowed --noaudio --merge=scripts
GMBT_QuickTest_ScriptsAndWorldsDebug.bat
Similar to previous with additional merging of worlds.
gmbt test --windowed --noaudio --merge=scripts,worlds
GMBT_FullTest.bat
Full test. Gothic is running windowed.
gmbt test -F --windowed
GMBT_BuildVDF.bat
Builds a .mod.
gmbt build
There is an example project which uses this tool. There are some assets from World of Gothic DE Modderdatenbank — just for the test. That repository is very nice sandbox which allows you to get acquainted with the tool. The repository has the same structure of files as in example configuration.
Hooks are actions that can be set in config file to trigger actions at certain points in the tool execution.
common
- executes in every instancetest
- executes when test (quick or full) is executing.
quickTest
- executes when quick test is executingfullTest
- executes when full test is executingbuild
- executes when build is executingcompile
- executes when compilation (quick or full) is executing
quickCompile
- executes when quick compilation is executingfullCompile
- executes when full compilation is executingpack
- executes when pack mode is executingpre
- before an eventpost
- after an eventassetsMerge
subtitlesUpdate
Hooks have to be set in config file. Example:
hooks:
common:
post:
assetsMerge:
- "tools/script.bat"
- "tools/script1.bat"
test:
post:
subtitlesUpdate:
- "tools/script2.bat"
quickTest:
pre:
assetsMerge:
- "tools/script3.bat"
To better understand the entire process of tool execution, you should look at the diagram:
Predefined options is something like templates for command line parameters.
You can set predefined options sets in config file:
predefined:
- "world": "--world=WORLD.ZEN"
- "anotherworld": "--world=WORLD2.ZEN"
and then, instead of calling gmbt test --world=WORLD2.ZEN
, you can type gmbt test anotherworld
.
MIT License
Copyright (c) 2019 Szymon 'Szmyk' Zak <[email protected]> and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Licenses and disclaimers are in the ThirdPartyNotices.md file.
Licenses and disclaimers are in the tools directory.
Big thanks to: