matortheeternal / smash

An application that provides a means of performing automatic conflict resolution between multiple Bethesda Plugin Files for TES and Fallout games.
Other
129 stars 20 forks source link

Changes from Unofficial Mator Smash Updated #252

Open chuckseven1 opened 3 years ago

chuckseven1 commented 3 years ago

Please tell me if any of these changes look insane. I made a few... educated guesses when changing from the xEdit 3 API to 4.

matortheeternal commented 3 years ago

Alright, I'll review this over the next few days. :+1:

matortheeternal commented 3 years ago

Also it seems like string file loading may be broken based on the comments on Nexus Mods. You should look into that.

chuckseven1 commented 3 years ago

Also it seems like string file loading may be broken based on the comments on Nexus Mods. You should look into that.

Yes I saw the comments on nexus. I have started looking into it. Not sure why it only seems to affect some localized strings, but I am clearly doing something wrong with them.

matortheeternal commented 3 years ago

Yes I saw the comments on nexus. I have started looking into it. Not sure why it only seems to affect some localized strings, but I am clearly doing something wrong with them.

I think something in how localization is handled got changed from xEdit 3.x to 4.x, look into how they're doing localization shenanigans in the xEdit codebase and see if you can update things here appropriately.

If you can't see an issue you might have to get someone to send you their strings file(s). It could be a lot of different things, might be difficult to debug. You're certain it's only happening with some localized strings and not all?

chuckseven1 commented 3 years ago

Yes I saw the comments on nexus. I have started looking into it. Not sure why it only seems to affect some localized strings, but I am clearly doing something wrong with them.

I think something in how localization is handled got changed from xEdit 3.x to 4.x, look into how they're doing localization shenanigans in the xEdit codebase and see if you can update things here appropriately.

If you can't see an issue you might have to get someone to send you their strings file(s). It could be a lot of different things, might be difficult to debug. You're certain it's only happening with some localized strings and not all?

I had a string result in that error one time I smashed, then after changing my LO the same record was still in my smashed patch but that time it had the right value...

Yes I will look at xEdit to try to figure it out when I get the chance.

matortheeternal commented 3 years ago

I had a string result in that error one time I smashed, then after changing my LO the same record was still in my smashed patch but that time it had the right value...

Yes I will look at xEdit to try to figure it out when I get the chance.

OK, will merge and publish as soon as this is resolved.

chuckseven1 commented 3 years ago

The localized strings issue is because the BSAs corresponding to plugins in the LO are not being loaded. I added code to load them myself and the strings all come out correct for me. I must still be configuring xEdit wrong? I imagine it supports loading the BSAs automagically for the plugins.

matortheeternal commented 3 years ago

The localized strings issue is because the BSAs corresponding to plugins in the LO are not being loaded. I added code to load them myself and the strings all come out correct for me. I must still be configuring xEdit wrong? I imagine it supports loading the BSAs automagically for the plugins.

The BSA loading happens in msLoader.pas, LoadBSAs function.

chuckseven1 commented 3 years ago

The localized strings issue is because the BSAs corresponding to plugins in the LO are not being loaded. I added code to load them myself and the strings all come out correct for me. I must still be configuring xEdit wrong? I imagine it supports loading the BSAs automagically for the plugins.

The BSA loading happens in msLoader.pas, LoadBSAs function.

Yes but that function was only loading the BSAs listed in skyrim.ini. I am talking about loading foo.bsa when foo.esp is loaded. That was not happening.

I added a check to load the BSAs associated with the plugins and now my localized strings come out right. The problem was I have localized plugins which had their strings file in their associated BSA. That is why the files were not being found.

matortheeternal commented 3 years ago

Yes but that function was only loading the BSAs listed in skyrim.ini. I am talking about loading foo.bsa when foo.esp is loaded. That was not happening.

I added a check to load the BSAs associated with the plugins and now my localized strings come out right. The problem was I have localized plugins which had their strings file in their associated BSA. That is why the files were not being found.

It definitely has code that loaded BSAs associated with plugin files that worked in the past. If it isn't working in the current version that means the functions it calls may have changed, or something.

See these lines: https://github.com/matortheeternal/smash/blob/master/frontend/msLoader.pas#L291-L298

You should probably fix this function instead of adding a new one (haven't looked at your changes yet, about to run out of the house)

matortheeternal commented 3 years ago

Alright, want to check in. What's our current status here? Is everything functioning correctly? Localization issue is resolved?

chuckseven1 commented 3 years ago

The localized strings are working, but with my added line. I found the old code that was supposed to load the plugin BSAs but have not yet figured out how it used to work.

Also I tried to regenerate the Smash.All setting because I was getting null references in my smashed patch due to slight changes in how xEdit named things (see c82f7fc58f24ac0fc45513f1f2a246970d09035f). It seems to work for me but other users are reporting issues with the new Smash.All. I made it by doing autoset attributes after adding all the record types (as in the description of the original Smash.All). Is there something more I should have done? I intend to look more closely at their differences when I have the time...

Aside from those two things, I am not aware of any new issues. The issue with Russian is still present but it was already there AFAIK.