ME3Tweaks / LegendaryExplorer

Editor toolset for Mass Effect Trilogy and Mass Effect Legendary Edition
https://me3tweaks.com
GNU General Public License v3.0
125 stars 29 forks source link

Dump Wwisestreams experiment is unable to dump audio files from LE2 #412

Open lasidadoobee opened 3 months ago

lasidadoobee commented 3 months ago

When attempting to Dump Wwisestreams via the experiments in PackageEditor, the tool is able to dump the files from LE3, however for LE2 no audio files are dumped.

I believe the issue is due to this line of code: image

located in : LegendaryExplorer/LegendaryExplorer/LegendaryExplorer/Tools/PackageEditor/Experiments/PackageEditorExperimentsS.cs

The issue is within the "en-us" portion of the line, this check is fine with LE3, however it prevents proper function in LE2

image (Example of a dialogue file from LE3. All INT dialogue files from LE3 begin with en-us)

image (Example of a dialogue file from LE2. All INT dialogue files from LE2 begin with en_us)

As the code checks for "en-us," LE2 dialogue files will never be extracted as none of the dialogue files begin with "en-us." This also prevents the dumping of dialogue files from other localizations, such as in the FRA localization of LE2 where all the dialogue files begin with 'fr_fr.'

I would suggest checking if parts[0] == 'en-us' or parts[0] == 'en_us,' and if possible change these comparison strings to correspond with a chosen language.

I'd like to modify the code myself to test this change, however I am unsure how to do so.

The version is 6.3 7/23/2023

Mgamerz commented 3 months ago

Seems like a good change. Good job finding this. To add language options, you'd probably need to add a dialog choice at the start of the dump operation. Can you post the language prefixes for LE2/LE3 languages - we can easily add them with our PromptDialog combobox system. Would not take us very long as long as we knew the values (en-us, fr-fr).

Mgamerz commented 3 months ago

Also, you should put in a pull request with this change. This way you will be credited for the work.

lasidadoobee commented 3 months ago

Sure, I'll get on that.

For the language prefixes, here is a list:

For LE2: INT (English): en_us FRA (French) fr_fr DEU (Dutch) de_de ITA (Italian) it_it POL (Polish) pl_pl

For LE3: INT (English): en-us FRA (French) fr-fr DEU (Dutch) de-de ITA (Italian) it-it No Polish localization

Mgamerz commented 3 months ago

The upcoming nightly will allow you to choose your language with this experiment, however it still won't work with LE2. LE2 doesn't use , to separate out items. We will have to figure out how to split the components up, because it's use of conflicts with other valid uses of .

lasidadoobee commented 3 months ago

Yeah, I just stumbled upon that issue after playing around with the code myself. However, it seems that all lines for the player start with either "en_us_player_m" or "en_us_player_f." I'm not sure how to implement a check on only that part of the string yet, but I'll take a look tomorrow and see if that fixes the issue.