Union API is the core of Union Framework that provides an API to create native plugins for Gothic games based on ZenGin. Native plugins can use Union API to access the game objects in memory and hook any function using the Decorator pattern to extend and modify ZenGin behavior to a large extent.
The complementary Gothic API repository contains ZenGin headers with a mapping to the memory address for each supported Gothic release.
Union API is under active development and is not released yet. You are welcome to try and play with it, but please keep in mind that it's not finished, may contain bugs and the API may change before the final release.
Documentation is available on Union Framework Docs.
Union API is built using CMake and requires C++17 or later to compile. The recommended way to build is to use Visual Studio 2022 with CMake support enabled.
Project could be built in several configurations, depending on how you want to use it:
- DLL - dynamically linked library
- LIB - statically linked library
- EXE - executable with an entry point from
union-api.cppfor testing the code without running it as DLL attached to the game
You can change the configuration directly in CMakeLists.txt or by using command line. Default configuration is LIB.
To include Union API in your project, you need to get its source using git submodule or CMake's FetchContent module.
If you are using git submodule, run the following command in your project root:
git submodule add https://gitlab.com/union-framework/union-api.gitThis will add Union API as a submodule in your project. You can then include it in your CMake project by adding the following lines to your CMakeLists.txt:
add_subdirectory(union-api)If you are using CMake's FetchContent, add the following lines to your CMakeLists.txt:
include(FetchContent)
FetchContent_Declare(
union-api
GIT_REPOSITORY https://gitlab.com/union-framework/union-api.git
GIT_TAG main
)
FetchContent_MakeAvailable(union-api)After including Union API, you can link it to your target. For example, if your target is your_target, you can add the following line to your CMakeLists.txt:
target_link_libraries(your_target PRIVATE union_api_lib)Community-driven support is provided on Gothic Modding Community Discord.
If you have found a bug, please create an issue with a detailed description and your environment.
Union API is licensed under BSD 3-Clause.
- Detours MIT License (c) Microsoft Corporation - https://github.com/microsoft/Detours
- libogg BSD 3-Clause License (c) 2002, Xiph.org Foundation - https://github.com/xiph/ogg
- Vorbis BSD 3-Clause License (c) 2002, Xiph.org Foundation - https://github.com/xiph/vorbis
- zlib zlib License (C) 1995-2023 Jean-loup Gailly and Mark Adler - https://zlib.net/