Skip to content

Commit

Permalink
sm64ex: Various Features (#790)
Browse files Browse the repository at this point in the history
* sm64ex: Course and Secret Randomizer

* sm64ex: Allow higher star door costs, raise minimum amount of stars, deprecate ExtraStars

* sm64ex: Support setting MIPS costs

* sm64ex: Safeguard MIPS Costs
  • Loading branch information
N00byKing authored Jul 25, 2022
1 parent e6635cd commit c3ff201
Show file tree
Hide file tree
Showing 6 changed files with 237 additions and 152 deletions.
2 changes: 1 addition & 1 deletion worlds/generic/docs/advanced_settings_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ Super Mario 64:
StrictCapRequirements: true
StrictCannonRequirements: true
StarsToFinish: 70
ExtraStars: 30
AmountOfStars: 70
DeathLink: true
BuddyChecks: true
AreaRandomizer: true
Expand Down
53 changes: 36 additions & 17 deletions worlds/sm64ex/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,42 +182,61 @@ class SM64Location(Location):
"RR: 100 Coins": 3626104
}

locPSS_table = {
"The Princess's Secret Slide Block": 3626126,
"The Princess's Secret Slide Fast": 3626127,
}

locSA_table = {
"The Secret Aquarium": 3626161
}

locBitDW_table = {
"Bowser in the Dark World Red Coins": 3626105,
"Bowser in the Dark World Key": 3626178
}

locTotWC_table = {
"Tower of the Wing Cap Switch": 3626181,
"Tower of the Wing Cap Red Coins": 3626140
}

locCotMC_table = {
"Cavern of the Metal Cap Switch": 3626182,
"Cavern of the Metal Cap Red Coins": 3626133
}

locVCutM_table = {
"Vanish Cap Under the Moat Switch": 3626183,
"Vanish Cap Under the Moat Red Coins": 3626147
}

locBitFS_table = {
"Bowser in the Fire Sea Red Coins": 3626112,
"Bowser in the Fire Sea Key": 3626179
}

#Secret Stars and Stages
locWMotR_table = {
"Wing Mario Over the Rainbow": 3626154
}

locBitS_table = {
"Bowser in the Sky Red Coins": 3626119
}

#Secret Stars found inside the Castle
locSS_table = {
"Bowser in the Sky Red Coins": 3626119,
"The Princess's Secret Slide Block": 3626126,
"The Princess's Secret Slide Fast": 3626127,
"Cavern of the Metal Cap Red Coins": 3626133,
"Tower of the Wing Cap Red Coins": 3626140,
"Vanish Cap Under the Moat Red Coins": 3626147,
"Wing Mario Over the Rainbow": 3626154,
"The Secret Aquarium": 3626161,
"Toad (Basement)": 3626168,
"Toad (Second Floor)": 3626169,
"Toad (Third Floor)": 3626170,
"MIPS 1": 3626171,
"MIPS 2": 3626172
}

#Caps
locCap_table = {
"Tower of the Wing Cap Switch": 3626181,
"Cavern of the Metal Cap Switch": 3626182,
"Vanish Cap Under the Moat Switch": 3626183
}

# Correspond to 3626000 + course index * 7 + star index, then secret stars, then keys, then 100 Coin Stars
location_table = {**locBoB_table,**locWhomp_table,**locJRB_table,**locCCM_table,**locBBH_table, \
**locHMC_table,**locLLL_table,**locSSL_table,**locDDD_table,**locSL_table, \
**locWDW_table,**locTTM_table,**locTHI_table,**locTTC_table,**locRR_table, \
**loc100Coin_table,**locBitDW_table,**locBitFS_table,**locSS_table,**locCap_table}
**loc100Coin_table,**locPSS_table,**locSA_table,**locBitDW_table,**locTotWC_table, \
**locCotMC_table, **locVCutM_table, **locBitFS_table, **locWMotR_table, **locBitS_table, \
**locSS_table}
44 changes: 31 additions & 13 deletions worlds/sm64ex/Options.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import typing
from Options import Option, DefaultOnToggle, Range, Toggle, DeathLink
from Options import Option, DefaultOnToggle, Range, Toggle, DeathLink, Choice

class EnableCoinStars(DefaultOnToggle):
"""Disable to Ignore 100 Coin Stars. You can still collect them, but they don't do anything"""
Expand All @@ -16,19 +16,31 @@ class StrictCannonRequirements(DefaultOnToggle):
class FirstBowserStarDoorCost(Range):
"""How many stars are required at the Star Door to Bowser in the Dark World"""
range_start = 0
range_end = 20
range_end = 50
default = 8

class BasementStarDoorCost(Range):
"""How many stars are required at the Star Door in the Basement"""
range_start = 0
range_end = 50
range_end = 70
default = 30

class SecondFloorStarDoorCost(Range):
"""How many stars are required to access the third floor"""
range_start = 0
range_end = 50
range_end = 90
default = 50

class MIPS1Cost(Range):
"""How many stars are required to spawn MIPS the first time"""
range_start = 0
range_end = 40
default = 15

class MIPS2Cost(Range):
"""How many stars are required to spawn MIPS the secound time. Must be bigger or equal MIPS1Cost"""
range_start = 0
range_end = 80
default = 50

class StarsToFinish(Range):
Expand All @@ -38,15 +50,19 @@ class StarsToFinish(Range):
range_end = 100
default = 70

class ExtraStars(Range):
"""How many stars exist beyond those set for StarsToFinish"""
range_start = 0
range_end = 50
default = 50
class AmountOfStars(Range):
"""How many stars exist. Disabling 100 Coin Stars removes 15 from the Pool. At least max of any Cost set"""
range_start = 35
range_end = 120
default = 120

class AreaRandomizer(Toggle):
"""Randomize Entrances to Courses"""
display_name = "Course Randomizer"
class AreaRandomizer(Choice):
"""Randomize Entrances"""
display_name = "Entrance Randomizer"
alias_false = 0
option_Off = 0
option_Courses_Only = 1
option_Courses_and_Secrets = 2

class BuddyChecks(Toggle):
"""Bob-omb Buddies are checks, Cannon Unlocks are items"""
Expand All @@ -60,13 +76,15 @@ class ProgressiveKeys(DefaultOnToggle):
"AreaRandomizer": AreaRandomizer,
"ProgressiveKeys": ProgressiveKeys,
"EnableCoinStars": EnableCoinStars,
"AmountOfStars": AmountOfStars,
"StrictCapRequirements": StrictCapRequirements,
"StrictCannonRequirements": StrictCannonRequirements,
"FirstBowserStarDoorCost": FirstBowserStarDoorCost,
"BasementStarDoorCost": BasementStarDoorCost,
"SecondFloorStarDoorCost": SecondFloorStarDoorCost,
"MIPS1Cost": MIPS1Cost,
"MIPS2Cost": MIPS2Cost,
"StarsToFinish": StarsToFinish,
"ExtraStars": ExtraStars,
"death_link": DeathLink,
"BuddyChecks": BuddyChecks,
}
Loading

0 comments on commit c3ff201

Please sign in to comment.