Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Hint Importance" option #394

Merged
merged 3 commits into from
Jul 5, 2024
Merged

Conversation

tanjo3
Copy link
Contributor

@tanjo3 tanjo3 commented Jun 18, 2024

This PR adds a new hint option called "Hint Importance". When this setting is enabled, item and location hints are slightly modified to include information if the reward is required, possibly required, or not required. This setting has been added somewhat recently to other randomizers (Majora's Mask and Twilight Princess randomizers, for instance). I'm using the naming convention from the OoTMM cross randomizer. This is an optional setting, disabled by default.

If this setting is disabled, then hints are written as before. If this setting is enabled, generated item and location hints may be modified with this importance information. This information is already determined when generating path and barren hints, so no additional logic processing needs to be done.

An item that is required is an item that is required for at least one of the path goals in the randomized seed. An item that is not required is an item that the player does not need to collect to complete all the path goals. An item that is possibly required is an item that may be used to accomplish a path goal, but there may be a different path to that goal that does not use that item. This follows from the path and barren logic of hints already in the randomizer.

Below are two examples of item hints (on the King of Red Lions), showing examples of items being hinted as possibly required and not required:


In the second example, the hinted Tingle statue is not required because the item on the Ankle check (which is the only check directly locked behind Tingle statues) is also not required. However, the Ankle check is a logical location in the seed (i.e., the Miscellaneous category of locations is on). Non-progress items do not include importance information, even with the hint importance options turned on, because they are trivially non-required. A quick benefit of the setting is that if sunken treasure from Triforce Charts and cryptic hints are off, the reader can quickly tell the difference between a hinted Triforce Shard and Triforce Chart since a hint for a shard will note that it is required and a hint for a chart will contain no additional information. This is a frequent misread for runners. Additionally, note the color highlighting of the hint importance text.

Here is an example of a location hint for a required item:

Since the Savage Labyrinth and Octo Fairy hints are item and location hints, respectively, they, too, are affected by the setting. The Savage Labyrinth stone tablet follows a similar syntax for other location hints:

The colors for the tablet text are different, so I couldn't quite get the same palette, but the highlighting is the important part (for ease of readability), not necessarily the exact colors.

The Octo Fairy's text is modified to incorporate the importance, as shown below:

The original text (i.e., with the hint importance option off) would say, "A piece of the power of the gods, which may help you on your quest." If hint importance is on and the hinted item is not required, the following text box would say, "Though if you still desire such an item, you must journey to that place." Otherwise, the original text of "When you find you have need of such an item, you must journey to that place." is used. I made this change since saying that an item is not required and then saying "when you need the item..." sounds awkward.

Some additional implementation notes: since the Savage Labyrinth and Octo Fairy require the hint importance information, and this information is calculated in the call to generate_hints() in randomizers/hints.py, I've moved this call to before either the Savage Labyrinth and Octo Fairy hints are generated. This doesn't affect hint generation. Also, dungeon keys are conventionally not considered path items when key-lunacy is disabled since getting a path hint for the DRC Small Key in the first room would feel pretty bad (as an example). However, if a location containing a dungeon key is selected for a location hint, we don't want to say that the key is not required when it obviously is. As such, the filter for dungeon keys in non-key-lunacy seeds is moved to after get_required_locations_for_paths() and all path locations (including keys) have been recorded in self.path_locations. Finally, since remote location hints are necessarily determined before path or barren hints, the setting of the importance of these items is deferred until both path and barren hints are generated.

randomizers/hints.py Outdated Show resolved Hide resolved
@LagoLunatic LagoLunatic merged commit 8cf6ba3 into LagoLunatic:master Jul 5, 2024
8 checks passed
@tanjo3 tanjo3 deleted the hint-importance branch July 5, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants