Added new SFX instrument shuffle option
This commit is contained in:
@@ -36,8 +36,9 @@ def main():
|
||||
parser.add_argument('--ow_palettes', default='default', choices=['default', 'random', 'blackout'])
|
||||
parser.add_argument('--uw_palettes', default='default', choices=['default', 'random', 'blackout'])
|
||||
parser.add_argument('--reduce_flashing', help='Reduce some in-game flashing.', action='store_true')
|
||||
parser.add_argument('--shuffle_sfx', help='Shuffles sfx instruments', action='store_true')
|
||||
parser.add_argument('--shuffle_songinstruments', help='Shuffles sound sfx', action='store_true')
|
||||
parser.add_argument('--shuffle_sfx', help='Shuffles sound sfx', action='store_true')
|
||||
parser.add_argument('--shuffle_sfxinstruments', help='Shuffles sound instruments', action='store_true')
|
||||
parser.add_argument('--shuffle_songinstruments', help='Shuffles song instruments', action='store_true')
|
||||
parser.add_argument('--msu_resume', help='Enable MSU resume', action='store_true')
|
||||
parser.add_argument('--sprite', help='''\
|
||||
Path to a sprite sheet to use for Link. Needs to be in
|
||||
|
||||
@@ -33,7 +33,7 @@ def adjust(args):
|
||||
|
||||
apply_rom_settings(rom, args.heartbeep, args.heartcolor, args.quickswap, args.fastmenu, args.disablemusic,
|
||||
args.sprite, args.ow_palettes, args.uw_palettes, args.reduce_flashing, args.shuffle_sfx,
|
||||
args.shuffle_songinstruments, args.msu_resume)
|
||||
args.shuffle_sfxinstruments, args.shuffle_songinstruments, args.msu_resume)
|
||||
|
||||
output_path.cached_path = args.outputpath
|
||||
rom.write_to_file(output_path('%s.sfc' % outfilebase))
|
||||
@@ -68,7 +68,7 @@ def patch(args):
|
||||
|
||||
apply_rom_settings(rom, args.heartbeep, args.heartcolor, args.quickswap, args.fastmenu, args.disablemusic,
|
||||
args.sprite, args.ow_palettes, args.uw_palettes, args.reduce_flashing, args.shuffle_sfx,
|
||||
args.shuffle_songinstruments, args.msu_resume)
|
||||
args.shuffle_sfxinstruments, args.shuffle_songinstruments, args.msu_resume)
|
||||
|
||||
output_path.cached_path = args.outputpath
|
||||
rom.write_to_file(output_path('%s.sfc' % outfile_base))
|
||||
|
||||
5
CLI.py
5
CLI.py
@@ -143,8 +143,8 @@ def parse_cli(argv, no_defaults=False):
|
||||
'shufflebosses', 'shuffleenemies', 'enemy_health', 'enemy_damage', 'shufflepots',
|
||||
'ow_palettes', 'uw_palettes', 'sprite', 'disablemusic', 'quickswap', 'fastmenu', 'heartcolor',
|
||||
'heartbeep', 'remote_items', 'shopsanity', 'dropshuffle', 'pottery', 'keydropshuffle',
|
||||
'mixed_travel', 'standardize_palettes', 'code', 'reduce_flashing', 'shuffle_sfx', 'shuffle_songinstruments',
|
||||
'msu_resume', 'collection_rate', 'colorizepots', 'decoupledoors', 'door_type_mode',
|
||||
'mixed_travel', 'standardize_palettes', 'code', 'reduce_flashing', 'shuffle_sfx', 'shuffle_sfxinstruments',
|
||||
'shuffle_songinstruments', 'msu_resume', 'collection_rate', 'colorizepots', 'decoupledoors', 'door_type_mode',
|
||||
'bonk_drops', 'trap_door_mode', 'key_logic_algorithm', 'door_self_loops', 'aga_randomness']:
|
||||
value = getattr(defaults, name) if getattr(playerargs, name) is None else getattr(playerargs, name)
|
||||
if player == 1:
|
||||
@@ -262,6 +262,7 @@ def parse_settings():
|
||||
"uw_palettes": "default",
|
||||
"reduce_flashing": False,
|
||||
"shuffle_sfx": False,
|
||||
"shuffle_sfxinstruments": False,
|
||||
"shuffle_songinstruments": False,
|
||||
"msu_resume": False,
|
||||
"collection_rate": False,
|
||||
|
||||
3
Main.py
3
Main.py
@@ -338,7 +338,8 @@ def main(args, seed=None, fish=None):
|
||||
apply_rom_settings(rom, args.heartbeep[player], args.heartcolor[player], args.quickswap[player],
|
||||
args.fastmenu[player], args.disablemusic[player], args.sprite[player],
|
||||
args.ow_palettes[player], args.uw_palettes[player], args.reduce_flashing[player],
|
||||
args.shuffle_sfx[player], args.shuffle_songinstruments[player], args.msu_resume[player])
|
||||
args.shuffle_sfx[player], args.shuffle_sfxinstruments[player], args.shuffle_songinstruments[player],
|
||||
args.msu_resume[player])
|
||||
|
||||
if args.jsonout:
|
||||
jsonout[f'patch_t{team}_p{player}'] = rom.patches
|
||||
|
||||
7
Rom.py
7
Rom.py
@@ -32,7 +32,7 @@ from EntranceShuffle import door_addresses, exit_ids, ow_prize_table
|
||||
from OverworldShuffle import default_flute_connections, flute_data
|
||||
from InitialSram import InitialSram
|
||||
|
||||
from source.classes.SFX import randomize_sfx, randomize_songinstruments
|
||||
from source.classes.SFX import randomize_sfx, randomize_sfxinstruments, randomize_songinstruments
|
||||
from source.item.FillUtil import valid_pot_items
|
||||
from source.dungeon.RoomList import Room0127
|
||||
|
||||
@@ -1830,7 +1830,8 @@ def hud_format_text(text):
|
||||
|
||||
|
||||
def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, sprite,
|
||||
ow_palettes, uw_palettes, reduce_flashing, shuffle_sfx, shuffle_songinstruments, msu_resume):
|
||||
ow_palettes, uw_palettes, reduce_flashing, shuffle_sfx,
|
||||
shuffle_sfxinstruments, shuffle_songinstruments, msu_resume):
|
||||
|
||||
if not os.path.exists("data/sprites/official/001.link.1.zspr") and rom.orig_buffer:
|
||||
dump_zspr(rom.orig_buffer[0x80000:0x87000], rom.orig_buffer[0xdd308:0xdd380],
|
||||
@@ -1936,6 +1937,8 @@ def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, spr
|
||||
|
||||
if shuffle_sfx:
|
||||
randomize_sfx(rom)
|
||||
if shuffle_sfxinstruments:
|
||||
randomize_sfxinstruments(rom)
|
||||
if shuffle_songinstruments:
|
||||
randomize_songinstruments(rom)
|
||||
|
||||
|
||||
@@ -269,6 +269,9 @@
|
||||
shuffle_sfx:
|
||||
on: 1
|
||||
off: 1
|
||||
shuffle_sfxinstruments:
|
||||
on: 1
|
||||
off: 1
|
||||
shuffle_songinstruments:
|
||||
on: 1
|
||||
off: 1
|
||||
|
||||
@@ -199,6 +199,9 @@ rom:
|
||||
shuffle_sfx:
|
||||
on: 1
|
||||
off: 1
|
||||
shuffle_sfxinstruments:
|
||||
on: 1
|
||||
off: 1
|
||||
shuffle_songinstruments:
|
||||
on: 1
|
||||
off: 1
|
||||
|
||||
@@ -349,6 +349,10 @@
|
||||
"action": "store_true",
|
||||
"type": "bool"
|
||||
},
|
||||
"shuffle_sfxinstruments": {
|
||||
"action": "store_true",
|
||||
"type": "bool"
|
||||
},
|
||||
"shuffle_songinstruments": {
|
||||
"action": "store_true",
|
||||
"type": "bool"
|
||||
|
||||
@@ -429,6 +429,7 @@
|
||||
],
|
||||
"reduce_flashing": [ "Reduce some in-game flashing (default: %(default)s)" ],
|
||||
"shuffle_sfx": [ "Shuffle sounds effects (default: %(default)s)" ],
|
||||
"shuffle_sfxinstruments": [ "Shuffle sound instruments (default: %(default)s)" ],
|
||||
"shuffle_songinstruments": [ "Shuffle song instruments (default: %(default)s)" ],
|
||||
"msu_resume": [ "Enable MSU Resume (default: %(default)s)" ],
|
||||
"create_rom": [ "Create an output rom file. (default: %(default)s)" ],
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"quickswap": { "type": "checkbox" },
|
||||
"reduce_flashing": {"type": "checkbox" },
|
||||
"shuffle_sfx": {"type": "checkbox" },
|
||||
"shuffle_sfxinstruments": {"type": "checkbox" },
|
||||
"shuffle_songinstruments": {"type": "checkbox" }
|
||||
},
|
||||
"leftAdjustFrame": {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"adjust.quickswap": "L/R Quickswapping",
|
||||
"adjust.reduce_flashing": "Reduce Flashing",
|
||||
"adjust.shuffle_sfx": "Shuffle Sound Effects",
|
||||
"adjust.shuffle_sfxinstruments": "Shuffle Sound Instruments",
|
||||
"adjust.shuffle_songinstruments": "Shuffle Song Instruments",
|
||||
"adjust.msu_resume": "MSU Resume",
|
||||
|
||||
@@ -192,6 +193,7 @@
|
||||
"randomizer.gameoptions.quickswap": "L/R Quickswapping",
|
||||
"randomizer.gameoptions.reduce_flashing": "Reduce Flashing",
|
||||
"randomizer.gameoptions.shuffle_sfx": "Shuffle Sound Effects",
|
||||
"randomizer.gameoptions.shuffle_sfxinstruments": "Shuffle Sound Instruments",
|
||||
"randomizer.gameoptions.shuffle_songinstruments": "Shuffle Song Instruments",
|
||||
"randomizer.gameoptions.msu_resume": "MSU Resume",
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"quickswap": { "type": "checkbox" },
|
||||
"reduce_flashing": { "type": "checkbox" },
|
||||
"shuffle_sfx": { "type": "checkbox" },
|
||||
"shuffle_sfxinstruments": { "type": "checkbox" },
|
||||
"shuffle_songinstruments": { "type": "checkbox" }
|
||||
},
|
||||
"leftRomOptionsFrame": {
|
||||
|
||||
@@ -186,6 +186,7 @@ class CustomSettings(object):
|
||||
args.ow_palettes[p] = get_setting(settings['ow_palettes'], args.ow_palettes[p])
|
||||
args.uw_palettes[p] = get_setting(settings['uw_palettes'], args.uw_palettes[p])
|
||||
args.shuffle_sfx[p] = get_setting(settings['shuffle_sfx'], args.shuffle_sfx[p])
|
||||
args.shuffle_sfxinstruments[p] = get_setting(settings['shuffle_sfxinstruments'], args.shuffle_sfxinstruments[p])
|
||||
args.shuffle_songinstruments[p] = get_setting(settings['shuffle_songinstruments'], args.shuffle_songinstruments[p])
|
||||
args.msu_resume[p] = get_setting(settings['msu_resume'], args.msu_resume[p])
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -139,6 +139,7 @@ SETTINGSTOPROCESS = {
|
||||
"uwpalettes": "uw_palettes",
|
||||
"reduce_flashing": "reduce_flashing",
|
||||
"shuffle_sfx": "shuffle_sfx",
|
||||
"shuffle_sfxinstruments": "shuffle_sfxinstruments",
|
||||
"shuffle_songinstruments": "shuffle_songinstruments",
|
||||
'msu_resume': 'msu_resume',
|
||||
},
|
||||
|
||||
@@ -107,6 +107,7 @@ def adjust_page(top, parent, settings):
|
||||
"reduce_flashing": "reduce_flashing",
|
||||
'msu_resume': 'msu_resume',
|
||||
"shuffle_sfx": "shuffle_sfx",
|
||||
"shuffle_sfxinstruments": "shuffle_sfxinstruments",
|
||||
"shuffle_songinstruments": "shuffle_songinstruments",
|
||||
}
|
||||
guiargs = Namespace()
|
||||
@@ -159,6 +160,7 @@ def adjust_page(top, parent, settings):
|
||||
"nobgm": "disablemusic",
|
||||
"reduce_flashing": "reduce_flashing",
|
||||
"shuffle_sfx": "shuffle_sfx",
|
||||
"shuffle_sfxinstruments": "shuffle_sfxinstruments",
|
||||
"shuffle_songinstruments": "shuffle_songinstruments",
|
||||
"msu_resume": "msu_resume"
|
||||
}
|
||||
|
||||
@@ -311,6 +311,7 @@ def create_guiargs(parent):
|
||||
"uwpalettes": "uw_palettes",
|
||||
"reduce_flashing": "reduce_flashing",
|
||||
"shuffle_sfx": "shuffle_sfx",
|
||||
"shuffle_sfxinstruments": "shuffle_sfxinstruments",
|
||||
"shuffle_songinstruments": "shuffle_songinstruments"
|
||||
}
|
||||
for adjustarg in adjustargs:
|
||||
|
||||
@@ -225,6 +225,7 @@ def loadadjustargs(gui, settings):
|
||||
"uwpalettes": "adjust.uwpalettes",
|
||||
"reduce_flashing": "adjust.reduce_flashing",
|
||||
"shuffle_sfx": "adjust.shuffle_sfx",
|
||||
"shuffle_sfxinstruments": "adjust.shuffle_sfxinstruments",
|
||||
"shuffle_songinstruments": "adjust.shuffle_songinstruments"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,6 +221,7 @@ def roll_settings(weights):
|
||||
ret.ow_palettes = get_choice('ow_palettes', romweights)
|
||||
ret.uw_palettes = get_choice('uw_palettes', romweights)
|
||||
ret.shuffle_sfx = get_choice('shuffle_sfx', romweights) == 'on'
|
||||
ret.shuffle_sfxinstruments = get_choice('shuffle_sfxinstruments', romweights) == 'on'
|
||||
ret.shuffle_songinstruments = get_choice('shuffle_songinstruments', romweights) == 'on'
|
||||
ret.msu_resume = get_choice('msu_resume', romweights) == 'on'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user