How khaomi/cotl_api works
COTL_API is a Unity/BepInEx modding library for adding content and game integrations to Cult of the Lamb. Mod authors define custom content and register it through managers; runtime patches expose that content in game systems, while shared GUID/type and save support preserve identity and state. The README describes the product broadly, and the tree confirms many additional content domains. Unsampled subsystems are represented at their exact directories; edges are limited to relationships supported by the README or source index and excerpts.
Main entry points: Plugin.cs Plugin lifecycle · DebugManager.cs Debug content · CustomStructureManager.cs Structures · CustomInventory Items and food
Components 22
Runtime Core
- Plugin lifecycle
COTL_API/Plugin.cs - Stable IDs
COTL_API/Guid/GuidManager.cs - Type lookup
COTL_API/Guid/TypeManager.cs
Custom Content
- Items and food
COTL_API/CustomInventory - Follower commands
COTL_API/CustomFollowerCommand/CustomFollowerCommand.cs - Custom skins
COTL_API/CustomSkins/CustomSkinManager.cs - Structures
COTL_API/CustomStructures/CustomStructureManager.cs - Custom enemies
COTL_API/CustomEnemy/CustomEnemyManager.cs - Objectives
COTL_API/CustomObjectives/CustomObjectiveManager.cs - Other content types
COTL_API
Game Integration
- Game patches
COTL_API/CustomInventory/Patches - Prefab integration
COTL_API/Prefabs/CustomPrefabManager.cs - Mod settings
COTL_API/CustomSettings/CustomSettingsManager.cs - Localization
COTL_API/CustomLocalization/CustomLocalizationManager.cs - Mod save data
COTL_API/Saves/ModdedSaveManager.cs
Mod Support
- UI helpers
COTL_API/UI/UIManager.cs - Assets and icons
COTL_API/Helpers/TextureHelper.cs - Custom audio
COTL_API/Sounds/SoundLoader.cs - Debug content
COTL_API/Debug/DebugManager.cs
Other components
- Mod author
- Cult of the Lamb
- Game save/config
Connections 29
- Mod author → Plugin lifecycle: initializes
- Plugin lifecycle → Mod settings: configures
COTL_API/Plugin.cs - Plugin lifecycle → Mod save data: loads
COTL_API/Plugin.cs - Plugin lifecycle → Debug content: enables
COTL_API/Plugin.cs - Debug content → Follower commands: registers
COTL_API/Debug/DebugManager.cs - Debug content → Custom skins: registers
COTL_API/Debug/DebugManager.cs - Debug content → Structures: registers
COTL_API/Debug/DebugManager.cs - Debug content → Objectives: exercises
COTL_API/Debug/DebugManager.cs - Items and food → Stable IDs: allocates IDs
COTL_API/CustomInventory/CustomItemManager.cs - Follower commands → Stable IDs: allocates IDs
COTL_API/CustomFollowerCommand/CustomFollowerCommandManager.cs - Structures → Stable IDs: allocates IDs
COTL_API/CustomStructures/CustomStructureManager.cs - Objectives → Cult of the Lamb: adds quests
COTL_API/CustomObjectives/CustomObjectiveManager.cs - Items and food → Game patches: extended by
- Game patches → Cult of the Lamb: patches runtime
- Structures → Prefab integration: resolves structures
COTL_API/Prefabs/CustomPrefabManager.cs - Prefab integration → Cult of the Lamb: instantiates
COTL_API/Prefabs/CustomPrefabManager.cs - Mod settings → Game save/config: binds config
COTL_API/CustomSettings/CustomSettingsManager.cs - Mod save data → Game save/config: persists data
- Plugin lifecycle → Custom skins: configures
COTL_API/Plugin.cs - Plugin lifecycle → Items and food: registers
COTL_API/Plugin.cs - Plugin lifecycle → Objectives: restores data
COTL_API/Plugin.cs - Type lookup → Cult of the Lamb: patches type lookup
COTL_API/Guid/TypeManager.cs - Items and food → Assets and icons: loads icons
COTL_API/CustomInventory/CustomInventoryItem.cs - Structures → Assets and icons: loads sprites
- Custom skins → Cult of the Lamb: applies skins
- Other content types → Cult of the Lamb: extends gameplay
README.md - Localization → Cult of the Lamb: localizes content
- Custom audio → Cult of the Lamb: loads sounds
- UI helpers → Cult of the Lamb: supports UI