Merge remote-tracking branch 'origin/OverworldShuffle' into OverworldShuffle

This commit is contained in:
2022-09-18 18:57:25 -07:00
78 changed files with 8114 additions and 2984 deletions

View File

@@ -1,5 +1,5 @@
import random
from Utils import int16_as_bytes
from Utils import int16_as_bytes, snes_to_pc
class SFX(object):
@@ -126,7 +126,7 @@ def shuffle_sfx_data():
random.shuffle(candidates)
# place chained sfx first
random.shuffle(chained_sfx) # todo: sort largest to smallest
random.shuffle(chained_sfx)
chained_sfx = sorted(chained_sfx, key=lambda x: len(x.chain), reverse=True)
for chained in chained_sfx:
chosen_slot = next(x for x in candidates if len(accompaniment_map[x[0]]) - len(chained.chain) >= 0)
@@ -153,16 +153,13 @@ def shuffle_sfx_data():
sfx_table = {
2: 0x1a8c29,
3: 0x1A8D25
2: 0x1A8BD0,
3: 0x1A8CCC
}
# 0x1a8c29
# d8059
sfx_accompaniment_table = {
2: 0x1A8CA7,
3: 0x1A8DA3
2: 0x1A8C4E,
3: 0x1A8D4A
}
@@ -171,9 +168,9 @@ def randomize_sfx(rom):
for shuffled_sfx in sfx_map.values():
for sfx in shuffled_sfx.values():
base_address = sfx_table[sfx.target_set]
base_address = snes_to_pc(sfx_table[sfx.target_set])
rom.write_bytes(base_address + (sfx.target_id * 2) - 2, int16_as_bytes(sfx.addr))
ac_base = sfx_accompaniment_table[sfx.target_set]
ac_base = snes_to_pc(sfx_accompaniment_table[sfx.target_set])
last = sfx.target_id
if sfx.target_chain:
for chained in sfx.target_chain:

View File

@@ -4,6 +4,7 @@ import json
import os
import random
import shutil
import ssl
from urllib.parse import urlparse
from urllib.request import urlopen
import webbrowser
@@ -149,7 +150,7 @@ class SpriteSelector(object):
try:
task.update_status("Downloading official sprites list")
with urlopen('https://alttpr.com/sprites') as response:
with urlopen('https://alttpr.com/sprites', context=ssl._create_unverified_context()) as response:
sprites_arr = json.loads(response.read().decode("utf-8"))
except Exception as e:
resultmessage = "Error getting list of official sprites. Sprites not updated.\n\n%s: %s" % (type(e).__name__, e)

View File

@@ -73,7 +73,8 @@ SETTINGSTOPROCESS = {
"progressives": "progressive",
"accessibility": "accessibility",
"sortingalgo": "algorithm",
"beemizer": "beemizer"
"beemizer": "beemizer",
"restrict_boss_items": "restrict_boss_items"
},
"overworld": {
"overworldshuffle": "ow_shuffle",
@@ -81,13 +82,15 @@ SETTINGSTOPROCESS = {
"keepsimilar": "ow_keepsimilar",
"mixed": "ow_mixed",
"whirlpool": "ow_whirlpool",
"bonk_drops": "bonk_drops",
"overworldflute": "ow_fluteshuffle"
},
"entrance": {
"openpyramid": "openpyramid",
"shuffleganon": "shuffleganon",
"shufflelinks": "shufflelinks",
"entranceshuffle": "shuffle"
"entranceshuffle": "shuffle",
"overworld_map": "overworld_map",
},
"enemizer": {
"enemyshuffle": "shuffleenemies",
@@ -100,9 +103,12 @@ SETTINGSTOPROCESS = {
"compassshuffle": "compassshuffle",
"smallkeyshuffle": "keyshuffle",
"bigkeyshuffle": "bigkeyshuffle",
"keydropshuffle": "keydropshuffle",
"dungeondoorshuffle": "door_shuffle",
"dungeonintensity": "intensity",
"keydropshuffle": "keydropshuffle",
"dropshuffle": "dropshuffle",
"pottery": "pottery",
"colorizepots": "colorizepots",
"potshuffle": "shufflepots",
"experimental": "experimental",
"dungeon_counters": "dungeon_counters",
@@ -118,9 +124,12 @@ SETTINGSTOPROCESS = {
"owpalettes": "ow_palettes",
"uwpalettes": "uw_palettes",
"reduce_flashing": "reduce_flashing",
"shuffle_sfx": "shuffle_sfx"
"shuffle_sfx": "shuffle_sfx",
'msu_resume': 'msu_resume',
'collection_rate': 'collection_rate',
},
"generation": {
"bps": "bps",
"createspoiler": "create_spoiler",
"createrom": "create_rom",
"calcplaythrough": "calc_playthrough",