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

Add preliminary SF support #29

Merged
merged 4 commits into from
Oct 8, 2023
Merged

Add preliminary SF support #29

merged 4 commits into from
Oct 8, 2023

Conversation

Silarn
Copy link
Member

@Silarn Silarn commented Oct 6, 2023

So in theory, this SHOULD work.

I've been told that SF can read FO4 archives so for the time being I'm having it simply use the FO4 archive formats. I should have the necessary data for a SF dummy plugin. I've added the necessary ENUM and checks for SF. MO2 acts like it's creating the archive and claims to be successful.

Then, nothing actually happens.

Thing is, this seems to be true for every game. And I can't figure out if it's some kind of local problem on my machine or a problem with libbsarch or - something else? I seem to recall that the ported Qt6 version was working on the earliest Qt6 builds, so whatever is going on is more recent than that.

Hopefully someone can help me figure this out. Maybe it's just a local issue.

@Silarn
Copy link
Member Author

Silarn commented Oct 6, 2023

@PurpleFez - not sure if you're still active but you might be the best person to check my work. Maybe I need to rebuild the delphi project?

@@ -28,7 +29,7 @@ namespace BsaPacker

QString ArchiveNameService::GetArchiveFullPath(const bsa_archive_type_e type, const IModDto* modDto) const
{
return modDto->Directory() + '/' + modDto->ArchiveName() + this->Infix(type) + this->GetFileExtension();
return QDir::toNativeSeparators(modDto->Directory() + '/' + modDto->ArchiveName() + this->Infix(type) + this->GetFileExtension());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something I tried just to see if it would do anything, but it's not working with or without this change.

@Silarn
Copy link
Member Author

Silarn commented Oct 8, 2023

I guess this has been broken since the switch to Qt6. And it's probably my fault. After looking at the 0.0.8 release Al made against my 0.0.9, he definitely had the larger libbsarch.dll included rather than the stub DLL produced by the OOP wrapper code.

I've fixed this release archive and hopefully future builds will work.

@Silarn
Copy link
Member Author

Silarn commented Oct 8, 2023

This did expose some apparent issues in the FO4 archive code (and in general). Since it creates a - Main and - Texture archive regardless of the files in the mod, if it tried to create an archive with no files it would fail.

I attempted to work around this by asking the archive for the number of files it has, but for some reason this was always returning 0. So I had to add a try / catch when attempting to save the archive.

In addition, I found another issue when writing dummy plugins. The check code didn't account for the suffixes added by the FO4 BA2 generator and would fail to 'find' the created archive(s).

This should be fixed with these commits.

@Silarn
Copy link
Member Author

Silarn commented Oct 8, 2023

Elminster has kindly offered to implement a version of libbsarch within xEdit (which it was based on and builds against).

Once this is done we can rebase the dependency and add Starfield BA2 support. I believe the FO4 BA2s do work for the time being.

@Silarn Silarn merged commit bf2b31f into master Oct 8, 2023
@Silarn Silarn deleted the starfield_packer_update branch October 8, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants