-
Notifications
You must be signed in to change notification settings - Fork 233
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
Enable hint distribution to exclude specific goal categories for goal hints #2271
Enable hint distribution to exclude specific goal categories for goal hints #2271
Conversation
I feel like for consistency with the # Initialize default goals for win condition
self.goal_categories: dict[str, GoalCategory] = OrderedDict()
if self.hint_dist_user['use_default_goals']:
self.set_goals()
+ for cat in self.hint_dist_user.get('excluded_goal_categories', []):
+ try:
+ del self.goal_categories[cat]
+ except KeyError:
+ pass # don't crash when a hint distro doesn't exist due to selected settings |
would adding that behavior eliminate the need for the changes in |
Yes. |
…for goal hints" This reverts commit 27f3d75.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this implementation is now significantly different from what's being used in SGL, I'm going to require some basic testing: Does it correctly affect both hints and AGR? I'm not sure if I'll have time to test this myself today, so if anyone would like to help get this PR merged, please report your findings.
We're giving this PR an exemption from the ongoing feature freeze since it's making a hints change from this release cycle configurable. |
Agreed that it needs testing. |
Tested using ootrstats: $ ootrstats-supervisor -u Elagatua -b feature/exclude-specific-goal-categories --preset=tournament --json-settings='{"reachable_locations": "goals", "hint_dist_user": {"name": "test", "gui_name": "Test", "description": "Test", "add_locations": [], "remove_locations": [], "add_items": [], "remove_items": [], "dungeons_woth_limit": 40, "dungeons_barren_limit": 40, "named_items_required": true, "vague_named_items": false, "use_default_goals": true, "upgrade_hints": "on", "distribution": {"always": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 1}, "trial": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 1}, "goal": {"order": 3, "weight": 0.0, "fixed": 40, "copies": 1}, "junk": {"order": 4, "weight": 0.0, "fixed": 40, "copies": 1}}, "excluded_goal_categories": ["ganon"]}}' categorize '.gossip_stones[].text | select(contains("on the path of"))'
$ ootrstats-supervisor -u Elagatua -b feature/exclude-specific-goal-categories --preset=tournament --json-settings='{"reachable_locations": "goals", "hint_dist_user": {"name": "test", "gui_name": "Test", "description": "Test", "add_locations": [], "remove_locations": [], "add_items": [], "remove_items": [], "dungeons_woth_limit": 40, "dungeons_barren_limit": 40, "named_items_required": true, "vague_named_items": false, "use_default_goals": true, "upgrade_hints": "on", "distribution": {"always": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 1}, "trial": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 1}, "goal": {"order": 3, "weight": 0.0, "fixed": 40, "copies": 1}, "junk": {"order": 4, "weight": 0.0, "fixed": 40, "copies": 1}}, "excluded_goal_categories": ["ganon"]}}' categorize '.[":goal_locations"].ganon'
8152x: null
$ ootrstats-supervisor --clean -u Elagatua -b feature/exclude-specific-goal-categories --preset=tournament --json-settings='{"reachable_locations": "goals", "hint_dist_user": {"name": "test", "gui_name": "Test", "description": "Test", "add_locations": [], "remove_locations": [], "add_items": [], "remove_items": [], "dungeons_woth_limit": 40, "dungeons_barren_limit": 40, "named_items_required": true, "vague_named_items": false, "use_default_goals": true, "upgrade_hints": "on", "distribution": {"always": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 1}, "trial": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 1}, "goal": {"order": 3, "weight": 0.0, "fixed": 40, "copies": 1}, "junk": {"order": 4, "weight": 0.0, "fixed": 40, "copies": 1}}, "excluded_goal_categories": []}}' categorize '.[":goal_locations"].ganon'
112x: {"Path of the hero":{"GC Maze Left Chest":"Light Arrows"}}
105x: {"Path of the hero":{"Graveyard Shield Grave Chest":"Light Arrows"}}
102x: {"Path of the hero":{"ZD Chest":"Light Arrows"}}
[…]
$ ootrstats-supervisor -u Elagatua -b feature/exclude-specific-goal-categories --preset=tournament --json-settings='{"reachable_locations": "goals", "hint_dist_user": {"name": "test", "gui_name": "Test", "description": "Test", "add_locations": [], "remove_locations": [], "add_items": [], "remove_items": [], "dungeons_woth_limit": 40, "dungeons_barren_limit": 40, "named_items_required": true, "vague_named_items": false, "use_default_goals": true, "upgrade_hints": "on", "distribution": {"always": {"order": 1, "weight": 0.0, "fixed": 0, "copies": 1}, "trial": {"order": 2, "weight": 0.0, "fixed": 0, "copies": 1}, "goal": {"order": 3, "weight": 0.0, "fixed": 40, "copies": 1}, "junk": {"order": 4, "weight": 0.0, "fixed": 40, "copies": 1}}, "excluded_goal_categories": []}}' categorize '.gossip_stones[].text | select(contains("on the path of"))'
607x: "They say that #Kakariko Village# is on the path of #the hero#."
295x: "They say that #the Sacred Forest Meadow# is on the path of #the hero#."
267x: "They say that #the Ice Cavern# is on the path of #the hero#."
[…] In summary, |
This feature was created for the SGL 2024 settings which needed to have Path of the Hero hints disabled.
A
excluded_goal_categories
key can be defined in the hint distribution file along with an array of goal category names. Any goal category in the array will not be selected when generating goal hints.