quilt-loader icon indicating copy to clipboard operation
quilt-loader copied to clipboard

`"patches":` dependency for cross-compatible mod addons.

Open sisby-folk opened this issue 1 year ago • 2 comments

Suggested addition for the QMJ format. A flag for dependencies called "patches": that only enforces the dependency if the specified mod ID is loaded.

It's a bit like an optional dependency, except the mod that gets checked for presence is a different mod than the one that needs to match the version string.

Here's a few usage examples:

Literal compatibility patch - LambdaBetterGrass - quilt,mod.json

    "depends": [
      {
        "id": "indium",
        "patches": "sodium",
      },
    ],

JIJ'd library replacements - Switchy 1.18.2 - quilt.mod.json

    "depends": [
      {
        "id": "calio",
        "versions": "1.0.0-quilt",
        "patches": "origins",
      },
    ],

Compatibility addons - Promenade - quilt,mod.json

    "depends": [
      {
        "id": "createplus",
        "patches": "create",
      },
    ],

[Contrived] Flagging compatibiltiy addons for breakages - EMI - quilt,mod.json

    "depends": [
      {
        "id": "emicompat",
        "versions": ">=2.0.3",
        "patches": "farmers-delight",
        "optional": true,
      },
    ],

This would also allow (if I understand correctly) for a whole compatibility mod to be JIJ'd and declared using a patches dependency - meaning the loader would know to load that JIJ'd mod only if another mod is loaded. In example 2, the fixed calio version could be included in Switchy itself, and would only be loaded if origins is present.

If anyone's a bit more awake and thinks of a better format for this go nuts.

sisby-folk avatar Feb 22 '23 09:02 sisby-folk