Skip to main content

Discovery and capabilities

Two independent checks protect a PAPER feature:

  1. Interface version: discovery serves the interface at the exact major and at least the minor your headers were built for, with a table at least as large as yours.
  2. Granted capability: this owner may call the function.

Discovery​

Resolve PAPERAPI_QueryInterfaceV1 (kQueryExportName) from the loaded PAPER.dll and call it with an interface ID, exact major, minimum minor and minimum table size. It runs on any thread; the returned descriptor and table stay valid for the process lifetime.

ResultMeaning
OkDescriptor returned; its table is at least the size you asked for.
UnknownInterfaceThis PAPER does not know the interface ID.
UnsupportedMajorThis PAPER does not serve that major. A mod built for the pre-2.0 API gets this.
UnsupportedMinorThe installed PAPER is older than your headers.
TableTooSmallThe installed table is smaller than your headers expect.
InvalidArgumentNull output pointer, or a zero major or table size.
InternalErrorDiscovery failed inside PAPER.

After any version refusal, or a call to a pre-2.0 export, PAPER logs the calling DLL once in PAPER.log and the game keeps running. Request exactly the versions your headers declare and never probe with trial queries. When PAPER.dll is not loaded or refuses your request, turn your PAPER features off and keep running.

paper::api::Client does this for you: connect queries Provider and registers the owner, acquire queries any further interface and checks that it accepts this Provider version (requiredProviderMajor / requiredProviderMinor). There are no per-family table extents or feature bits: a negotiated table is complete.

Capability map​

Capabilities are requested once, at registration, as a ConsumerCapability mask.

CapabilityBitPurpose
RuntimeState0Runtime and configuration snapshots; PhysicalReload read.
CapturedTransforms1Native animation node capture.
NativeHandPose2Hand-in-weapon and 15 finger-local transforms.
AnimationAuthority3Animation ownership arbitration; PhysicalReload acquire.
FrameCallbacks4Event callback registration.
NativePosePipeline10Resolved pose diagnostics and PresentationComplete events.

Bits 5 to 9 and 11 to 14 belonged to the removed observation, motion and development capture calls; they are retired, never granted and never reused. All covers the six bits above, but request only the ones you use.

Registration returns the actual granted mask (Client::grantedCapabilities). Treat missing required bits as a failed integration, close the partial owner, and report which feature is unavailable. A call without its capability returns PermissionDenied, or false/0 for the getters that do not return Status.