fix: started using the map_hud_mode flag (somewhat against my better judgement, there's some crufty asm lying about)

This commit is contained in:
aerinon
2026-01-16 15:46:37 -07:00
parent 3fab26f423
commit a2b23110c4
5 changed files with 32 additions and 19 deletions

View File

@@ -10,6 +10,8 @@
# Patch Notes
Changelog archive
* 1.5.1
* Bugfix: Fixed an issue with keys not counting correctly
* 1.5.0
* Logic: Fixed vanilla key logic for GT basement
* Logic (Playthrough): Fixed an issue where enemy kill rules were not applied during playthrough calculation. (Thanks Catobat for the catch)

View File

@@ -1,4 +1,5 @@
# Patch Notes
* 1.5.1
* Bugfix: Fixed an issue with keys not counting correctly
* Logic: Key logic fix for part of a dungeon located at Skull 3 (or other similar restricted entrancs). Appropriate key logic was not being applied, causing progression issues. This mostly affect crosskey style seeds.
* Standard: Rupee balancing algorithm can no longer switch out the weapon on uncle for money.
* Dungeon Counters: Some fixes for inconsistent tracking and display of dungeon counters on the keysanity menu.

40
Rom.py
View File

@@ -42,7 +42,7 @@ from source.enemizer.Enemizer import write_enemy_shuffle_settings
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '3f033ac891acfcedce26c00d5cd880ed'
RANDOMIZERBASEHASH = '794b7cd02f429873c3ad6dc74490279c'
class JsonRom(object):
@@ -465,9 +465,9 @@ def patch_rom(world, rom, player, team, is_mystery=False):
itemid = 0x5A
if not location.locked and ((location.item.smallkey and world.keyshuffle[player] == 'none') or (
location.item.bigkey and world.bigkeyshuffle[player] == 'none') or (
location.item.map and world.mapshuffle[player] == 'none') or (
location.item.compass and world.compassshuffle[player] == 'none')):
location.item.bigkey and world.bigkeyshuffle[player] == 'none') or (
location.item.map and world.mapshuffle[player] == 'none') or (
location.item.compass and world.compassshuffle[player] == 'none')):
itemid = handle_native_dungeon(location, itemid)
rom.write_byte(location.address, itemid)
@@ -556,15 +556,15 @@ def patch_rom(world, rom, player, team, is_mystery=False):
if world.mirrorscroll[player] or world.doorShuffle[player] != 'vanilla':
dr_flags |= DROptions.Town_Portal
if world.doorShuffle[player] == 'vanilla':
dr_flags |= DROptions.Eternal_Mini_Bosses
dr_flags |= DROptions.Eternal_Mini_Bosses
if world.doorShuffle[player] not in ['vanilla', 'basic']:
dr_flags |= DROptions.Map_Info
if ((world.collection_rate[player] or world.goal[player] == 'completionist')
and world.goal[player] not in ['triforcehunt', 'trinity', 'ganonhunt']):
and world.goal[player] not in ['triforcehunt', 'trinity', 'ganonhunt']):
dr_flags |= DROptions.Debug
rom.write_byte(snes_to_pc(0x308039), 1)
if world.doorShuffle[player] not in ['vanilla', 'basic'] and world.logic[player] != 'nologic'\
and world.mixed_travel[player] == 'prevent':
if world.doorShuffle[player] not in ['vanilla', 'basic'] and world.logic[player] != 'nologic' \
and world.mixed_travel[player] == 'prevent':
# PoD Falling Bridge or Hammjump
# 1FA607: db $2D, $79, $69 ; 0x0069: Vertical Rail ↕ | { 0B, 1E } | Size: 05
# 1FA60A: db $14, $99, $5D ; 0x005D: Large Horizontal Rail ↔ | { 05, 26 } | Size: 01
@@ -649,9 +649,9 @@ def patch_rom(world, rom, player, team, is_mystery=False):
if world.doorShuffle[player] == 'basic':
rom.write_byte(0x138002, 1)
for door in world.doors:
if door.dest is not None and isinstance(door.dest, Door) and\
door.player == player and door.type in [DoorType.Normal, DoorType.SpiralStairs,
DoorType.Open, DoorType.StraightStairs, DoorType.Ladder]:
if door.dest is not None and isinstance(door.dest, Door) and \
door.player == player and door.type in [DoorType.Normal, DoorType.SpiralStairs,
DoorType.Open, DoorType.StraightStairs, DoorType.Ladder]:
rom.write_bytes(door.getAddress(), door.dest.getTarget(door))
for paired_door in world.paired_doors[player]:
rom.write_bytes(paired_door.address_a(world, player), paired_door.rom_data_a(world, player))
@@ -1108,7 +1108,7 @@ def patch_rom(world, rom, player, team, is_mystery=False):
gametype = 0x04 # item
if (world.shuffle[player] != 'vanilla' or world.doorShuffle[player] != 'vanilla'
or world.dropshuffle[player] != 'none' or world.pottery[player] != 'none'):
or world.dropshuffle[player] != 'none' or world.pottery[player] != 'none'):
gametype |= 0x02 # entrance/door
rom.write_byte(0x180211, gametype) # Game type
@@ -1201,8 +1201,18 @@ def patch_rom(world, rom, player, team, is_mystery=False):
| (0x02 if world.compassshuffle[player] else 0x00)
| (0x04 if world.mapshuffle[player] else 0x00)
| (0x08 if world.bigkeyshuffle[player] else 0x00))) # free roaming item text boxes
rom.write_byte(0x18003B, 0x01 if world.mapshuffle[player] else 0x00) # maps showing crystals on overworld
map_hud_mode = 0x00
if world.dungeon_counters[player] == 'on':
map_hud_mode = 0x02 # always on
elif world.dungeon_counters[player] == 'off':
pass
elif world.keyshuffle[player] != 'universal' and (world.mapshuffle[player] != 'none' or world.doorShuffle[player] != 'vanilla'
or world.dropshuffle[player] != 'none' or world.pottery[player] not in ['none', 'cave'] or world.dungeon_counters[player] == 'pickup'):
map_hud_mode = 0x01 # show on pickup
rom.write_byte(0x18003A, map_hud_mode)
rom.write_byte(0x18003B, 0x01 if world.mapshuffle[player] else 0x00) # maps showing crystals on overworld
# compasses showing dungeon count
compass_mode = 0x00
if world.clock_mode != 'none' or world.dungeon_counters[player] == 'off':
@@ -1408,7 +1418,7 @@ def patch_rom(world, rom, player, team, is_mystery=False):
write_enemy_shuffle_settings(world, player, rom)
if (world.doorShuffle[player] != 'vanilla' or world.dropshuffle[player] != 'none'
or world.pottery[player] != 'none'):
or world.pottery[player] != 'none'):
for room in world.rooms:
if room.player == player and room.modified:
if room.index in world.data_tables[player].room_list:
@@ -1453,7 +1463,7 @@ def patch_rom(world, rom, player, team, is_mystery=False):
(hashint >> 10) & 0x1F,
(hashint >> 5) & 0x1F,
hashint & 0x1F,
]
]
rom.write_bytes(0x180215, code)
rom.hash = code

Binary file not shown.

View File

@@ -92,11 +92,11 @@
"randomizer.dungeon.experimental": "Enable Experimental Features",
"randomizer.dungeon.dungeon_counters": "Dungeon Chest Counters",
"randomizer.dungeon.dungeon_counters": "Dungeon Counters",
"randomizer.dungeon.dungeon_counters.default": "Auto",
"randomizer.dungeon.dungeon_counters.off": "Off",
"randomizer.dungeon.dungeon_counters.on": "On",
"randomizer.dungeon.dungeon_counters.pickup": "On Compass Pickup",
"randomizer.dungeon.dungeon_counters.pickup": "On Item Pickup",
"randomizer.dungeon.mixed_travel": "Mixed Dungeon Travel ",
"randomizer.dungeon.mixed_travel.prevent": "Prevent Mixed Dungeon Travel",