Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion archipelago.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"minimum_ap_version": "0.6.5",
"world_version": "1.4.24",
"world_version": "1.4.25",
"authors": ["2dos", "AlmostSeagull", "Ballaam", "Green Bean", "Killklli", "Lrauq", "PoryGone", "Umed"],
"version": 7,
"compatible_version": 7,
Expand Down
19 changes: 19 additions & 0 deletions archipelago/DK64Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,25 @@ async def validate_client_connection(self):
if not self.memory_pointer:
self.memory_pointer = self.n64_client.read_u32(DK64MemoryMap.memory_pointer)
self.n64_client.write_u8(self.memory_pointer + DK64MemoryMap.connection, 0xFF)
if self.n64_client.read_u8(DK64MemoryMap.eeprom_determined) == 1:
if self.n64_client.read_u32(DK64MemoryMap.save_type) != 2:
# Map emulator IDs to their setup guides
emulator_setup_guides = {
"Project64": "https://dev.dk64randomizer.com/wiki/index.html?title=Consoles-and-Emulators:-Project-64",
"Project64_v4": "https://dev.dk64randomizer.com/wiki/index.html?title=Consoles-and-Emulators:-Project-64",
"RMG": "https://dev.dk64randomizer.com/wiki/index.html?title=Consoles-and-Emulators:-Rosalies-Mupen-GUI",
"ParallelLauncher": "https://dev.dk64randomizer.com/wiki/index.html?title=Consoles-and-Emulators:-Parallel-Launcher",
"RetroArch": "https://dev.dk64randomizer.com/wiki/index.html?title=Consoles-and-Emulators:-RetroArch",
"BizHawk": "https://dev.dk64randomizer.com/wiki/index.html?title=Consoles-and-Emulators:-BizHawk-DK64-Edition",
"Simple64": "https://dev.dk64randomizer.com/wiki/index.html?title=Consoles-and-Emulators:-Simple64",
}

emulator_id = self.n64_client.emulator_info.id.name
setup_guide = emulator_setup_guides.get(emulator_id, "https://dev.dk64randomizer.com/wiki/index.html?title=Consoles-and-Emulators")

logger.error(f"{self.n64_client.emulator_info.id.name} is not set up correctly! Please follow the appropriate setup guide to ensure the game works!")
logger.error(f"{setup_guide}")
raise Exception("Bad emulator setup")

# ==================== MESSAGING METHODS ====================

Expand Down
2 changes: 1 addition & 1 deletion archipelago/Logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ def CanFreeChunky(self):
return self.IsKong(self.settings.chunky_freeing_kong) or self.settings.free_trade_items
# Otherwise you need the right slam level (usually 1)
else:
return self.hasMoveSwitchsanity(Switches.FactoryFreeKong, level=Levels.FranticFactory, default_slam_level=1) and (self.slope_resets or self.handstand)
return self.hasMoveSwitchsanity(Switches.FactoryFreeKong, level=Levels.FranticFactory, default_slam_level=1)

def CanOpenForestLobbyGoneDoor(self):
"""Check if the player can open the door to the gone pad in forest lobby."""
Expand Down
2 changes: 2 additions & 0 deletions archipelago/client/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class DK64MemoryMap:
CurrentGamemode = 0x80755314
NextGamemode = 0x80755318
current_map = 0x8076A0A8
save_type = 0x807EDEAC
eeprom_determined = 0x807467E0
safety_text_timer = 0x02A
end_credits = 0x1B0
send_death = 0x05C # If donk player dies. Set this back to 0 upon receiving that the donk player has died
Expand Down
3 changes: 2 additions & 1 deletion randomizer/Enums/Events.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
"HelmLobbyW1aTagged": 206,
"HelmLobbyW1bTagged": 207,
"KilledRabbit": 208,
"LankyMushroomSlamSwitch": 209
"LankyMushroomSlamSwitch": 209,
"ChunkyFreed": 210
}
}
2 changes: 1 addition & 1 deletion randomizer/Logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ def CanFreeChunky(self):
return self.IsKong(self.settings.chunky_freeing_kong) or self.settings.free_trade_items
# Otherwise you need the right slam level (usually 1)
else:
return self.hasMoveSwitchsanity(Switches.FactoryFreeKong, level=Levels.FranticFactory, default_slam_level=1) and (self.slope_resets or self.handstand)
return self.hasMoveSwitchsanity(Switches.FactoryFreeKong, level=Levels.FranticFactory, default_slam_level=1)

def CanOpenForestLobbyGoneDoor(self):
"""Check if the player can open the door to the gone pad in forest lobby."""
Expand Down
6 changes: 3 additions & 3 deletions randomizer/LogicFiles/FranticFactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@
]),

Regions.BeyondHatch: Region("Beyond Hatch", HintRegion.Storage, Levels.FranticFactory, True, -1, [
LocationLogic(Locations.ChunkyKong, lambda l: l.CanFreeChunky()),
LocationLogic(Locations.FactoryLankyFreeChunky, lambda l: l.CanFreeChunky()),
LocationLogic(Locations.ChunkyKong, lambda l: Events.ChunkyFreed in l.Events),
LocationLogic(Locations.FactoryLankyFreeChunky, lambda l: Events.ChunkyFreed in l.Events),
LocationLogic(Locations.FactoryChunkyDarkRoom, lambda l: ((l.punch and l.chunky) or l.CanPhase()) and ((l.punch and l.CanSlamSwitch(Levels.FranticFactory, 1)) or l.generalclips) and l.ischunky),
LocationLogic(Locations.RainbowCoin_Location02, lambda l: (l.punch and l.chunky) or l.CanPhase()),
LocationLogic(Locations.FactoryKasplatStorage, lambda l: not l.settings.kasplat_rando),
Expand Down Expand Up @@ -173,7 +173,7 @@
]),

Regions.FactoryStoragePipe: Region("Factory Storage Pipe", HintRegion.Storage, Levels.FranticFactory, False, None, [], [
# If we were to move the switch to Chunky's cage back up this pipe, the event would go here.
Event(Events.ChunkyFreed, lambda l: l.CanFreeChunky())
], [
TransitionFront(Regions.BeyondHatch, lambda _: True),
]),
Expand Down
2 changes: 1 addition & 1 deletion randomizer/Patching/ApplyRandomizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,6 @@ def patching_response(spoiler):
randomize_coins(spoiler, ROM_COPY)
place_mayhem_coins(spoiler, ROM_COPY)
ApplyShopRandomizer(spoiler, ROM_COPY)
showWinCondition(spoiler.settings, ROM_COPY)
remove5DSCameraPoint(spoiler, ROM_COPY)
alterTextboxRequirements(spoiler)
spoiler.arcade_item_reward = Items.NintendoCoin
Expand Down Expand Up @@ -729,6 +728,7 @@ def patching_response(spoiler):
applyKongModelSwaps(spoiler.settings, ROM_COPY)
updateHelmFaces(spoiler.settings, ROM_COPY)
updateSnidePanel(spoiler.settings, ROM_COPY)
showWinCondition(spoiler.settings, ROM_COPY)

patchAssembly(ROM_COPY, spoiler)
ApplyMirrorMode(spoiler.settings, ROM_COPY)
Expand Down
8 changes: 8 additions & 0 deletions randomizer/Patching/EnemyRando.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,14 @@ def writeEnemy(spoiler, ROM_COPY: LocalROM, cont_map_spawner_address: int, new_e
new_speed = 255
ROM_COPY.seek(cont_map_spawner_address + spawner.offset + speed_offset)
ROM_COPY.writeMultipleBytes(new_speed, 1)
# Cap Klobber Speed
if new_enemy_id in (Enemies.Klobber, Enemies.Kaboom):
for speed_offset in [0xC, 0xD]:
ROM_COPY.seek(cont_map_spawner_address + spawner.offset + speed_offset)
current_speed = int.from_bytes(ROM_COPY.readBytes(1), "big")
new_speed = max(1, int(current_speed * 0.6))
ROM_COPY.seek(cont_map_spawner_address + spawner.offset + speed_offset)
ROM_COPY.writeMultipleBytes(new_speed, 1)
# Fix Tiny 5DI enemy to not respawn
ROM_COPY.seek(cont_map_spawner_address + spawner.offset + 0x13)
id = int.from_bytes(ROM_COPY.readBytes(1), "big")
Expand Down
1 change: 1 addition & 0 deletions typings/randomizer/Enums/Events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,5 @@ export enum Events {
HelmLobbyW1bTagged = 207,
KilledRabbit = 208,
LankyMushroomSlamSwitch = 209,
ChunkyFreed = 210,
}
1 change: 1 addition & 0 deletions typings/randomizer/Enums/Events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,4 @@ class Events(IntEnum):
HelmLobbyW1bTagged = 207
KilledRabbit = 208
LankyMushroomSlamSwitch = 209
ChunkyFreed = 210