Skip to content

Commit

Permalink
Merge 'Make �Minor Items in Big/Gold chests� a multiselect and add �D…
Browse files Browse the repository at this point in the history
…eku Stick & Nut Capacity� option' (#2100)
  • Loading branch information
cjohnson57 committed Nov 29, 2023
2 parents 38524f8 + 337b7e1 commit 36eec6d
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 32 deletions.
33 changes: 21 additions & 12 deletions Patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -2241,34 +2241,43 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p
HEART_CHEST_BIG = 17
if world.settings.shuffle_tcgkeys == 'vanilla':
# Force key chests in Treasure Chest Game to use the default chest texture when not shuffled
item = read_rom_item(rom, 0x71)
item = read_rom_item(rom, 0x0071)
item['chest_type'] = BROWN_CHEST
write_rom_item(rom, 0x71, item)
if world.settings.free_bombchu_drops or world.settings.minor_items_as_major_chest:
bombchu_ids = [0x6A, 0x03, 0x6B]
write_rom_item(rom, 0x0071, item)
if world.settings.free_bombchu_drops or 'bombchus' in world.settings.minor_items_as_major_chest:
bombchu_ids = [0x006A, 0x0003, 0x006B]
for i in bombchu_ids:
item = read_rom_item(rom, i)
item['chest_type'] = GILDED_CHEST
write_rom_item(rom, i, item)
if world.settings.bridge == 'tokens' or world.settings.lacs_condition == 'tokens' or world.settings.shuffle_ganon_bosskey == 'tokens':
item = read_rom_item(rom, 0x5B)
item = read_rom_item(rom, 0x005B)
item['chest_type'] = SKULL_CHEST_BIG
write_rom_item(rom, 0x5B, item)
write_rom_item(rom, 0x005B, item)
if world.settings.bridge == 'hearts' or world.settings.lacs_condition == 'hearts' or world.settings.shuffle_ganon_bosskey == 'hearts':
heart_ids = [0x3D, 0x3E, 0x76]
heart_ids = [0x003D, 0x003E, 0x0076]
for i in heart_ids:
item = read_rom_item(rom, i)
item['chest_type'] = HEART_CHEST_BIG
write_rom_item(rom, i, item)
if world.settings.minor_items_as_major_chest:
if 'shields' in world.settings.minor_items_as_major_chest:
# Deku
item = read_rom_item(rom, 0x29)
item = read_rom_item(rom, 0x0029)
item['chest_type'] = GILDED_CHEST
write_rom_item(rom, 0x29, item)
write_rom_item(rom, 0x0029, item)
# Hylian
item = read_rom_item(rom, 0x2A)
item = read_rom_item(rom, 0x002A)
item['chest_type'] = GILDED_CHEST
write_rom_item(rom, 0x2A, item)
write_rom_item(rom, 0x002A, item)
if 'capacity' in world.settings.minor_items_as_major_chest:
# Nuts
item = read_rom_item(rom, 0x0087)
item['chest_type'] = GILDED_CHEST
write_rom_item(rom, 0x0087, item)
# Sticks
item = read_rom_item(rom, 0x0088)
item['chest_type'] = GILDED_CHEST
write_rom_item(rom, 0x0088, item)

# Update chest type appearance
if world.settings.correct_chest_appearances == 'textures':
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ issue. You should always Hard Reset to avoid this issue entirely.
### Dev

#### New Features
* **Settings**
* `Minor Items in Big/Gold chests` has been converted into a multiselect so you may granularly make bombchus, shields, or stick/nut capacity appear in big chests.
* **Hints**
* The `Clearer Hints` option now provides clearer hints for the rainbow bridge text on the altar in the Temple of Time.
* New option in hint distribution `combine_trial_hints` which combines multiple trials hints into one.
Expand Down
24 changes: 15 additions & 9 deletions SettingsList.py
Original file line number Diff line number Diff line change
Expand Up @@ -3230,19 +3230,25 @@ class SettingInfos:
},
)

minor_items_as_major_chest = Checkbutton(
minor_items_as_major_chest = MultipleSelect(
gui_text = 'Minor Items in Big/Gold chests',
choices = {
'bombchus': 'Bombchus',
'shields': 'Deku & Hylian Shields',
'capacity': 'Deku Stick & Nut Capacity',
},
gui_tooltip = '''\
Chests with Hylian Shield, Deku Shield, or
Bombchus will appear in Big and/or Gold chests,
depending on the Chest Appearance Matches
Contents setting. Bombchus are always in big
chests if Add Bombchu Bag and Drops is on.
Chests with Hylian or Deku Shields, Deku Stick
or Nut Capacity, or Bombchus will appear in Big
and/or Gold chests, depending on the Chest
Appearance Matches Contents setting. Bombchus
are always in big chests if Add Bombchu Bag and
Drops is on.
''',
shared = True,
disabled_default = False,
gui_params = {
"hide_when_disabled" : True
default = [],
gui_params = {
"hide_when_disabled" : True,
},
)

Expand Down
20 changes: 10 additions & 10 deletions data/presets_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"ruto_already_f1_jabu": false,
"ocarina_songs": "off",
"correct_chest_appearances": "off",
"minor_items_as_major_chest": false,
"minor_items_as_major_chest": [],
"invisible_chests": false,
"correct_potcrate_appearances": "textures_unchecked",
"key_appearance_match_dungeon": false,
Expand Down Expand Up @@ -304,7 +304,7 @@
"ruto_already_f1_jabu": false,
"ocarina_songs": "off",
"correct_chest_appearances": "both",
"minor_items_as_major_chest": false,
"minor_items_as_major_chest": [],
"invisible_chests": false,
"correct_potcrate_appearances": "textures_content",
"key_appearance_match_dungeon": false,
Expand Down Expand Up @@ -482,7 +482,7 @@
"ruto_already_f1_jabu": false,
"ocarina_songs": "off",
"correct_chest_appearances": "both",
"minor_items_as_major_chest": false,
"minor_items_as_major_chest": [],
"invisible_chests": false,
"correct_potcrate_appearances": "textures_content",
"key_appearance_match_dungeon": false,
Expand Down Expand Up @@ -661,7 +661,7 @@
"ruto_already_f1_jabu": false,
"ocarina_songs": "off",
"correct_chest_appearances": "off",
"minor_items_as_major_chest": false,
"minor_items_as_major_chest": [],
"invisible_chests": false,
"correct_potcrate_appearances": "textures_unchecked",
"key_appearance_match_dungeon": false,
Expand Down Expand Up @@ -848,7 +848,7 @@
"ruto_already_f1_jabu": true,
"ocarina_songs": "off",
"correct_chest_appearances": "textures",
"minor_items_as_major_chest": false,
"minor_items_as_major_chest": [],
"invisible_chests": false,
"correct_potcrate_appearances": "textures_unchecked",
"key_appearance_match_dungeon": false,
Expand Down Expand Up @@ -1024,7 +1024,7 @@
"ruto_already_f1_jabu": true,
"ocarina_songs": "off",
"correct_chest_appearances": "textures",
"minor_items_as_major_chest": false,
"minor_items_as_major_chest": [],
"invisible_chests": false,
"correct_potcrate_appearances": "textures_content",
"key_appearance_match_dungeon": true,
Expand Down Expand Up @@ -1374,7 +1374,7 @@
"ruto_already_f1_jabu": false,
"ocarina_songs": "all",
"correct_chest_appearances": "off",
"minor_items_as_major_chest": false,
"minor_items_as_major_chest": [],
"invisible_chests": true,
"correct_potcrate_appearances": "off",
"key_appearance_match_dungeon": false,
Expand Down Expand Up @@ -1540,7 +1540,7 @@
"ruto_already_f1_jabu": false,
"ocarina_songs": "off",
"correct_chest_appearances": "off",
"minor_items_as_major_chest": false,
"minor_items_as_major_chest": [],
"invisible_chests": false,
"correct_potcrate_appearances": "textures_unchecked",
"key_appearance_match_dungeon": false,
Expand Down Expand Up @@ -1717,7 +1717,7 @@
"ruto_already_f1_jabu": false,
"ocarina_songs": "off",
"correct_chest_appearances": "both",
"minor_items_as_major_chest": false,
"minor_items_as_major_chest": [],
"invisible_chests": false,
"correct_potcrate_appearances": "textures_content",
"key_appearance_match_dungeon": false,
Expand Down Expand Up @@ -1901,7 +1901,7 @@
"ruto_already_f1_jabu": false,
"ocarina_songs": "off",
"correct_chest_appearances": "off",
"minor_items_as_major_chest": false,
"minor_items_as_major_chest": [],
"invisible_chests": false,
"correct_potcrate_appearances": "textures_unchecked",
"key_appearance_match_dungeon": false,
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '8.0.8'
__version__ = '8.0.9'

# This is a supplemental version number for branches based off of main dev.
supplementary_version = 0
Expand Down

0 comments on commit 36eec6d

Please sign in to comment.