diff --git a/data/presets/Beginner.yaml b/data/presets/Beginner.yaml index 4884d119..626622a7 100644 --- a/data/presets/Beginner.yaml +++ b/data/presets/Beginner.yaml @@ -25,11 +25,17 @@ World 1: chest_type_matches_contents: all_contents small_keys_in_fancy_chests: 'off' path_hints: '3' + path_hints_on_fi: 'off' + path_hints_on_gossip_stones: 'on' barren_hints: '2' + barren_hints_on_fi: 'off' + barren_hints_on_gossip_stones: 'on' location_hints: '7' + location_hints_on_fi: 'off' + location_hints_on_gossip_stones: 'on' item_hints: '3' - fi_hints: 'off' - gossip_stone_hints: 'on' + item_hints_on_fi: 'off' + item_hints_on_gossip_stones: 'on' song_hints: direct impa_sot_hint: 'on' cryptic_hint_text: 'off' diff --git a/data/presets/Chestless.yaml b/data/presets/Chestless.yaml index b0272417..a8c4d32d 100644 --- a/data/presets/Chestless.yaml +++ b/data/presets/Chestless.yaml @@ -25,11 +25,17 @@ World 1: chest_type_matches_contents: 'off' small_keys_in_fancy_chests: 'off' path_hints: '3' + path_hints_on_fi: 'on' + path_hints_on_gossip_stones: 'off' barren_hints: '2' + barren_hints_on_fi: 'on' + barren_hints_on_gossip_stones: 'off' location_hints: '7' + location_hints_on_fi: 'on' + location_hints_on_gossip_stones: 'off' item_hints: '3' - fi_hints: 'on' - gossip_stone_hints: 'off' + item_hints_on_fi: 'on' + item_hints_on_gossip_stones: 'off' song_hints: direct impa_sot_hint: 'on' cryptic_hint_text: 'off' diff --git a/data/presets/Max Settings.yaml b/data/presets/Max Settings.yaml index 7bf3b115..f8655b8f 100644 --- a/data/presets/Max Settings.yaml +++ b/data/presets/Max Settings.yaml @@ -25,11 +25,17 @@ World 1: chest_type_matches_contents: all_contents small_keys_in_fancy_chests: 'off' path_hints: '4' + path_hints_on_fi: 'off' + path_hints_on_gossip_stones: 'on' barren_hints: '3' + barren_hints_on_fi: 'off' + barren_hints_on_gossip_stones: 'on' location_hints: '7' + location_hints_on_fi: 'off' + location_hints_on_gossip_stones: 'on' item_hints: '3' - fi_hints: 'off' - gossip_stone_hints: 'on' + item_hints_on_fi: 'off' + item_hints_on_gossip_stones: 'on' song_hints: direct impa_sot_hint: 'on' cryptic_hint_text: 'off' diff --git a/data/settings_list.yaml b/data/settings_list.yaml index 30f7ec30..8efe6623 100644 --- a/data/settings_list.yaml +++ b/data/settings_list.yaml @@ -304,6 +304,26 @@ options: - 0-7: "Select the number of path hints you would like to generate." +- name: path_hints_on_fi + default_option: "off" + pretty_name: On Fi # Hint type is implied by groupbox + pretty_options: + - "Off" + - "On" + options: + - "off": "Path hints will not be placed on Fi." + - "on": "Path hints will be placed on Fi and can be seen by calling Fi and asking her for hints. If path hints are also on placed on gossip stones, then the hints will be split evenly between the two options." + +- name: path_hints_on_gossip_stones + default_option: "on" + pretty_name: On Gossip Stones # Hint type is implied by groupbox + pretty_options: + - "Off" + - "On" + options: + - "off": "Path hints will not be placed on gossip stones." + - "on": "Path hints will be placed on gossip stones and can be seen by talking to them. If path hints are also on placed on Fi, then the hints will be split evenly between the two options." + - name: barren_hints default_option: 2 pretty_name: Barren Hints @@ -312,6 +332,26 @@ options: - 0-7: "Select the number of barren hints you would like to generate." +- name: barren_hints_on_fi + default_option: "off" + pretty_name: On Fi # Hint type is implied by groupbox + pretty_options: + - "Off" + - "On" + options: + - "off": "Barren hints will not be placed on Fi." + - "on": "Barren hints will be placed on Fi and can be seen by calling Fi and asking her for hints. If barren hints are also on placed on gossip stones, then the hints will be split evenly between the two options." + +- name: barren_hints_on_gossip_stones + default_option: "on" + pretty_name: On Gossip Stones # Hint type is implied by groupbox + pretty_options: + - "Off" + - "On" + options: + - "off": "Barren hints will not be placed on gossip stones." + - "on": "Barren hints will be placed on gossip stones and can be seen by talking to them. If barren hints are also on placed on Fi, then the hints will be split evenly between the two options." + - name: location_hints default_option: 7 # assumes always_hints is on pretty_name: Location Hints @@ -320,6 +360,26 @@ options: - 0-7: "Select the number of location hints you would like to generate." +- name: location_hints_on_fi + default_option: "off" + pretty_name: On Fi # Hint type is implied by groupbox + pretty_options: + - "Off" + - "On" + options: + - "off": "Location hints will not be placed on Fi." + - "on": "Location hints will be placed on Fi and can be seen by calling Fi and asking her for hints. If location hints are also on placed on gossip stones, then the hints will be split evenly between the two options." + +- name: location_hints_on_gossip_stones + default_option: "on" + pretty_name: On Gossip Stones # Hint type is implied by groupbox + pretty_options: + - "Off" + - "On" + options: + - "off": "Location hints will not be placed on gossip stones." + - "on": "Location hints will be placed on gossip stones and can be seen by talking to them. If location hints are also on placed on Fi, then the hints will be split evenly between the two options." + - name: item_hints default_option: 3 pretty_name: Item Hints @@ -328,25 +388,25 @@ options: - 0-7: "Select the number of item hints you would like to generate." -- name: fi_hints - default_option: "on" - pretty_name: Fi Hints +- name: item_hints_on_fi + default_option: "off" + pretty_name: On Fi # Hint type is implied by groupbox pretty_options: - "Off" - "On" options: - - "off": "Hints will not be placed on Fi." - - "on": "Hints will be placed on Fi and can be seen by calling Fi and asking her for hints." + - "off": "Item hints will not be placed on Fi." + - "on": "Item hints will be placed on Fi and can be seen by calling Fi and asking her for hints. If item hints are also on placed on gossip stones, then the hints will be split evenly between the two options." -- name: gossip_stone_hints - default_option: "off" - pretty_name: Gossip Stone Hints +- name: item_hints_on_gossip_stones + default_option: "on" + pretty_name: On Gossip Stones # Hint type is implied by groupbox pretty_options: - "Off" - "On" options: - - "off": "Hints will not be placed on Gossip Stones." - - "on": "Hints will be placed on Gossip Stones and can be seen by talking to them." + - "off": "Item hints will not be placed on gossip stones." + - "on": "Item hints will be placed on gossip stones and can be seen by talking to them. If item hints are also on placed on Fi, then the hints will be split evenly between the two options." - name: song_hints default_option: "direct" diff --git a/gui/tracker.py b/gui/tracker.py index d7e8ca68..5d4ac38a 100644 --- a/gui/tracker.py +++ b/gui/tracker.py @@ -1697,7 +1697,7 @@ def update_areas_locations(self) -> None: self.world.assign_hint_regions_and_goal_locations() all_locations = self.world.get_all_item_locations() - if self.world.setting("gossip_stone_hints") == "on": + if self.world.is_placing_hints_on_gossip_stones(): all_locations.extend(self.world.get_gossip_stones()) for location in all_locations: for area_name in set( diff --git a/gui/ui/main.ui b/gui/ui/main.ui index e9123d72..777eb4df 100644 --- a/gui/ui/main.ui +++ b/gui/ui/main.ui @@ -36,7 +36,7 @@ QTabWidget::TabShape::Rounded - 0 + 5 @@ -2427,24 +2427,234 @@ - - - Gossip Stone Hints + + + Path Hints + + + false + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + On Fi + + + + + + + + 0 + 0 + + + + On Gossip Stones + + + + + + + + 0 + 0 + + + + + - - - Fi Hints + + + Barren Hints + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + On Fi + + + + + + + + 0 + 0 + + + + On Gossip Stones + + + + + + + + 0 + 0 + + + + + - - - Past Impa Stone of Trials Hint + + + Location Hints + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + On Fi + + + + + + + + 0 + 0 + + + + On Gossip Stones + + + + + + + + 0 + 0 + + + + + + + + + + + Item Hints + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + On Fi + + + + + + + + 0 + 0 + + + + On Gossip Stones + + + + + + + + 0 + 0 + + + + + @@ -2457,102 +2667,6 @@ - - - - 0 - - - - - Path Hints - - - - - - - - 0 - 0 - - - - - - - - - - 0 - - - - - Barren Hints - - - - - - - - 0 - 0 - - - - - - - - - - 0 - - - - - Location Hints - - - - - - - - 0 - 0 - - - - - - - - - - 0 - - - - - Item Hints - - - - - - - - 0 - 0 - - - - - - @@ -2567,6 +2681,13 @@ + + + + Past Impa Stone of Trials Hint + + + diff --git a/gui/ui/ui_main.py b/gui/ui/ui_main.py index 9bd53494..42b262ec 100644 --- a/gui/ui/ui_main.py +++ b/gui/ui/ui_main.py @@ -1596,102 +1596,132 @@ def setupUi(self, main_window): self.hints_group_box.setObjectName(u"hints_group_box") self.verticalLayout_23 = QVBoxLayout(self.hints_group_box) self.verticalLayout_23.setObjectName(u"verticalLayout_23") - self.setting_gossip_stone_hints = RandoTriStateCheckBox(self.hints_group_box) - self.setting_gossip_stone_hints.setObjectName(u"setting_gossip_stone_hints") - - self.verticalLayout_23.addWidget(self.setting_gossip_stone_hints) - - self.setting_fi_hints = RandoTriStateCheckBox(self.hints_group_box) - self.setting_fi_hints.setObjectName(u"setting_fi_hints") - - self.verticalLayout_23.addWidget(self.setting_fi_hints) - - self.setting_impa_sot_hint = RandoTriStateCheckBox(self.hints_group_box) - self.setting_impa_sot_hint.setObjectName(u"setting_impa_sot_hint") - - self.verticalLayout_23.addWidget(self.setting_impa_sot_hint) - - self.song_hints_label = QLabel(self.hints_group_box) - self.song_hints_label.setObjectName(u"song_hints_label") - - self.verticalLayout_23.addWidget(self.song_hints_label) - - self.setting_song_hints = QComboBox(self.hints_group_box) - self.setting_song_hints.setObjectName(u"setting_song_hints") - - self.verticalLayout_23.addWidget(self.setting_song_hints) - - self.path_hints_layout = QHBoxLayout() - self.path_hints_layout.setSpacing(0) - self.path_hints_layout.setObjectName(u"path_hints_layout") - self.path_hints_label = QLabel(self.hints_group_box) - self.path_hints_label.setObjectName(u"path_hints_label") - - self.path_hints_layout.addWidget(self.path_hints_label) - - self.setting_path_hints = QSpinBox(self.hints_group_box) + self.path_hints_group_box = QGroupBox(self.hints_group_box) + self.path_hints_group_box.setObjectName(u"path_hints_group_box") + self.path_hints_group_box.setFlat(False) + self.horizontalLayout_9 = QHBoxLayout(self.path_hints_group_box) + self.horizontalLayout_9.setObjectName(u"horizontalLayout_9") + self.horizontalLayout_9.setContentsMargins(5, 5, 5, 5) + self.setting_path_hints_on_fi = RandoTriStateCheckBox(self.path_hints_group_box) + self.setting_path_hints_on_fi.setObjectName(u"setting_path_hints_on_fi") + sizePolicy6.setHeightForWidth(self.setting_path_hints_on_fi.sizePolicy().hasHeightForWidth()) + self.setting_path_hints_on_fi.setSizePolicy(sizePolicy6) + + self.horizontalLayout_9.addWidget(self.setting_path_hints_on_fi) + + self.setting_path_hints_on_gossip_stones = RandoTriStateCheckBox(self.path_hints_group_box) + self.setting_path_hints_on_gossip_stones.setObjectName(u"setting_path_hints_on_gossip_stones") + sizePolicy6.setHeightForWidth(self.setting_path_hints_on_gossip_stones.sizePolicy().hasHeightForWidth()) + self.setting_path_hints_on_gossip_stones.setSizePolicy(sizePolicy6) + + self.horizontalLayout_9.addWidget(self.setting_path_hints_on_gossip_stones) + + self.setting_path_hints = QSpinBox(self.path_hints_group_box) self.setting_path_hints.setObjectName(u"setting_path_hints") sizePolicy6.setHeightForWidth(self.setting_path_hints.sizePolicy().hasHeightForWidth()) self.setting_path_hints.setSizePolicy(sizePolicy6) - self.path_hints_layout.addWidget(self.setting_path_hints) + self.horizontalLayout_9.addWidget(self.setting_path_hints) + + self.verticalLayout_23.addWidget(self.path_hints_group_box) - self.verticalLayout_23.addLayout(self.path_hints_layout) + self.barren_hints_group_box = QGroupBox(self.hints_group_box) + self.barren_hints_group_box.setObjectName(u"barren_hints_group_box") + self.horizontalLayout_10 = QHBoxLayout(self.barren_hints_group_box) + self.horizontalLayout_10.setObjectName(u"horizontalLayout_10") + self.horizontalLayout_10.setContentsMargins(5, 5, 5, 5) + self.setting_barren_hints_on_fi = RandoTriStateCheckBox(self.barren_hints_group_box) + self.setting_barren_hints_on_fi.setObjectName(u"setting_barren_hints_on_fi") + sizePolicy6.setHeightForWidth(self.setting_barren_hints_on_fi.sizePolicy().hasHeightForWidth()) + self.setting_barren_hints_on_fi.setSizePolicy(sizePolicy6) - self.barren_hints_layout = QHBoxLayout() - self.barren_hints_layout.setSpacing(0) - self.barren_hints_layout.setObjectName(u"barren_hints_layout") - self.barren_hints_label = QLabel(self.hints_group_box) - self.barren_hints_label.setObjectName(u"barren_hints_label") + self.horizontalLayout_10.addWidget(self.setting_barren_hints_on_fi) - self.barren_hints_layout.addWidget(self.barren_hints_label) + self.setting_barren_hints_on_gossip_stones = RandoTriStateCheckBox(self.barren_hints_group_box) + self.setting_barren_hints_on_gossip_stones.setObjectName(u"setting_barren_hints_on_gossip_stones") + sizePolicy6.setHeightForWidth(self.setting_barren_hints_on_gossip_stones.sizePolicy().hasHeightForWidth()) + self.setting_barren_hints_on_gossip_stones.setSizePolicy(sizePolicy6) - self.setting_barren_hints = QSpinBox(self.hints_group_box) + self.horizontalLayout_10.addWidget(self.setting_barren_hints_on_gossip_stones) + + self.setting_barren_hints = QSpinBox(self.barren_hints_group_box) self.setting_barren_hints.setObjectName(u"setting_barren_hints") sizePolicy6.setHeightForWidth(self.setting_barren_hints.sizePolicy().hasHeightForWidth()) self.setting_barren_hints.setSizePolicy(sizePolicy6) - self.barren_hints_layout.addWidget(self.setting_barren_hints) + self.horizontalLayout_10.addWidget(self.setting_barren_hints) + + + self.verticalLayout_23.addWidget(self.barren_hints_group_box) + self.location_hints_group_box = QGroupBox(self.hints_group_box) + self.location_hints_group_box.setObjectName(u"location_hints_group_box") + self.horizontalLayout_11 = QHBoxLayout(self.location_hints_group_box) + self.horizontalLayout_11.setObjectName(u"horizontalLayout_11") + self.horizontalLayout_11.setContentsMargins(5, 5, 5, 5) + self.setting_location_hints_on_fi = RandoTriStateCheckBox(self.location_hints_group_box) + self.setting_location_hints_on_fi.setObjectName(u"setting_location_hints_on_fi") + sizePolicy6.setHeightForWidth(self.setting_location_hints_on_fi.sizePolicy().hasHeightForWidth()) + self.setting_location_hints_on_fi.setSizePolicy(sizePolicy6) - self.verticalLayout_23.addLayout(self.barren_hints_layout) + self.horizontalLayout_11.addWidget(self.setting_location_hints_on_fi) - self.location_hints_layout = QHBoxLayout() - self.location_hints_layout.setSpacing(0) - self.location_hints_layout.setObjectName(u"location_hints_layout") - self.location_hints_label = QLabel(self.hints_group_box) - self.location_hints_label.setObjectName(u"location_hints_label") + self.setting_location_hints_on_gossip_stones = RandoTriStateCheckBox(self.location_hints_group_box) + self.setting_location_hints_on_gossip_stones.setObjectName(u"setting_location_hints_on_gossip_stones") + sizePolicy6.setHeightForWidth(self.setting_location_hints_on_gossip_stones.sizePolicy().hasHeightForWidth()) + self.setting_location_hints_on_gossip_stones.setSizePolicy(sizePolicy6) - self.location_hints_layout.addWidget(self.location_hints_label) + self.horizontalLayout_11.addWidget(self.setting_location_hints_on_gossip_stones) - self.setting_location_hints = QSpinBox(self.hints_group_box) + self.setting_location_hints = QSpinBox(self.location_hints_group_box) self.setting_location_hints.setObjectName(u"setting_location_hints") sizePolicy6.setHeightForWidth(self.setting_location_hints.sizePolicy().hasHeightForWidth()) self.setting_location_hints.setSizePolicy(sizePolicy6) - self.location_hints_layout.addWidget(self.setting_location_hints) + self.horizontalLayout_11.addWidget(self.setting_location_hints) - self.verticalLayout_23.addLayout(self.location_hints_layout) + self.verticalLayout_23.addWidget(self.location_hints_group_box) - self.item_hints_layout = QHBoxLayout() - self.item_hints_layout.setSpacing(0) - self.item_hints_layout.setObjectName(u"item_hints_layout") - self.item_hints_label = QLabel(self.hints_group_box) - self.item_hints_label.setObjectName(u"item_hints_label") + self.item_hints_group_box = QGroupBox(self.hints_group_box) + self.item_hints_group_box.setObjectName(u"item_hints_group_box") + self.horizontalLayout_12 = QHBoxLayout(self.item_hints_group_box) + self.horizontalLayout_12.setObjectName(u"horizontalLayout_12") + self.horizontalLayout_12.setContentsMargins(5, 5, 5, 5) + self.setting_item_hints_on_fi = RandoTriStateCheckBox(self.item_hints_group_box) + self.setting_item_hints_on_fi.setObjectName(u"setting_item_hints_on_fi") + sizePolicy6.setHeightForWidth(self.setting_item_hints_on_fi.sizePolicy().hasHeightForWidth()) + self.setting_item_hints_on_fi.setSizePolicy(sizePolicy6) - self.item_hints_layout.addWidget(self.item_hints_label) + self.horizontalLayout_12.addWidget(self.setting_item_hints_on_fi) - self.setting_item_hints = QSpinBox(self.hints_group_box) + self.setting_item_hints_on_gossip_stones = RandoTriStateCheckBox(self.item_hints_group_box) + self.setting_item_hints_on_gossip_stones.setObjectName(u"setting_item_hints_on_gossip_stones") + sizePolicy6.setHeightForWidth(self.setting_item_hints_on_gossip_stones.sizePolicy().hasHeightForWidth()) + self.setting_item_hints_on_gossip_stones.setSizePolicy(sizePolicy6) + + self.horizontalLayout_12.addWidget(self.setting_item_hints_on_gossip_stones) + + self.setting_item_hints = QSpinBox(self.item_hints_group_box) self.setting_item_hints.setObjectName(u"setting_item_hints") sizePolicy6.setHeightForWidth(self.setting_item_hints.sizePolicy().hasHeightForWidth()) self.setting_item_hints.setSizePolicy(sizePolicy6) - self.item_hints_layout.addWidget(self.setting_item_hints) + self.horizontalLayout_12.addWidget(self.setting_item_hints) + + + self.verticalLayout_23.addWidget(self.item_hints_group_box) + + self.song_hints_label = QLabel(self.hints_group_box) + self.song_hints_label.setObjectName(u"song_hints_label") + + self.verticalLayout_23.addWidget(self.song_hints_label) + self.setting_song_hints = QComboBox(self.hints_group_box) + self.setting_song_hints.setObjectName(u"setting_song_hints") - self.verticalLayout_23.addLayout(self.item_hints_layout) + self.verticalLayout_23.addWidget(self.setting_song_hints) self.setting_always_hints = RandoTriStateCheckBox(self.hints_group_box) self.setting_always_hints.setObjectName(u"setting_always_hints") @@ -1703,6 +1733,11 @@ def setupUi(self, main_window): self.verticalLayout_23.addWidget(self.setting_cryptic_hint_text) + self.setting_impa_sot_hint = RandoTriStateCheckBox(self.hints_group_box) + self.setting_impa_sot_hint.setObjectName(u"setting_impa_sot_hint") + + self.verticalLayout_23.addWidget(self.setting_impa_sot_hint) + self.chest_size_matches_contents_label = QLabel(self.hints_group_box) self.chest_size_matches_contents_label.setObjectName(u"chest_size_matches_contents_label") @@ -2840,7 +2875,7 @@ def setupUi(self, main_window): self.retranslateUi(main_window) - self.tab_widget.setCurrentIndex(0) + self.tab_widget.setCurrentIndex(5) QMetaObject.connectSlotsByName(main_window) @@ -3020,16 +3055,22 @@ def retranslateUi(self, main_window): self.excluded_hint_locations_free_search.setText("") self.excluded_hint_locations_free_search.setPlaceholderText(QCoreApplication.translate("main_window", u"Search", None)) self.hints_group_box.setTitle(QCoreApplication.translate("main_window", u"Hint Settings", None)) - self.setting_gossip_stone_hints.setText(QCoreApplication.translate("main_window", u"Gossip Stone Hints", None)) - self.setting_fi_hints.setText(QCoreApplication.translate("main_window", u"Fi Hints", None)) - self.setting_impa_sot_hint.setText(QCoreApplication.translate("main_window", u"Past Impa Stone of Trials Hint", None)) + self.path_hints_group_box.setTitle(QCoreApplication.translate("main_window", u"Path Hints", None)) + self.setting_path_hints_on_fi.setText(QCoreApplication.translate("main_window", u"On Fi", None)) + self.setting_path_hints_on_gossip_stones.setText(QCoreApplication.translate("main_window", u"On Gossip Stones", None)) + self.barren_hints_group_box.setTitle(QCoreApplication.translate("main_window", u"Barren Hints", None)) + self.setting_barren_hints_on_fi.setText(QCoreApplication.translate("main_window", u"On Fi", None)) + self.setting_barren_hints_on_gossip_stones.setText(QCoreApplication.translate("main_window", u"On Gossip Stones", None)) + self.location_hints_group_box.setTitle(QCoreApplication.translate("main_window", u"Location Hints", None)) + self.setting_location_hints_on_fi.setText(QCoreApplication.translate("main_window", u"On Fi", None)) + self.setting_location_hints_on_gossip_stones.setText(QCoreApplication.translate("main_window", u"On Gossip Stones", None)) + self.item_hints_group_box.setTitle(QCoreApplication.translate("main_window", u"Item Hints", None)) + self.setting_item_hints_on_fi.setText(QCoreApplication.translate("main_window", u"On Fi", None)) + self.setting_item_hints_on_gossip_stones.setText(QCoreApplication.translate("main_window", u"On Gossip Stones", None)) self.song_hints_label.setText(QCoreApplication.translate("main_window", u"Song Hints", None)) - self.path_hints_label.setText(QCoreApplication.translate("main_window", u"Path Hints", None)) - self.barren_hints_label.setText(QCoreApplication.translate("main_window", u"Barren Hints", None)) - self.location_hints_label.setText(QCoreApplication.translate("main_window", u"Location Hints", None)) - self.item_hints_label.setText(QCoreApplication.translate("main_window", u"Item Hints", None)) self.setting_always_hints.setText(QCoreApplication.translate("main_window", u"Prioritize Remote Location Hints", None)) self.setting_cryptic_hint_text.setText(QCoreApplication.translate("main_window", u"Cryptic Hint Text", None)) + self.setting_impa_sot_hint.setText(QCoreApplication.translate("main_window", u"Past Impa Stone of Trials Hint", None)) self.chest_size_matches_contents_label.setText(QCoreApplication.translate("main_window", u"Chest Type Matches Contents (CTMC)", None)) self.setting_small_keys_in_fancy_chests.setText(QCoreApplication.translate("main_window", u"Small Keys in Fancy Chests", None)) self.tab_widget.setTabText(self.tab_widget.indexOf(self.hints_tab), QCoreApplication.translate("main_window", u"Hints", None)) diff --git a/logic/hints.py b/logic/hints.py index 679b0a6d..2145ba7a 100644 --- a/logic/hints.py +++ b/logic/hints.py @@ -13,7 +13,7 @@ def generate_hints(worlds: list[World]) -> None: calculate_possible_barren_regions(worlds) for world in worlds: - hint_locations = [] + hint_locations: list[Location] = [] generate_impa_sot_hint(world) generate_song_hints(world, hint_locations) generate_path_hint_locations(world, hint_locations) @@ -33,40 +33,43 @@ def generate_hints(worlds: list[World]) -> None: num_location_hints = total_num_hints - total_made_hints generate_location_hint_locations(world, hint_locations, num_location_hints) - # Setup each possible hint placement option - hint_placement_options = [] - if world.setting("fi_hints") == "on": - hint_placement_options.append("fi_hints") - if world.setting("gossip_stone_hints") == "on": - hint_placement_options.append("gossip_stone_hints") - - # If no placement options were selected, don't use hints - if not hint_placement_options: - continue - - random.shuffle(hint_placement_options) - - hints_for_category = { - placement_option: [] for placement_option in hint_placement_options + hints_for_category: dict[str, list[Location]] = { + "fi_hints": [], + "gossip_stone_hints": [], } - # Distribute hints as evenly as possible among placement options + + # Distribute each hint to its appropriate placement option for i in range(len(hint_locations)): - # Iterate between the placement options on each index - placement_option = hint_placement_options[i % len(hint_placement_options)] - # Add the hint location to the selected placement option - hints_for_category[placement_option].append(hint_locations[i]) - logging.getLogger("").debug( - f'Hint for "{hint_locations[i]}" will be given to {placement_option}' + location = hint_locations[i] + type = location.hint.type.lower() + + type_on_fi = world.setting(f"{type}_hints_on_fi") == "on" + type_on_gossip_stones = ( + world.setting(f"{type}_hints_on_gossip_stones") == "on" ) - if ( - "gossip_stone_hints" in hints_for_category - and hints_for_category["gossip_stone_hints"] - ): + placement_option = "" + # If both options for the type are selected, then choose based on the current list index. + # All hints of a type should be consecutive in the list, so this works for evenly distributing them + if type_on_fi and type_on_gossip_stones: + placement_option = "fi_hints" if i % 2 else "gossip_stone_hints" + elif type_on_fi: + placement_option = "fi_hints" + elif type_on_gossip_stones: + placement_option = "gossip_stone_hints" + + if placement_option: + hints_for_category[placement_option].append(location) + logging.getLogger("").debug( + f'Hint for "{location}" will be given to {placement_option}' + ) + + if hints_for_category["gossip_stone_hints"]: assign_gossip_stone_hints( world, worlds, hints_for_category["gossip_stone_hints"] ) - if "fi_hints" in hints_for_category: + + if hints_for_category["fi_hints"]: world.fi_hints = hints_for_category["fi_hints"] @@ -322,14 +325,14 @@ def generate_path_hint_locations(world: World, hint_locations: list) -> None: goal_location = random.choice(goal_locations_list) - # If we're placing hints on gossip stones, don't choose any that somehow + # If we're placing path hints on gossip stones, don't choose any that somehow # manage to be before every possible gossip stone valid_path_locations = [ loc for loc in world.path_locations[goal_location] - if world.setting("gossip_stone_hints") == "off" + if world.setting("path_hints_on_gossip_stones") == "off" or ( - world.setting("gossip_stone_hints") == "on" + world.setting("path_hints_on_gossip_stones") == "on" and get_possible_gossip_stones(loc) ) ] @@ -459,6 +462,7 @@ def generate_location_hint_locations( always_locations.clear() random.shuffle(sometimes_locations) + random.shuffle(always_locations) for i in range(num_location_hints): hint_location = None @@ -606,6 +610,7 @@ def generate_location_hint_message(location: Location) -> None: ) location.hint.text = full_text + location.hint.type = "Location" def assign_gossip_stone_hints( diff --git a/logic/world.py b/logic/world.py index c2f322d6..de612ce3 100644 --- a/logic/world.py +++ b/logic/world.py @@ -858,3 +858,12 @@ def get_shuffled_entrances( ) -> list[Entrance]: entrances = self.get_shuffleable_entrances(entrance_type, only_primary) return [e for e in entrances if e.shuffled] + + def is_placing_hints_on_gossip_stones(self) -> None: + hint_types = ["path", "barren", "location", "item"] + return any( + [ + self.setting(f"{type}_hints_on_gossip_stones") == "on" + for type in hint_types + ] + ) diff --git a/max_entrance_rando.yaml b/max_entrance_rando.yaml new file mode 100644 index 00000000..64b24bcc --- /dev/null +++ b/max_entrance_rando.yaml @@ -0,0 +1,202 @@ +seed: TESTTESTTESTTESTTEST +generate_spoiler_log: true +use_plandomizer: false +plandomizer_file: None +World 1: + logic_rules: all_locations_reachable + item_pool: standard + enable_back_in_time: 'off' + gratitude_crystal_shuffle: 'on' + stamina_fruit_shuffle: 'off' + npc_closet_shuffle: vanilla + hidden_item_shuffle: 'off' + rupee_shuffle: vanilla + underground_rupee_shuffle: 'off' + beedle_shop_shuffle: junk_only + goddess_chest_shuffle: 'off' + trial_treasure_shuffle: '0' + full_wallet_upgrades: 'off' + skip_harp_playing: 'off' + random_trial_object_positions: none + randomize_skykeep_layout: 'off' + peatrice_conversations: '0' + small_keys: own_dungeon + lanayru_caves_keys: removed + boss_keys: own_dungeon + map_mode: own_dungeon_restricted + chest_type_matches_contents: all_contents + small_keys_in_fancy_chests: 'off' + path_hints: '3' + path_hints_on_fi: 'off' + path_hints_on_gossip_stones: 'on' + barren_hints: '2' + barren_hints_on_fi: 'off' + barren_hints_on_gossip_stones: 'on' + location_hints: '7' + location_hints_on_fi: 'off' + location_hints_on_gossip_stones: 'on' + item_hints: '3' + item_hints_on_fi: 'off' + item_hints_on_gossip_stones: 'on' + song_hints: direct + impa_sot_hint: 'on' + cryptic_hint_text: 'off' + always_hints: 'on' + random_starting_statues: 'on' + random_starting_spawn: anywhere + limit_starting_spawn: 'off' + randomize_dungeon_entrances: 'on' + randomize_trial_gate_entrances: 'on' + randomize_door_entrances: 'on' + decouple_double_doors: 'on' + randomize_interior_entrances: 'on' + randomize_overworld_entrances: 'on' + decouple_entrances: 'on' + natural_night_connections: 'on' + skip_horde: 'off' + skip_g3: 'off' + skip_demise: 'off' + required_dungeons: '2' + dungeons_include_sky_keep: 'off' + empty_unrequired_dungeons: 'on' + random_bottle_contents: 'off' + trap_mode: no_traps + trappable_items: major_items + burn_traps: 'on' + curse_traps: 'on' + noise_traps: 'on' + groose_traps: 'off' + health_traps: 'off' + ammo_availability: plentiful + boss_key_puzzles: vanilla_orientation + got_sword_requirement: true_master_sword + upgraded_skyward_strike: 'on' + faster_air_meter_depletion: 'off' + spawn_hearts: 'on' + damage_multiplier: '1' + unlock_all_groosenator_destinations: 'off' + language: english_us + tunic_swap: 'off' + lightning_skyward_strike: 'off' + starry_skies: 'off' + daytime_sky_color: default + nighttime_sky_color: default + daytime_cloud_color: default + nighttime_cloud_color: default + remove_enemy_music: 'off' + low_health_beeping_speed: normal + open_thunderhead: 'off' + open_lake_floria: open + open_earth_temple: 'on' + open_lmf: open + open_batreaux_shed: 'on' + shortcut_ios_bridge_complete: 'off' + shortcut_spiral_log_to_btt: 'on' + shortcut_logs_near_machi: 'off' + shortcut_faron_log_to_floria: 'off' + shortcut_deep_woods_log_before_tightrope: 'off' + shortcut_deep_woods_log_before_temple: 'on' + shortcut_eldin_entrance_boulder: 'off' + shortcut_eldin_ascent_boulder: 'off' + shortcut_vs_flames: 'off' + shortcut_lanayru_bars: 'off' + shortcut_west_wall_minecart: 'off' + shortcut_sand_oasis_minecart: 'off' + shortcut_minecart_before_caves: 'off' + shortcut_skyview_boards: 'off' + shortcut_skyview_bars: 'off' + shortcut_earth_temple_bridge: 'off' + shortcut_lmf_wind_gates: 'off' + shortcut_lmf_boxes: 'off' + shortcut_lmf_bars_to_west_side: 'off' + shortcut_ac_bridge: 'off' + shortcut_ac_water_vents: 'off' + shortcut_sandship_windows: 'off' + shortcut_sandship_brig_bars: 'off' + shortcut_fs_outside_bars: 'off' + shortcut_fs_lava_flow: 'on' + shortcut_sky_keep_sv_room_bars: 'on' + logic_early_lake_floria: 'off' + logic_beedles_island_cage_chest_dive: 'off' + logic_volcanic_island_dive: 'off' + logic_east_island_dive: 'off' + logic_advanced_lizalfos_combat: 'off' + logic_long_ranged_skyward_strikes: 'off' + logic_gravestone_jump: 'off' + logic_waterfall_cave_jump: 'off' + logic_bird_nest_item_from_beedles_shop: 'off' + logic_beedles_shop_with_bombs: 'off' + logic_stuttersprint: 'off' + logic_precise_beetle: 'off' + logic_bomb_throws: 'off' + logic_faron_woods_with_groosenator: 'off' + logic_itemless_first_timeshift_stone: 'off' + logic_brakeslide: 'off' + logic_lanayru_mine_quick_bomb: 'off' + logic_tot_skip_brakeslide: 'off' + logic_tot_slingshot: 'off' + logic_fire_node_without_hook_beetle: 'off' + logic_cactus_bomb_whip: 'off' + logic_skippers_fast_clawshots: 'off' + logic_skyview_spider_roll: 'off' + logic_skyview_coiled_rupee_jump: 'off' + logic_skyview_precise_slingshot: 'off' + logic_et_keese_skyward_strike: 'off' + logic_et_slope_stuttersprint: 'off' + logic_et_bombless_scaldera: 'off' + logic_lmf_whip_switch: 'off' + logic_lmf_ceiling_precise_slingshot: 'off' + logic_lmf_whip_armos_room_timeshift_stone: 'off' + logic_lmf_minecart_jump: 'off' + logic_lmf_bellowsless_moldarach: 'off' + logic_ac_lever_jump_trick: 'off' + logic_ac_chest_after_whip_hooks_jump: 'off' + logic_sandship_jump_to_stern: 'off' + logic_sandship_itemless_spume: 'off' + logic_sandship_no_combination_hint: 'off' + logic_fs_pillar_jump: 'off' + logic_fs_practice_sword_ghirahim_2: 'off' + logic_present_bow_switches: 'off' + logic_skykeep_vineclip: 'off' + starting_sword: goddess_sword + random_starting_tablet_count: '1' + random_starting_item_count: '0' + starting_hearts: '6' + starting_inventory: + - Hylian Shield + - Progressive Pouch + - Scrapper + - Skyview Temple Map + - Earth Temple Map + - Lanayru Mining Facility Map + - Ancient Cistern Map + - Sandship Map + - Fire Sanctuary Map + - Sky Keep Map + excluded_locations: + - Knight Academy - Deliver Kikwi to Owlan + - Upper Skyloft - 600 Points in Pumpkin Pull + - Central Skyloft - Peatrice's Love + - Batreaux's House - 70 Gratitude Crystals First Reward + - Batreaux's House - 70 Gratitude Crystals Second Reward + - Batreaux's House - 80 Gratitude Crystals Reward + - Lumpy Pumpkin - Harp Duet with Kina + - Lumpy Pumpkin - Deliver Mogma to Kina + - Fun Fun Island - 500 Rupees in Dodoh's High Dive + - The Sky - Form a Swirrell Ring above Volcanic Island + - The Sky - Form a Swirrell Ring above Lumpy Pumpkin + - The Sky - Form a Swirrell Ring above Bamboo Island + - Inside the Thunderhead - Song from Levias + - Bug Heaven - 10 Bugs in 3 Minutes + - Shipyard - Heart Stopping Rickety Coaster Track in 1'05 + - The Goddess's Silent Realm - Collect all Tears Reward + - Farore's Silent Realm - Collect all Tears Reward + - Nayru's Silent Realm - Collect all Tears Reward + - Din's Silent Realm - Collect all Tears Reward + excluded_hint_locations: + - Shipyard - Gossip Stone after First Minecart Track + mixed_entrance_pools: + - [] + - [] + - [] + - [] diff --git a/tests/test_configs/all_hints.yaml b/tests/test_configs/all_hints.yaml index 81cbe296..b7630d69 100644 --- a/tests/test_configs/all_hints.yaml +++ b/tests/test_configs/all_hints.yaml @@ -1,10 +1,16 @@ seed: TESTTESTTEST World 1: - path_hints: "7" - barren_hints: "7" - item_hints: "7" - location_hints: "7" - fi_hints: "on" - gossip_stone_hints: "on" + path_hints: '7' + path_hints_on_fi: 'on' + path_hints_on_gossip_stones: 'on' + barren_hints: '7' + barren_hints_on_fi: 'on' + barren_hints_on_gossip_stones: 'on' + location_hints: '7' + location_hints_on_fi: 'on' + location_hints_on_gossip_stones: 'on' + item_hints: '3' + item_hints_on_fi: 'on' + item_hints_on_gossip_stones: 'on' song_hints: direct impa_sot_hint: "on" diff --git a/tests/test_configs/fi_hints.yaml b/tests/test_configs/fi_hints.yaml index 518e9eff..85a6ff2c 100644 --- a/tests/test_configs/fi_hints.yaml +++ b/tests/test_configs/fi_hints.yaml @@ -1,7 +1,14 @@ seed: TESTTESTTEST World 1: - path_hints: "7" - barren_hints: "7" - item_hints: "7" - location_hints: "7" - fi_hints: "on" + path_hints: '7' + path_hints_on_fi: 'on' + path_hints_on_gossip_stones: 'off' + barren_hints: '7' + barren_hints_on_fi: 'on' + barren_hints_on_gossip_stones: 'off' + location_hints: '7' + location_hints_on_fi: 'on' + location_hints_on_gossip_stones: 'off' + item_hints: '7' + item_hints_on_fi: 'on' + item_hints_on_gossip_stones: 'off' diff --git a/tests/test_configs/gossip_stone_hints.yaml b/tests/test_configs/gossip_stone_hints.yaml index 7be9da58..13d6aabe 100644 --- a/tests/test_configs/gossip_stone_hints.yaml +++ b/tests/test_configs/gossip_stone_hints.yaml @@ -4,4 +4,3 @@ World 1: barren_hints: "7" item_hints: "7" location_hints: "7" - gossip_stone_hints: "on" diff --git a/tests/test_configs/spoiler_as_config.yaml b/tests/test_configs/spoiler_as_config.yaml index 0d3c1d62..1a800f9c 100644 --- a/tests/test_configs/spoiler_as_config.yaml +++ b/tests/test_configs/spoiler_as_config.yaml @@ -24,11 +24,17 @@ World 1: chest_type_matches_contents: random small_keys_in_fancy_chests: random path_hints: random + path_hints_on_fi: random + path_hints_on_gossip_stones: random barren_hints: random + barren_hints_on_fi: random + barren_hints_on_gossip_stones: random location_hints: random + location_hints_on_fi: random + location_hints_on_gossip_stones: random item_hints: random - fi_hints: random - gossip_stone_hints: random + item_hints_on_fi: random + item_hints_on_gossip_stones: random song_hints: random impa_sot_hint: random cryptic_hint_text: random