Super Mario 64: Universal Tracker support - #6259
Conversation
N00byKing
left a comment
There was a problem hiding this comment.
I previously mentioned in discord that I am not a fan of adding tracker-specific info in slot data.
But tbh I've since mellowed out a lot, so I don't really mind anymore.
However, the slot_option_names list especially is a bit annoying.
For future updates this can really cause issues, and I feel it should be somehow automatic from the option definitions.
| for cost_name in ("FirstBowserDoorCost", "BasementDoorCost", "SecondFloorDoorCost", | ||
| "MIPS1Cost", "MIPS2Cost", "StarsToFinish"): | ||
| if cost_name in slot_data: | ||
| self.star_costs[cost_name] = slot_data[cost_name] | ||
| if "MoveRandoVec" in slot_data: | ||
| self.move_rando_bitvec = slot_data["MoveRandoVec"] |
There was a problem hiding this comment.
Can you move this to the top if slot_data block and early return there instead?
There was a problem hiding this comment.
Shifted code into the if block, added return, added a return for UT gen pass on create_items to prevent crashes when checking uninitialized world properties.
| slot_option_names = ( | ||
| "area_rando", | ||
| "buddy_checks", | ||
| "exclamation_boxes", | ||
| "progressive_keys", | ||
| "enable_coin_stars", | ||
| "enable_locked_paintings", | ||
| "enable_move_rando", | ||
| "move_rando_actions", | ||
| "strict_cap_requirements", | ||
| "strict_cannon_requirements", | ||
| "strict_move_requirements", | ||
| "amount_of_stars", | ||
| "first_bowser_star_door_cost", | ||
| "basement_star_door_cost", | ||
| "second_floor_star_door_cost", | ||
| "mips1_cost", | ||
| "mips2_cost", | ||
| "stars_to_finish", | ||
| "death_link", | ||
| "completion_type", | ||
| ) |
There was a problem hiding this comment.
Can this somehow be generated from the definitions in options.py?
There was a problem hiding this comment.
Can this somehow be generated from the definitions in options.py?
Could you be more specific about what you mean?
There was a problem hiding this comment.
So this list is just a list of all the options right?
I really dont want to hardcode this list, it should be somehow inferred, maybe from the dataclass or the options object
There was a problem hiding this comment.
Problem is you DON'T want all options in slot data. Only ones that change logic generation. Archipelago already handles starting items for example. So adding all yaml options would just be bloat. You could automate a list tho, and blacklist unwanted ones. Just need to update the blacklist if AP adds new global options to yamls instead of updating a whitelist when adding new options.
There was a problem hiding this comment.
Flags are now added to option classes and the list is generated from these flags.
|
|
||
|
|
||
| class SM64DeathLink(DeathLink): | ||
| include_in_slot_data = True |
There was a problem hiding this comment.
Why does deathlink have to be in as well?
There was a problem hiding this comment.
Mistake. DeathLink is covered by a separate key in slot data. It has been fixed.
What is this fixing or adding?
Adds Universal Tracker support to Super Mario 64
How was this tested?
Comparing spoiler log to observed locations. Unit tests.
