ME3Tweaks / ME3TweaksModManager

Mod Manager for Mass Effect Original Trilogy and Mass Effect Legendary Edition
GNU General Public License v3.0
123 stars 34 forks source link

Feature Request: GAME1_EMBEDDED_TLK support for compatibility patches #397

Closed Deepk666 closed 2 months ago

Deepk666 commented 9 months ago

I'm using the GAME1_EMBEDDED_TLK feature in a LE1 mod, but have to make some compatibility patches for certain mods and I'm wondering if there is a way to add a new feature to create other CombinedTLKMergeData.m3za file included in GAME1_EMBEDDED_TLK folders inside the compatibility patches folders, that when installed, they replace totally the base mod CombinedTLKMergeData.m3za file created with GAME1_EMBEDDED_TLK folder... or preferably just replace/add the new xml files contained in the compatibility patch folder CombinedTLKMergeData.m3za on top of the ones contained in the base mod CombinedTLKMergeData.m3za.

Deepk666 commented 9 months ago

Maybe it could be introduced like another 'Alternates' feature in moddesc.ini. For example instead of having the only possibility of an unique GAME1_EMBEDDED_TLK folder in the mod main folder, to give the possibility to point to another GAME1_EMBEDDED_TLK folders too, that could be inside other folders (such as patches, or another DLC folders included in the mod).

Mgamerz commented 4 months ago

This will take some time to investigate the feasibility of. The feature was coded against the idea of having only one m3za file - deployment checks, deployment, loading, etc all look for this one specific file.

It may be easier to change the file format to enable different parts of it than to add another m3za file.

Deepk666 commented 4 months ago

Thank you very much for consider my feature request, any way of implementation you could develop will be welcome.

Mgamerz commented 4 months ago

This has been implemented into the codebase, but it is going to require some extensive testing due to the multiple environments TLK merge works out of (during development it will do on-disk xmls, after deployment and imported, it will use m3za. There's also compressed archives having m3za and compressed archives using loose files, which might crop up if you manually zip the mod, not something I support, but something we should ensure works properly, e.g. you are sharing a dev copy that can't be deployed yet).

I put this in under [CUSTOMDLC] because I did not want to write a whole new system for this specific job. When targetting moddesc 9, the parser will search all files in the TLK folder, rather than just the files at the root directory of it. Files nested under a single folder will have the folder name turned into an key. Files with a key are not installed by default.

To enable install of the files, you create a new alternate dlc item with operation OP_ENABLE_TLKMERGE_OPTIONKEY and new descriptor LE1TLKOptionKey that is the name of the folder. When this alternate is applied, it unlocks those files for install. This way you can leverage the existing AlternateDLC system. I will post a private alpha soon for you to test with. This will NOT work unless the mod targets moddesc 9 or higher.

Deepk666 commented 4 months ago

Nice! I'm looking forward to test It.

Mgamerz commented 2 months ago

Implemented in 9.0