Skip to content

An inofficial SDK for Gothic 3.

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

georgeto/gothic3sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This inofficial Gothic 3 SDK is intended for modders with experience in C++ and reverse engineering.

The Gothic 3 game engine (Genome) consists of multiple dynamic-link libraries (DLLs) that depend on one another. Therefore, each of these DLLs exports most of its functionality. We can reconstruct C++ class and function declarations from the exported symbols, which we then use to interface with the engine.

Binary compatibility

Gothic 3 was build using Visual Studio 2005 (platform toolset v80) so for optimal compatibility we should use the same compiler for our project. Citing the MSVC documentation regarding the topic of binary compatibility:

In Visual Studio 2013 and earlier, binary compatibility between object files (OBJs), static libraries (LIBs), dynamic libraries (DLLs), and executables (EXEs) built by using different versions of the compiler toolset and runtime libraries was not guaranteed.

But let's face it, no one wants to work with Visual Studio 2005 these days. After extensive testing I came to the conclusion that although not officially guaranteed, Visual Studio 2013 (platform toolset v120) seems to be binary compatible with the v80 compiler, at least in the areas relevant for this project. Using the v120 compiler has the advantage of an improved IDE and the ability to use C++11 language features.

Possibly even more recent versions of Visual Studio (MSVC compiler) would work, but I haven't done extensive testing on that.

Building

The Gothic 3 SDK is build using Visual Studio 2013 (Community Edition is sufficient). Alternatively you can use a more recent version of Visual Studio, but you have to have the platform toolset v120 installed, which is shipped with Visual Studio 2013 (for background information see Binary compatibility).

Under source/Scripts/ you find a bunch of example projects and it's also the place where you can add your own creations. The build artifacts end up in bin/scripts/.

Installation

Copy the content of bin into your Gothic 3 installation directory. Every DLL inside the scripts folder following the naming convention Script_*.dll is automatically loaded by the game.

Credits