about summary refs log tree commit diff stats
path: root/apworld/options.py
diff options
context:
space:
mode:
Diffstat (limited to 'apworld/options.py')
-rw-r--r--apworld/options.py135
1 files changed, 134 insertions, 1 deletions
diff --git a/apworld/options.py b/apworld/options.py index 3646eea..c1eab33 100644 --- a/apworld/options.py +++ b/apworld/options.py
@@ -1,6 +1,6 @@
1from dataclasses import dataclass 1from dataclasses import dataclass
2 2
3from Options import PerGameCommonOptions, Toggle, Choice, DefaultOnToggle, Range 3from Options import PerGameCommonOptions, Toggle, Choice, DefaultOnToggle, Range, OptionSet, FreeText
4 4
5 5
6class ShuffleDoors(DefaultOnToggle): 6class ShuffleDoors(DefaultOnToggle):
@@ -44,6 +44,17 @@ class ShuffleLetters(Choice):
44 option_item_cyan = 4 44 option_item_cyan = 4
45 45
46 46
47class RestrictLetterPlacements(Toggle):
48 """
49 If enabled, letter items will be shuffled among letter locations in your local world. Shuffle Letters must be set to
50 Progressive or Item Cyan for this to be useful.
51
52 WARNING: This option may slow down generation. Additionally, it is only reliable with Shuffle Letters set to Item
53 Cyan. When set to Progressive, Shuffle Doors and Shuffle Symbols must be turned off.
54 """
55 display_name = "Restrict Letter Placements"
56
57
47class ShuffleSymbols(Toggle): 58class ShuffleSymbols(Toggle):
48 """ 59 """
49 If enabled, 19 items will be added to the pool, representing the different symbols that can appear on a panel. 60 If enabled, 19 items will be added to the pool, representing the different symbols that can appear on a panel.
@@ -52,6 +63,15 @@ class ShuffleSymbols(Toggle):
52 display_name = "Shuffle Symbols" 63 display_name = "Shuffle Symbols"
53 64
54 65
66class ShuffleWorldports(Toggle):
67 """
68 Randomizes the connections between maps. This affects worldports only, which are the loading zones you walk into in
69 order to change maps. This does not affect paintings, panels that teleport you, or certain other special connections
70 like the one between The Shop and Control Center.
71 """
72 display_name = "Shuffle Worldports"
73
74
55class KeyholderSanity(Toggle): 75class KeyholderSanity(Toggle):
56 """ 76 """
57 If enabled, 26 locations will be created for placing each key into its respective Green Ending keyholder. 77 If enabled, 26 locations will be created for placing each key into its respective Green Ending keyholder.
@@ -82,6 +102,72 @@ class CyanDoorBehavior(Choice):
82 option_item = 2 102 option_item = 2
83 103
84 104
105class ShuffleFastTravel(Toggle):
106 """If enabled, the list of maps you can fast travel to is randomized, except for The Entry, which is always
107 accessible."""
108 display_name = "Shuffle Fast Travel"
109
110
111class FastTravelAccess(Choice):
112 """
113 Controls how the fast travel buttons on the pause menu work.
114
115 - **Vanilla**: You can only fast travel to maps once you have been to them and stepped foot in the general area that
116 the warp would place you. This option means that fast travel has no impact on logic.
117 - **Unlocked**: All five fast travel maps will be available from the start.
118 - **Items**: Only The Entry is available from the start. The other fast travel buttons are locked behind items.
119 """
120 display_name = "Fast Travel Access"
121 option_vanilla = 0
122 option_unlocked = 1
123 option_items = 2
124
125
126class EnableIcarus(Toggle):
127 """
128 Controls whether Icarus is randomized. If disabled, which is the default, no locations or items will be created for
129 it, and its worldport will not be shuffled when worldport shuffle is on.
130 """
131 display_name = "Enable Icarus"
132
133
134class EnableGiftMaps(OptionSet):
135 """
136 Controls whether the beta tester gift maps are randomized. By default, these are not accessible at all from within
137 the randomizer. This option allows you to enter the maps, and creates items and locations for them. If worldport
138 shuffle is on, their worldports will be included in the randomization.
139
140 The gift maps are accessed via a panel in The Entry's Starting Room, which only appears if at least one gift map is
141 enabled. It is also treated like a cyan door, and will not appear until the condition specified in the Cyan Door
142 Behavior option is satisfied. Solving this panel with the name of one of the beta testers will teleport you to their
143 corresponding gift map.
144
145 In the base game, nothing happens once you complete a gift map. Masteries have been added to the gift maps in the
146 randomizer so that the player can be rewarded for completing them.
147
148 Note that the gift maps were originally only intended to be played by specific people, and as a result may be
149 frustrating or require knowledge of inside jokes. The Crystalline is particularly difficult as it requires
150 completing a parkour course.
151 """
152 display_name = "Enable Gift Maps"
153 valid_keys = ["The Advanced", "The Charismatic", "The Crystalline", "The Fuzzy", "The Stellar"]
154
155
156class DaedalusOnly(Toggle):
157 """
158 If enabled, all maps besides Daedalus, The Gold, and The Tenacious will be disabled. This overrides any other
159 map-based option, such as Enable Icarus. The player will start in Daedalus. The following options are restricted
160 with this setting:
161
162 - The ending must be set to Orange or Gold.
163 - Worldport shuffle must be enabled.
164 - Letter shuffle must Unlocked.
165 - Cyan Door Behavior cannot be set to Collect H2.
166 - Control Center Color shuffle must be enabled.
167 """
168 display_name = "Daedalus Only"
169
170
85class DaedalusRoofAccess(Toggle): 171class DaedalusRoofAccess(Toggle):
86 """ 172 """
87 If enabled, the player will be logically expected to be able to go from the castle entrance to any part of Daedalus 173 If enabled, the player will be logically expected to be able to go from the castle entrance to any part of Daedalus
@@ -92,6 +178,15 @@ class DaedalusRoofAccess(Toggle):
92 display_name = "Allow Daedalus Roof Access" 178 display_name = "Allow Daedalus Roof Access"
93 179
94 180
181class CustomMintEnding(FreeText):
182 """
183 If not blank, this will add a new panel that must be solved before collecting Mint Ending (EXIT in the Control
184 Center). The panel will only require typing the text provided for this option, which means the choice of letters
185 here has an impact on logic.
186 """
187 display_name = "Custom Mint Ending"
188
189
95class StrictPurpleEnding(DefaultOnToggle): 190class StrictPurpleEnding(DefaultOnToggle):
96 """ 191 """
97 If enabled, the player will be required to have all purple (level 1) letters in order to get Purple Ending. 192 If enabled, the player will be required to have all purple (level 1) letters in order to get Purple Ending.
@@ -142,6 +237,26 @@ class VictoryCondition(Choice):
142 option_white_ending = 12 237 option_white_ending = 12
143 238
144 239
240class EndingsRequirement(Range):
241 """The number of endings required to unlock White Ending."""
242 display_name = "Endings Requirement"
243 range_start = 0
244 range_end = 12
245 default = 12
246
247
248class MasteriesRequirement(Range):
249 """The number of masteries required to unlock White Ending.
250
251 There are only 13 masteries in the base game, but some of the other slot options may add more masteries to the
252 world. If the chosen number of masteries is higher than the total in your world, it will be automatically lowered to
253 the maximum."""
254 display_name = "Masteries Requirement"
255 range_start = 0
256 range_end = 19
257 default = 0
258
259
145class TrapPercentage(Range): 260class TrapPercentage(Range):
146 """Replaces junk items with traps, at the specified rate.""" 261 """Replaces junk items with traps, at the specified rate."""
147 display_name = "Trap Percentage" 262 display_name = "Trap Percentage"
@@ -150,17 +265,35 @@ class TrapPercentage(Range):
150 default = 0 265 default = 0
151 266
152 267
268class ShuffleMusic(Toggle):
269 """
270 If enabled, every map will be assigned a random music track.
271 """
272 display_name = "Shuffle Music"
273
274
153@dataclass 275@dataclass
154class Lingo2Options(PerGameCommonOptions): 276class Lingo2Options(PerGameCommonOptions):
155 shuffle_doors: ShuffleDoors 277 shuffle_doors: ShuffleDoors
156 shuffle_control_center_colors: ShuffleControlCenterColors 278 shuffle_control_center_colors: ShuffleControlCenterColors
157 shuffle_gallery_paintings: ShuffleGalleryPaintings 279 shuffle_gallery_paintings: ShuffleGalleryPaintings
158 shuffle_letters: ShuffleLetters 280 shuffle_letters: ShuffleLetters
281 restrict_letter_placements: RestrictLetterPlacements
159 shuffle_symbols: ShuffleSymbols 282 shuffle_symbols: ShuffleSymbols
283 shuffle_worldports: ShuffleWorldports
160 keyholder_sanity: KeyholderSanity 284 keyholder_sanity: KeyholderSanity
161 cyan_door_behavior: CyanDoorBehavior 285 cyan_door_behavior: CyanDoorBehavior
286 shuffle_fast_travel: ShuffleFastTravel
287 fast_travel_access: FastTravelAccess
288 enable_icarus: EnableIcarus
289 enable_gift_maps: EnableGiftMaps
290 daedalus_only: DaedalusOnly
162 daedalus_roof_access: DaedalusRoofAccess 291 daedalus_roof_access: DaedalusRoofAccess
292 custom_mint_ending: CustomMintEnding
163 strict_purple_ending: StrictPurpleEnding 293 strict_purple_ending: StrictPurpleEnding
164 strict_cyan_ending: StrictCyanEnding 294 strict_cyan_ending: StrictCyanEnding
165 victory_condition: VictoryCondition 295 victory_condition: VictoryCondition
296 endings_requirement: EndingsRequirement
297 masteries_requirement: MasteriesRequirement
166 trap_percentage: TrapPercentage 298 trap_percentage: TrapPercentage
299 shuffle_music: ShuffleMusic