Allow setting of Glitching to Triforce from ganon in host.yaml.

This commit is contained in:
CaitSith2 2021-03-22 13:14:19 -07:00
parent 9fe4fa1098
commit 4d99bb1429
8 changed files with 16 additions and 1 deletions

View File

@ -43,6 +43,7 @@ class World(object):
# persistently running program with multiple worlds rolling concurrently # persistently running program with multiple worlds rolling concurrently
self.players = players self.players = players
self.teams = 1 self.teams = 1
self.glitch_triforce = False
self.shuffle = shuffle.copy() self.shuffle = shuffle.copy()
self.logic = logic.copy() self.logic = logic.copy()
self.mode = mode.copy() self.mode = mode.copy()

View File

@ -38,6 +38,7 @@ def parse_arguments(argv, no_defaults=False):
No Logic: Distribute items without regard for No Logic: Distribute items without regard for
item requirements. item requirements.
''') ''')
parser.add_argument('--glitch_triforce', help='Allow glitching to Triforce from Ganon\'s room', action='store_true')
parser.add_argument('--mode', default=defval('open'), const='open', nargs='?', choices=['standard', 'open', 'inverted'], parser.add_argument('--mode', default=defval('open'), const='open', nargs='?', choices=['standard', 'open', 'inverted'],
help='''\ help='''\
Select game mode. (default: %(default)s) Select game mode. (default: %(default)s)

View File

@ -105,6 +105,7 @@ def main(args, seed=None):
world.er_seeds = args.er_seeds.copy() world.er_seeds = args.er_seeds.copy()
world.restrict_dungeon_item_on_boss = args.restrict_dungeon_item_on_boss.copy() world.restrict_dungeon_item_on_boss = args.restrict_dungeon_item_on_boss.copy()
world.required_medallions = args.required_medallions.copy() world.required_medallions = args.required_medallions.copy()
world.glitch_triforce = args.glitch_triforce # This is enabled/disabled globally, no per player option.
world.rom_seeds = {player: random.Random(world.random.randint(0, 999999999)) for player in range(1, world.players + 1)} world.rom_seeds = {player: random.Random(world.random.randint(0, 999999999)) for player in range(1, world.players + 1)}

View File

@ -49,6 +49,7 @@ if __name__ == "__main__":
enemizer_path = multi_mystery_options["enemizer_path"] enemizer_path = multi_mystery_options["enemizer_path"]
player_files_path = multi_mystery_options["player_files_path"] player_files_path = multi_mystery_options["player_files_path"]
target_player_count = multi_mystery_options["players"] target_player_count = multi_mystery_options["players"]
glitch_triforce = multi_mystery_options["glitch_triforce_room"]
race = multi_mystery_options["race"] race = multi_mystery_options["race"]
plando_options = multi_mystery_options["plando_options"] plando_options = multi_mystery_options["plando_options"]
create_spoiler = multi_mystery_options["create_spoiler"] create_spoiler = multi_mystery_options["create_spoiler"]
@ -114,6 +115,8 @@ if __name__ == "__main__":
command += " --skip_playthrough" command += " --skip_playthrough"
if zip_diffs: if zip_diffs:
command += " --create_diff" command += " --create_diff"
if glitch_triforce:
command += " --glitch_triforce"
if race: if race:
command += " --race" command += " --race"
if os.path.exists(os.path.join(player_files_path, meta_file_path)): if os.path.exists(os.path.join(player_files_path, meta_file_path)):

View File

@ -42,6 +42,7 @@ def mystery_argparse():
parser.add_argument('--rom') parser.add_argument('--rom')
parser.add_argument('--enemizercli') parser.add_argument('--enemizercli')
parser.add_argument('--outputpath') parser.add_argument('--outputpath')
parser.add_argument('--glitch_triforce', action='store_true')
parser.add_argument('--race', action='store_true') parser.add_argument('--race', action='store_true')
parser.add_argument('--meta', default=None) parser.add_argument('--meta', default=None)
parser.add_argument('--log_output_path', help='Path to store output log') parser.add_argument('--log_output_path', help='Path to store output log')
@ -106,6 +107,7 @@ def main(args=None, callback=ERmain):
erargs.name = {x: "" for x in range(1, args.multi + 1)} # only so it can be overwrittin in mystery erargs.name = {x: "" for x in range(1, args.multi + 1)} # only so it can be overwrittin in mystery
erargs.create_spoiler = args.create_spoiler erargs.create_spoiler = args.create_spoiler
erargs.create_diff = args.create_diff erargs.create_diff = args.create_diff
erargs.glitch_triforce = args.glitch_triforce
erargs.race = args.race erargs.race = args.race
erargs.skip_playthrough = args.skip_playthrough erargs.skip_playthrough = args.skip_playthrough
erargs.outputname = seedname erargs.outputname = seedname

2
Rom.py
View File

@ -1495,7 +1495,7 @@ def patch_rom(world, rom, player, team, enemized):
rom.write_byte(0xEFD95, digging_game_rng) rom.write_byte(0xEFD95, digging_game_rng)
rom.write_byte(0x1800A3, 0x01) # enable correct world setting behaviour after agahnim kills rom.write_byte(0x1800A3, 0x01) # enable correct world setting behaviour after agahnim kills
rom.write_byte(0x1800A4, 0x01 if world.logic[player] != 'nologic' else 0x00) # enable POD EG fix rom.write_byte(0x1800A4, 0x01 if world.logic[player] != 'nologic' else 0x00) # enable POD EG fix
rom.write_byte(0x186383, 0x00 if world.logic[player] != 'nologic' else 0x01) # disable glitching to Triforce from Ganons Room rom.write_byte(0x186383, 0x01 if world.glitch_triforce or world.logic[player] == 'nologic' else 0x00) # disable glitching to Triforce from Ganons Room
rom.write_byte(0x180042, 0x01 if world.save_and_quit_from_boss else 0x00) # Allow Save and Quit after boss kill rom.write_byte(0x180042, 0x01 if world.save_and_quit_from_boss else 0x00) # Allow Save and Quit after boss kill
# remove shield from uncle # remove shield from uncle

View File

@ -224,6 +224,7 @@ def get_default_options() -> dict:
"zip_spoiler": 0, "zip_spoiler": 0,
"zip_multidata": 1, "zip_multidata": 1,
"zip_format": 1, "zip_format": 1,
"glitch_triforce_room": 1,
"race": 0, "race": 0,
"cpu_threads": 0, "cpu_threads": 0,
"max_attempts": 0, "max_attempts": 0,

View File

@ -101,6 +101,12 @@ multi_mystery_options:
# 2 -> 7z is recommended for roms. All of them get the job done. # 2 -> 7z is recommended for roms. All of them get the job done.
# 3 -> bz2 # 3 -> bz2
zip_format: 1 zip_format: 1
# Glitch to Triforce room from Ganon
# When disabled, you have to have a weapon that can hurt ganon (master sword or swordless/easy item functionality + hammer)
# and have completed the goal required for killing ganon to be able to access the triforce room.
# 1 -> Enabled.
# 0 -> Disabled (except in no-logic)
glitch_triforce_room: 1
# Create encrypted race roms # Create encrypted race roms
race: 0 race: 0
# List of options that can be plando'd. Can be combined, for example "bosses, items" # List of options that can be plando'd. Can be combined, for example "bosses, items"