SA2B Style Improvements (#525)
This commit is contained in:
parent
48a7587c5a
commit
05efbe0af8
|
@ -255,16 +255,16 @@ location_table = {}
|
||||||
def setup_locations(world, player: int):
|
def setup_locations(world, player: int):
|
||||||
location_table = {**first_mission_location_table}
|
location_table = {**first_mission_location_table}
|
||||||
|
|
||||||
if world.IncludeMissions[player].value >= 2:
|
if world.include_missions[player].value >= 2:
|
||||||
location_table.update({**second_mission_location_table})
|
location_table.update({**second_mission_location_table})
|
||||||
|
|
||||||
if world.IncludeMissions[player].value >= 3:
|
if world.include_missions[player].value >= 3:
|
||||||
location_table.update({**third_mission_location_table})
|
location_table.update({**third_mission_location_table})
|
||||||
|
|
||||||
if world.IncludeMissions[player].value >= 4:
|
if world.include_missions[player].value >= 4:
|
||||||
location_table.update({**fourth_mission_location_table})
|
location_table.update({**fourth_mission_location_table})
|
||||||
|
|
||||||
if world.IncludeMissions[player].value >= 5:
|
if world.include_missions[player].value >= 5:
|
||||||
location_table.update({**fifth_mission_location_table})
|
location_table.update({**fifth_mission_location_table})
|
||||||
|
|
||||||
location_table.update({**upgrade_location_table})
|
location_table.update({**upgrade_location_table})
|
||||||
|
|
|
@ -68,10 +68,10 @@ class MusicShuffle(Choice):
|
||||||
|
|
||||||
|
|
||||||
sa2b_options: typing.Dict[str, type(Option)] = {
|
sa2b_options: typing.Dict[str, type(Option)] = {
|
||||||
"DeathLink": DeathLink,
|
"death_link": DeathLink,
|
||||||
"MusicShuffle": MusicShuffle,
|
"music_shuffle": MusicShuffle,
|
||||||
"IncludeMissions": IncludeMissions,
|
"include_missions": IncludeMissions,
|
||||||
"EmblemPercentageForCannonsCore": EmblemPercentageForCannonsCore,
|
"emblem_percentage_for_cannons_core": EmblemPercentageForCannonsCore,
|
||||||
"NumberOfLevelGates": NumberOfLevelGates,
|
"number_of_level_gates": NumberOfLevelGates,
|
||||||
"LevelGateDistribution": LevelGateDistribution,
|
"level_gate_distribution": LevelGateDistribution,
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,16 +15,16 @@ def set_mission_progress_rules(world: MultiWorld, player: int):
|
||||||
sorted(fourth_mission_location_table.items()),
|
sorted(fourth_mission_location_table.items()),
|
||||||
sorted(fifth_mission_location_table.items())):
|
sorted(fifth_mission_location_table.items())):
|
||||||
|
|
||||||
if world.IncludeMissions[player].value >= 2:
|
if world.include_missions[player].value >= 2:
|
||||||
set_rule(world.get_location(k2, player), lambda state, k1=k1: state.can_reach(k1, "Location", player))
|
set_rule(world.get_location(k2, player), lambda state, k1=k1: state.can_reach(k1, "Location", player))
|
||||||
|
|
||||||
if world.IncludeMissions[player].value >= 3:
|
if world.include_missions[player].value >= 3:
|
||||||
set_rule(world.get_location(k3, player), lambda state, k2=k2: state.can_reach(k2, "Location", player))
|
set_rule(world.get_location(k3, player), lambda state, k2=k2: state.can_reach(k2, "Location", player))
|
||||||
|
|
||||||
if world.IncludeMissions[player].value >= 4:
|
if world.include_missions[player].value >= 4:
|
||||||
set_rule(world.get_location(k4, player), lambda state, k3=k3: state.can_reach(k3, "Location", player))
|
set_rule(world.get_location(k4, player), lambda state, k3=k3: state.can_reach(k3, "Location", player))
|
||||||
|
|
||||||
if world.IncludeMissions[player].value >= 5:
|
if world.include_missions[player].value >= 5:
|
||||||
set_rule(world.get_location(k5, player), lambda state, k4=k4: state.can_reach(k4, "Location", player))
|
set_rule(world.get_location(k5, player), lambda state, k4=k4: state.can_reach(k4, "Location", player))
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ def set_mission_upgrade_rules(world: MultiWorld, player: int):
|
||||||
state.has(ItemName.sonic_bounce_bracelet, player))
|
state.has(ItemName.sonic_bounce_bracelet, player))
|
||||||
|
|
||||||
# Mission 2 Upgrade Requirements
|
# Mission 2 Upgrade Requirements
|
||||||
if world.IncludeMissions[player].value >= 2:
|
if world.include_missions[player].value >= 2:
|
||||||
add_rule(world.get_location(LocationName.metal_harbor_2, player),
|
add_rule(world.get_location(LocationName.metal_harbor_2, player),
|
||||||
lambda state: state.has(ItemName.sonic_light_shoes, player))
|
lambda state: state.has(ItemName.sonic_light_shoes, player))
|
||||||
add_rule(world.get_location(LocationName.mission_street_2, player),
|
add_rule(world.get_location(LocationName.mission_street_2, player),
|
||||||
|
@ -116,7 +116,7 @@ def set_mission_upgrade_rules(world: MultiWorld, player: int):
|
||||||
state.has(ItemName.eggman_jet_engine, player))
|
state.has(ItemName.eggman_jet_engine, player))
|
||||||
|
|
||||||
# Mission 3 Upgrade Requirements
|
# Mission 3 Upgrade Requirements
|
||||||
if world.IncludeMissions[player].value >= 3:
|
if world.include_missions[player].value >= 3:
|
||||||
add_rule(world.get_location(LocationName.city_escape_3, player),
|
add_rule(world.get_location(LocationName.city_escape_3, player),
|
||||||
lambda state: state.has(ItemName.sonic_mystic_melody, player))
|
lambda state: state.has(ItemName.sonic_mystic_melody, player))
|
||||||
add_rule(world.get_location(LocationName.wild_canyon_3, player),
|
add_rule(world.get_location(LocationName.wild_canyon_3, player),
|
||||||
|
@ -220,7 +220,7 @@ def set_mission_upgrade_rules(world: MultiWorld, player: int):
|
||||||
state.has(ItemName.sonic_light_shoes, player))
|
state.has(ItemName.sonic_light_shoes, player))
|
||||||
|
|
||||||
# Mission 4 Upgrade Requirements
|
# Mission 4 Upgrade Requirements
|
||||||
if world.IncludeMissions[player].value >= 4:
|
if world.include_missions[player].value >= 4:
|
||||||
add_rule(world.get_location(LocationName.metal_harbor_4, player),
|
add_rule(world.get_location(LocationName.metal_harbor_4, player),
|
||||||
lambda state: state.has(ItemName.sonic_light_shoes, player))
|
lambda state: state.has(ItemName.sonic_light_shoes, player))
|
||||||
add_rule(world.get_location(LocationName.pumpkin_hill_4, player),
|
add_rule(world.get_location(LocationName.pumpkin_hill_4, player),
|
||||||
|
@ -274,7 +274,7 @@ def set_mission_upgrade_rules(world: MultiWorld, player: int):
|
||||||
state.has(ItemName.sonic_bounce_bracelet, player))
|
state.has(ItemName.sonic_bounce_bracelet, player))
|
||||||
|
|
||||||
# Mission 5 Upgrade Requirements
|
# Mission 5 Upgrade Requirements
|
||||||
if world.IncludeMissions[player].value >= 5:
|
if world.include_missions[player].value >= 5:
|
||||||
add_rule(world.get_location(LocationName.city_escape_5, player),
|
add_rule(world.get_location(LocationName.city_escape_5, player),
|
||||||
lambda state: state.has(ItemName.sonic_flame_ring, player))
|
lambda state: state.has(ItemName.sonic_flame_ring, player))
|
||||||
add_rule(world.get_location(LocationName.wild_canyon_5, player),
|
add_rule(world.get_location(LocationName.wild_canyon_5, player),
|
||||||
|
@ -341,6 +341,7 @@ def set_mission_upgrade_rules(world: MultiWorld, player: int):
|
||||||
add_rule(world.get_location(LocationName.cannon_core_5, player),
|
add_rule(world.get_location(LocationName.cannon_core_5, player),
|
||||||
lambda state: state.has(ItemName.tails_booster, player) and
|
lambda state: state.has(ItemName.tails_booster, player) and
|
||||||
state.has(ItemName.eggman_jet_engine, player) and
|
state.has(ItemName.eggman_jet_engine, player) and
|
||||||
|
state.has(ItemName.knuckles_mystic_melody, player) and
|
||||||
state.has(ItemName.knuckles_hammer_gloves, player) and
|
state.has(ItemName.knuckles_hammer_gloves, player) and
|
||||||
state.has(ItemName.knuckles_air_necklace, player) and
|
state.has(ItemName.knuckles_air_necklace, player) and
|
||||||
state.has(ItemName.sonic_bounce_bracelet, player))
|
state.has(ItemName.sonic_bounce_bracelet, player))
|
||||||
|
|
|
@ -65,12 +65,12 @@ class SA2BWorld(World):
|
||||||
return {
|
return {
|
||||||
"ModVersion": 100,
|
"ModVersion": 100,
|
||||||
"MusicMap": self.music_map,
|
"MusicMap": self.music_map,
|
||||||
"MusicShuffle": self.world.MusicShuffle[self.player],
|
"MusicShuffle": self.world.music_shuffle[self.player].value,
|
||||||
"DeathLink": self.world.DeathLink[self.player],
|
"DeathLink": self.world.death_link[self.player].value,
|
||||||
"IncludeMissions": self.world.IncludeMissions[self.player].value,
|
"IncludeMissions": self.world.include_missions[self.player].value,
|
||||||
"EmblemPercentageForCannonsCore": self.world.EmblemPercentageForCannonsCore[self.player].value,
|
"EmblemPercentageForCannonsCore": self.world.emblem_percentage_for_cannons_core[self.player].value,
|
||||||
"NumberOfLevelGates": self.world.NumberOfLevelGates[self.player].value,
|
"NumberOfLevelGates": self.world.number_of_level_gates[self.player].value,
|
||||||
"LevelGateDistribution": self.world.LevelGateDistribution[self.player],
|
"LevelGateDistribution": self.world.level_gate_distribution[self.player].value,
|
||||||
"EmblemsForCannonsCore": self.emblems_for_cannons_core,
|
"EmblemsForCannonsCore": self.emblems_for_cannons_core,
|
||||||
"RegionEmblemMap": self.region_emblem_map,
|
"RegionEmblemMap": self.region_emblem_map,
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ class SA2BWorld(World):
|
||||||
|
|
||||||
def get_levels_per_gate(self) -> list:
|
def get_levels_per_gate(self) -> list:
|
||||||
levels_per_gate = list()
|
levels_per_gate = list()
|
||||||
max_gate_index = self.world.NumberOfLevelGates[self.player]
|
max_gate_index = self.world.number_of_level_gates[self.player]
|
||||||
average_level_count = 30 / (max_gate_index + 1)
|
average_level_count = 30 / (max_gate_index + 1)
|
||||||
levels_added = 0
|
levels_added = 0
|
||||||
|
|
||||||
|
@ -103,8 +103,8 @@ class SA2BWorld(World):
|
||||||
levels_added += 1
|
levels_added += 1
|
||||||
additional_count_iterator += 1 if additional_count_iterator < max_gate_index else -max_gate_index
|
additional_count_iterator += 1 if additional_count_iterator < max_gate_index else -max_gate_index
|
||||||
|
|
||||||
if self.world.LevelGateDistribution[self.player] == 0 or self.world.LevelGateDistribution[self.player] == 2:
|
if self.world.level_gate_distribution[self.player] == 0 or self.world.level_gate_distribution[self.player] == 2:
|
||||||
early_distribution = self.world.LevelGateDistribution[self.player] == 0
|
early_distribution = self.world.level_gate_distribution[self.player] == 0
|
||||||
levels_to_distribute = 5
|
levels_to_distribute = 5
|
||||||
gate_index_offset = 0
|
gate_index_offset = 0
|
||||||
while levels_to_distribute > 0:
|
while levels_to_distribute > 0:
|
||||||
|
@ -133,7 +133,7 @@ class SA2BWorld(World):
|
||||||
total_required_locations = 31
|
total_required_locations = 31
|
||||||
|
|
||||||
# Mission Locations
|
# Mission Locations
|
||||||
total_required_locations *= self.world.IncludeMissions[self.player].value
|
total_required_locations *= self.world.include_missions[self.player].value
|
||||||
|
|
||||||
# Upgrades
|
# Upgrades
|
||||||
total_required_locations += 28
|
total_required_locations += 28
|
||||||
|
@ -147,7 +147,7 @@ class SA2BWorld(World):
|
||||||
# itempool += [self.create_item(ItemName.emblem)] * total_emblem_count
|
# itempool += [self.create_item(ItemName.emblem)] * total_emblem_count
|
||||||
|
|
||||||
self.emblems_for_cannons_core = math.floor(
|
self.emblems_for_cannons_core = math.floor(
|
||||||
total_emblem_count * (self.world.EmblemPercentageForCannonsCore[self.player].value / 100.0))
|
total_emblem_count * (self.world.emblem_percentage_for_cannons_core[self.player].value / 100.0))
|
||||||
|
|
||||||
shuffled_region_list = list(range(30))
|
shuffled_region_list = list(range(30))
|
||||||
emblem_requirement_list = list()
|
emblem_requirement_list = list()
|
||||||
|
@ -168,8 +168,8 @@ class SA2BWorld(World):
|
||||||
total_levels_added += 1
|
total_levels_added += 1
|
||||||
if levels_added_to_gate >= levels_per_gate[current_gate]:
|
if levels_added_to_gate >= levels_per_gate[current_gate]:
|
||||||
current_gate += 1
|
current_gate += 1
|
||||||
if current_gate > self.world.NumberOfLevelGates[self.player].value:
|
if current_gate > self.world.number_of_level_gates[self.player].value:
|
||||||
current_gate = self.world.NumberOfLevelGates[self.player].value
|
current_gate = self.world.number_of_level_gates[self.player].value
|
||||||
else:
|
else:
|
||||||
current_gate_emblems = max(
|
current_gate_emblems = max(
|
||||||
math.floor(total_emblem_count * math.pow(total_levels_added / 30.0, 2.0)), current_gate)
|
math.floor(total_emblem_count * math.pow(total_levels_added / 30.0, 2.0)), current_gate)
|
||||||
|
@ -186,12 +186,12 @@ class SA2BWorld(World):
|
||||||
|
|
||||||
self.world.itempool += itempool
|
self.world.itempool += itempool
|
||||||
|
|
||||||
if self.world.MusicShuffle[self.player] == "levels":
|
if self.world.music_shuffle[self.player] == "levels":
|
||||||
musiclist_o = list(range(0, 47))
|
musiclist_o = list(range(0, 47))
|
||||||
musiclist_s = musiclist_o.copy()
|
musiclist_s = musiclist_o.copy()
|
||||||
self.world.random.shuffle(musiclist_s)
|
self.world.random.shuffle(musiclist_s)
|
||||||
self.music_map = dict(zip(musiclist_o, musiclist_s))
|
self.music_map = dict(zip(musiclist_o, musiclist_s))
|
||||||
elif self.world.MusicShuffle[self.player] == "full":
|
elif self.world.music_shuffle[self.player] == "full":
|
||||||
musiclist_o = list(range(0, 78))
|
musiclist_o = list(range(0, 78))
|
||||||
musiclist_s = musiclist_o.copy()
|
musiclist_s = musiclist_o.copy()
|
||||||
self.world.random.shuffle(musiclist_s)
|
self.world.random.shuffle(musiclist_s)
|
||||||
|
|
|
@ -4,13 +4,15 @@
|
||||||
|
|
||||||
- Sonic Adventure 2: Battle from: [Sonic Adventure 2: Battle Steam Store Page](https://store.steampowered.com/app/213610/Sonic_Adventure_2/)
|
- Sonic Adventure 2: Battle from: [Sonic Adventure 2: Battle Steam Store Page](https://store.steampowered.com/app/213610/Sonic_Adventure_2/)
|
||||||
- Currently the DLC is not required for this mod, but it will be required in a future release.
|
- Currently the DLC is not required for this mod, but it will be required in a future release.
|
||||||
- Sonic Adventure 2 Mod Loader from: [Sonic Retro Mod Loader Page](http://info.sonicretro.org/SA2_Mod_Loader )
|
- Sonic Adventure 2 Mod Loader from: [Sonic Retro Mod Loader Page](http://info.sonicretro.org/SA2_Mod_Loader)
|
||||||
- Microsoft Visual C++ 2013 from: [Microsoft Visual C++ 2013 Redistributable Page](https://www.microsoft.com/en-us/download/details.aspx?id=40784 )
|
- Microsoft Visual C++ 2013 from: [Microsoft Visual C++ 2013 Redistributable Page](https://www.microsoft.com/en-us/download/details.aspx?id=40784)
|
||||||
- Archipelago Mod for Sonic Adventure 2: Battle
|
- Archipelago Mod for Sonic Adventure 2: Battle
|
||||||
from: [Sonic Adventure 2: Battle Archipelago Randomizer Mod Releases Page](https://github.com/PoryGone/SA2B_Archipelago/releases/)
|
from: [Sonic Adventure 2: Battle Archipelago Randomizer Mod Releases Page](https://github.com/PoryGone/SA2B_Archipelago/releases/)
|
||||||
|
|
||||||
Optional:
|
## Optional Software
|
||||||
- Sonic Adventure 2: Battle Archipelago PopTracker pack from: [SA2B_AP_Tracker Releases Page](https://github.com/PoryGone/SA2B_AP_Tracker/releases/)
|
- Sonic Adventure 2 Tracker
|
||||||
|
- PopTracker from: [PopTracker Releases Page](https://github.com/black-sliver/PopTracker/releases/)
|
||||||
|
- Sonic Adventure 2: Battle Archipelago PopTracker pack from: [SA2B AP Tracker Releases Page](https://github.com/PoryGone/SA2B_AP_Tracker/releases/)
|
||||||
|
|
||||||
## Installation Procedures
|
## Installation Procedures
|
||||||
|
|
||||||
|
@ -47,9 +49,7 @@ Optional:
|
||||||
Some additional settings related to the Archipelago messages in game can be adjusted in the SA2ModManager if you select `Configure...` on the SA2B_Archipelago mod. This settings will be under a `General Settings` tab.
|
Some additional settings related to the Archipelago messages in game can be adjusted in the SA2ModManager if you select `Configure...` on the SA2B_Archipelago mod. This settings will be under a `General Settings` tab.
|
||||||
|
|
||||||
- Message Display Count: This is the maximum number of Archipelago messages that can be displayed on screen at any given time.
|
- Message Display Count: This is the maximum number of Archipelago messages that can be displayed on screen at any given time.
|
||||||
|
|
||||||
- Message Display Duration: This dictates how long Archipelago messages are displayed on screen (in seconds).
|
- Message Display Duration: This dictates how long Archipelago messages are displayed on screen (in seconds).
|
||||||
|
|
||||||
- Message Font Size: The is the size of the font used to display the messages from Archipelago.
|
- Message Font Size: The is the size of the font used to display the messages from Archipelago.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
Loading…
Reference in New Issue