Skip to content
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

Option to allow progressive items to give all the upgrades at once #2108

Open
wants to merge 46 commits into
base: Dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
de6b3bb
logic for upgrading bow
AngheloAlf Oct 5, 2023
c49f09c
wire up the guy
AngheloAlf Oct 5, 2023
d8f5845
build files
AngheloAlf Oct 5, 2023
88fd7fa
stuff
AngheloAlf Oct 5, 2023
553c1bc
autogenerated stuff
AngheloAlf Oct 6, 2023
007ed82
bow seems to work
AngheloAlf Oct 6, 2023
622d603
macro cleanup
AngheloAlf Oct 6, 2023
3b65fde
checks for most progressive items
AngheloAlf Oct 6, 2023
5d6bd3e
magic upgradeful
AngheloAlf Oct 6, 2023
6461238
whoops
AngheloAlf Oct 6, 2023
d4a3fe3
testing
AngheloAlf Oct 6, 2023
00d5b4d
upgradeful bow
AngheloAlf Oct 6, 2023
8f5c2c7
fix bombbag and slingshot
AngheloAlf Oct 6, 2023
0544e6e
Various fixes
AngheloAlf Oct 6, 2023
824a699
tooltip
AngheloAlf Oct 6, 2023
5c38195
cleanups
AngheloAlf Oct 6, 2023
9e363f7
Change UPGRADEFUL_ITEM_FLAGS to uint16_t
AngheloAlf Oct 6, 2023
002f573
Wording
AngheloAlf Oct 6, 2023
356f9ea
CI
AngheloAlf Oct 6, 2023
6d94b46
tooltip
AngheloAlf Oct 6, 2023
3f7c926
Add all the upgradeful items to item_table.c and ItemList.py
AngheloAlf Oct 6, 2023
21b2812
Rename to Max Upgrade
AngheloAlf Oct 6, 2023
7eee920
Add Max Upgrade items to ItemPool
AngheloAlf Oct 6, 2023
f1407b9
Better ItemPool.py Implementation
Cuphat Oct 6, 2023
4041518
hint list placeholders
AngheloAlf Oct 7, 2023
5c60da3
hints
AngheloAlf Oct 7, 2023
c5bd519
change plando file
AngheloAlf Oct 7, 2023
9610848
Properly give Adult's Wallet or Tycoon's Wallet depending if shopsani…
AngheloAlf Oct 7, 2023
06d4170
Remove UPGRADEFUL_ITEM_FLAGS
AngheloAlf Oct 8, 2023
1d3c4d4
more explanation on the tooltip
AngheloAlf Oct 8, 2023
4adcc38
Remove symbols and use raw addresses instead
AngheloAlf Oct 8, 2023
a4e4d9c
Move to Other Misc
AngheloAlf Oct 8, 2023
b9c18f0
remove unused stuff
AngheloAlf Oct 8, 2023
45502bf
Merge remote-tracking branch 'upstream/Dev' into upgradeful_item_2
AngheloAlf Dec 25, 2023
ef08c80
update build files
AngheloAlf Dec 25, 2023
9961082
Move index to 0x011B
AngheloAlf Jan 19, 2024
9f1191d
Merge remote-tracking branch 'upstream/Dev' into upgradeful_item_2
AngheloAlf May 17, 2024
7e816f9
rerun build
AngheloAlf May 17, 2024
211f4f8
Update SettingsList.py
AngheloAlf May 17, 2024
c4dc491
Update Patches.py
AngheloAlf May 17, 2024
2c4a263
Merge remote-tracking branch 'upstream/Dev' into upgradeful_item_2
AngheloAlf Sep 1, 2024
57d7a47
generated files
AngheloAlf Sep 1, 2024
111c7c2
Merge remote-tracking branch 'upstream/Dev' into upgradeful_item_2
AngheloAlf Sep 30, 2024
5cf21fa
Update stuff
AngheloAlf Sep 30, 2024
6254814
generated files
AngheloAlf Oct 1, 2024
0d6d936
presets?
AngheloAlf Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
944 changes: 475 additions & 469 deletions ASM/build/asm_symbols.txt

Large diffs are not rendered by default.

Binary file modified ASM/build/bundle.o
Binary file not shown.
911 changes: 458 additions & 453 deletions ASM/build/c_symbols.txt

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion ASM/c/actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ void Actor_StoreChestType(z64_actor_t* actor, z64_game_t* game) {
if (POTCRATE_TEXTURES_MATCH_CONTENTS == PTMC_UNCHECKED && override.key.all > 0) { // For "unchecked" PTMC setting: Check if we have an override which means it wasn't collected.
*pChestType = GILDED_CHEST;
} else if (POTCRATE_TEXTURES_MATCH_CONTENTS == PTMC_CONTENTS) {
uint16_t item_id = resolve_upgrades(override);
uint16_t item_id = resolve_upgrades(override); // unused?
item_row_t* row = get_item_row(override.value.looks_like_item_id);

if (row == NULL) {
row = get_item_row(override.value.base.item_id);
}
Expand Down
18 changes: 18 additions & 0 deletions ASM/c/item_effects.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,21 @@ void unlock_ocarina_note(z64_file_t* save, int16_t arg1, int16_t arg2) {
break;
}
}

void give_max_upgrade_bomb_bag(z64_file_t *save, int16_t arg1, int16_t arg2) {
z64_Inventory_ChangeUpgrade(UPG_BOMB_BAG, 3);
INV_CONTENT(ITEM_BOMB) = ITEM_BOMB;
AMMO(ITEM_BOMB) = CAPACITY(UPG_BOMB_BAG, 3);
}

void give_max_upgrade_bow(z64_file_t *save, int16_t arg1, int16_t arg2) {
z64_Inventory_ChangeUpgrade(UPG_QUIVER, 3);
INV_CONTENT(ITEM_BOW) = ITEM_BOW;
AMMO(ITEM_BOW) = CAPACITY(UPG_QUIVER, 3);
}

void give_max_upgrade_slingshot(z64_file_t *save, int16_t arg1, int16_t arg2) {
z64_Inventory_ChangeUpgrade(UPG_BULLET_BAG, 3);
INV_CONTENT(ITEM_SLINGSHOT) = ITEM_SLINGSHOT;
AMMO(ITEM_SLINGSHOT) = CAPACITY(UPG_BULLET_BAG, 3);
}
3 changes: 3 additions & 0 deletions ASM/c/item_effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ void give_bombchus(z64_file_t* save, int16_t arg1, int16_t arg2);
void trade_quest_upgrade(z64_file_t* save, int16_t item_id, int16_t arg2);
extern uint8_t KEYRING_BOSSKEY_CONDITION;
void unlock_ocarina_note(z64_file_t* save, int16_t arg1, int16_t arg2);
void give_max_upgrade_bomb_bag(z64_file_t* save, int16_t arg1, int16_t arg2);
void give_max_upgrade_bow(z64_file_t* save, int16_t arg1, int16_t arg2);
void give_max_upgrade_slingshot(z64_file_t* save, int16_t arg1, int16_t arg2);

typedef enum dungeon {
DEKU_ID = 0,
Expand Down
13 changes: 12 additions & 1 deletion ASM/c/item_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,18 @@ item_row_t item_table[GI_RANDO_MAX] = {
[GI_FAIRY] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x90B4, 0x0177, 0x9E, no_upgrade, full_heal, -1, -1, NULL), // Fairy
[GI_NOTHING] = ITEM_ROW(0x53, BROWN_CHEST, 0x41, -1, 0x90B5, 0x0177, 0x9F, no_upgrade, no_effect, -1, -1, NULL), // Nothing :)

// 0x011B through 0x0126 reserved for https://github.com/OoTRandomizer/OoT-Randomizer/pull/2108
[GI_MAX_UPGRADE_HOOKSHOT] = ITEM_ROW(0x53, GILDED_CHEST, 0x0B, -1, 0x004F, 0x00DD, 0x2E, no_upgrade, no_effect, -1, -1, NULL),
[GI_MAX_UPGRADE_STRENGTH] = ITEM_ROW(0x53, GILDED_CHEST, 0x52, -1, 0x005C, 0x012D, 0x4A, no_upgrade, no_effect, -1, -1, NULL),
[GI_MAX_UPGRADE_BOMB_BAG] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x90B6, 0x00BF, 0x18, no_upgrade, give_max_upgrade_bomb_bag, -1, -1, NULL),
[GI_MAX_UPGRADE_BOW] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x90B7, 0x00E9, 0x35, no_upgrade, give_max_upgrade_bow, -1, -1, NULL),
[GI_MAX_UPGRADE_SLINGSHOT] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x90B8, 0x00E7, 0x33, no_upgrade, give_max_upgrade_slingshot, -1, -1, NULL),
[GI_MAX_UPGRADE_WALLET] = ITEM_ROW( -1, GILDED_CHEST, -1, -1, -1, 0x00D1, 0x22, max_upgrade_wallet_upgrade, no_effect, 3, -1, NULL),
[GI_MAX_UPGRADE_SCALE] = ITEM_ROW(0x53, GILDED_CHEST, 0x54, -1, 0x00CE, 0x00DB, 0x2B, no_upgrade, no_effect, -1, -1, NULL),
[GI_MAX_UPGRADE_NUT] = ITEM_ROW(0x53, BROWN_CHEST, 0x9B, -1, 0x00A8, 0x00BB, 0x12, no_upgrade, no_effect, -1, -1, NULL),
[GI_MAX_UPGRADE_STICK] = ITEM_ROW(0x53, BROWN_CHEST, 0x99, -1, 0x0091, 0x00C7, 0x1B, no_upgrade, no_effect, -1, -1, NULL),
[GI_MAX_UPGRADE_BOMBCHU] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x9019, 0x0197, 0x7E, no_upgrade, give_bombchus, 20, -1, NULL),
[GI_MAX_UPGRADE_MAGIC] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x00E8, 0x00CD, 0x1F, no_upgrade, give_double_magic, -1, -1, NULL),
[GI_MAX_UPGRADE_OCARINA] = ITEM_ROW(0x53, GILDED_CHEST, 0x08, -1, 0x003A, 0x00DE, 0x2F, no_upgrade, no_effect, -1, -1, NULL),

[GI_KOKIRI_EMERALD] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0080, 0x01AB, 0x9B, no_upgrade, give_quest_item, 18, -1, NULL), // Kokiri Emerald
[GI_GORON_RUBY] = ITEM_ROW(0x53, GILDED_CHEST, 0x41, -1, 0x0081, 0x01AC, 0x9C, no_upgrade, give_quest_item, 19, -1, NULL), // Goron Ruby
Expand Down
13 changes: 12 additions & 1 deletion ASM/c/item_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,18 @@ typedef enum GetItemID {
/* 0x0119 */ GI_FAIRY,
/* 0x011A */ GI_NOTHING,

// 0x011B through 0x0126 reserved for https://github.com/OoTRandomizer/OoT-Randomizer/pull/2108
/* 0x011B */ GI_MAX_UPGRADE_HOOKSHOT, // Max Upgrade Hookshot
/* 0x011C */ GI_MAX_UPGRADE_STRENGTH, // Max Upgrade Strength
/* 0x011D */ GI_MAX_UPGRADE_BOMB_BAG, // Max Upgrade Bomb Bag
/* 0x011E */ GI_MAX_UPGRADE_BOW, // Max Upgrade Bow
/* 0x011F */ GI_MAX_UPGRADE_SLINGSHOT, // Max Upgrade Slingshot
/* 0x0120 */ GI_MAX_UPGRADE_WALLET, // Max Upgrade Wallet
/* 0x0121 */ GI_MAX_UPGRADE_SCALE, // Max Upgrade Scale
/* 0x0122 */ GI_MAX_UPGRADE_NUT, // Max Upgrade Nut
/* 0x0123 */ GI_MAX_UPGRADE_STICK, // Max Upgrade Stick
/* 0x0124 */ GI_MAX_UPGRADE_BOMBCHU, // Max Upgrade Bombchu
/* 0x0125 */ GI_MAX_UPGRADE_MAGIC, // Max Upgrade Magic
/* 0x0126 */ GI_MAX_UPGRADE_OCARINA, // Max Upgrade Ocarina

// TODO: remove hardcoded value when that PR gets merged
/* 0x0127 */ GI_KOKIRI_EMERALD = 0x0127,
Expand Down
10 changes: 9 additions & 1 deletion ASM/c/item_upgrades.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "get_items.h"
#include "item_table.h"
#include "z64.h"
#include "shop.h"

extern uint32_t FREE_BOMBCHU_DROPS;

Expand Down Expand Up @@ -116,7 +117,7 @@ uint16_t bombchu_upgrade(z64_file_t* save, override_t override) {
if (save->items[Z64_SLOT_BOMBCHU] == ITEM_NONE) {
return GI_BOMBCHUS_20; // Bombchu 20 pack
}
if (save->ammo[8] <= 5) {
if (AMMO(ITEM_BOMBCHU) <= 5) {
return GI_BOMBCHUS_10; // Bombchu 10 pack
}
return GI_BOMBCHUS_5; // Bombchu 5 pack
Expand All @@ -129,6 +130,13 @@ uint16_t ocarina_upgrade(z64_file_t* save, override_t override) {
}
}

uint16_t max_upgrade_wallet_upgrade(z64_file_t* save, override_t override) {
if (CFG_SHOPSANITY_ENABLED) {
return GI_TYCOONS_WALLET;
}
return GI_WALLET_GIANT;
}

uint16_t arrows_to_rupee(z64_file_t* save, override_t override) {
return ((override.value.base.player == PLAYER_ID || !MW_PROGRESSIVE_ITEMS_ENABLE) ? save->quiver : MW_PROGRESSIVE_ITEMS_STATE[override.value.base.player].bow) ? override.value.base.item_id : GI_RUPEE_BLUE; // Blue Rupee
}
Expand Down
1 change: 1 addition & 0 deletions ASM/c/item_upgrades.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ uint16_t letter_to_bottle(z64_file_t* save, override_t override);
uint16_t health_upgrade_cap(z64_file_t* save, override_t override);
uint16_t bombchus_to_bag(z64_file_t* save, override_t override);
uint16_t upgrade_key_model(z64_file_t* save, override_t override);
uint16_t max_upgrade_wallet_upgrade(z64_file_t* save, override_t override);

#endif
8 changes: 8 additions & 0 deletions ASM/c/shop.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef SHOP_H
#define SHOP_H

#include <stdint.h>

extern uint8_t CFG_SHOPSANITY_ENABLED;

#endif
27 changes: 26 additions & 1 deletion ASM/c/z64.h
Original file line number Diff line number Diff line change
Expand Up @@ -1897,11 +1897,24 @@ typedef enum {
} PauseBgPreRenderState;


typedef enum UpgradeType {
/* 0x00 */ UPG_QUIVER,
/* 0x01 */ UPG_BOMB_BAG,
/* 0x02 */ UPG_STRENGTH,
/* 0x03 */ UPG_SCALE,
/* 0x04 */ UPG_WALLET,
/* 0x05 */ UPG_BULLET_BAG,
/* 0x06 */ UPG_DEKU_STICKS,
/* 0x07 */ UPG_DEKU_NUTS,
/* 0x08 */ UPG_MAX
} UpgradeType;

/* helper macros */
#define LINK_IS_ADULT (z64_file.link_age == 0)
#define SLOT(item) gItemSlots[item]
#define INV_CONTENT(item) z64_file.items[SLOT(item)]
#define AMMO(item) z64_file.ammo[SLOT(item)]
#define CAPACITY(upg, value) gUpgradeCapacities[upg][value]
#define ABS(x) ((x) >= 0 ? (x) : -(x))

/* dram addresses */
Expand Down Expand Up @@ -1929,6 +1942,7 @@ typedef enum {
#define z64_SwitchAgeEquips_addr 0x8006F804
#define z64_UpdateItemButton_addr 0x8006FB50
#define z64_GiveItem_addr 0x8006FDCC
#define z64_Inventory_ChangeUpgrade_addr 0x80081294
#define z64_UpdateEquipment_addr 0x80079764
#define z64_LoadRoom_addr 0x80080A3C
#define z64_UnloadRoom_addr 0x80080C98
Expand Down Expand Up @@ -1964,6 +1978,8 @@ typedef enum {
#define z64_link_addr 0x801DAA30
#define z64_state_ovl_tab_addr 0x800F1340
#define z64_event_state_1_addr 0x800EF1B0
#define gItemSlots_addr 0x800F8F34
#define gUpgradeCapacities_addr 0x800F8CCC
#define z64_LinkInvincibility_addr 0x8038E578
#define z64_LinkDamage_addr 0x8038E6A8
#define z64_ObjectSpawn_addr 0x800812F0
Expand Down Expand Up @@ -2046,7 +2062,9 @@ typedef void (*z64_DisplayTextbox_proc) (z64_game_t* game, uint16_t text_id,
int unknown_);
typedef void (*z64_GiveItem_proc) (z64_game_t* game, uint8_t item);

typedef void(*z64_LinkDamage_proc) (z64_game_t* ctxt, z64_link_t* link,
typedef void (*z64_Inventory_ChangeUpgrade_proc)(int16_t upgrade, int16_t value);

typedef void(*z64_LinkDamage_proc) (z64_game_t* ctxt, z64_link_t *link,
uint8_t damage_type, float unk_00, uint32_t unk_01,
uint16_t unk_02);
typedef void(*z64_LinkInvincibility_proc) (z64_link_t* link, uint8_t frames);
Expand Down Expand Up @@ -2106,6 +2124,11 @@ typedef void(*z64_Play_SetupRespawnPoint_proc)(z64_game_t *game, int32_t respawn
z64_state_ovl_tab_addr)
#define z64_event_state_1 (*(uint32_t*) z64_event_state_1_addr)

//extern uint8_t gItemSlots[56];
#define gItemSlots ( (uint8_t*) gItemSlots_addr)

// extern uint16_t gUpgradeCapacities[UPG_MAX][4];
#define gUpgradeCapacities ( (uint16_t (*)[4]) gUpgradeCapacities_addr)

/* functions */
#define z64_ActorKill ((z64_ActorKillFunc) z64_ActorKill_addr)
Expand Down Expand Up @@ -2140,6 +2163,8 @@ typedef void(*z64_Play_SetupRespawnPoint_proc)(z64_game_t *game, int32_t respawn
z64_DisplayTextbox_addr)
#define z64_GiveItem ((z64_GiveItem_proc) z64_GiveItem_addr)

#define z64_Inventory_ChangeUpgrade ((z64_Inventory_ChangeUpgrade_proc) z64_Inventory_ChangeUpgrade_addr)

#define z64_LinkDamage ((z64_LinkDamage_proc)z64_LinkDamage_addr)
#define z64_LinkInvincibility ((z64_LinkInvincibility_proc) \
z64_LinkInvincibility_addr)
Expand Down
9 changes: 7 additions & 2 deletions ASM/src/shop.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
.definelabel Shop_Item_Save_Offset, 0xD4 + (0x2C * 0x1C) + 0x10

CFG_MASK_SHOP_HINT:
.word 0x00000000
.byte 0

CFG_SHOPSANITY_ENABLED:
.byte 0

.align 4

Shop_Check_Sold_Out:
lhu t6, 0x1c(a0)
Expand Down Expand Up @@ -157,7 +162,7 @@ mask_shop_display:
beq a2, at, @@mask_of_truth
nop
; rest of the slots are right side masks
lw at, CFG_MASK_SHOP_HINT
lbu at, CFG_MASK_SHOP_HINT
bnez at, @@mask_of_truth
nop
b @@display_func
Expand Down
13 changes: 13 additions & 0 deletions HintList.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,19 @@ def tokens_required_by_settings(world: World) -> int:
'Fairy Drop': (["an annoying companion", "Navi's cousin"], "a Stray Fairy", 'item'),
'Nothing': (["emptiness", "loneliness"], "Nothing", 'item'),

'Max Upgrade Hookshot': (["Water Tenple's keepsake", "the largest Grapple Beam", "the BOINGEST! chain"], "a Max Upgrade Hookshot", 'item'),
'Max Upgrade Strength': (["power gloves", "metal mittens", "the heavy lifty"], "a Max Upgrade Strength", 'item'),
'Max Upgrade Bomb Bag': (["biggest explosive container", "a huge blast bag"], "a Max Upgrade Bomb Bag", 'item'),
'Max Upgrade Bow': (["a fully archery enabler", "a very danger dart launcher"], "a Max Upgrade Bow", 'item'),
'Max Upgrade Slingshot': (["a seed shooter", "a rubberband", "a child's catapult"], "a Max Upgrade Slingshot", 'item'),
'Max Upgrade Wallet': (["the biggest mo' money holder", "a big gem purse", "a huge portable bank"], "a Max Upgrade Wallet", 'item'),
'Max Upgrade Scale': (["the deepest dive", "a piece of Zora"], "a Max Upgrade Zora Scale", 'item'),
'Max Upgrade Nut': (["even more nuts", "the largest flashbang storage"], "Max Upgrade Deku Nut Capacity", 'item'),
'Max Upgrade Stick': (["tons of lumber rack", "even more flammable twigs"], "Max Upgrade Deku Stick Capacity", 'item'),
'Max Upgrade Bombchu': (["tons of mice bombs", "tons of proximity mice", "tons of wall crawlers", "tons of trail blazers"], "Max Upgrade Bombchus", 'item'),
'Max Upgrade Magic': (["ultimate mystic training", "lots of pixie dust", "the largest green rectangle"], "a Max Upgrade Magic Meter", 'item'),
'Max Upgrade Ocarina': (["a time flute"], "a Max Upgrade Ocarina", 'item'),

Comment on lines +540 to +552
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the max upgrade items should have separate hints from the normal ones. I guess if you're on random settings, it's a good way to tell what items are set to max upgrade, though. I could see it being either way

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iirc it was suggested to me over discord to add individual hints for those items. I tried to look up the convo about it but I suck at using Discord's search feature, sorry.
Either way, I'm indifferent to having specific hints for those or not

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: Take a closer look at the cryptic hints at some point.

'ZR Frogs Ocarina Game': (["an #amphibian feast# yields", "the #croaking choir's magnum opus# awards", "the #froggy finale# yields"], "the final reward from the #Frogs of Zora's River# is", ['overworld', 'sometimes']),
'KF Links House Cow': ("the #bovine bounty of a horseback hustle# gifts", "#Malon's obstacle course# leads to", 'always'),

Expand Down
13 changes: 13 additions & 0 deletions ItemList.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,19 @@ class GetItemId(IntEnum):
'Fairy Drop': ('Item', None, GetItemId.GI_FAIRY, None),
'Nothing': ('Item', None, GetItemId.GI_NOTHING, None),

'Max Upgrade Hookshot': ('Item', True, 0x011B, {'alias': ('Progressive Hookshot', 2), 'progressive': 2}),
'Max Upgrade Strength': ('Item', True, 0x011C, {'alias': ('Progressive Strength Upgrade', 3), 'progressive': 3}),
'Max Upgrade Bomb Bag': ('Item', True, 0x011D, {'alias': ('Bomb Bag', 3), 'progressive': 3}),
'Max Upgrade Bow': ('Item', True, 0x011E, {'alias': ('Bow', 3), 'progressive': 3}),
'Max Upgrade Slingshot': ('Item', True, 0x011F, {'alias': ('Slingshot', 3), 'progressive': 3}),
'Max Upgrade Wallet': ('Item', True, 0x0120, {'alias': ('Progressive Wallet', 3), 'progressive': 3}),
'Max Upgrade Scale': ('Item', True, 0x0121, {'alias': ('Progressive Scale', 2), 'progressive': 2}),
'Max Upgrade Nut': ('Item', True, 0x0122, {'alias': ('Deku Nut Capacity', 2), 'progressive': 2}),
'Max Upgrade Stick': ('Item', True, 0x0123, {'alias': ('Deku Stick Capacity', 2), 'progressive': 2}),
'Max Upgrade Bombchu': ('Item', True, 0x0124, {'alias': ('Bombchus', 1), 'progressive': 1}),
'Max Upgrade Magic': ('Item', True, 0x0125, {'alias': ('Magic Meter', 2), 'progressive': 2}),
'Max Upgrade Ocarina': ('Item', True, 0x0126, {'alias': ('Ocarina', 2), 'progressive': 2}),

# Event items otherwise generated by generic event logic
# can be defined here to enforce their appearance in playthroughs.
'Water Temple Clear': ('Event', True, None, None),
Expand Down
19 changes: 19 additions & 0 deletions ItemPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,21 @@
'Piece of Heart (Treasure Chest Game)',
]

max_upgrade_items: dict[str, str] = {
'Progressive Hookshot': 'Max Upgrade Hookshot',
'Progressive Strength Upgrade': 'Max Upgrade Strength',
'Bomb Bag': 'Max Upgrade Bomb Bag',
'Bow': 'Max Upgrade Bow',
'Slingshot': 'Max Upgrade Slingshot',
'Progressive Wallet': 'Max Upgrade Wallet',
'Progressive Scale': 'Max Upgrade Scale',
'Deku Nut Capacity': 'Max Upgrade Nut',
'Deku Stick Capacity': 'Max Upgrade Stick',
'Bombchus': 'Max Upgrade Bombchu',
'Magic Meter': 'Max Upgrade Magic',
'Ocarina': 'Max Upgrade Ocarina',
}

item_groups: dict[str, Sequence[str]] = {
'Junk': remove_junk_items,
'JunkSong': ('Prelude of Light', 'Serenade of Water'),
Expand Down Expand Up @@ -876,6 +891,10 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]:
elif location.type in ("Chest", "NPC", "Song", "Collectable", "Cutscene", "BossHeart"):
shuffle_item = True

# Replace with max upgrade item if enabled.
if item in max_upgrade_items and item in world.settings.max_upgrade_items:
item = max_upgrade_items[item]

# Now, handle the item as necessary.
if shuffle_item:
pool.append(item)
Expand Down
3 changes: 3 additions & 0 deletions Messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@
(0x90B3, "\x08\x13\x58You got \x05\x41Deku Seeds\x05\x40!\x01Use these as bullets\x01for your Slingshot."),
(0x90B4, "\x08You found a \x05\x41fairy\x05\x40!\x01Your health has been restored!"),
(0x90B5, "\x08You found \x05\x43literally nothing\x05\x40!"),
(0x90B6, "\x08\x13\x4DYou found a \x05\x41Bomb Bag\x05\x40!\x01This is the \x05\x43biggest bomb bag\x05\x40,\x01it can carry up to \x05\x4640\x05\x40 Bombs!"),
(0x90B7, "\x08\x13\x03You found the \x05\x41Fairy Bow\x05\x40 and\x01\x05\x43the biggest quiver\x05\x40!"),
(0x90B8, "\x08\x13\x06You found the \x05\x41Fairy Slingshot\x05\x40\x01and a \x05\x43Deku Seeds Bullet Bag\x05\x40.\x01This bag can hold up to \x05\x4640\x05\x40\x01slingshot bullets."),
]

KEYSANITY_MESSAGES: list[tuple[int, str]] = [
Expand Down
4 changes: 3 additions & 1 deletion Patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,9 @@ def calculate_traded_flags(world):
build_misc_location_hints(world, messages)

if 'mask_shop' in world.settings.misc_hints:
rom.write_int32(rom.sym('CFG_MASK_SHOP_HINT'), 1)
rom.write_byte(rom.sym('CFG_MASK_SHOP_HINT'), 1)

rom.write_byte(rom.sym("CFG_SHOPSANITY_ENABLED"), world.settings.shopsanity not in ('off', '0'))

# Make the cursed skulltula people come down instantly when entering if skull hints are on.
# Change lui $at, 0x4320 to lui $at, 0x44C8
Expand Down
Loading
Loading