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 .omwaddon and .omwgame #98

Open
poperigby opened this issue Jan 13, 2025 · 4 comments
Open

Support .omwaddon and .omwgame #98

poperigby opened this issue Jan 13, 2025 · 4 comments

Comments

@poperigby
Copy link

libloot doesn't seem to recognize these two plugin formats used by OpenMW. They're identical to .esp and .esm files though, except a single record, LUAL for Lua mods. libloot is throwing this error when trying to use them:

"/home/cassidy/Games/Morrowind/Data/bound-balance.omwaddon" is not a valid plugin
@Ortham
Copy link
Member

Ortham commented Jan 13, 2025

Just to check, does LOOT handle them correctly if you change their extension to .esp or .esm? Can you provide a link to that plugin so that I can test using it?

@poperigby
Copy link
Author

Yeah, they load just fine when renamed. Here's the mod: https://modding-openmw.gitlab.io/bound-balance/

@Ortham
Copy link
Member

Ortham commented Jan 13, 2025

(Notes for myself)

There are a few places that define valid plugin file extensions:

  • libloadorder, at the top of src/plugin.rs
  • loot-condition-interpreter, in is_unghosted_plugin_file_extension() at the top of src/function/path.rs
  • libloot, in hasPluginFileExtension() at the bottom of src/api/plugin.cpp
  • LOOT, in HasPluginFileExtension() in src/gui/state/game.cpp

LOOT doesn't check the current game type, but the rest do (to exclude light plugins for games that don't support them), and I think it would be a good idea to do the same for the new extensions - that means adding a new game type for OpenMW so that it can be distinguished from Morrowind.

@Ortham
Copy link
Member

Ortham commented Jan 26, 2025

I think libloadorder's and loot-condition-interpreter's openmw branches now have everything they need for OpenMW support. libloadorder was a bit complicated because it's not enough to just recognise .omwaddon and .omwgame files, the load order is read and written in a completely different way to Morrowind, and there are also .omwscripts files with a completely different file format that are also treated as plugins in the load order.

A complication that I didn't address is that while the OpenMW launcher includes inactive plugins in the load order it displays, it derives that order from the order of their parent data paths and from their filenames, so you can't actually change the order of those plugins. libloadorder will let you, but when you read the load order next it will re-derive their order.

Those are things that libloot will also have to deal with: for inactive plugins it's probably best to handle them just like any other game but document that setting their load order positions won't actually do anything.

EDIT: Spoke too soon...

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

No branches or pull requests

2 participants