Grimrukh / soulstruct

Python tools for inspecting and modifying FromSoft games (mainly Dark Souls 1).
144 stars 16 forks source link

Elden Ring DLC text missing #28

Open above-c-level opened 2 months ago

above-c-level commented 2 months ago

Hey there! TL;DR: I cannot figure out how to get DLC text working within soulstruct and any advice would be appreciated.

Initially I had issue importing any of the text code in Python due to this refactor, which was fixed by removing from .msgbnd import MSGBND due to its incorporation within MSGDirectory (I think?).

From there, I tried modifying file_name_re = re.compile(r"^(item|menu)\.msgbnd(\.dcx)?$") to something like file_name_re = re.compile(r"^(item|menu)(\_dlc\d+)?\.msgbnd(\.dcx)?$"), and storing the corresponding DLC text within the corresponding files dict, passing to the .create_fmgs function, as well as instead treating files as a Dict[str, List[Binder]] and passing those lists into .create_fmgs. After a bit I reverted my changes when I discovered the merge_base_and_patch function.

I noticed there was no override in Elden Ring's msg_directory.py file for BASE_PATCH_FMGS like there is in e.g. Dark Souls 1: Prepare to Die Edition's msg_directory.py file.

Am I correct in believing this is where information should go for allowing editing of the DLC text? Is there some other approach I should be taking? I basically want to spice up my NG+ gameplay by running all of the text in the game through Google translate a bunch of times in a row. All of the translation code works, I just need to iterate over all the items and menu text, export them, and patch them into the game.

Thanks in advance and thanks for the truly impressive work you've already done on this project, I wish I had known about it sooner!