Get the ROCK headers
ROCK 1.0 publishes its provider API from its own repository: the headers are in ROCK's include/ROCK/ folder. Take them from ROCK's repository at the release tag you target; the release archive holds only the player's files. There is nothing to link. The headers include only the C++ standard library, need a 64-bit consumer and compile as C++20.
CMake
Point a cache variable at ROCK's include/ folder and add it to your plugin:
set(ROCK_INCLUDE_DIR "" CACHE PATH "ROCK include directory (the folder that contains ROCK/)")
if(NOT EXISTS "${ROCK_INCLUDE_DIR}/ROCK/Client.h")
message(FATAL_ERROR "Set ROCK_INCLUDE_DIR to ROCK's include directory")
endif()
target_include_directories(MyPlugin PRIVATE "${ROCK_INCLUDE_DIR}")
Set the path for your machine in your own, uncommitted CMakeUserPresets.json. Include <ROCK/Client.h> and the headers of the interfaces you use, such as <ROCK/Hands.h>. Do not copy the headers into your project or include anything from ROCK's src/.
Use the headers of the ROCK version you ship against. Records carry their own size and version, and ROCK refuses a record whose size does not match its own; rebuild when you move to a newer ROCK.
Runtime requirements
- Fallout 4 VR 1.2.72 with F4SE VR.
- FRIK 0.79.1 or newer (API 2.3). ROCK uses FRIK's skeleton; its provider interfaces are versioned independently of FRIK's API.
ROCK.dllloaded. Resolve it at runtime withGetModuleHandleW(L"ROCK.dll"); if it is absent, or discovery fails, leave your ROCK features off and keep running.
Your plugin owns its own F4SE Query/Load and its runtime version check.
Mods built for provider API 1
Pre-1.0 ROCK headers (...V1 record names, V1_1 extension headers) describe provider API 1. ROCK 1.0 refuses every major-1 request with UnsupportedMajor and logs the calling DLL in ROCK.log; the game keeps running. See migrating from provider API 1.
Next: first consumer.