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

New SFX cosmetic : Rupee change #2327

Open
wants to merge 1 commit into
base: Dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions Cosmetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ def patch_sfx(rom: Rom, settings: Settings, log: CosmeticsLog, symbols: dict[str
('sfx_explosion', Sounds.SoundHooks.EXPLOSION),
('sfx_daybreak', Sounds.SoundHooks.DAYBREAK),
('sfx_cucco', Sounds.SoundHooks.CUCCO),
('sfx_rupee_change', Sounds.SoundHooks.RUPEE_CHANGE),
]
sound_dict = Sounds.get_patch_dict()
sounds_keyword_label = {sound.value.keyword: sound.value.label for sound in Sounds.Sounds}
Expand Down
17 changes: 17 additions & 0 deletions SettingsList.py
Original file line number Diff line number Diff line change
Expand Up @@ -5395,6 +5395,23 @@ class SettingInfos:
}
)

sfx_rupee_change = Combobox(
gui_text = 'Rupee Change',
shared = False,
cosmetic = True,
choices = Sounds.get_setting_choices(Sounds.SoundHooks.RUPEE_CHANGE),
default = 'default',
gui_tooltip = '''\
Change the sound for rupee changes.
''',
gui_params = {
'randomize_key': 'randomize_all_sfx',
'distribution': [
('random-ear-safe', 1),
]
}
)

setting_infos: dict[str, SettingInfo] = {}
setting_map: dict = {}

Expand Down
59 changes: 32 additions & 27 deletions Sounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Tags(Enum):
MENUSELECT = 10 # Menu selection sounds (hand chosen, could use some more)
MENUMOVE = 11 # Menu movement sounds (hand chosen, could use some more)
HORSE = 12 # Horse neigh sounds (hand chosen)
PAINFUL_RUPEE = 13 # Rupee changes will play every frame so more sounds are painful
INC_NE = 20 # Incompatible with NAVI_ENEMY? (Verify)
# I'm now thinking it has to do with a limit of concurrent sounds)

Expand All @@ -68,51 +69,51 @@ class Sounds(Enum):
BONGO_HIGH = Sound(0x3951, 'bongo-bongo-high', 'Bongo Bongo High', [Tags.MENUSELECT])
BONGO_LOW = Sound(0x3950, 'bongo-bongo-low', 'Bongo Bongo Low', [Tags.QUIET, Tags.HPLOW, Tags.MENUMOVE])
BOTTLE_CORK = Sound(0x286C, 'bottle-cork', 'Bottle Cork', [Tags.IMMEDIATE, Tags.BRIEF, Tags.QUIET])
BOW_TWANG = Sound(0x1830, 'bow-twang', 'Bow Twang', [Tags.HPLOW, Tags.MENUMOVE])
BOW_TWANG = Sound(0x1830, 'bow-twang', 'Bow Twang', [Tags.HPLOW, Tags.MENUMOVE, Tags.PAINFUL_RUPEE])
BUBBLE_LOL = Sound(0x38CA, 'bubble-laugh', 'Bubble Laugh', [])
BUSINESS_SCRUB = Sound(0x3882, 'business-scrub', 'Business Scrub', [Tags.PAINFUL, Tags.NAVI, Tags.HPLOW])
BUSINESS_SCRUB = Sound(0x3882, 'business-scrub', 'Business Scrub', [Tags.PAINFUL, Tags.NAVI, Tags.HPLOW, Tags.PAINFUL_RUPEE])
CARROT_REFILL = Sound(0x4845, 'carrot-refill', 'Carrot Refill', [Tags.NAVI, Tags.HPLOW])
CARTOON_FALL = Sound(0x28A0, 'cartoon-fall', 'Cartoon Fall', [Tags.PAINFUL, Tags.HOVERBOOT])
CHANGE_ITEM = Sound(0x0835, 'change-item', 'Change Item', [Tags.IMMEDIATE, Tags.BRIEF, Tags.MENUSELECT])
CHEST_OPEN = Sound(0x2820, 'chest-open', 'Chest Open', [Tags.PAINFUL])
CHILD_CRINGE = Sound(0x683A, 'child-cringe', 'Child Cringe', [Tags.PAINFUL, Tags.IMMEDIATE, Tags.MENUSELECT])
CHILD_GASP = Sound(0x6836, 'child-gasp', 'Child Gasp', [Tags.PAINFUL])
CHILD_HURT = Sound(0x6825, 'child-hurt', 'Child Hurt', [Tags.PAINFUL])
CHILD_HURT = Sound(0x6825, 'child-hurt', 'Child Hurt', [Tags.PAINFUL, Tags.PAINFUL_RUPEE])
CHILD_OWO = Sound(0x6823, 'child-owo', 'Child owo', [Tags.PAINFUL])
CHILD_PANT = Sound(0x6829, 'child-pant', 'Child Pant', [Tags.IMMEDIATE])
CHILD_SCREAM = Sound(0x6828, 'child-scream', 'Child Scream', [Tags.PAINFUL, Tags.IMMEDIATE, Tags.MENUSELECT, Tags.HORSE])
CHILD_SCREAM = Sound(0x6828, 'child-scream', 'Child Scream', [Tags.PAINFUL, Tags.IMMEDIATE, Tags.MENUSELECT, Tags.HORSE, Tags.PAINFUL_RUPEE])
CUCCO_CLUCK = Sound(0x2812, 'cluck', 'Cluck', [Tags.BRIEF, Tags.NAVI, Tags.HPLOW])
CUCCO_CROW = Sound(0x2813, 'cockadoodledoo', 'Cockadoodledoo', [Tags.PAINFUL, Tags.NAVI, Tags.NIGHTFALL])
CURSED_ATTACK = Sound(0x6868, 'cursed-attack', 'Cursed Attack', [Tags.PAINFUL, Tags.IMMEDIATE])
CURSED_SCREAM = Sound(0x6867, 'cursed-scream', 'Cursed Scream', [Tags.PAINFUL])
DEKU_BABA_CHATTER = Sound(0x3860, 'deku-baba', 'Deku Baba', [Tags.MENUMOVE])
DRAWBRIDGE_SET = Sound(0x280E, 'drawbridge-set', 'Drawbridge Set', [Tags.HPLOW])
DUSK_HOWL = Sound(0x28AE, 'dusk-howl', 'Dusk Howl', [Tags.NAVI])
EPONA_CHILD = Sound(0x2844, 'baby-epona', 'Epona (Baby)', [Tags.PAINFUL])
EXPLODE_CRATE = Sound(0x2839, 'exploding-crate', 'Exploding Crate', [Tags.PAINFUL, Tags.NAVI])
EXPLOSION = Sound(0x180E, 'explosion', 'Explosion', [Tags.PAINFUL, Tags.NAVI])
FANFARE_SMALL = Sound(0x4824, 'fanfare-light', 'Fanfare (Light)', [])
FANFARE_MED = Sound(0x4831, 'fanfare-medium', 'Fanfare (Medium)', [])
EPONA_CHILD = Sound(0x2844, 'baby-epona', 'Epona (Baby)', [Tags.PAINFUL, Tags.PAINFUL_RUPEE])
EXPLODE_CRATE = Sound(0x2839, 'exploding-crate', 'Exploding Crate', [Tags.PAINFUL, Tags.NAVI, Tags.PAINFUL_RUPEE])
EXPLOSION = Sound(0x180E, 'explosion', 'Explosion', [Tags.PAINFUL, Tags.NAVI, Tags.PAINFUL_RUPEE])
FANFARE_SMALL = Sound(0x4824, 'fanfare-light', 'Fanfare (Light)', [Tags.PAINFUL_RUPEE])
FANFARE_MED = Sound(0x4831, 'fanfare-medium', 'Fanfare (Medium)', [Tags.PAINFUL_RUPEE])
FIELD_SHRUB = Sound(0x2877, 'field-shrub', 'Field Shrub', [])
FLARE_BOSS_LOL = Sound(0x3981, 'flare-dancer-laugh', 'Flare Dancer Laugh', [Tags.PAINFUL, Tags.IMMEDIATE, Tags.HOVERBOOT])
FLARE_BOSS_STARTLE = Sound(0x398B, 'flare-dancer-startled', 'Flare Dancer Startled', [])
GANON_TENNIS = Sound(0x39CA, 'ganondorf-teh', 'Ganondorf "Teh!"', [])
GOHMA_LARVA_CROAK = Sound(0x395D, 'gohma-larva-croak', 'Gohma Larva Croak', [])
GOLD_SKULL_TOKEN = Sound(0x4843, 'gold-skull-token', 'Gold Skull Token', [Tags.NIGHTFALL])
GORON_WAKE = Sound(0x38FC, 'goron-wake', 'Goron Wake', [])
GREAT_FAIRY = Sound(0x6858, 'great-fairy', 'Great Fairy', [Tags.PAINFUL, Tags.NAVI, Tags.NIGHTFALL, Tags.HORSE])
GREAT_FAIRY = Sound(0x6858, 'great-fairy', 'Great Fairy', [Tags.PAINFUL, Tags.NAVI, Tags.NIGHTFALL, Tags.HORSE, Tags.PAINFUL_RUPEE])
GUAY = Sound(0x38B6, 'guay', 'Guay', [Tags.BRIEF, Tags.NAVI, Tags.HPLOW])
GUNSHOT = Sound(0x4835, 'gunshot', 'Gunshot', [])
GUNSHOT = Sound(0x4835, 'gunshot', 'Gunshot', [Tags.PAINFUL_RUPEE])
HAMMER_BONK = Sound(0x180A, 'hammer-bonk', 'Hammer Bonk', [])
HORSE_NEIGH = Sound(0x2805, 'horse-neigh', 'Horse Neigh', [Tags.PAINFUL, Tags.NAVI])
HORSE_NEIGH = Sound(0x2805, 'horse-neigh', 'Horse Neigh', [Tags.PAINFUL, Tags.NAVI, Tags.PAINFUL_RUPEE])
HORSE_TROT = Sound(0x2804, 'horse-trot', 'Horse Trot', [Tags.HPLOW])
HOVER_BOOTS = Sound(0x08C9, 'hover-boots', 'Hover Boots', [Tags.LOOPED, Tags.PAINFUL])
HP_LOW = Sound(0x481B, 'low-health', 'HP Low', [Tags.INC_NE, Tags.NAVI])
HP_RECOVER = Sound(0x480B, 'recover-health', 'HP Recover', [Tags.NAVI, Tags.HPLOW])
ICE_SHATTER = Sound(0x0875, 'shattering-ice', 'Ice Shattering', [Tags.PAINFUL, Tags.NAVI])
INGO_WOOAH = Sound(0x6854, 'ingo-wooah', 'Ingo "Wooah!"', [Tags.PAINFUL])
IRON_BOOTS = Sound(0x080D, 'iron-boots', 'Iron Boots', [Tags.BRIEF, Tags.HPLOW, Tags.QUIET])
IRON_KNUCKLE = Sound(0x3929, 'iron-knuckle', 'Iron Knuckle', [])
IRON_KNUCKLE = Sound(0x3929, 'iron-knuckle', 'Iron Knuckle', [Tags.PAINFUL_RUPEE])
INGO_KAAH = Sound(0x6855, 'kaah', 'Kaah!', [Tags.PAINFUL])
MOBLIN_CLUB_GROUND = Sound(0x38E1, 'moblin-club-ground', 'Moblin Club Ground', [Tags.PAINFUL])
MOBLIN_CLUB_SWING = Sound(0x39EF, 'moblin-club-swing', 'Moblin Club Swing', [Tags.PAINFUL])
Expand All @@ -123,41 +124,41 @@ class Sounds(Enum):
NAVI_RANDOM = Sound(0x6843, 'navi-random', 'Navi Random', [Tags.PAINFUL, Tags.HPLOW])
NOTIFICATION = Sound(0x4820, 'notification', 'Notification', [Tags.NAVI, Tags.HPLOW])
PHANTOM_GANON_LOL = Sound(0x38B0, 'phantom-ganon-laugh', 'Phantom Ganon Laugh', [])
PLANT_EXPLODE = Sound(0x284E, 'plant-explode', 'Plant Explode', [])
PLANT_EXPLODE = Sound(0x284E, 'plant-explode', 'Plant Explode', [Tags.PAINFUL_RUPEE])
POE = Sound(0x38EC, 'poe', 'Poe', [Tags.PAINFUL, Tags.NAVI])
POT_SHATTER = Sound(0x2887, 'shattering-pot', 'Pot Shattering', [Tags.NAVI, Tags.HPLOW])
POT_SHATTER = Sound(0x2887, 'shattering-pot', 'Pot Shattering', [Tags.NAVI, Tags.HPLOW, Tags.PAINFUL_RUPEE])
REDEAD_MOAN = Sound(0x38E4, 'redead-moan', 'Redead Moan', [Tags.NIGHTFALL])
REDEAD_SCREAM = Sound(0x38E5, 'redead-scream', 'Redead Scream', [Tags.PAINFUL, Tags.NAVI, Tags.HORSE])
RIBBIT = Sound(0x28B1, 'ribbit', 'Ribbit', [Tags.NAVI, Tags.HPLOW])
RUPEE = Sound(0x4803, 'rupee', 'Rupee', [])
RIBBIT = Sound(0x28B1, 'ribbit', 'Ribbit', [Tags.NAVI, Tags.HPLOW, Tags.PAINFUL_RUPEE])
RUPEE = Sound(0x4803, 'rupee', 'Rupee', [Tags.PAINFUL_RUPEE])
RUPEE_SILVER = Sound(0x28E8, 'silver-rupee', 'Rupee (Silver)', [Tags.HPLOW])
RUTO_CHILD_CRASH = Sound(0x6860, 'ruto-crash', 'Ruto Crash', [])
RUTO_CHILD_EXCITED = Sound(0x6861, 'ruto-excited', 'Ruto Excited', [Tags.PAINFUL])
RUTO_CHILD_GIGGLE = Sound(0x6863, 'ruto-giggle', 'Ruto Giggle', [Tags.PAINFUL, Tags.NAVI])
RUTO_CHILD_LIFT = Sound(0x6864, 'ruto-lift', 'Ruto Lift', [])
RUTO_CHILD_THROWN = Sound(0x6865, 'ruto-thrown', 'Ruto Thrown', [])
RUTO_CHILD_WIGGLE = Sound(0x6866, 'ruto-wiggle', 'Ruto Wiggle', [Tags.PAINFUL, Tags.HORSE])
RUTO_CHILD_THROWN = Sound(0x6865, 'ruto-thrown', 'Ruto Thrown', [Tags.PAINFUL_RUPEE])
RUTO_CHILD_WIGGLE = Sound(0x6866, 'ruto-wiggle', 'Ruto Wiggle', [Tags.PAINFUL, Tags.HORSE, Tags.PAINFUL_RUPEE])
SCRUB_NUTS_UP = Sound(0x387C, 'scrub-emerge', 'Scrub Emerge', [])
SHABOM_BOUNCE = Sound(0x3948, 'shabom-bounce', 'Shabom Bounce', [Tags.IMMEDIATE])
SHABOM_POP = Sound(0x3949, 'shabom-pop', 'Shabom Pop', [Tags.IMMEDIATE, Tags.BRIEF, Tags.HOVERBOOT])
SHABOM_POP = Sound(0x3949, 'shabom-pop', 'Shabom Pop', [Tags.IMMEDIATE, Tags.BRIEF, Tags.HOVERBOOT, Tags.PAINFUL_RUPEE])
SHELLBLADE = Sound(0x3849, 'shellblade', 'Shellblade', [])
SKULLTULA = Sound(0x39DA, 'skulltula', 'Skulltula', [Tags.BRIEF, Tags.NAVI])
SOFT_BEEP = Sound(0x4804, 'soft-beep', 'Soft Beep', [Tags.NAVI, Tags.HPLOW])
SPIKE_TRAP = Sound(0x38E9, 'spike-trap', 'Spike Trap', [Tags.LOOPED, Tags.PAINFUL])
SPIT_NUT = Sound(0x387E, 'spit-nut', 'Spit Nut', [Tags.IMMEDIATE, Tags.BRIEF])
SPIT_NUT = Sound(0x387E, 'spit-nut', 'Spit Nut', [Tags.IMMEDIATE, Tags.BRIEF, Tags.PAINFUL_RUPEE])
STALCHILD_ATTACK = Sound(0x3831, 'stalchild-attack', 'Stalchild Attack', [Tags.PAINFUL, Tags.HORSE])
STINGER_CRY = Sound(0x39A3, 'stinger-squeak', 'Stinger Squeak', [Tags.PAINFUL])
SWITCH = Sound(0x2815, 'switch', 'Switch', [Tags.HPLOW])
SWORD_BONK = Sound(0x181A, 'sword-bonk', 'Sword Bonk', [Tags.HPLOW])
STINGER_CRY = Sound(0x39A3, 'stinger-squeak', 'Stinger Squeak', [Tags.PAINFUL, Tags.PAINFUL_RUPEE])
SWITCH = Sound(0x2815, 'switch', 'Switch', [Tags.HPLOW, Tags.PAINFUL_RUPEE])
SWORD_BONK = Sound(0x181A, 'sword-bonk', 'Sword Bonk', [Tags.HPLOW, Tags.PAINFUL_RUPEE])
TALON_CRY = Sound(0x6853, 'talon-cry', 'Talon Cry', [Tags.PAINFUL])
TALON_HMM = Sound(0x6852, 'talon-hmm', 'Talon "Hmm"', [])
TALON_SNORE = Sound(0x6850, 'talon-snore', 'Talon Snore', [Tags.NIGHTFALL])
TALON_WTF = Sound(0x6851, 'talon-wtf', 'Talon Wtf', [])
TAMBOURINE = Sound(0x4842, 'tambourine', 'Tambourine', [Tags.QUIET, Tags.NAVI, Tags.HPLOW, Tags.HOVERBOOT])
TARGETING_ENEMY = Sound(0x4830, 'target-enemy', 'Target Enemy', [])
TARGETING_NEUTRAL = Sound(0x480C, 'target-neutral', 'Target Neutral', [])
TARGETING_NEUTRAL = Sound(0x480C, 'target-neutral', 'Target Neutral', [Tags.PAINFUL_RUPEE])
THUNDER = Sound(0x282E, 'thunder', 'Thunder', [Tags.NIGHTFALL])
TIMER = Sound(0x481A, 'timer', 'Timer', [Tags.INC_NE, Tags.NAVI, Tags.HPLOW])
TIMER = Sound(0x481A, 'timer', 'Timer', [Tags.INC_NE, Tags.NAVI, Tags.HPLOW, Tags.PAINFUL_RUPEE])
TWINROVA_BICKER = Sound(0x39E7, 'twinrova-bicker', 'Twinrova Bicker', [Tags.LOOPED, Tags.PAINFUL])
WOLFOS_HOWL = Sound(0x383C, 'wolfos-howl', 'Wolfos Howl', [Tags.PAINFUL])
ZELDA_ADULT_GASP = Sound(0x6879, 'adult-zelda-gasp', 'Zelda Gasp (Adult)', [Tags.NAVI, Tags.HPLOW])
Expand Down Expand Up @@ -212,6 +213,7 @@ class SoundHooks(Enum):
BOMBCHU_MOVE = SoundHook('Bombchu Move', standard, [0xD5F792], True)
GET_SMALL_ITEM = SoundHook('Get Small Item', standard, [0xBDA00E, 0xBE9B4A, 0xBD9FFA, 0xA88EA2], False)
EXPLOSION = SoundHook('Explosion', standard, [0xC0ECA2, 0xC88476], False)
RUPEE_CHANGE = SoundHook('Rupee Change', standard, [0xAEE71A, 0xAEE79A, 0xAEE7DE], False)
# Only overrides normal bomb/chu and Bomb flower, Bombchu bowling sounds too weird with it : 0xEECB9A, 0xEED402
DAYBREAK = SoundHook('Daybreak', nightfall, [0xAD342E, 0xAD7B52], False)
CUCCO = SoundHook('Cucco', standard, [0xC28B9E, 0xC28C92, 0xC28D12, 0xC294EE,
Expand All @@ -231,7 +233,10 @@ def get_patch_dict() -> dict[str, int]:

def get_hook_pool(sound_hook: SoundHooks, earsafeonly: bool = False) -> list[Sounds]:
if earsafeonly:
list = [s for s in sound_hook.value.pool if Tags.PAINFUL not in s.value.tags]
if sound_hook is Sounds.SoundHooks.RUPEE:
list = [s for s in sound_hook.value.pool if Tags.PAINFUL_RUPEE not in s.value.tags]
else:
list = [s for s in sound_hook.value.pool if Tags.PAINFUL not in s.value.tags]
return list
else:
return sound_hook.value.pool
Expand Down
3 changes: 2 additions & 1 deletion data/settings_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,8 @@
"sfx_menu_select",
"sfx_low_hp",
"sfx_silver_rupee",
"sfx_get_small_item"
"sfx_get_small_item",
"sfx_rupee_change"
]
}
]
Expand Down