diff --git a/dist/DarkSoulsItemRandomizer.exe b/dist/DarkSoulsItemRandomizer.exe index 00251d0..73e1da0 100644 Binary files a/dist/DarkSoulsItemRandomizer.exe and b/dist/DarkSoulsItemRandomizer.exe differ diff --git a/hint_setup.py b/hint_setup.py index 84a00f4..71974d6 100644 --- a/hint_setup.py +++ b/hint_setup.py @@ -204,6 +204,7 @@ def __init__(self): self.key_items = [] self.big_keys = [] self.hint_list = [] + self.hint_locations = HINT_LOCATIONS.copy() def AddItemOrLocationToHintBuilder(self, itemlotpart, loc_id): item_name = "" @@ -269,6 +270,29 @@ def AddHintsToBloodMessages(self, blood_messages: fmg_handler.FMGHandler, rng: r hint_index = 0 for event in blood_messages.messages: - if event.id in HINT_LOCATIONS and hint_index < len(self.hint_list): + if event.id in self.hint_locations and hint_index < len(self.hint_list): event.text = self.hint_list[hint_index] - hint_index += 1 \ No newline at end of file + self.hint_locations[event.id]["new_text"] = event.text + hint_index += 1 + + def WriteDebugFile(self, filepath: str): + """ + Prints the seed's hint locations into a file at the provided filepath + """ + + hint_debug_text = "" + + for location_id in self.hint_locations: + location = self.hint_locations[location_id] + + # Remove the line break introduced into the hint text for the game + single_line_hint = location["new_text"].replace("\n", "") + + # Each hint will be a single line, " - : " + hint_debug_text += ( + f"{location['area']} - {location['original_text']}: " + f"{single_line_hint}\n" + ) + + with open(filepath, 'w') as f: + f.write(hint_debug_text) \ No newline at end of file diff --git a/randomizer_gui.py b/randomizer_gui.py index 9f79ab2..c7a0643 100644 --- a/randomizer_gui.py +++ b/randomizer_gui.py @@ -538,6 +538,7 @@ def export_seed_info(self, use_randomized_data=None): CHEATSHEET_FILEPATH = os.path.join(new_dirpath, "cheatsheet.txt") HINTSHEET_FILEPATH = os.path.join(new_dirpath, "hintsheet.txt") SEEDINFO_FILEPATH = os.path.join(new_dirpath, "seed_info.txt") + HINTDEBUG_FILEPATH = os.path.join(new_dirpath, "hint_debug.txt") with open(ITEMLOT_FILEPATH, 'wb') as f: f.write(ilp_binary_export) @@ -551,6 +552,9 @@ def export_seed_info(self, use_randomized_data=None): f.write(hint_string) with open(SEEDINFO_FILEPATH, 'w') as f: f.write(seed_info) + + if (self.set_up_hints.get()): + table.hint_builder.WriteDebugFile(HINTDEBUG_FILEPATH) if not use_randomized_data: self.msg_continue_button.lower()