Encrypt most of the remaining items, and all player IDs
This commit is contained in:
parent
83db79815a
commit
7cf4ad35a9
17
Regions.py
17
Regions.py
|
@ -397,6 +397,23 @@ shop_table = {
|
|||
'Capacity Upgrade': (0x0115, ShopType.UpgradeShop, 0x04, True, True, [('Bomb Upgrade (+5)', 100, 7), ('Arrow Upgrade (+5)', 100, 7)])
|
||||
}
|
||||
|
||||
old_location_address_to_new_location_address = {
|
||||
0x2eb18: 0x18001b, # Bottle Merchant
|
||||
0x33d68: 0x18001a, # Purple Chest
|
||||
0x2df45: 0x18001d, # Link's Uncle
|
||||
0x2f1fc: 0x180008, # Sahasrahla
|
||||
0x18002a: 0x18001c, # Black Smith
|
||||
0x339cf: 0x180009, # Sick Kid
|
||||
0x33e7d: 0x180019, # Hobo
|
||||
0x180160: 0x18000b, # Desert Palace - Desert Torch
|
||||
0x289b0: 0x180018, # Master Sword Pedestal
|
||||
0xf69fa: 0x180007, # Old Man
|
||||
0x180162: 0x18000d, # Tower of Hera - Basement Cage
|
||||
0x330c7: 0x18000a, # Stumpy
|
||||
0x180161: 0x18000c # Ganons Tower - Bob's Torch
|
||||
}
|
||||
|
||||
|
||||
key_drop_data = {
|
||||
'Hyrule Castle - Map Guard Key Drop': [0x140036, 0x140037],
|
||||
'Hyrule Castle - Boomerang Guard Key Drop': [0x140033, 0x140034],
|
||||
|
|
11
Rom.py
11
Rom.py
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
JAP10HASH = '03a63945398191337e896e5771f77173'
|
||||
RANDOMIZERBASEHASH = '0fc63d72970ab96ffb18699f4d12a594'
|
||||
RANDOMIZERBASEHASH = '8021a943f940a0bb5800c013138c02e8'
|
||||
|
||||
import io
|
||||
import json
|
||||
|
@ -19,7 +19,7 @@ from typing import Optional
|
|||
|
||||
from BaseClasses import CollectionState, ShopType, Region, Location
|
||||
from Dungeons import dungeon_music_addresses
|
||||
from Regions import location_table
|
||||
from Regions import location_table, old_location_address_to_new_location_address
|
||||
from Text import MultiByteTextMapper, CompressedTextMapper, text_addresses, Credits, TextTable
|
||||
from Text import Uncle_texts, Ganon1_texts, TavernMan_texts, Sahasrahla2_texts, Triforce_texts, Blind_texts, \
|
||||
BombShop2_texts, junk_texts
|
||||
|
@ -93,8 +93,10 @@ class LocalRom(object):
|
|||
self.write_bytes(0x186140, [0] * 0x150)
|
||||
self.write_bytes(0x186140 + 0x150, itemplayertable)
|
||||
self.encrypt_range(0x186140 + 0x150, 168, key)
|
||||
self.encrypt_range(0x186338, 56, key)
|
||||
self.encrypt_range(0x180000, 32, key)
|
||||
self.encrypt_range(0x180140, 32, key)
|
||||
self.encrypt_range(0xEDA1, 8, key)
|
||||
|
||||
def write_to_file(self, file, hide_enemizer=False):
|
||||
with open(file, 'wb') as outfile:
|
||||
|
@ -661,7 +663,8 @@ def patch_rom(world, rom, player, team, enemized):
|
|||
rom.write_byte(location.player_address, location.item.player)
|
||||
else:
|
||||
itemid = 0x5A
|
||||
rom.write_byte(location.address, itemid)
|
||||
location_address = old_location_address_to_new_location_address.get(location.address, location.address)
|
||||
rom.write_byte(location_address, itemid)
|
||||
else:
|
||||
# crystals
|
||||
for address, value in zip(location.address, itemid):
|
||||
|
@ -1476,7 +1479,7 @@ def patch_rom(world, rom, player, team, enemized):
|
|||
|
||||
write_strings(rom, world, player, team)
|
||||
|
||||
rom.write_byte(0x18636C, 1 if world.remote_items[player] else 0)
|
||||
rom.write_byte(0x18637C, 1 if world.remote_items[player] else 0)
|
||||
|
||||
# set rom name
|
||||
# 21 bytes
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue