diff --git a/CLI.py b/CLI.py index 9c15e4cb..ce230037 100644 --- a/CLI.py +++ b/CLI.py @@ -179,9 +179,7 @@ def parse_settings(): "names": "", "securerandom": False, - # Hints default to TRUE - "hints": True, - "no_hints": False, + "hints": False, "disablemusic": False, "quickswap": False, "heartcolor": "red", diff --git a/Rom.py b/Rom.py index 2227cbe9..60b40ab6 100644 --- a/Rom.py +++ b/Rom.py @@ -27,7 +27,7 @@ from EntranceShuffle import door_addresses, exit_ids JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = 'f8f1b851b091d50af2b87283ea79ed90' +RANDOMIZERBASEHASH = '56cf37536facb8e6b19d2ce516436f66' class JsonRom(object): @@ -2026,7 +2026,7 @@ def write_strings(rom, world, player, team): if world.doorShuffle[player] in ['crossed']: attic_hint = world.get_location("Thieves' Town - Attic", player).parent_region.dungeon.name this_hint = 'A cracked floor can be found in ' + attic_hint + '.' - if hint_locations[0] == 'telepathic_tile_thieves_town_upstairs': + if world.intensity[player] < 2 and hint_locations[0] == 'telepathic_tile_thieves_town_upstairs': tt[hint_locations.pop(1)] = this_hint else: tt[hint_locations.pop(0)] = this_hint @@ -2115,6 +2115,17 @@ def write_strings(rom, world, player, team): bombos_text = 'Some Hot Air' if bombositem is None else hint_text(bombositem, True) if bombositem.pedestal_hint_text is not None else 'Unknown Item' tt['tablet_bombos_book'] = bombos_text + # attic hint + if world.doorShuffle[player] in ['crossed']: + attic_hint = world.get_location("Thieves' Town - Attic", player).parent_region.dungeon.name + tt['blind_not_that_way'] = f'{attic_hint} is too bright for my eyes' + # see tagalog.asm tables at 957,967 or Follower_HandleTrigger in JPDASM + # also the baserom table at org $09A4C2 in hooks.asm (Escort text) + rom.write_byte(0x04a4be, 0xac) # change the room to blind's room + rom.write_byte(0x04a526, 0xb8) # y coordinate, shifted down + rom.write_byte(0x04a529, 0x19) # x tile shifted right a few tiles + rom.write_byte(0x04a52e, 0x06) # follower set to blind maiden + # inverted spawn menu changes if world.mode[player] == 'inverted': tt['menu_start_2'] = "{MENU}\n{SPEED0}\n≥@'s house\n Dark Chapel\n{CHOICE3}" diff --git a/Utils.py b/Utils.py index 06ccca62..cf3db3fb 100644 --- a/Utils.py +++ b/Utils.py @@ -294,29 +294,18 @@ def update_deprecated_args(args): if args: argVars = vars(args) truthy = [1, True, "True", "true"] - # Hints default to TRUE + # Hints default to FALSE # Don't do: Yes # Do: No if "no_hints" in argVars: - src = "no_hints" - if isinstance(argVars["hints"], dict): - tmp = {} - for idx in range(1, len(argVars["hints"]) + 1): - tmp[idx] = argVars[src] not in truthy # tmp = !src - args.hints = tmp # dest = tmp - else: - args.hints = args.no_hints not in truthy # dest = !src - # Don't do: No - # Do: Yes - if "hints" in argVars: - src = "hints" - if isinstance(argVars["hints"], dict): - tmp = {} - for idx in range(1, len(argVars["hints"]) + 1): - tmp[idx] = argVars[src] not in truthy # tmp = !src - args.no_hints = tmp # dest = tmp - else: - args.no_hints = args.hints not in truthy # dest = !src + if args.no_hints in truthy: + if isinstance(argVars["hints"], dict): + tmp = {} + for idx in range(1, len(argVars["hints"]) + 1): + tmp[idx] = False + args.hints = tmp + else: + args.hints = False # Spoiler defaults to TRUE # Don't do: Yes diff --git a/asm/drhooks.asm b/asm/drhooks.asm index 6739de34..2824771e 100644 --- a/asm/drhooks.asm +++ b/asm/drhooks.asm @@ -173,6 +173,12 @@ JSL RainPrevention : NOP #2 org $1edabf ; <- sprite_energy_ball.asm : 86-7 Sprite_EnergyBall (LDA.b #$10 : LDX.b #$00) JSL StandardAgaDmg + +org $09a681 ; < - similar to talalong.asm : 1157 (JSL Main_ShowTextMessage) +JSL BlindsAtticHint : NOP #2 +org $1cfd69 +Main_ShowTextMessage: + ; These two, if enabled together, have implications for vanilla BK doors in IP/Hera/Mire ; IPBJ is common enough to consider not doing this. Mire is not a concern for vanilla - maybe glitched modes ; Hera BK door back can be seen with Pot clipping - likely useful for no logic seeds diff --git a/asm/overrides.asm b/asm/overrides.asm index 8f78bb5d..4ab5d3ca 100644 --- a/asm/overrides.asm +++ b/asm/overrides.asm @@ -148,3 +148,10 @@ StandardAgaDmg: LDA.b #$10 ; hurt him! + RTL ; A is zero if the AND results in zero and then Agahnim's invincible! +; note: this skips both maiden dialog triggers if the hole is open +BlindsAtticHint: + CMP.w #$0122 : BNE + + LDA $7EF0CA : AND.w #$0100 : BEQ + + SEP #$20 : RTL ; skip the dialog box if the hole is already open + + SEP #$20 : JML Main_ShowTextMessage + diff --git a/data/base2current.bps b/data/base2current.bps index 97c703b3..974762d1 100644 Binary files a/data/base2current.bps and b/data/base2current.bps differ diff --git a/resources/app/gui/lang/en.json b/resources/app/gui/lang/en.json index f7cdc0a3..303e91cb 100644 --- a/resources/app/gui/lang/en.json +++ b/resources/app/gui/lang/en.json @@ -128,7 +128,7 @@ "randomizer.entrance.entranceshuffle.dungeonssimple": "Dungeons + Simple", - "randomizer.gameoptions.hints": "Include Helpful Hints", + "randomizer.gameoptions.nobgm": "Disable Music & MSU-1", "randomizer.gameoptions.quickswap": "L/R Quickswapping", @@ -184,7 +184,7 @@ "randomizer.generation.rom.dialog.romfiles": "Rom Files", "randomizer.generation.rom.dialog.allfiles": "All Files", - + "randomizer.item.hints": "Include Helpful Hints", "randomizer.item.retro": "Retro mode (universal keys)", "randomizer.item.worldstate": "World State", diff --git a/resources/app/gui/randomize/gameoptions/widgets.json b/resources/app/gui/randomize/gameoptions/widgets.json index 815f72b1..7f612cb4 100644 --- a/resources/app/gui/randomize/gameoptions/widgets.json +++ b/resources/app/gui/randomize/gameoptions/widgets.json @@ -1,9 +1,5 @@ { "checkboxes": { - "hints": { - "type": "checkbox", - "default": "true" - }, "nobgm": { "type": "checkbox" }, "quickswap": { "type": "checkbox" } }, diff --git a/resources/app/gui/randomize/item/widgets.json b/resources/app/gui/randomize/item/widgets.json index 058d03ba..043a29ed 100644 --- a/resources/app/gui/randomize/item/widgets.json +++ b/resources/app/gui/randomize/item/widgets.json @@ -1,7 +1,10 @@ { "checkboxes": { "retro": { "type": "checkbox" }, - "shopsanity": { "type": "checkbox" } + "shopsanity": { "type": "checkbox" }, + "hints": { + "type": "checkbox" + } }, "leftItemFrame": { "worldstate": { diff --git a/source/classes/constants.py b/source/classes/constants.py index 64f44398..5c8f3ce3 100644 --- a/source/classes/constants.py +++ b/source/classes/constants.py @@ -55,6 +55,7 @@ CUSTOMITEMLABELS = [ SETTINGSTOPROCESS = { "randomizer": { "item": { + "hints": "hints", "retro": "retro", "shopsanity": "shopsanity", "worldstate": "mode", @@ -97,7 +98,6 @@ SETTINGSTOPROCESS = { "standardize_palettes": "standardize_palettes", }, "gameoptions": { - "hints": "hints", "nobgm": "disablemusic", "quickswap": "quickswap", "heartcolor": "heartcolor",