Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified dist/DarkSoulsItemRandomizer.exe
Binary file not shown.
28 changes: 26 additions & 2 deletions hint_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down Expand Up @@ -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
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, "<location> - <original message>: <hint message>"
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)
4 changes: 4 additions & 0 deletions randomizer_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down