Skip to content
/ Ninja Public

Extension framework for the video game series Gothic to allow true modular modifications

License

Notifications You must be signed in to change notification settings

szapp/Ninja

Repository files navigation

Ninja

Build status Documentation GitHub release Support on Ko-fi Combined downloads
World of Gothic Spine Steam Gothic 1 Steam Gothic 2

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.

Patch template

About

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.

Usage

To use Ninja, download and install the latest release. If you run into issues or need further instructions, please consult the documentation.


Building from Source

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.

Requirements

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.

Additionally, you'll need the following binaries:

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.

Assembling

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

Legal

Ninja is free software and released under the MIT License (MIT).