OoT updates (#160)
* OoT: disable mixed entrance pools and decoupled entrances for now * OoT: fix error message crash in get_hint_area * Oot Adjuster: kill zootdec if it's not the vanilla rom anymore * OoT Adjuster: fix dmaTable issue Adjuster should now work on compiled versions of the software * OoT: don't skip dungeon items shuffled as any_dungeon for barren hints * OoT: wrap zootdec remove in try-finally
This commit is contained in:
parent
b3c1c0bbe8
commit
03a892aded
|
@ -12,6 +12,7 @@ from worlds.oot.Cosmetics import patch_cosmetics
|
|||
from worlds.oot.Options import cosmetic_options, sfx_options
|
||||
from worlds.oot.Rom import Rom, compress_rom_file
|
||||
from worlds.oot.N64Patch import apply_patch_file
|
||||
from worlds.oot.Utils import data_path
|
||||
from Utils import local_path
|
||||
|
||||
logger = logging.getLogger('OoTAdjuster')
|
||||
|
@ -211,9 +212,11 @@ def adjust(args):
|
|||
ootworld.logic_rules = 'glitched' if args.is_glitched else 'glitchless'
|
||||
ootworld.death_link = args.deathlink
|
||||
|
||||
delete_zootdec = False
|
||||
if os.path.splitext(args.rom)[-1] in ['.z64', '.n64']:
|
||||
# Load up the ROM
|
||||
rom = Rom(file=args.rom, force_use=True)
|
||||
delete_zootdec = True
|
||||
elif os.path.splitext(args.rom)[-1] == '.apz5':
|
||||
# Load vanilla ROM
|
||||
rom = Rom(file=args.vanilla_rom, force_use=True)
|
||||
|
@ -222,6 +225,7 @@ def adjust(args):
|
|||
else:
|
||||
raise Exception("Invalid file extension; requires .n64, .z64, .apz5")
|
||||
# Call patch_cosmetics
|
||||
try:
|
||||
patch_cosmetics(ootworld, rom)
|
||||
rom.write_byte(rom.sym('DEATH_LINK'), args.deathlink)
|
||||
# Output new file
|
||||
|
@ -229,8 +233,13 @@ def adjust(args):
|
|||
decomp_path = path_pieces[0] + '-adjusted-decomp.n64'
|
||||
comp_path = path_pieces[0] + '-adjusted.n64'
|
||||
rom.write_to_file(decomp_path)
|
||||
os.chdir(data_path("Compress"))
|
||||
compress_rom_file(decomp_path, comp_path)
|
||||
os.remove(decomp_path)
|
||||
finally:
|
||||
if delete_zootdec:
|
||||
os.chdir(os.path.split(__file__)[0])
|
||||
os.remove("ZOOTDEC.z64")
|
||||
return comp_path
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -312,7 +312,7 @@ def get_hint_area(spot):
|
|||
|
||||
spot_queue.extend(list(filter(lambda ent: ent not in already_checked, parent_region.entrances)))
|
||||
|
||||
raise HintAreaNotFound('No hint area could be found for %s [World %d]' % (spot, spot.world.id))
|
||||
raise HintAreaNotFound('No hint area could be found for %s [World %d]' % (spot, spot.player))
|
||||
else:
|
||||
return spot.name
|
||||
|
||||
|
|
|
@ -191,8 +191,8 @@ world_options: typing.Dict[str, type(Option)] = {
|
|||
"owl_drops": OwlDrops,
|
||||
"warp_songs": WarpSongs,
|
||||
"spawn_positions": SpawnPositions,
|
||||
"mix_entrance_pools": MixEntrancePools,
|
||||
"decouple_entrances": DecoupleEntrances,
|
||||
# "mix_entrance_pools": MixEntrancePools,
|
||||
# "decouple_entrances": DecoupleEntrances,
|
||||
"triforce_hunt": TriforceHunt,
|
||||
"triforce_goal": TriforceGoal,
|
||||
"extra_triforce_percentage": ExtraTriforces,
|
||||
|
|
|
@ -282,7 +282,7 @@ class Rom(BigStream):
|
|||
|
||||
|
||||
def compress_rom_file(input_file, output_file):
|
||||
compressor_path = data_path("Compress")
|
||||
compressor_path = "."
|
||||
|
||||
if platform.system() == 'Windows':
|
||||
executable_path = "Compress.exe"
|
||||
|
|
|
@ -186,6 +186,8 @@ class OOTWorld(World):
|
|||
self.mq_dungeons_random = False # this will be a deprecated option later
|
||||
self.ocarina_songs = False # just need to pull in the OcarinaSongs module
|
||||
self.big_poe_count = 1 # disabled due to client-side issues for now
|
||||
self.mix_entrance_pools = False
|
||||
self.decouple_entrances = False
|
||||
|
||||
# Set internal names used by the OoT generator
|
||||
self.keysanity = self.shuffle_smallkeys in ['keysanity', 'remove', 'any_dungeon', 'overworld']
|
||||
|
@ -827,7 +829,12 @@ class OOTWorld(World):
|
|||
or (loc.player in item_hint_players and loc.name in world.worlds[loc.player].added_hint_types['item'])):
|
||||
autoworld.major_item_locations.append(loc)
|
||||
|
||||
if loc.game == "Ocarina of Time" and loc.item.code and (not loc.locked or loc.item.type == 'Song'):
|
||||
if loc.game == "Ocarina of Time" and loc.item.code and (not loc.locked or
|
||||
(loc.item.type == 'Song' or
|
||||
(loc.item.type == 'SmallKey' and world.worlds[loc.player].shuffle_smallkeys == 'any_dungeon') or
|
||||
(loc.item.type == 'FortressSmallKey' and world.worlds[loc.player].shuffle_fortresskeys == 'any_dungeon') or
|
||||
(loc.item.type == 'BossKey' and world.worlds[loc.player].shuffle_bosskeys == 'any_dungeon') or
|
||||
(loc.item.type == 'GanonBossKey' and world.worlds[loc.player].shuffle_ganon_bosskey == 'any_dungeon'))):
|
||||
if loc.player in barren_hint_players:
|
||||
hint_area = get_hint_area(loc)
|
||||
items_by_region[loc.player][hint_area]['weight'] += 1
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
0 1 2 3 4 5 6 7 8 9 15 16 17 18 19 20 21 22 23 24 25 26 942 944 946 948 950 952 954 956 958 960 962 964 966 968 970 972 974 976 978 980 982 984 986 988 990 992 994 996 998 1000 1002 1004 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525
|
Loading…
Reference in New Issue