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

Update libloot-python to expose ESL qualifications #13

Open
Sharlikran opened this issue Dec 31, 2019 · 4 comments
Open

Update libloot-python to expose ESL qualifications #13

Sharlikran opened this issue Dec 31, 2019 · 4 comments

Comments

@Sharlikran
Copy link
Member

I don't know exactly what to put for the AI. The main thing I was requesting was to add the ability to check ESL qualifications and whether or not the ESL flag is valid.

loot_api.check_esl_qualifications(parameter: filename) : returns True if the file meets Bethesda standards for a file to have the ESL flag. Should allow 0x800 to 0xFFF for Fallout 4 and once implemented for Skyrim SE also. : returns True or False
loot_api.check_eslexpanded_qualifications(parameter: filename) : alternative check if implemented to check range 0x000 to 0xFFF and a different command for 0x000 to 0xFFF : returns True or False
loot_api.is_eslflag_valid(parameter: filename) : Checks to see if the ESL flag is valid, returning true or false
loot_api.ismod_creationclub_esl(parameter: filename) : checks if the file extension is .esl and if both the ESM and ESL falg is set. This it mostly for mod sorting reasons as they are force loaded. : returns True or False

I don't know if loot or libloot has other things it checks that might be useful.

@Ortham
Copy link
Member

Ortham commented Dec 31, 2019

What's the difference between check_esl_qualifications and is_eslflag_valid? I.e. what does 'valid' mean?

Also, shouldn't ismod_creationclub_esl only return true if the given plugin is in the game's *.ccc file?

@Sharlikran
Copy link
Member Author

Sharlikran commented Jan 1, 2020

What's the difference between check_esl_qualifications and is_eslflag_valid? I.e. what does 'valid' mean?

Also, shouldn't ismod_creationclub_esl only return true if the given plugin is in the game's *.ccc file?

I see your point. I can appreciate eliminating redundancy. However, these are for different sections of Wrye Bash.

Referencing the xedit docs

  • Does the file qualify to have an ESL flag? If it qualifies, does it have a flag? If not inform the user it can be flagged.
  • Mark in ModInfos that it does not have a flag but qualifies so the ESL flag can be toggled.
  • If the file has the ESL flag allow the user to remove the ESL flag if it is not an official CC file.
  • If the file has an ESL flag, does it qualify? If not then it is illegally flagged. Inform the user. Possibly forcefully remove the flag. It should not be there and would be helpful to eliminate issues for the user.
  • If the file ends in the extension .esl and has only the ESL flag it should be sorted among the other ESM files and can be manually sorted as needed. It is sorted among the ESM files because the game will force the ESM flag regardless because of the .esl extension.
  • If the file is an official CC file it can not be sorted or disabled.

So that's my thinking as I am requesting these things. Most of it can be handled by Wrye Bash but what Wrye bash cannot do currently is parse the plugin like xEdit and really see if the file qualifies to have an ESL flag. Vortex uses libloot and some type of wrapper so I want to take advantage of that as well. Simply because getting wrye bash to check for esl qualifications would take a rewrite of a lot of code.

My implementation is a hack of the old method of checking for new records when Wrye Bash checks to see if a file can be merged into the bash patch. Because of that it is dependent on having the plugin fully decoded. Fallout 4 does not have every record implemented because I'm way behind on that. So Fallout 4 can't check at all. Skyrim has a few records that are not decoded so any plugin that has records that remain undefined in Wrye Bash return a warning.

The changes will help get past some of the restrictions I am facing.

@Ortham
Copy link
Member

Ortham commented Jan 2, 2020

libloot doesn't have access to most of that detail, so I can only expose:

  • Is this plugin a light master (i.e. does it have the flag set or have a .esl file extension)?
  • Is this plugin a valid light master (if it is a light master) or would it be valid as a light master (if it is not a light master)?

libloot doesn't know if a light master has its flag set or not, so if that matters for you, you'll have to get that info some other way. It also doesn't know anything about which plugins are Creation Club plugins, but at least Wrye Bash could trivially parse the .ccc file to get them.

@Ortham
Copy link
Member

Ortham commented Jan 4, 2020

OK, I've exposed the relevant methods in 7ccfe6d, you can test it out using this snapshot build.

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

No branches or pull requests

2 participants