Norbyte / bg3se

Baldur's Gate 3 Script Extender
Other
1.15k stars 67 forks source link

`Ext.Mod` incorrectly reports `0.0.0.0` version number if mod has `Version` instead of `Version64` as id in meta.lsx #444

Closed AtilioA closed 2 months ago

AtilioA commented 2 months ago

I have attempted solutions to common problems

Yes

I have checked that my game version is supported

Yes

OS

Windows 11

Platform

Steam

Description

Ext.Mod seems to have a problem with mods that don't have a version number with id="Version64" in their meta.lsx.

With unique_tav 1.6.2.0:

<attribute id="UUID" type="FixedString" value="4cb0fd40-7212-4fe9-8733-9a8dbc6637ae"/>
<attribute id="Version" type="int64" value="36873226244063232"/>

_D(Ext.Mod.GetMod("4cb0fd40-7212-4fe9-8733-9a8dbc6637ae"))

        ...
        "Info" :
        {
                "Author" : "kartoffel Trips KittHaven",
                "CharacterCreationLevelName" : "",
                "Description" : "Base version of unique_tav.",
                "Directory" : "unique_tav",
                "FileSize" : 0,
                "Hash" : "a84f0946f42686636b5d88a489b0332f",
                "LobbyLevelName" : "",
                "MenuLevelName" : "",
                "ModVersion" :
                [
                        0,
                        0,
                        0,
                        0
                ],
                "ModuleUUID" : "4cb0fd40-7212-4fe9-8733-9a8dbc6637ae",
                "ModuleUUIDString" : "4cb0fd40-7212-4fe9-8733-9a8dbc6637ae",
                "Name" : "unique_tav",
                "NumPlayers" : 4,
                "PhotoBoothLevelName" : "",
                "PublishHandle" : 0,
                "PublishVersion" :
                [
                        1,
                        0,
                        0,
                        0
                ],
                "StartLevelName" : ""
        }

If I edit the meta.lsx:

  <attribute id="Version64" type="int64" value="36873226244063232" />

_D(Ext.Mod.GetMod("4cb0fd40-7212-4fe9-8733-9a8dbc6637ae"))

        ...
        "Info" :
        {
                "Author" : "kartoffel Trips KittHaven",
                "CharacterCreationLevelName" : "",
                "Description" : "Base version of unique_tav.",
                "Directory" : "unique_tav",
                "FileSize" : 0,
                "Hash" : "b057cbf5c2baef2426552322fbeba566",
                "LobbyLevelName" : "",
                "MenuLevelName" : "",
                "ModVersion" :
                [
                        1,
                        6,
                        2,
                        0
                ],
                "ModuleUUID" : "4cb0fd40-7212-4fe9-8733-9a8dbc6637ae",
                "ModuleUUIDString" : "4cb0fd40-7212-4fe9-8733-9a8dbc6637ae",
                "Name" : "unique_tav",
                "NumPlayers" : 4,
                "PhotoBoothLevelName" : "",
                "PublishHandle" : 0,
                "PublishVersion" :
                [
                        1,
                        0,
                        0,
                        0
                ],
                "StartLevelName" : ""
        },

Note: unique_tav has no PublishVersion, but this is likely irrelevant.

Indications

BG3MM is able to report the expected version number.

Diagnostic Files

No response

Steps to Reproduce

  1. Create a mod with a meta.lsx file that has a version number with id="Version";
  2. Load the mod in the game;
  3. Run Ext.Mod.GetMod(modUUID);
  4. Observe that the mod version is incorrect.

Expected Behavior

Ext.Mod should report the version listed in the meta.lsx file.

Actual Behavior

Ext.Mod reports 0.0.0.0 as the version number for such mods.

AtilioA commented 2 months ago

Won't be fixed, this is a problem with outdated/incorrect meta.lsx files.