Новости Анонсирован Atomic Heart II
Новости Анонсирован ремастер Final Fantasy Tactics
  • 121
  • 0
Культовая пошаговая тактическая RPG от Square Enix получит второе дыхание. На проходящей выставке State of Play, где анонсируются игры для Play Station, состоялся анонс ремастера Final Fantasy...
Новости Моддеры Oblivion Remastered нашли способ внедрения абсолютно любых скриптов
  • 230
  • 1
Сообщество моддинга Oblivion Remastered (ORM) переживает настоящий расцвет. После долгих месяцев работы, энтузиасты научили игру работать с мощным скриптовым языком Lua, открыв перед создателями...
Новости Tainted Grail: The Fall of Avalon — Польская «Skyrim» теперь официально
  • 1.624
  • 24
23 мая 2025 после двух лет успешного раннего доступа в Steam польская студия Questline наконец представила свою фэнтези-RPG в полной версии. Tainted Grail: The Fall of Avalon доступна на ПК...
Инструментарий Union SDK

Референс / справочник Инструментарий Union SDK

Union SDK для работы с игровыми движками: события, методы через UserAPI, перехват функций с HOOK
Core Engine Events
n Plugin.cpp, you’ll find functions automatically triggered by engine events — their names typically indicate their purpose. The call order of some functions is explained in the comments at the end of the file. These hooks are enabled via CApplication, which synchronously runs them across all loaded plugins.

Extending Game Classes
To add methods or variables to classes across all four Gothic engines in one go, use the UserAPI catalog. Locate the target class using the filter, and add your members — although IntelliSense may show errors, that’s just a limitation of the tech. Implementations can be placed anywhere in your project.

Only non-virtual methods, static functions, and static variables are safe to add. Virtual methods or modifying class sizes can break the virtual table or game stability.

Function & Method Hooks
Union supports two main hooking strategies:
  • HOOK + AS: Uses MS Detours.
  • HOOK + PATCH: Alters the call by patching the instruction.
To call the original function:
  • Use the hook object like a pointer to function.
  • For class methods, use this->*HookName or simplify with the THISCALL macro.
✅ Hook signatures must match originals. Union validates this at startup and throws an error if mismatched — helping prevent crashes.​
🔁 Multiple plugins can hook the same function. Union queues them to ensure compatibility and shared execution.​
You can hook either by function name or address.

Method

AS

PATCH

Guarantee of 100% hook

Yes

No, if the call address is passed implicitly

Compatibility with other extenders and patches

No

Yes

Hook scope

The whole process

Module Gothic.exe


Conditional Hooks (AS_IF / PATCH_IF):



These versions accept a third argument as a condition. If False, the hook is deferred. You can later activate it by calling .Commit() on the hook object.
Сверху Снизу