This repository contains the source code of the Ninja extension for the Gothic game series.
If you are interested in developing patches with Ninja, please follow the instructions in the relevant chapters of the documentation and get started with the official patch template.
Ninja is supported by the games Gothic (1.08k_mod), Gothic Sequel (1.12f), Gothic 2 (1.30 fix report version), and Gothic 2 NotR (2.6 fix report version).
For information on Ninja, please visit the documentation.
To use Ninja, download and install the latest release. If you run into issues or need further instructions, please consult the documentation.
There is absolutely no need to assemble Ninja yourself as the latest build is always available for download.
Nevertheless, if you wish to do so anyway, not all resources necessary for building are supplied in this repository and you'll not be able to successfully build it. The purpose of this repository is merely to provide insight into the source code. The additional resources may be provided upon request.
Because of linking a Windows DLL, assembling this project is no longer possible under *nix but is exclusive to Windows. (All *nix shell scripts have been stripped from this project, but may still be found in the git history.) For linking the final DLL the following libraries are required on your system.
- User32.dll
- Kernel32.dll
- NtDll.dll
For assembling and building, the following software is required.
- NASM (The Netwide Assembler) (2.16.03)
- GoLink (Go Tools for Windows) (1.0.4.5)
- GoRC (Go Tools for Windows) (1.0.3.0)
- NSIS (Nullsoft Scriptable Install System) (3.10)
Additionally, you'll need the following binaries:
- GNU Make (3.81)
- Git for Windows (2.45.1) for various included GNU Win32 tools
- BinUtils (2.28) for
objdump
- ducible (1.2.2)
The binaries of the listed software must be added to your PATH
environment variable or placed in the root directory.
Some binaries are attempted to be automatically detected at build time and added to the PATH
for the duration of building. These include nasm
, makensis
, grep
, date
, dd
, touch
, xxd
.
Building Ninja consists of a cascade of assembling the core and assembling the DLL wrapper.
First, the core is assembled into binary files. These are then included when assembling the wrapper which is then
finally linked into a DLL.
The reason for this compartmentalization is to separate core and wrapper and to avoid slow absolute (eax) jumps within the executed code by injecting it into the executable at fixed addresses to make use of relative jumps to addresses known at time of assembling.
All the steps above are performed simply with
make
Ninja is free software and released under the MIT License (MIT).