Skip to content
 
 

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libKCD2

C++17 Platform

Reverse-engineered headers and runtime library for Kingdom Come: Deliverance 2 (CryEngine 3 + Warhorse modules). Includes KCSE (Kingdom Come Script Extender) — an SKSE-style native plugin framework.

This is a hobby project. Not every RE'd member is guaranteed correct — verify before use. Contributions welcome.

Build Dependencies

End User Dependencies

Notes

  • libKCD2 targets game version 1.5.6. CryEngine's interfuscator shuffles vtable order in release builds — SDK headers cannot be used for direct virtual calls across versions.

Developing a KCSE Plugin

  1. Create your plugin repo under Projects/ (or add it as a submodule):

    Projects/MyPlugin/
    ├── .buildenv/
    │   └── CMakeLists.txt
    └── src/
        └── plugin.cpp
    
  2. Minimal CMakeLists.txt:

    project(MyPlugin LANGUAGES CXX)
    
    file(GLOB_RECURSE PLUGIN_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../src/*.cpp")
    add_library(MyPlugin SHARED ${PLUGIN_SOURCES})
    
    target_precompile_headers(MyPlugin PRIVATE "${RE_BUILDENV}/PCH.h")
    target_compile_definitions(MyPlugin PRIVATE _ITERATOR_DEBUG_LEVEL=0 WIN32_LEAN_AND_MEAN NOMINMAX)
    target_compile_options(MyPlugin PRIVATE /utf-8 /W4 /wd4819 /wd4100)
    target_include_directories(MyPlugin PRIVATE
        ${RE_ROOT}/include ${RE_ROOT}/include/CryEngine/CryCommon ${CMAKE_CURRENT_SOURCE_DIR}/../src)
    target_link_libraries(MyPlugin PRIVATE kcd_re spdlog::spdlog)
  3. Minimal plugin.cpp:

    #include "KCSE/KCSEAPI.h"
    
    KCSE_PLUGIN_INFO("MyPlugin", "Author", 1);
    
    KCSE_PLUGIN_LOAD(kcse)
    {
        return true;
    }

Any subproject with a .buildenv/CMakeLists.txt is auto-discovered by the root build.

Acknowledgements

Inspired by SKSE and CommonLibSSE.

License

GPLv3

About

RE project for game KCD 2

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages