Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple mod versions #259

Open
Alystrasz opened this issue Jan 1, 2025 · 8 comments · May be fixed by #261
Open

Support multiple mod versions #259

Alystrasz opened this issue Jan 1, 2025 · 8 comments · May be fixed by #261

Comments

@Alystrasz
Copy link
Contributor

Alystrasz commented Jan 1, 2025

Currently, Northstar does not support multiple mod versions, i.e. a single mod being installed several times with different versions.
In the Northstar repositories, launcher and mods pull requests have been opened to fix this issue; however, they change the enabledmods.json file format:

From

{
    "Northstar.Client": true,
    "Northstar.Coop": true,
    "Northstar.CustomServers": true,
    "Northstar.Custom": true,
    "MRVN Shake It": true,
    "Titan Payload": false,
    "Parkour": true
}

To

{
    "Version": 1,
    "Northstar.Client": {
        "1.19.0": true
    },
    "Northstar.Coop": {
        "0.0.0": true
    },
    "Northstar.CustomServers": {
        "1.19.0": true
    },
    "Northstar.Custom": {
        "1.19.0": false
    },
    "Parkour": {
        "0.1.2": false,
        "0.2.1": true
    },
    "MRVN Shake It": {
        "0.0.1": true
    },
    "Titan Payload": {
        "1.2.0": false
    }
}

It would be great if Viper had the capacity to adapt to this new enabledmods.json format.

@0neGal
Copy link
Owner

0neGal commented Jan 2, 2025

I presume this is backwards compatible and older versions see the Object as truthy?

And how is backwards compatibility when it comes to disabling the mods?

Assuming backwards compatibility is concern...

@Alystrasz
Copy link
Contributor Author

On game start, proposed launcher modification will migrate enabledmods.json format to new format, using the existing configuration if possible.

Viper, on its end, should enable/disable mods in the enabledmods.json file regarding the format it is following.

[NB] I omitted to mention an important element: new manifest format involves a "Version" member, which is set to 1 for this new modName => modVersion => enabled format; if no "Version" member is present or its value is 0, then old format (modName => enabled) should be assumed.

@0neGal
Copy link
Owner

0neGal commented Jan 2, 2025

I omitted to mention an important element: new manifest format involves a "Version" member, which is set to 1 for this new modName => modVersion => enabled format; if no "Version" member is present or its value is 0, then old format (modName => enabled) should be assumed.

By manifest you mean mod.json right? So it's kind of a hybrid system in a way, falling back to the old format if no Version is set (not actually sure I've ever seen a mod without it...)

Is there an ETA for when this lands in NS? Given implementing this in Viper before it is in NS would just break things...

@GeckoEidechse
Copy link
Contributor

GeckoEidechse commented Jan 2, 2025

I omitted to mention an important element: new manifest format involves a "Version" member, which is set to 1 for this new modName => modVersion => enabled format; if no "Version" member is present or its value is 0, then old format (modName => enabled) should be assumed.

By manifest you mean mod.json right? So it's kind of a hybrid system in a way, falling back to the old format if no Version is set (not actually sure I've ever seen a mod without it...)

Is there an ETA for when this lands in NS? Given implementing this in Viper before it is in NS would just break things...

enabledmods.json

Is there an ETA for when this lands in NS? Given implementing this in Viper before it is in NS would just break things...

It depends on how much work we can get done. Ideally we would have this finished before Jan 8th in time for the anniversary ^^

@0neGal
Copy link
Owner

0neGal commented Jan 2, 2025

enabledmods.json

Ah I just misunderstood something lol

It depends on how much work we can get done. Ideally we would have this finished before Jan 8th in time for the anniversary ^^

I'll attempt to see if I can have this ready in Viper by then, delaying the current latest release until I've had time to implement it... I'm presuming the version that's used inside enabledmods.json is always gotten from the mod's mod.json and not the Thunderstore manifest or similar?

@GeckoEidechse
Copy link
Contributor

I'm presuming the version that's used inside enabledmods.json is always gotten from the mod's mod.json and not the Thunderstore manifest or similar?

Exactly

@0neGal 0neGal linked a pull request Jan 2, 2025 that will close this issue
4 tasks
@0neGal
Copy link
Owner

0neGal commented Jan 2, 2025

Some initial part of the implementation is now available with #261, albeit only the changes to enabledmods.json and not anything regarding actually showing and differentiating between different versions of the same mod in the mods list.

@0neGal
Copy link
Owner

0neGal commented Jan 7, 2025

The aforementioned PR should actually be ready to be merged, assuming no noticeable bugs, and that Viper handles the new format as intended, any testing and feedback is highly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants