lslib icon indicating copy to clipboard operation
lslib copied to clipboard

LSF version 7 support?

Open wilhelmw201 opened this issue 2 years ago • 17 comments

Hi, it seems that Larian has a new lsf version out now e.g. Patch3\Mods\GustavDev\Story\DialogsBinary\Act1\DEN\DEN_DarkJusticiar_PAD_MuralHint.lsf converting this gives [FATAL] Failed to convert resource: LSF version 7 is not supported with the newest version of divine.exe

wilhelmw201 avatar Sep 22 '23 16:09 wilhelmw201

I simply patched the max version from 6 to 7 and in some cases that works, in some, it doesn't xD So we need to see what the differences are.

EDIT: I'll see if I can spot the difference real quick.

LennardF1989 avatar Sep 22 '23 18:09 LennardF1989

Norbyte fixed this in latest commit.

LennardF1989 avatar Sep 22 '23 19:09 LennardF1989

will there be an updated Release of this build?

ekvasir avatar Sep 23 '23 00:09 ekvasir

Converting this file

Patch3\Mods\GustavDev\Story\DialogsBinary\Camp\CAMP_ArabellaPowers_AD_ArabellaJergal.lsf

getting here

[FATAL] Failed to convert resource: ToString() is not safe to use anymore, AsString(settings) instead

wilhelmw201 avatar Sep 23 '23 08:09 wilhelmw201

Seconding the question of an updated Release. Can we expect to see one?

Hiwasawa12 avatar Sep 23 '23 21:09 Hiwasawa12

Here is an unofficial build with the fix.

LSLib-v1-18-6-nightly.zip

LennardF1989 avatar Sep 23 '23 23:09 LennardF1989

Here is an unofficial build with the fix.

LSLib-v1-18-6-nightly.zip

Many thanks. I was starting to get annoyed at not being able to open files.

stuffinhere avatar Sep 24 '23 13:09 stuffinhere

The exporttools seems to be workinng with dialog lsfs, but when I convert it to lsj json,and use converter to convert back to lsf, the dialogs are "silently broken" in that the game loads fine but when tie dialog starts the game is locked and does not proceed anymore

also it because significantly smaller (481->151kb Mods\GustavDev\Story\DialogsBinary\Companions\ShadowHeart_InParty2.lsf)

wilhelmw201 avatar Sep 24 '23 19:09 wilhelmw201

So it works from LSF to XML and back, but not from LSF to JSON and back?

LennardF1989 avatar Sep 25 '23 10:09 LennardF1989

So it works from LSF to XML and back, but not from LSF to JSON and back?

actually I get an exception when I convert the mentioned shadowheart file from lsf to [lsx to lsf] <= exception

wilhelmw201 avatar Sep 25 '23 17:09 wilhelmw201

I was having the same issue with the dialogue where the game would lock when trying to talk.

If you look at the dialogue files from Patch 3, the 'TagText' attribute has changed.

Patch 2

<attribute id="TagText" type="TranslatedFSString" value="" handle="h90c5764eg5ad6g48c2g934eg13b00207eec1" arguments="0" />

Patch 3

<attribute id="TagText" type="TranslatedString" handle="h90c5764eg5ad6g48c2g934eg13b00207eec1" version="1" />

It changes TranslatedFSString to TranslatedString, removes value="" and changes arguments="0" to version="1"

Changing these back to the Patch 2 values allowed to dialogue to run in game. There may be something going wrong during the conversion from LSX to LSF.

J-Lyt avatar Sep 25 '23 23:09 J-Lyt

I was having the same issue with the dialogue where the game would lock when trying to talk.

If you look at the dialogue files from Patch 3, the 'TagText' attribute has changed.

Patch 2

<attribute id="TagText" type="TranslatedFSString" value="" handle="h90c5764eg5ad6g48c2g934eg13b00207eec1" arguments="0" />

Patch 3

<attribute id="TagText" type="TranslatedString" handle="h90c5764eg5ad6g48c2g934eg13b00207eec1" version="1" />

It changes TranslatedFSString to TranslatedString, removes value="" and changes arguments="0" to version="1"

Changing these back to the Patch 2 values allowed to dialogue to run in game. There may be something going wrong during the conversion from LSX to LSF.

Can you describe the process how you made it work? lsf->lsx->edit lsx->lsf? I was still getting exceptions when I convert lsx->lsf

wilhelmw201 avatar Sep 27 '23 07:09 wilhelmw201

Can you describe the process how you made it work? lsf->lsx->edit lsx->lsf? I was still getting exceptions when I convert lsx->lsf

I had all the LSF files converted using the MultiTool. Would make my changes to the LSX file, then pack the mod using the MultiTool as it converted them back automatically; as long as your file ends in .lsf.lsx.

I also used the nightly of LSLib and it worked as well.

What file are you trying to edit and whats the exception? Is it the one you mentioned previously?

Converting this file

Patch3\Mods\GustavDev\Story\DialogsBinary\Camp\CAMP_ArabellaPowers_AD_ArabellaJergal.lsf

getting here

[FATAL] Failed to convert resource: ToString() is not safe to use anymore, AsString(settings) instead

J-Lyt avatar Sep 27 '23 08:09 J-Lyt

Can you describe the process how you made it work? lsf->lsx->edit lsx->lsf? I was still getting exceptions when I convert lsx->lsf

I had all the LSF files converted using the MultiTool. Would make my changes to the LSX file, then pack the mod using the MultiTool as it converted them back automatically; as long as your file ends in .lsf.lsx.

I also used the nightly of LSLib and it worked as well.

What file are you trying to edit and whats the exception? Is it the one you mentioned previously?

Converting this file Patch3\Mods\GustavDev\Story\DialogsBinary\Camp\CAMP_ArabellaPowers_AD_ArabellaJergal.lsf getting here [FATAL] Failed to convert resource: ToString() is not safe to use anymore, AsString(settings) instead

It is not, i get an exception due to an unknown field by the LSLib's lsxreader, when converting the shadowheart file. On closer inspection: It is at line 153 of LSXReader.

            case "attribute":
                UInt32 attrTypeId;
                if (Version >= LSXVersion.V4)
                {
                    attrTypeId = (uint)AttributeTypeMaps.TypeToId[reader["type"]]; //Here: Key 23 not found in TypeToId
                }

Where reader["type"] is "23"

wilhelmw201 avatar Sep 27 '23 09:09 wilhelmw201

LSFv7 support and fix for LSJ serialization was added in v1.18.7: https://github.com/Norbyte/lslib/releases

Norbyte avatar Sep 27 '23 14:09 Norbyte

lsf->lsj->lsf (or lsf->lsf, for that matter) still is broken on my side though. is anyone having success with dialog conversions? e.g. convert UnpackedData\Patch3\Mods\GustavDev\Story\DialogsBinary\Companions\ShadowHeart_InParty2.lsf to Baldurs Gate 3\Data\Mods\GustavDev\Story\DialogsBinary\Companions\ShadowHeart_InParty2.lsf and talk to shadowheart, game always dies, right?

wilhelmw201 avatar Sep 27 '23 17:09 wilhelmw201

I was having the same issue with the dialogue where the game would lock when trying to talk.

If you look at the dialogue files from Patch 3, the 'TagText' attribute has changed.

Patch 2

<attribute id="TagText" type="TranslatedFSString" value="" handle="h90c5764eg5ad6g48c2g934eg13b00207eec1" arguments="0" />

Patch 3

<attribute id="TagText" type="TranslatedString" handle="h90c5764eg5ad6g48c2g934eg13b00207eec1" version="1" />

It changes TranslatedFSString to TranslatedString, removes value="" and changes arguments="0" to version="1"

Changing these back to the Patch 2 values allowed to dialogue to run in game. There may be something going wrong during the conversion from LSX to LSF.

Very late reply but just wanted to say thanks for this, I'd been banging my head against the wall trying to figure out why this wasn't working despite having done it before, and editing those values accordingly got past the lock up when trying to start the conversation. Cheers :-)

edisnooM avatar Dec 10 '23 19:12 edisnooM