Back to mods
CompatLib project artwork

Vintage Story Mod DB · Vintage Story mod

CompatLib

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 regi

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which CompatLib release should I use?

Updated 1 year ago
Latest stable file 1.0.1
Game version 1.20.3
Loader Built-in Vintage Story mod system

CompatLib 1.0.1 targets 1.20.3. It must be installed on the client. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is CompatLib required on the client, server, or both?

It must be installed on the client. Installation on the dedicated server is optional.

Client Required
Dedicated server Optional
Loader for this release Built-in Vintage Story mod system
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This release supports both sides, but the source does not require it on the server.

What else does CompatLib 1.0.1 need?

1.0.1. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add CompatLib without breaking your instance.

Built for CompatLib 1.0.1. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.0.1. It targets 1.20.3; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    It must be installed on the client. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.0.1. It opens that exact file at the source.

About this project

What does CompatLib add?

Heart Support Sticker by Ko-fiimage

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):

  1. 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.

  2. Add to Mods Folder: Place the CompatLib .zip file into your Vintage Story Mods directory.

  3. 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:

  1. Download CompatLib: Get the latest release.

  2. Add to Project: Include the CompatLib DLL in your mod's project references.

  3. Namespace Inclusion: Add the CompatLib namespace in your code:

    using CompatLib;

  4. 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!
My Wishlist

Project description from Vintage Story Mod DB.

Pick your setup

CompatLib releases for each Vintage Story version.

Choose the version and loader you play, then open the matching release.

1 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

CompatLib versions and loaders

2 of 2 releases match

Looking for an older file? The official Vintage Story Mod DB project page is in Resources.