-
Notifications
You must be signed in to change notification settings - Fork 638
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
alttp: Add second power star to differentiate otherworld progression items #2139
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
import worlds.Files | ||
|
||
LTTPJPN10HASH: str = "03a63945398191337e896e5771f77173" | ||
RANDOMIZERBASEHASH: str = "9952c2a3ec1b421e408df0d20c8f0c7f" | ||
RANDOMIZERBASEHASH: str = "8719f420b587adac8d3750792d46e5bd" | ||
ROM_PLAYER_LIMIT: int = 255 | ||
|
||
import io | ||
|
@@ -762,11 +762,16 @@ def write_to_rom(self, rom: LocalRom): | |
0x4D504, 0x4D507, 0x4D55E, 0x4D56A] | ||
|
||
|
||
def get_nonnative_item_sprite(code: int) -> int: | ||
def get_nonnative_item_sprite(code: int, advancement: bool) -> int: | ||
if 84173 >= code >= 84007: # LttP item in SMZ3 | ||
return code - 84000 | ||
return 0x6B # set all non-native sprites to Power Star as per 13 to 2 vote at | ||
# Set all non-native sprites to a gold Power Star for advancement | ||
# items and a silver Power Star for non-advancement items as per 13 to 2 vote at | ||
# https://discord.com/channels/731205301247803413/827141303330406408/852102450822905886 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment regarding the vote seems at least somewhat misleading now, since that was not about gold vs. silver at all. |
||
if advancement: | ||
return 0x69 # Gold Power Star | ||
else: | ||
return 0x6B # Silver Power Star | ||
|
||
|
||
def patch_rom(world: MultiWorld, rom: LocalRom, player: int, enemized: bool): | ||
|
@@ -787,7 +792,7 @@ def patch_rom(world: MultiWorld, rom: LocalRom, player: int, enemized: bool): | |
if location.item.trap: | ||
itemid = 0x5A # Nothing, which disguises | ||
else: | ||
itemid = get_nonnative_item_sprite(location.item.code) | ||
itemid = get_nonnative_item_sprite(location.item.code, location.item.advancement) | ||
# Keys in their native dungeon should use the orignal item code for keys | ||
elif location.parent_region.dungeon: | ||
if location.parent_region.dungeon.is_dungeon_item(location.item): | ||
|
@@ -1741,7 +1746,8 @@ 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(world.worlds[item['player']].item_name_to_id[item['item']]) | ||
item_code = get_nonnative_item_sprite(world.worlds[item['player']].item_name_to_id[item['item']], | ||
shop.region.locations[index].item.advancement) | ||
else: | ||
item_code = ItemFactory(item['item'], player).code | ||
if item['item'] == 'Single Arrow' and item['player'] == 0 and world.retro_bow[player]: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why is the golden one called "a Blue Power Star", while the silver one is "a Power Star"?
(Although I am not sure whether that hint text is ever actually used for otherworld items.)