Frodo45127 / rpfm

Rusted PackFile Manager (RPFM) is a... reimplementation in Rust and Qt5 of PackFile Manager (PFM), one of the best modding tools for Total War Games.
MIT License
357 stars 57 forks source link

Shogun 2 dependency cache generation doesn't read Assembly Kit .xml DB files #242

Closed ComradeCheekiBreeki closed 1 year ago

ComradeCheekiBreeki commented 1 year ago

Describe your problem [Windows build ver. 4.0.12] There appears to be some problem at the moment with the automatic dependency cache generation tool, at least for Shogun 2 (it's the only Total War game I have installed right now). Despite about 1.5 solid hours of moving things around and trying all available methods of clearing the existing cache and ensuring files are in a readable location, the .xml db files in the Shogun 2 Assembly Kit simply are not being read by the cache generator, which causes a huge number of "missing table" warnings and makes table editing a PITA, especially for units and models.

Example: After generating dependency cache, the battle_animations_table table is missing from the dependencies, meaning I get warnings in the unit_stats_land table in my mod because it can't populate the drop-down in man_animations_table. image This is despite the fact that the file exists in raw_data/db and does not have any critical issues (since I can load it in TWeak). The cache generator either thinks that the file is already included in the .pack data (which it is not), or it can't find it in the first place. I didn't bother compiling RPFM to debug it, but looking at the source code, I don't think I could have figured it out anyway. Really I am at a loss as to the cause, I suspect it must be something related to text encoding or something like that because it seems very obscure.

Also, I feel I can rule out bad paths being the cause- Shogun 2, the Assembly Kit and RPFM are all installed on the C:/ drive, and probably a dozen different locations for the Assembly Kit were tried, including in the root, in the Shogun 2 install directory, in my Users folder (on my desktop specifically, where I install a lot of programs) and elsewhere. I also tried routing the directory to the raw_data and db folders directly but that also did not change anything. This is on top of reinstalling the kit multiple times and testing paths without whitespace.

Frodo45127 commented 1 year ago

Indeed, there was a bug in the code that read Assembly Kit files that caused it to silently fail for Shogun 2 on some tables. It's fixed for the next update (4.0.13). Thanks for the report.