
Mods / CompatLib
Author: Elocrypt
Side: Both
Created: Feb 2nd at 1:58 AM
Last modified: Feb 4th at 5:50 AM
Downloads: 1568
Follow Unfollow 48
Latest release (for outdated Vintage Story v1.20.3):
CompatLib_1.0.1.zip
1-click install
CompatLib is a library designed to streamline mod compatibility by providing a structured approach to detect and manage interactions between various mods. This library offers utilities to check for the presence of specific mods, retrieve mod versions, and register compatibility handlers that ensure seamless integration simplifying the process for mod developers to ensure their mods work harmoniously with others, enhancing the overall modding experience.
Discuss CompatLib: Vintage Story Discord CompatLib mod thread
Key Features:
- Mod Detection: Check if specific mods are installed and retrieve their versions.
- Compatibility Management: Register and process compatibility handlers for mods.
- Conflict Tracking: Detect and log compatibility conflicts dynamically.
- Server & Client Commands: In-game commands for debugging compatibility issues.
- Client-side command:.compatlog
- Server-side command:/compatlog
- Thread Safety: Utilizes thread-safe operations to ensure data integrity in multithreaded environments.
- Dynamic Handler Control: Enable or disable specific handlers at runtime for flexible compatibility management.
- Version Compatibility Checks: Ensure handlers are compatible with specific mod versions to prevent conflicts.
- User Feedback Mechanism: Inform users about active handlers and detected conflicts, enhancing transparency.
- JSON Export for Compatibility Logs: Export compatibility logs in a structured JSON format for easier debugging and analysis.
- Logging Granularity: Introduced different log levels (INFO, WARNING, ERROR) to categorize messages, allowing for more granular control over logging output.
Installation Instructions (Dependency for other mods):
-
Download CompatLib: Ensure you have the correct version of CompatLib the mod is using as a dependency and that they are compatible with your Vintage Story game version.
-
Add to Mods Folder: Place the CompatLib
.zip
file into your Vintage StoryMods
directory. -
Launch the Game: Start Vintage Story, and CompatLib will be automatically recognized and integrated.
For Developers:
To utilize CompatLib in your mod development, follow these steps:
-
Download CompatLib: Get the latest release.
-
Add to Project: Include the CompatLib DLL in your mod's project references.
-
Namespace Inclusion: Add the CompatLib namespace in your code:
using CompatLib;
-
Initialization: Initialize CompatLib within your mod's main class by extending
ModSystem
:using Vintagestory.API.Common;
namespace YourModNamespace { public class YourModSystem : ModSystem { public override void Start(ICoreAPI api) { base.Start(api); // Initialize CompatLib api.Logger.Notification("YourMod initialized with CompatLib support."); } } }
For a comprehensive guide and examples, please refer to the CompatLib Wiki.
Support & Feedback:
- Ko-fi: Support development at Ko-fi.
- Twitch: Watch live gameplay and mod development at Twitch.
- Discord: Join our community for feedback and discussions at Discord.
- GitHub: Report issues or track development progress at GitHub.
- ModDB: Find my other Vintage Story mods and patches at ModDB.
Your support helps keep this mod updated and improves the Vintage Story experience for everyone!
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v1.0.1 | 1219 | Feb 4th at 5:50 AM | Show | CompatLib_1.0.1.zip | 1-click install | |
v1.0.0 | 349 | Feb 2nd at 2:31 AM | Show | CompatLib_1.0.0.zip | 1-click install |
Edvardas
I haven't tested with 1.20.0 specifically, although I believe this should work with 1.20.0.
Does it work with 1.20.0?
Thank you :)