Pottery fixes for Room0127

Added mystery flag for future use
This commit is contained in:
aerinon
2022-04-21 11:03:49 -06:00
parent a035beca1e
commit 31aeb8a776
7 changed files with 31 additions and 9 deletions

1
CLI.py
View File

@@ -145,6 +145,7 @@ def parse_settings():
"progressive": "on", "progressive": "on",
"accessibility": "items", "accessibility": "items",
"algorithm": "balanced", "algorithm": "balanced",
'mystery': False,
"restrict_boss_items": "none", "restrict_boss_items": "none",
# Shuffle Ganon defaults to TRUE # Shuffle Ganon defaults to TRUE

View File

@@ -289,7 +289,7 @@ def main(args, seed=None, fish=None):
logging.warning(enemizerMsg) logging.warning(enemizerMsg)
raise EnemizerError(enemizerMsg) raise EnemizerError(enemizerMsg)
patch_rom(world, rom, player, team, enemized, bool(args.outputname)) patch_rom(world, rom, player, team, enemized, bool(args.mystery))
if args.race: if args.race:
patch_race_rom(rom) patch_race_rom(rom)

View File

@@ -69,6 +69,7 @@ def main():
erargs.outputname = seedname erargs.outputname = seedname
erargs.outputpath = args.outputpath erargs.outputpath = args.outputpath
erargs.loglevel = args.loglevel erargs.loglevel = args.loglevel
erargs.mystery = True
if args.rom: if args.rom:
erargs.rom = args.rom erargs.rom = args.rom

View File

@@ -850,7 +850,7 @@ vanilla_pots = {
Pot(100, 22, PotItem.Heart, 'Dark Lake Hylia Ledge Spike Cave', obj=RoomObject(0x0AB62A, [0xCB, 0xB3, 0xFA])), Pot(100, 22, PotItem.Heart, 'Dark Lake Hylia Ledge Spike Cave', obj=RoomObject(0x0AB62A, [0xCB, 0xB3, 0xFA])),
Pot(88, 28, PotItem.Heart, 'Dark Lake Hylia Ledge Spike Cave', obj=RoomObject(0x0AB633, [0xB3, 0xE3, 0xFA])), Pot(88, 28, PotItem.Heart, 'Dark Lake Hylia Ledge Spike Cave', obj=RoomObject(0x0AB633, [0xB3, 0xE3, 0xFA])),
Pot(100, 28, PotItem.Heart, 'Dark Lake Hylia Ledge Spike Cave', obj=RoomObject(0x0AB636, [0xCB, 0xE3, 0xFA]))], Pot(100, 28, PotItem.Heart, 'Dark Lake Hylia Ledge Spike Cave', obj=RoomObject(0x0AB636, [0xCB, 0xE3, 0xFA]))],
0x127: [Pot(24, 25, PotItem.Nothing, 'Dark World Hammer Peg Cave', obj=RoomObject(0x2A801A, [0xB3, 0xB3, 0xFA])), 0x127: [Pot(24, 25, PotItem.Nothing, 'Dark World Hammer Peg Cave', obj=RoomObject(0x2A801A, [0x33, 0xCB, 0xFA])),
Pot(28, 25, PotItem.Nothing, 'Dark World Hammer Peg Cave', obj=RoomObject(0x2A801D, [0x3B, 0xCB, 0xFA])), Pot(28, 25, PotItem.Nothing, 'Dark World Hammer Peg Cave', obj=RoomObject(0x2A801D, [0x3B, 0xCB, 0xFA])),
Pot(32, 25, PotItem.Nothing, 'Dark World Hammer Peg Cave', obj=RoomObject(0x2A8020, [0x43, 0xCB, 0xFA])), Pot(32, 25, PotItem.Nothing, 'Dark World Hammer Peg Cave', obj=RoomObject(0x2A8020, [0x43, 0xCB, 0xFA])),
Pot(36, 25, PotItem.Nothing, 'Dark World Hammer Peg Cave', obj=RoomObject(0x2A8023, [0x4B, 0xCB, 0xFA]))], Pot(36, 25, PotItem.Nothing, 'Dark World Hammer Peg Cave', obj=RoomObject(0x2A8023, [0x4B, 0xCB, 0xFA]))],

View File

@@ -10,15 +10,25 @@ New pottery option that control which pots (and large blocks) are in the locatio
* Key Pots: The pots that have keys are in the pool. This is about half of the old keydropshuffle option * Key Pots: The pots that have keys are in the pool. This is about half of the old keydropshuffle option
* Cave Pots: The pots that are not found in dungeons are in the pool. (Includes the large block in Spike Cave). Does * Cave Pots: The pots that are not found in dungeons are in the pool. (Includes the large block in Spike Cave). Does
not include key pots. not include key pots.
* CaveKeys: Both non-dungeon pots and pots that used to have keys are in the pool.
* Reduced: Same as CaveKeys but also roughly a quarter of dungeon pots are added to the location pool picked at random. This is a dynamic mode so pots in the pool will be colored. Pots out of the pool will have vanilla contents.
* Clustered: LIke reduced but pot are grouped by logical sets and roughly 50% of pots are chosen from those group. This is a dynamic mode like the above.
* Nonempty: All pots that had some sort of objects under them are chosen to be in the location pool. This excludes most large blocks and some pots out of dungeons.
* Dungeon Pots: The pots that are in dungeons are in the pool. (Includes serveral large blocks) * Dungeon Pots: The pots that are in dungeons are in the pool. (Includes serveral large blocks)
* Lottery: All pots and large blocks are in the pool * Lottery: All pots and large blocks are in the pool
By default, switches remain in their vanilla location (unless you turn on the legacy option below) By default, switches remain in their vanilla location (unless you turn on the legacy option below)
CLI `--pottery <option>` from `none, keys, lottery` CLI `--pottery <option>` from `none, keys, cave, cavekeys, reduced, clustered, nonempty, dungeon, lottery`
Note for multiworld: due to the design of the pottery lottery, only 256 items for other players can be under pots in your world. Note for multiworld: due to the design of the pottery lottery, only 256 items for other players can be under pots in your world.
### Colorize Pots
If the pottery mode is dynamic, this option is forced to be on (clustered and reduced). It is allowed to be on in all other pottery modes. Exception "none" where no pots would be colored, and "lottery" where all pots would be. This option colors the pots differently that have been chosen to be part of the location pool. If not specified, you are expected to remember the pottery setting you chose.
CLI `--colorizepots`
### Shuffle key drops ### Shuffle key drops
Enemies that drop keys can have their drop shuffled into the pool. This is the other half of the keydropshuffle option. Enemies that drop keys can have their drop shuffled into the pool. This is the other half of the keydropshuffle option.
@@ -148,9 +158,12 @@ Same as above but both small keys and bigs keys of the dungeon are not allowed o
#### Volatile #### Volatile
* 1.0.1.13 * 1.0.1.13
* New pottery modes
* Trinity goal added
* Potential fix for pottery hera key * Potential fix for pottery hera key
* Fix for arrows sneaking into item pool with rupee bow * Fix for arrows sneaking into item pool with rupee bow
* Fixed msu resume bug on patcher * Fixed msu resume bug on patcher
* Bonk Recoil OHKO fix (again)
* 1.0.1.12 * 1.0.1.12
* Fix for Multiworld forfeits, shops and pot items now included * Fix for Multiworld forfeits, shops and pot items now included
* Reworked GT Trash Fill. Base rate is 0-75% of locations fill with 7 crystals entrance requirements. Triforce hunt is 75%-100% of locations. The 75% number will decrease based on the crystal entrance requirement. Dungeon_only algorithm caps it based on how many items need to be placed in dungeons. Cross dungeon shuffle will now work with the trash fill. * Reworked GT Trash Fill. Base rate is 0-75% of locations fill with 7 crystals entrance requirements. Triforce hunt is 75%-100% of locations. The 75% number will decrease based on the crystal entrance requirement. Dungeon_only algorithm caps it based on how many items need to be placed in dungeons. Cross dungeon shuffle will now work with the trash fill.

14
Rom.py
View File

@@ -651,9 +651,15 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
if world.mapshuffle[player]: if world.mapshuffle[player]:
rom.write_byte(0x155C9, random.choice([0x11, 0x16])) # Randomize GT music too with map shuffle rom.write_byte(0x155C9, random.choice([0x11, 0x16])) # Randomize GT music too with map shuffle
if world.pottery[player] not in ['none']:
rom.write_bytes(snes_to_pc(0x1F8375), int32_as_bytes(0x2A8000))
# make hammer pegs use different tiles
Room0127.write_to_rom(snes_to_pc(0x2A8000), rom)
if world.pot_contents[player]: if world.pot_contents[player]:
colorize_pots = (world.pottery[player] not in ['vanilla', 'lottery'] colorize_pots = is_mystery or (world.pottery[player] not in ['vanilla', 'lottery']
and (world.colorizepots[player] or world.pottery[player] in ['reduced', 'clustered'])) and (world.colorizepots[player]
or world.pottery[player] in ['reduced', 'clustered']))
if world.pot_contents[player].size() > 0x2800: if world.pot_contents[player].size() > 0x2800:
raise Exception('Pot table is too big for current area') raise Exception('Pot table is too big for current area')
world.pot_contents[player].write_pot_data_to_rom(rom, colorize_pots) world.pot_contents[player].write_pot_data_to_rom(rom, colorize_pots)
@@ -897,10 +903,6 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
# Cuccos should not prevent kill rooms from opening # Cuccos should not prevent kill rooms from opening
rom.write_byte(snes_to_pc(0x0DB457), 0x40) rom.write_byte(snes_to_pc(0x0DB457), 0x40)
rom.write_byte(snes_to_pc(0x28AA56), 0 if world.pottery[player] == 'none' else 1) rom.write_byte(snes_to_pc(0x28AA56), 0 if world.pottery[player] == 'none' else 1)
if world.pottery[player] not in ['none']:
rom.write_bytes(snes_to_pc(0x1F8375), int32_as_bytes(0x2A8000))
# make hammer pegs use different tiles
Room0127.write_to_rom(snes_to_pc(0x2A8000), rom)
write_int16(rom, 0x187010, credits_total) # dynamic credits write_int16(rom, 0x187010, credits_total) # dynamic credits
if credits_total != 216: if credits_total != 216:

View File

@@ -13,6 +13,11 @@
"suppress_spoiler": { "suppress_spoiler": {
"action": "store_true" "action": "store_true"
}, },
"mystery": {
"action": "store_true",
"type": "bool",
"help": "suppress"
},
"logic": { "logic": {
"choices": [ "choices": [
"noglitches", "noglitches",