limo-app / limo

A simple Qt based mod manager
GNU General Public License v3.0
111 stars 2 forks source link

Loot sorting fails in Fallout: NV #11

Closed phen0mX closed 2 months ago

phen0mX commented 2 months ago

Sorting plugins in Fallout New Vegas results in:

[Error]: yaml-cpp: error at line 19, column 9: bad conversion: 'text' key missing from 'message content' object

Even with no additional mods.

Bildschirmfoto vom 2024-08-25 17-56-22

phen0mX commented 2 months ago

Just checked, the yaml it can't read is:

  - &obsolete
    type: say
    content:
      - lang: en
        str: 'Obsolete. Update to latest version.'
      - lang: ru
        str: 'Устарело. Обновите до последней версии.'
      - lang: es
        str: 'Obsoleto. Actualizar a la última versión.'
      - lang: ko
        str: '사용되지 않습니다. 최신 버전으로 업데이트하십시오.'
      - lang: zh_CN
        str: '已过时。请升级到最新版本。'

From masterlist.yaml. Apparently the expected content would have been just a string, instead of a list.

limo-app commented 2 months ago

Are you using the flathub version or did you compile manually?

phen0mX commented 2 months ago

Latest flatpak version.

limo-app commented 2 months ago

I will try to reproduce this, if i understand you correctly this should occur regardless of which mods are used if you sort using the New Vegas masterlist.

phen0mX commented 2 months ago

That seems to be the case, yes.

limo-app commented 2 months ago

This also raises another issue: It looks like some of LOOT's masterlists are poorly maintained and outdated, see here. The website of Viva New Vegas also mentions that LOOT should be avoided for that game. Limo should probably offer an option to only use user defined rules for some games.

phen0mX commented 2 months ago

Good catch! I had already read that, but didn't want to bring up game specific issues. As the whole concept of Limo seems to try and be as generic as possible. I only mentioned FNV because it's (masterlist) is the source of the error I encountered. Edit:

Limo should probably offer an option to only use user defined rules for some games.

Seems like a good idea. I somehow misread it as a hack/fix specifically for FNV.

limo-app commented 2 months ago

Can reproduce this by installing a single mod (this one). I will try to debug this, but it looks like an internal issue of libloot in which case i will raise this with upstream. Edit: I also verified that msterlist.yaml for NV is at least valid yaml, so it's probably a libloot issue.

phen0mX commented 2 months ago

It only happened with a mod installed? For me it happened with my modlist (didn't check single mods) and when I "undeployed" all mods using an empty profile. Btw. is there a simpler way to "undeploy" all mods? Edit:

I also verified that msterlist.yaml for NV is at least valid yaml

Could it be a different yaml? Maybe I guessed wrong?

phen0mX commented 2 months ago

Applying a loadorder.txt, like is mentioned here. Would be a potential way to workaround the no/outdated masterlist issue.

The contents seem quite easy to parse at least:


# This file was automatically generated by Mod Organizer.
FalloutNV.esm
DeadMoney.esm
HonestHearts.esm
OldWorldBlues.esm
LonesomeRoad.esm
GunRunnersArsenal.esm
ClassicPack.esm
MercenaryPack.esm
TribalPack.esm
CaravanPack.esm
limo-app commented 2 months ago

Sorry for the confusion, i meant to say that even if you just use a single mod, the issue still occurs. So its probably not related to the mods you used but a general problem with NVs masterlist. By valid yaml is simply mean that the file contains no yaml syntax errors, it could still contain other errors.

limo-app commented 2 months ago

Applying a loadorder.txt, like is mentioned here.

This link does not work for me. The loadorder file is currently parsed and edited by Limo, so you can sort your mods manually with drag and drop. The masterlist is just needed for automatic sorting with libloot.

Btw. is there a simpler way to "undeploy" all mods?

Currently not. I thought having a "Vanilla" profile would be sufficient. I thought about adding an "Undeploy" button but decided against it since i thought it would rare be useful under normal circumstances.

phen0mX commented 2 months ago

This link does not work for me. The loadorder file is currently parsed and edited by Limo, so you can sort your mods manually with drag and drop. The masterlist is just needed for automatic sorting with libloot.

Fixed. They are different files, "plugins.txt" is what's read by the game and "loadorder.txt" is more of an instruction to the mod manager to reorder the plugins. Useful for guides, bundles stuff like that. Because dragging around 20+ plugins gets annoying quite quickly, although it does work.

Currently not. I thought having a "Vanilla" profile would be sufficient. I thought about adding an "Undeploy" button but decided against it since i thought it would rare be useful under normal circumstances.

I have to say the current solution does work without issue, but it's extremely unintuitive. A fixed read-only "Vanilla" profile would be significantly better.

Edit: I would have used LOOT as just a shortcut anyway.

limo-app commented 2 months ago

but it's extremely unintuitive.

That's fair. I think the best solution to this would actually be some sort of un-deploy button after all.

"loadorder.txt" is more of an instruction to the mod manager to reorder the plugins

Since it looks like some games, like NV, might be better of without LOOT's auto sorting, it might be best to add an option that replaces this way of sorting with a new algorithm that respects the order in that file.

geowarin commented 2 months ago

Hello, I ran into the same problem with Oblivion (yaml-cpp: error at line 41, column 9: bad conversion: 'text' key missing from 'message content' object)

image

if masterlist.yaml is the culprit it's around the same type of structure.

  - &obsolete
    type: say
    content:
      - lang: en            <========== line 41
        str: 'Obsolete. Update to latest version.'
      - lang: ru
        str: 'Устарело. Обновите до последней версии.'
      - lang: es
        str: 'Obsoleto. Actualizar a la última versión.'
      - lang: ko
        str: '사용되지 않습니다. 최신 버전으로 업데이트하십시오.'
      - lang: zh_CN
        str: '已过时。请升级到最新版本。'

Another problem I noticed is that, the "Plugins" (loot) deployer writes the plugins.txt file, whereas Oblivion will read the Plugins.txt file (uppercase P)

geowarin commented 2 months ago

As suggested in the issue @limo-app opened upstream, I downloaded the masterlist file from the 0.21 branch (which is the default branch on the repo) and the problem parsing the yaml file was gone.

I don't know of a way to download from raw.githubusercontent without specifying a branch so... maybe it's ok to har-code 0.21 for now? Otherwise, we could use the github API to query the default branch but it looks like a hassle...

However, the issue with the case of plugin.txt remains. Should I open a separate issue?

phen0mX commented 2 months ago

As suggested in the issue @limo-app opened upstream, I downloaded the masterlist file from the 0.21 branch (which is the default branch on the repo) and the problem parsing the yaml file was gone.

Can confirm. After downloading the 0.21 masterlist LOOT works for FNV.

limo-app commented 2 months ago

I don't know of a way to download from raw.githubusercontent without specifying a branch so... maybe it's ok to har-code 0.21 for now?

Seeing as there hasn't been much activity in that repo recently, i believe hard coding 0.21 is probably the best option right now.

However, the issue with the case of plugin.txt remains. Should I open a separate issue?

Yes please. I don't own most of the bethesda games but will try to find the correct file names for all of them for the next update.

limo-app commented 2 months ago

1d7129d now uses v0.21 for all masterlists. I have also updated the naming for plugins.txt files. As far as i can see only oblivion uses the upper case version. The new implementation now respects the exact file name of any previously existing plugins.txt file. If none is found it defaults to Plugins.txt for Oblivion and plugins.txt for everything else.

limo-app commented 2 months ago

Both the original sorting issue and the capitalization of Plugins.txt for Oblivion are fixed in 1.0.5 which is live on Flathub. Closing