-
Notifications
You must be signed in to change notification settings - Fork 751
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
LTTP/SM/SMZ3: Show correct item icon for cross-game items #1112
Conversation
@@ -1730,7 +1732,7 @@ def write_custom_shops(rom, world, player): | |||
replacement_price_data = get_price_data(item['replacement_price'], item['replacement_price_type']) | |||
slot = 0 if shop.type == ShopType.TakeAny else index | |||
if item['player'] and world.game[item['player']] != "A Link to the Past": # item not native to ALTTP | |||
item_code = get_nonnative_item_sprite(item['item']) |
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.
This seems janky but I don't know how else to get an item code from just the name. But also I think a lot of the shop code is janky and should be rewritten at some point.
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.
world.item_name_to_id: dict[str, int]
LTTP items that aren't valid items in SMZ3 need to be filtered out. Triforce piece has the correct icon if you're in the LTTP side of SMZ3, but will identify it as "a junk item" and in SM side it will have a non-progression AP icon and show no item name when collected. Not sure the easiest way to do this since item names do not match and the item codes are in properties of a class. I could do a big converstion dict like with SM items but it would be a lot of items |
I have concerns with world implementations hard coding information that exists in other world implementations. In my opinion, world implementations should not need to know anything about other worlds and also, if another world maintainer changes a name or id, this would break. Also, thinking forward, I don't want to set the precedent, "Hey it's okay to code info from another world implementation because their interaction would be neat." It's a nice to have, for sure, but I think the cons outweigh the pros. |
@lordlou is this something conceptually you'd like? |
I personally like the idea but that opinion might be biased because I know AP well. Since it changes a behavior that was uniform across all games (I think?), it might confuse some players. That being said, maybe a vote could help us decide (see https://discord.com/channels/731205301247803413/731214280439103580/934522580864471061). If the vote is in favor, maybe a core feature could be added to supply a matching list of ItemID that games can query. Also, maybe it would be worth making it an option since it is relevant only to each local player. |
Fix bottle content item errors Co-authored-by: lordlou <[email protected]>
… possible additions to SM
# Conflicts: # worlds/sm/__init__.py # worlds/smz3/TotalSMZ3/Patch.py
# Conflicts: # worlds/sm/__init__.py
Co-authored-by: Fabian Dill <[email protected]>
# Conflicts: # worlds/sm/__init__.py
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.
I haven't actually tested this, nor do I want to. However, given that these are some of the most played games, issues should be found during testing phase fingers crossed.
…oMW#1112) Co-authored-by: lordlou <[email protected]> Co-authored-by: Fabian Dill <[email protected]>
…oMW#1112) Co-authored-by: lordlou <[email protected]> Co-authored-by: Fabian Dill <[email protected]>
What is this fixing or adding?
Adds functionality to LTTP, Super Metroid, and SMZ3 to show the correct, corresponding item icon for items from the other game worlds, instead of stars or AP icons.
How was this tested?
Generating multiworlds containing all three games, playtesting and seeing the correct item graphics. Further testing should be done to ensure everything looks correct.
If this makes graphical changes, please attach screenshots.
You'll have to take my word for it that this is a Super Metroid item being found in SMZ3