Fixed customizer example

Fixed /missing command in multiworld for non-pottery lottery settings
This commit is contained in:
aerinon
2023-07-28 12:29:47 -06:00
parent b7b9e5aea7
commit 75fc1f7cc3
4 changed files with 21 additions and 6 deletions

View File

@@ -34,7 +34,7 @@ from source.overworld.EntranceShuffle2 import link_entrances_new
from source.tools.BPS import create_bps_from_data
from source.classes.CustomSettings import CustomSettings
version_number = '1.2.0.18'
version_number = '1.2.0.19'
version_branch = '-u'
__version__ = f'{version_number}{version_branch}'

View File

@@ -66,6 +66,8 @@ class Context:
self.lookup_name_to_id = {}
self.lookup_id_to_name = {}
self.pottery_locations_enabled = None
def color_code(*args):
codes = {'reset': 0, 'bold': 1, 'underline': 4, 'black': 30, 'red': 31, 'green': 32, 'yellow': 33, 'blue': 34,
'magenta': 35, 'cyan': 36, 'white': 37 , 'black_bg': 40, 'red_bg': 41, 'green_bg': 42, 'yellow_bg': 43,
@@ -96,6 +98,8 @@ SHOP_SRAM_START = WRAM_START + 0x0164B8 # 2 bytes?
ITEM_SRAM_SIZE = 0x250
SHOP_SRAM_LEN = 0x29 # 41 tracked items
POT_LOCATION_TABLE = 0x142A60
RECV_PROGRESS_ADDR = SAVEDATA_START + 0x4D0 # 2 bytes
RECV_ITEM_ADDR = SAVEDATA_START + 0x4D2 # 1 byte
RECV_ITEM_PLAYER_ADDR = SAVEDATA_START + 0x4D3 # 1 byte
@@ -826,12 +830,14 @@ def get_location_name_from_address(ctx, address):
def filter_location(ctx, location):
if location in location_table_pot_items:
tile_idx, mask = location_table_pot_items[location]
tracking_data = ctx.pottery_locations_enabled
tile_pots = tracking_data[tile_idx] | (tracking_data[tile_idx+1] << 8)
return (mask & tile_pots) == 0
if (not ctx.key_drop_mode and location in PotShuffle.key_drop_data
and PotShuffle.key_drop_data[location][0] == 'Drop'):
return True
if (not ctx.pottery_mode and location in PotShuffle.key_drop_data
and PotShuffle.key_drop_data[location][0] == 'Pot'):
return True
if not ctx.shop_mode and location in Regions.flat_normal_shops:
return True
if not ctx.retro_mode and location in Regions.flat_retro_shops:
@@ -996,6 +1002,9 @@ async def game_watcher(ctx : Context):
logging.warning("ROM change detected, please reconnect to the multiworld server")
await disconnect(ctx)
if ctx.pottery_locations_enabled is None:
ctx.pottery_locations_enabled = await snes_read(ctx, POT_LOCATION_TABLE, 0x250)
gamemode = await snes_read(ctx, WRAM_START + 0x10, 1)
if gamemode is None or gamemode[0] not in INGAME_MODES:
continue

View File

@@ -110,8 +110,11 @@ These are now independent of retro mode and have three options: None, Random, an
# Bug Fixes and Notes
* 1.2.0.19u
* Fixed a bug with dungeon generation
* Added min/max for triforce pool, goal, and differnce for CLI and Customizer. (Thanks Catobat)
* Fixed a bug with dungeon generation
* Multiworld: Fixed /missing command to not list all the pots
* Changed the "Ganonhunt" goal to use open pyramid on the Auto setting
* Customizer: Fixed the example yaml for shopsanity
* 1.2.0.18u
* Fixed an issue with pyramid hole being in logic when it is not opened.
* Crystal cutscene at GT use new symmetrical layouts (thanks Codemann)

View File

@@ -1,7 +1,7 @@
meta:
algorithm: balanced
players: 1
seed: 42
seed: 41 # note to self: seed 42 had an interesting Swamp Palace problem
names: Lonk
settings:
1:
@@ -56,6 +56,9 @@ item_pool:
Sanctuary Heart Container: 3
Shovel: 3
Single Arrow: 1
Green Potion: 1
Blue Potion: 1
Red Potion: 1
placements:
1:
Palace of Darkness - Big Chest: Hammer