Troubleshooting
Start with the earliest failed layer.
Startup
- Confirm the log reports FTK2.ModAPI 0.5.9 and the supported runtime versions.
- Keep exactly one
FTK2.ModAPI.dllunderBepInEx\plugins. - Confirm the consumer declares a BepInEx dependency on
org.ftk2.modapi. - Find its
MOD_REGISTEREDentry before debugging content.
Registration and ownership
INVALID_CONTENT_OWNERmeans a content/localization namespace does not match the registered mod ID.- Duplicate IDs are preserved rather than overwritten.
- Subscribe in
Awake; GameDataReady events are not replayed. MAIN_THREAD_REQUIREDmeans a runtime service was called from a worker thread. Move that call to the Unity main thread.
Custom items
Check template creation, localization, definition registration, ability/passive dependencies, and activation in that order. CannotDeactivateWhileReferenced means a tracked runtime item or dependent definition must be released first.
Custom abilities
Check ability localization/template/registration/activation before the dependent item. Then verify the item carries the custom ID and an appropriate ItemSkillRoll. Existing status IDs must exist in the current FTK2 data.
FTK2 1.14.6 uses worker threads during combat asset preload. ModAPI 0.5.9 handles its own presentation/icon diagnostics safely there. A remaining MAIN_THREAD_REQUIRED report should include the complete stack trace so the caller can be identified.
Save load is blocked
Restore the mod that owns each reported missing custom ID. Do not bypass the preflight and force an unsafe commit. See Save Compatibility.
Use Reporting a Useful Bug for the report bundle.