diff --git a/Fill.py b/Fill.py
index d9919c1338..d8147b2eac 100644
--- a/Fill.py
+++ b/Fill.py
@@ -35,8 +35,8 @@ def fill_restrictive(multiworld: MultiWorld, base_state: CollectionState, locati
"""
:param multiworld: Multiworld to be filled.
:param base_state: State assumed before fill.
- :param locations: Locations to be filled with item_pool
- :param item_pool: Items to fill into the locations
+ :param locations: Locations to be filled with item_pool, gets mutated by removing locations that get filled.
+ :param item_pool: Items to fill into the locations, gets mutated by removing items that get placed.
:param single_player_placement: if true, can speed up placement if everything belongs to a single player
:param lock: locations are set to locked as they are filled
:param swap: if true, swaps of already place items are done in the event of a dead end
@@ -220,7 +220,8 @@ def fill_restrictive(multiworld: MultiWorld, base_state: CollectionState, locati
def remaining_fill(multiworld: MultiWorld,
locations: typing.List[Location],
itempool: typing.List[Item],
- name: str = "Remaining") -> None:
+ name: str = "Remaining",
+ move_unplaceable_to_start_inventory: bool = False) -> None:
unplaced_items: typing.List[Item] = []
placements: typing.List[Location] = []
swapped_items: typing.Counter[typing.Tuple[int, str]] = Counter()
@@ -284,13 +285,21 @@ def remaining_fill(multiworld: MultiWorld,
if unplaced_items and locations:
# There are leftover unplaceable items and locations that won't accept them
- raise FillError(f"No more spots to place {len(unplaced_items)} items. Remaining locations are invalid.\n"
- f"Unplaced items:\n"
- f"{', '.join(str(item) for item in unplaced_items)}\n"
- f"Unfilled locations:\n"
- f"{', '.join(str(location) for location in locations)}\n"
- f"Already placed {len(placements)}:\n"
- f"{', '.join(str(place) for place in placements)}")
+ if move_unplaceable_to_start_inventory:
+ last_batch = []
+ for item in unplaced_items:
+ logging.debug(f"Moved {item} to start_inventory to prevent fill failure.")
+ multiworld.push_precollected(item)
+ last_batch.append(multiworld.worlds[item.player].create_filler())
+ remaining_fill(multiworld, locations, unplaced_items, name + " Start Inventory Retry")
+ else:
+ raise FillError(f"No more spots to place {len(unplaced_items)} items. Remaining locations are invalid.\n"
+ f"Unplaced items:\n"
+ f"{', '.join(str(item) for item in unplaced_items)}\n"
+ f"Unfilled locations:\n"
+ f"{', '.join(str(location) for location in locations)}\n"
+ f"Already placed {len(placements)}:\n"
+ f"{', '.join(str(place) for place in placements)}")
itempool.extend(unplaced_items)
@@ -420,7 +429,8 @@ def distribute_early_items(multiworld: MultiWorld,
return fill_locations, itempool
-def distribute_items_restrictive(multiworld: MultiWorld) -> None:
+def distribute_items_restrictive(multiworld: MultiWorld,
+ panic_method: typing.Literal["swap", "raise", "start_inventory"] = "swap") -> None:
fill_locations = sorted(multiworld.get_unfilled_locations())
multiworld.random.shuffle(fill_locations)
# get items to distribute
@@ -470,8 +480,29 @@ def distribute_items_restrictive(multiworld: MultiWorld) -> None:
if progitempool:
# "advancement/progression fill"
- fill_restrictive(multiworld, multiworld.state, defaultlocations, progitempool, single_player_placement=multiworld.players == 1,
- name="Progression")
+ if panic_method == "swap":
+ fill_restrictive(multiworld, multiworld.state, defaultlocations, progitempool,
+ swap=True,
+ on_place=mark_for_locking, name="Progression", single_player_placement=multiworld.players == 1)
+ elif panic_method == "raise":
+ fill_restrictive(multiworld, multiworld.state, defaultlocations, progitempool,
+ swap=False,
+ on_place=mark_for_locking, name="Progression", single_player_placement=multiworld.players == 1)
+ elif panic_method == "start_inventory":
+ fill_restrictive(multiworld, multiworld.state, defaultlocations, progitempool,
+ swap=False, allow_partial=True,
+ on_place=mark_for_locking, name="Progression", single_player_placement=multiworld.players == 1)
+ if progitempool:
+ for item in progitempool:
+ logging.debug(f"Moved {item} to start_inventory to prevent fill failure.")
+ multiworld.push_precollected(item)
+ filleritempool.append(multiworld.worlds[item.player].create_filler())
+ logging.warning(f"{len(progitempool)} items moved to start inventory,"
+ f" due to failure in Progression fill step.")
+ progitempool[:] = []
+
+ else:
+ raise ValueError(f"Generator Panic Method {panic_method} not recognized.")
if progitempool:
raise FillError(
f"Not enough locations for progression items. "
@@ -486,7 +517,9 @@ def distribute_items_restrictive(multiworld: MultiWorld) -> None:
inaccessible_location_rules(multiworld, multiworld.state, defaultlocations)
- remaining_fill(multiworld, excludedlocations, filleritempool, "Remaining Excluded")
+ remaining_fill(multiworld, excludedlocations, filleritempool, "Remaining Excluded",
+ move_unplaceable_to_start_inventory=panic_method=="start_inventory")
+
if excludedlocations:
raise FillError(
f"Not enough filler items for excluded locations. "
@@ -495,7 +528,8 @@ def distribute_items_restrictive(multiworld: MultiWorld) -> None:
restitempool = filleritempool + usefulitempool
- remaining_fill(multiworld, defaultlocations, restitempool)
+ remaining_fill(multiworld, defaultlocations, restitempool,
+ move_unplaceable_to_start_inventory=panic_method=="start_inventory")
unplaced = restitempool
unfilled = defaultlocations
diff --git a/Generate.py b/Generate.py
index 2bc061b746..30b992317d 100644
--- a/Generate.py
+++ b/Generate.py
@@ -9,6 +9,7 @@ import urllib.parse
import urllib.request
from collections import Counter
from typing import Any, Dict, Tuple, Union
+from itertools import chain
import ModuleUpdate
@@ -319,18 +320,34 @@ def update_weights(weights: dict, new_weights: dict, update_type: str, name: str
logging.debug(f'Applying {new_weights}')
cleaned_weights = {}
for option in new_weights:
- option_name = option.lstrip("+")
+ option_name = option.lstrip("+-")
if option.startswith("+") and option_name in weights:
cleaned_value = weights[option_name]
new_value = new_weights[option]
- if isinstance(new_value, (set, dict)):
+ if isinstance(new_value, set):
cleaned_value.update(new_value)
elif isinstance(new_value, list):
cleaned_value.extend(new_value)
+ elif isinstance(new_value, dict):
+ cleaned_value = dict(Counter(cleaned_value) + Counter(new_value))
else:
raise Exception(f"Cannot apply merge to non-dict, set, or list type {option_name},"
f" received {type(new_value).__name__}.")
cleaned_weights[option_name] = cleaned_value
+ elif option.startswith("-") and option_name in weights:
+ cleaned_value = weights[option_name]
+ new_value = new_weights[option]
+ if isinstance(new_value, set):
+ cleaned_value.difference_update(new_value)
+ elif isinstance(new_value, list):
+ for element in new_value:
+ cleaned_value.remove(element)
+ elif isinstance(new_value, dict):
+ cleaned_value = dict(Counter(cleaned_value) - Counter(new_value))
+ else:
+ raise Exception(f"Cannot apply remove to non-dict, set, or list type {option_name},"
+ f" received {type(new_value).__name__}.")
+ cleaned_weights[option_name] = cleaned_value
else:
cleaned_weights[option_name] = new_weights[option]
new_options = set(cleaned_weights) - set(weights)
@@ -466,9 +483,11 @@ def roll_settings(weights: dict, plando_options: PlandoOptions = PlandoOptions.b
world_type = AutoWorldRegister.world_types[ret.game]
game_weights = weights[ret.game]
- if any(weight.startswith("+") for weight in game_weights) or \
- any(weight.startswith("+") for weight in weights):
- raise Exception(f"Merge tag cannot be used outside of trigger contexts.")
+ for weight in chain(game_weights, weights):
+ if weight.startswith("+"):
+ raise Exception(f"Merge tag cannot be used outside of trigger contexts. Found {weight}")
+ if weight.startswith("-"):
+ raise Exception(f"Remove tag cannot be used outside of trigger contexts. Found {weight}")
if "triggers" in game_weights:
weights = roll_triggers(weights, game_weights["triggers"], valid_trigger_names)
diff --git a/Main.py b/Main.py
index 1be91a8bb2..8b15a57a69 100644
--- a/Main.py
+++ b/Main.py
@@ -13,7 +13,7 @@ import worlds
from BaseClasses import CollectionState, Item, Location, LocationProgressType, MultiWorld, Region
from Fill import balance_multiworld_progression, distribute_items_restrictive, distribute_planned, flood_items
from Options import StartInventoryPool
-from Utils import __version__, output_path, version_tuple
+from Utils import __version__, output_path, version_tuple, get_settings
from settings import get_settings
from worlds import AutoWorld
from worlds.generic.Rules import exclusion_rules, locality_rules
@@ -272,7 +272,7 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No
if multiworld.algorithm == 'flood':
flood_items(multiworld) # different algo, biased towards early game progress items
elif multiworld.algorithm == 'balanced':
- distribute_items_restrictive(multiworld)
+ distribute_items_restrictive(multiworld, get_settings().generator.panic_method)
AutoWorld.call_all(multiworld, 'post_fill')
diff --git a/Utils.py b/Utils.py
index 141b1dc7f8..7802719965 100644
--- a/Utils.py
+++ b/Utils.py
@@ -101,8 +101,7 @@ def cache_self1(function: typing.Callable[[S, T], RetType]) -> typing.Callable[[
@functools.wraps(function)
def wrap(self: S, arg: T) -> RetType:
- cache: Optional[Dict[T, RetType]] = typing.cast(Optional[Dict[T, RetType]],
- getattr(self, cache_name, None))
+ cache: Optional[Dict[T, RetType]] = getattr(self, cache_name, None)
if cache is None:
res = function(self, arg)
setattr(self, cache_name, {arg: res})
@@ -209,10 +208,11 @@ def output_path(*path: str) -> str:
def open_file(filename: typing.Union[str, "pathlib.Path"]) -> None:
if is_windows:
- os.startfile(filename)
+ os.startfile(filename) # type: ignore
else:
from shutil import which
open_command = which("open") if is_macos else (which("xdg-open") or which("gnome-open") or which("kde-open"))
+ assert open_command, "Didn't find program for open_file! Please report this together with system details."
subprocess.call([open_command, filename])
@@ -300,21 +300,21 @@ def get_options() -> Settings:
return get_settings()
-def persistent_store(category: str, key: typing.Any, value: typing.Any):
+def persistent_store(category: str, key: str, value: typing.Any):
path = user_path("_persistent_storage.yaml")
- storage: dict = persistent_load()
- category = storage.setdefault(category, {})
- category[key] = value
+ storage = persistent_load()
+ category_dict = storage.setdefault(category, {})
+ category_dict[key] = value
with open(path, "wt") as f:
f.write(dump(storage, Dumper=Dumper))
-def persistent_load() -> typing.Dict[str, dict]:
- storage = getattr(persistent_load, "storage", None)
+def persistent_load() -> Dict[str, Dict[str, Any]]:
+ storage: Union[Dict[str, Dict[str, Any]], None] = getattr(persistent_load, "storage", None)
if storage:
return storage
path = user_path("_persistent_storage.yaml")
- storage: dict = {}
+ storage = {}
if os.path.exists(path):
try:
with open(path, "r") as f:
@@ -323,7 +323,7 @@ def persistent_load() -> typing.Dict[str, dict]:
logging.debug(f"Could not read store: {e}")
if storage is None:
storage = {}
- persistent_load.storage = storage
+ setattr(persistent_load, "storage", storage)
return storage
@@ -365,6 +365,7 @@ def store_data_package_for_checksum(game: str, data: typing.Dict[str, Any]) -> N
except Exception as e:
logging.debug(f"Could not store data package: {e}")
+
def get_default_adjuster_settings(game_name: str) -> Namespace:
import LttPAdjuster
adjuster_settings = Namespace()
@@ -383,7 +384,9 @@ def get_adjuster_settings(game_name: str) -> Namespace:
default_settings = get_default_adjuster_settings(game_name)
# Fill in any arguments from the argparser that we haven't seen before
- return Namespace(**vars(adjuster_settings), **{k:v for k,v in vars(default_settings).items() if k not in vars(adjuster_settings)})
+ return Namespace(**vars(adjuster_settings), **{
+ k: v for k, v in vars(default_settings).items() if k not in vars(adjuster_settings)
+ })
@cache_argsless
@@ -407,13 +410,13 @@ safe_builtins = frozenset((
class RestrictedUnpickler(pickle.Unpickler):
generic_properties_module: Optional[object]
- def __init__(self, *args, **kwargs):
+ def __init__(self, *args: Any, **kwargs: Any) -> None:
super(RestrictedUnpickler, self).__init__(*args, **kwargs)
self.options_module = importlib.import_module("Options")
self.net_utils_module = importlib.import_module("NetUtils")
self.generic_properties_module = None
- def find_class(self, module, name):
+ def find_class(self, module: str, name: str) -> type:
if module == "builtins" and name in safe_builtins:
return getattr(builtins, name)
# used by MultiServer -> savegame/multidata
@@ -437,7 +440,7 @@ class RestrictedUnpickler(pickle.Unpickler):
raise pickle.UnpicklingError(f"global '{module}.{name}' is forbidden")
-def restricted_loads(s):
+def restricted_loads(s: bytes) -> Any:
"""Helper function analogous to pickle.loads()."""
return RestrictedUnpickler(io.BytesIO(s)).load()
@@ -493,7 +496,7 @@ def init_logging(name: str, loglevel: typing.Union[str, int] = logging.INFO, wri
file_handler.setFormatter(logging.Formatter(log_format))
class Filter(logging.Filter):
- def __init__(self, filter_name, condition):
+ def __init__(self, filter_name: str, condition: typing.Callable[[logging.LogRecord], bool]) -> None:
super().__init__(filter_name)
self.condition = condition
@@ -544,7 +547,7 @@ def init_logging(name: str, loglevel: typing.Union[str, int] = logging.INFO, wri
)
-def stream_input(stream, queue):
+def stream_input(stream: typing.TextIO, queue: "asyncio.Queue[str]"):
def queuer():
while 1:
try:
@@ -572,7 +575,7 @@ class VersionException(Exception):
pass
-def chaining_prefix(index: int, labels: typing.Tuple[str]) -> str:
+def chaining_prefix(index: int, labels: typing.Sequence[str]) -> str:
text = ""
max_label = len(labels) - 1
while index > max_label:
@@ -595,7 +598,7 @@ def format_SI_prefix(value, power=1000, power_labels=("", "k", "M", "G", "T", "P
return f"{value.quantize(decimal.Decimal('1.00'))} {chaining_prefix(n, power_labels)}"
-def get_fuzzy_results(input_word: str, wordlist: typing.Sequence[str], limit: typing.Optional[int] = None) \
+def get_fuzzy_results(input_word: str, word_list: typing.Collection[str], limit: typing.Optional[int] = None) \
-> typing.List[typing.Tuple[str, int]]:
import jellyfish
@@ -603,21 +606,20 @@ def get_fuzzy_results(input_word: str, wordlist: typing.Sequence[str], limit: ty
return (1 - jellyfish.damerau_levenshtein_distance(word1.lower(), word2.lower())
/ max(len(word1), len(word2)))
- limit: int = limit if limit else len(wordlist)
+ limit = limit if limit else len(word_list)
return list(
map(
lambda container: (container[0], int(container[1]*100)), # convert up to limit to int %
sorted(
- map(lambda candidate:
- (candidate, get_fuzzy_ratio(input_word, candidate)),
- wordlist),
+ map(lambda candidate: (candidate, get_fuzzy_ratio(input_word, candidate)), word_list),
key=lambda element: element[1],
- reverse=True)[0:limit]
+ reverse=True
+ )[0:limit]
)
)
-def open_filename(title: str, filetypes: typing.Sequence[typing.Tuple[str, typing.Sequence[str]]], suggest: str = "") \
+def open_filename(title: str, filetypes: typing.Iterable[typing.Tuple[str, typing.Iterable[str]]], suggest: str = "") \
-> typing.Optional[str]:
logging.info(f"Opening file input dialog for {title}.")
@@ -734,7 +736,7 @@ def messagebox(title: str, text: str, error: bool = False) -> None:
root.update()
-def title_sorted(data: typing.Sequence, key=None, ignore: typing.Set = frozenset(("a", "the"))):
+def title_sorted(data: typing.Iterable, key=None, ignore: typing.AbstractSet[str] = frozenset(("a", "the"))):
"""Sorts a sequence of text ignoring typical articles like "a" or "the" in the beginning."""
def sorter(element: Union[str, Dict[str, Any]]) -> str:
if (not isinstance(element, str)):
@@ -788,7 +790,7 @@ class DeprecateDict(dict):
log_message: str
should_error: bool
- def __init__(self, message, error: bool = False) -> None:
+ def __init__(self, message: str, error: bool = False) -> None:
self.log_message = message
self.should_error = error
super().__init__()
diff --git a/WebHostLib/templates/playerOptions/macros.html b/WebHostLib/templates/playerOptions/macros.html
index c4d97255d8..b34ac79a02 100644
--- a/WebHostLib/templates/playerOptions/macros.html
+++ b/WebHostLib/templates/playerOptions/macros.html
@@ -141,7 +141,7 @@
{% for group_name in world.location_name_groups.keys()|sort %}
{% if group_name != "Everywhere" %}
-
+
{% endif %}
diff --git a/WebHostLib/templates/weightedOptions/macros.html b/WebHostLib/templates/weightedOptions/macros.html
index 91474d7696..5b8944a438 100644
--- a/WebHostLib/templates/weightedOptions/macros.html
+++ b/WebHostLib/templates/weightedOptions/macros.html
@@ -142,7 +142,7 @@
{% for group_name in world.location_name_groups.keys()|sort %}
{% if group_name != "Everywhere" %}
-
+
{% endif %}
diff --git a/docs/world api.md b/docs/world api.md
index 6714fa3a21..37638c3c66 100644
--- a/docs/world api.md
+++ b/docs/world api.md
@@ -121,6 +121,53 @@ class RLWeb(WebWorld):
# ...
```
+* `location_descriptions` (optional) WebWorlds can provide a map that contains human-friendly descriptions of locations
+or location groups.
+
+ ```python
+ # locations.py
+ location_descriptions = {
+ "Red Potion #6": "In a secret destructible block under the second stairway",
+ "L2 Spaceship": """
+ The group of all items in the spaceship in Level 2.
+
+ This doesn't include the item on the spaceship door, since it can be
+ accessed without the Spaceship Key.
+ """
+ }
+
+ # __init__.py
+ from worlds.AutoWorld import WebWorld
+ from .locations import location_descriptions
+
+
+ class MyGameWeb(WebWorld):
+ location_descriptions = location_descriptions
+ ```
+
+* `item_descriptions` (optional) WebWorlds can provide a map that contains human-friendly descriptions of items or item
+groups.
+
+ ```python
+ # items.py
+ item_descriptions = {
+ "Red Potion": "A standard health potion",
+ "Spaceship Key": """
+ The key to the spaceship in Level 2.
+
+ This is necessary to get to the Star Realm.
+ """,
+ }
+
+ # __init__.py
+ from worlds.AutoWorld import WebWorld
+ from .items import item_descriptions
+
+
+ class MyGameWeb(WebWorld):
+ item_descriptions = item_descriptions
+ ```
+
### MultiWorld Object
The `MultiWorld` object references the whole multiworld (all items and locations for all players) and is accessible
@@ -178,36 +225,6 @@ Classification is one of `LocationProgressType.DEFAULT`, `PRIORITY` or `EXCLUDED
The Fill algorithm will force progression items to be placed at priority locations, giving a higher chance of them being
required, and will prevent progression and useful items from being placed at excluded locations.
-#### Documenting Locations
-
-Worlds can optionally provide a `location_descriptions` map which contains human-friendly descriptions of locations and
-location groups. These descriptions will show up in location-selection options on the options pages.
-
-```python
-# locations.py
-
-location_descriptions = {
- "Red Potion #6": "In a secret destructible block under the second stairway",
- "L2 Spaceship":
- """
- The group of all items in the spaceship in Level 2.
-
- This doesn't include the item on the spaceship door, since it can be accessed without the Spaceship Key.
- """
-}
-```
-
-```python
-# __init__.py
-
-from worlds.AutoWorld import World
-from .locations import location_descriptions
-
-
-class MyGameWorld(World):
- location_descriptions = location_descriptions
-```
-
### Items
Items are all things that can "drop" for your game. This may be RPG items like weapons, or technologies you normally
@@ -232,36 +249,6 @@ Other classifications include:
* `progression_skip_balancing`: the combination of `progression` and `skip_balancing`, i.e., a progression item that
will not be moved around by progression balancing; used, e.g., for currency or tokens, to not flood early spheres
-#### Documenting Items
-
-Worlds can optionally provide an `item_descriptions` map which contains human-friendly descriptions of items and item
-groups. These descriptions will show up in item-selection options on the options pages.
-
-```python
-# items.py
-
-item_descriptions = {
- "Red Potion": "A standard health potion",
- "Spaceship Key":
- """
- The key to the spaceship in Level 2.
-
- This is necessary to get to the Star Realm.
- """
-}
-```
-
-```python
-# __init__.py
-
-from worlds.AutoWorld import World
-from .items import item_descriptions
-
-
-class MyGameWorld(World):
- item_descriptions = item_descriptions
-```
-
### Events
An Event is a special combination of a Location and an Item, with both having an `id` of `None`. These can be used to
diff --git a/settings.py b/settings.py
index b463c5a047..9d1c0904dd 100644
--- a/settings.py
+++ b/settings.py
@@ -665,6 +665,14 @@ class GeneratorOptions(Group):
OFF = 0
ON = 1
+ class PanicMethod(str):
+ """
+ What to do if the current item placements appear unsolvable.
+ raise -> Raise an exception and abort.
+ swap -> Attempt to fix it by swapping prior placements around. (Default)
+ start_inventory -> Move remaining items to start_inventory, generate additional filler items to fill locations.
+ """
+
enemizer_path: EnemizerPath = EnemizerPath("EnemizerCLI/EnemizerCLI.Core") # + ".exe" is implied on Windows
player_files_path: PlayerFilesPath = PlayerFilesPath("Players")
players: Players = Players(0)
@@ -673,6 +681,7 @@ class GeneratorOptions(Group):
spoiler: Spoiler = Spoiler(3)
race: Race = Race(0)
plando_options: PlandoOptions = PlandoOptions("bosses, connections, texts")
+ panic_method: PanicMethod = PanicMethod("swap")
class SNIOptions(Group):
diff --git a/test/general/test_items.py b/test/general/test_items.py
index 7c0b7050c6..9cc91a1b00 100644
--- a/test/general/test_items.py
+++ b/test/general/test_items.py
@@ -64,15 +64,6 @@ class TestBase(unittest.TestCase):
for item in multiworld.itempool:
self.assertIn(item.name, world_type.item_name_to_id)
- def test_item_descriptions_have_valid_names(self):
- """Ensure all item descriptions match an item name or item group name"""
- for game_name, world_type in AutoWorldRegister.world_types.items():
- valid_names = world_type.item_names.union(world_type.item_name_groups)
- for name in world_type.item_descriptions:
- with self.subTest("Name should be valid", game=game_name, item=name):
- self.assertIn(name, valid_names,
- "All item descriptions must match defined item names")
-
def test_itempool_not_modified(self):
"""Test that worlds don't modify the itempool after `create_items`"""
gen_steps = ("generate_early", "create_regions", "create_items")
diff --git a/test/general/test_locations.py b/test/general/test_locations.py
index 2ac059312c..4b95ebd22c 100644
--- a/test/general/test_locations.py
+++ b/test/general/test_locations.py
@@ -66,12 +66,3 @@ class TestBase(unittest.TestCase):
for location in locations:
self.assertIn(location, world_type.location_name_to_id)
self.assertNotIn(group_name, world_type.location_name_to_id)
-
- def test_location_descriptions_have_valid_names(self):
- """Ensure all location descriptions match a location name or location group name"""
- for game_name, world_type in AutoWorldRegister.world_types.items():
- valid_names = world_type.location_names.union(world_type.location_name_groups)
- for name in world_type.location_descriptions:
- with self.subTest("Name should be valid", game=game_name, location=name):
- self.assertIn(name, valid_names,
- "All location descriptions must match defined location names")
diff --git a/test/general/test_player_options.py b/test/general/test_player_options.py
index 9650fbe97a..ea7f19e3d9 100644
--- a/test/general/test_player_options.py
+++ b/test/general/test_player_options.py
@@ -31,7 +31,7 @@ class TestPlayerOptions(unittest.TestCase):
self.assertEqual(new_weights["list_2"], ["string_3"])
self.assertEqual(new_weights["list_1"], ["string", "string_2"])
self.assertEqual(new_weights["dict_1"]["option_a"], 50)
- self.assertEqual(new_weights["dict_1"]["option_b"], 0)
+ self.assertEqual(new_weights["dict_1"]["option_b"], 50)
self.assertEqual(new_weights["dict_1"]["option_c"], 50)
self.assertNotIn("option_f", new_weights["dict_2"])
self.assertEqual(new_weights["dict_2"]["option_g"], 50)
diff --git a/test/webhost/test_descriptions.py b/test/webhost/test_descriptions.py
new file mode 100644
index 0000000000..70f375b51c
--- /dev/null
+++ b/test/webhost/test_descriptions.py
@@ -0,0 +1,23 @@
+import unittest
+
+from worlds.AutoWorld import AutoWorldRegister
+
+
+class TestWebDescriptions(unittest.TestCase):
+ def test_item_descriptions_have_valid_names(self) -> None:
+ """Ensure all item descriptions match an item name or item group name"""
+ for game_name, world_type in AutoWorldRegister.world_types.items():
+ valid_names = world_type.item_names.union(world_type.item_name_groups)
+ for name in world_type.web.item_descriptions:
+ with self.subTest("Name should be valid", game=game_name, item=name):
+ self.assertIn(name, valid_names,
+ "All item descriptions must match defined item names")
+
+ def test_location_descriptions_have_valid_names(self) -> None:
+ """Ensure all location descriptions match a location name or location group name"""
+ for game_name, world_type in AutoWorldRegister.world_types.items():
+ valid_names = world_type.location_names.union(world_type.location_name_groups)
+ for name in world_type.web.location_descriptions:
+ with self.subTest("Name should be valid", game=game_name, location=name):
+ self.assertIn(name, valid_names,
+ "All location descriptions must match defined location names")
diff --git a/worlds/AutoWorld.py b/worlds/AutoWorld.py
index b564932eb9..32a84f5d57 100644
--- a/worlds/AutoWorld.py
+++ b/worlds/AutoWorld.py
@@ -3,13 +3,12 @@ from __future__ import annotations
import hashlib
import logging
import pathlib
-from random import Random
-import re
import sys
import time
+from random import Random
from dataclasses import make_dataclass
-from typing import (Any, Callable, ClassVar, Dict, FrozenSet, List, Mapping,
- Optional, Set, TextIO, Tuple, TYPE_CHECKING, Type, Union)
+from typing import (Any, Callable, ClassVar, Dict, FrozenSet, List, Mapping, Optional, Set, TextIO, Tuple,
+ TYPE_CHECKING, Type, Union)
from Options import (
ExcludeLocations, ItemLinks, LocalItems, NonLocalItems, OptionGroup, PerGameCommonOptions,
@@ -55,17 +54,12 @@ class AutoWorldRegister(type):
dct["item_name_groups"] = {group_name: frozenset(group_set) for group_name, group_set
in dct.get("item_name_groups", {}).items()}
dct["item_name_groups"]["Everything"] = dct["item_names"]
- dct["item_descriptions"] = {name: _normalize_description(description) for name, description
- in dct.get("item_descriptions", {}).items()}
- dct["item_descriptions"]["Everything"] = "All items in the entire game."
+
dct["location_names"] = frozenset(dct["location_name_to_id"])
dct["location_name_groups"] = {group_name: frozenset(group_set) for group_name, group_set
in dct.get("location_name_groups", {}).items()}
dct["location_name_groups"]["Everywhere"] = dct["location_names"]
dct["all_item_and_group_names"] = frozenset(dct["item_names"] | set(dct.get("item_name_groups", {})))
- dct["location_descriptions"] = {name: _normalize_description(description) for name, description
- in dct.get("location_descriptions", {}).items()}
- dct["location_descriptions"]["Everywhere"] = "All locations in the entire game."
# move away from get_required_client_version function
if "game" in dct:
@@ -226,6 +220,12 @@ class WebWorld(metaclass=WebWorldRegister):
option_groups: ClassVar[List[OptionGroup]] = []
"""Ordered list of option groupings. Any options not set in a group will be placed in a pre-built "Game Options"."""
+ location_descriptions: Dict[str, str] = {}
+ """An optional map from location names (or location group names) to brief descriptions for users."""
+
+ item_descriptions: Dict[str, str] = {}
+ """An optional map from item names (or item group names) to brief descriptions for users."""
+
class World(metaclass=AutoWorldRegister):
"""A World object encompasses a game's Items, Locations, Rules and additional data or functionality required.
@@ -252,23 +252,9 @@ class World(metaclass=AutoWorldRegister):
item_name_groups: ClassVar[Dict[str, Set[str]]] = {}
"""maps item group names to sets of items. Example: {"Weapons": {"Sword", "Bow"}}"""
- item_descriptions: ClassVar[Dict[str, str]] = {}
- """An optional map from item names (or item group names) to brief descriptions for users.
-
- Individual newlines and indentation will be collapsed into spaces before these descriptions are
- displayed. This may cover only a subset of items.
- """
-
location_name_groups: ClassVar[Dict[str, Set[str]]] = {}
"""maps location group names to sets of locations. Example: {"Sewer": {"Sewer Key Drop 1", "Sewer Key Drop 2"}}"""
- location_descriptions: ClassVar[Dict[str, str]] = {}
- """An optional map from location names (or location group names) to brief descriptions for users.
-
- Individual newlines and indentation will be collapsed into spaces before these descriptions are
- displayed. This may cover only a subset of locations.
- """
-
data_version: ClassVar[int] = 0
"""
Increment this every time something in your world's names/id mappings changes.
@@ -572,18 +558,3 @@ def data_package_checksum(data: "GamesPackage") -> str:
assert sorted(data) == list(data), "Data not ordered"
from NetUtils import encode
return hashlib.sha1(encode(data).encode()).hexdigest()
-
-
-def _normalize_description(description):
- """
- Normalizes a description in item_descriptions or location_descriptions.
-
- This allows authors to write descritions with nice indentation and line lengths in their world
- definitions without having it affect the rendered format.
- """
- # First, collapse the whitespace around newlines and the ends of the description.
- description = re.sub(r' *\n *', '\n', description.strip())
- # Next, condense individual newlines into spaces.
- description = re.sub(r'(? bool:
return True
except (TimeoutError, ConnectionRefusedError):
continue
-
+
# No ports worked
ctx.streams = None
ctx.connection_status = ConnectionStatus.NOT_CONNECTED
diff --git a/worlds/_bizhawk/client.py b/worlds/_bizhawk/client.py
index 32a6e3704e..00370c277a 100644
--- a/worlds/_bizhawk/client.py
+++ b/worlds/_bizhawk/client.py
@@ -2,7 +2,6 @@
A module containing the BizHawkClient base class and metaclass
"""
-
from __future__ import annotations
import abc
@@ -12,14 +11,13 @@ from worlds.LauncherComponents import Component, SuffixIdentifier, Type, compone
if TYPE_CHECKING:
from .context import BizHawkClientContext
-else:
- BizHawkClientContext = object
def launch_client(*args) -> None:
from .context import launch
launch_subprocess(launch, name="BizHawkClient")
+
component = Component("BizHawk Client", "BizHawkClient", component_type=Type.CLIENT, func=launch_client,
file_identifier=SuffixIdentifier())
components.append(component)
@@ -56,7 +54,7 @@ class AutoBizHawkClientRegister(abc.ABCMeta):
return new_class
@staticmethod
- async def get_handler(ctx: BizHawkClientContext, system: str) -> Optional[BizHawkClient]:
+ async def get_handler(ctx: "BizHawkClientContext", system: str) -> Optional[BizHawkClient]:
for systems, handlers in AutoBizHawkClientRegister.game_handlers.items():
if system in systems:
for handler in handlers.values():
@@ -77,7 +75,7 @@ class BizHawkClient(abc.ABC, metaclass=AutoBizHawkClientRegister):
"""The file extension(s) this client is meant to open and patch (e.g. ".apz3")"""
@abc.abstractmethod
- async def validate_rom(self, ctx: BizHawkClientContext) -> bool:
+ async def validate_rom(self, ctx: "BizHawkClientContext") -> bool:
"""Should return whether the currently loaded ROM should be handled by this client. You might read the game name
from the ROM header, for example. This function will only be asked to validate ROMs from the system set by the
client class, so you do not need to check the system yourself.
@@ -86,18 +84,18 @@ class BizHawkClient(abc.ABC, metaclass=AutoBizHawkClientRegister):
as necessary (such as setting `ctx.game = self.game`, modifying `ctx.items_handling`, etc...)."""
...
- async def set_auth(self, ctx: BizHawkClientContext) -> None:
+ async def set_auth(self, ctx: "BizHawkClientContext") -> None:
"""Should set ctx.auth in anticipation of sending a `Connected` packet. You may override this if you store slot
name in your patched ROM. If ctx.auth is not set after calling, the player will be prompted to enter their
username."""
pass
@abc.abstractmethod
- async def game_watcher(self, ctx: BizHawkClientContext) -> None:
+ async def game_watcher(self, ctx: "BizHawkClientContext") -> None:
"""Runs on a loop with the approximate interval `ctx.watcher_timeout`. The currently loaded ROM is guaranteed
to have passed your validator when this function is called, and the emulator is very likely to be connected."""
...
- def on_package(self, ctx: BizHawkClientContext, cmd: str, args: dict) -> None:
+ def on_package(self, ctx: "BizHawkClientContext", cmd: str, args: dict) -> None:
"""For handling packages from the server. Called from `BizHawkClientContext.on_package`."""
pass
diff --git a/worlds/_bizhawk/context.py b/worlds/_bizhawk/context.py
index 05bee23412..0a28a47894 100644
--- a/worlds/_bizhawk/context.py
+++ b/worlds/_bizhawk/context.py
@@ -3,7 +3,6 @@ A module containing context and functions relevant to running the client. This m
checking or launching the client, otherwise it will probably cause circular import issues.
"""
-
import asyncio
import enum
import subprocess
@@ -77,7 +76,7 @@ class BizHawkClientContext(CommonContext):
if self.client_handler is not None:
self.client_handler.on_package(self, cmd, args)
- async def server_auth(self, password_requested: bool = False):
+ async def server_auth(self, password_requested: bool=False):
self.password_requested = password_requested
if self.bizhawk_ctx.connection_status != ConnectionStatus.CONNECTED:
@@ -103,7 +102,7 @@ class BizHawkClientContext(CommonContext):
await self.send_connect()
self.auth_status = AuthStatus.PENDING
- async def disconnect(self, allow_autoreconnect: bool = False):
+ async def disconnect(self, allow_autoreconnect: bool=False):
self.auth_status = AuthStatus.NOT_AUTHENTICATED
await super().disconnect(allow_autoreconnect)
@@ -148,7 +147,8 @@ async def _game_watcher(ctx: BizHawkClientContext):
script_version = await get_script_version(ctx.bizhawk_ctx)
if script_version != EXPECTED_SCRIPT_VERSION:
- logger.info(f"Connector script is incompatible. Expected version {EXPECTED_SCRIPT_VERSION} but got {script_version}. Disconnecting.")
+ logger.info(f"Connector script is incompatible. Expected version {EXPECTED_SCRIPT_VERSION} but "
+ f"got {script_version}. Disconnecting.")
disconnect(ctx.bizhawk_ctx)
continue
diff --git a/worlds/ahit/Regions.py b/worlds/ahit/Regions.py
index 6a388a98e8..0ba0f5b9a5 100644
--- a/worlds/ahit/Regions.py
+++ b/worlds/ahit/Regions.py
@@ -699,11 +699,14 @@ def is_valid_first_act(world: "HatInTimeWorld", act: Region) -> bool:
# Needs to be at least moderate to cross the big dweller wall
if act.name == "Queen Vanessa's Manor" and diff < Difficulty.MODERATE:
return False
- elif act.name == "Your Contract has Expired" and diff < Difficulty.EXPERT: # Snatcher Hover
- return False
elif act.name == "Heating Up Mafia Town": # Straight up impossible
return False
+ # Need to be able to hover
+ if act.name == "Your Contract has Expired":
+ if diff < Difficulty.EXPERT or world.options.ShuffleSubconPaintings and world.options.NoPaintingSkips:
+ return False
+
if act.name == "Dead Bird Studio":
# No umbrella logic = moderate, umbrella logic = expert.
if diff < Difficulty.MODERATE or world.options.UmbrellaLogic and diff < Difficulty.EXPERT:
@@ -718,14 +721,9 @@ def is_valid_first_act(world: "HatInTimeWorld", act: Region) -> bool:
return False
if world.options.ShuffleSubconPaintings and act_chapters.get(act.name, "") == "Subcon Forest":
- # This requires a cherry hover to enter Subcon
- if act.name == "Your Contract has Expired":
- if diff < Difficulty.EXPERT or world.options.NoPaintingSkips:
- return False
- else:
- # Only allow Subcon levels if paintings can be skipped
- if diff < Difficulty.MODERATE or world.options.NoPaintingSkips:
- return False
+ # Only allow Subcon levels if painting skips are allowed
+ if diff < Difficulty.MODERATE or world.options.NoPaintingSkips:
+ return False
return True
diff --git a/worlds/cv64/__init__.py b/worlds/cv64/__init__.py
index 84bf03ff27..2f483cd4d9 100644
--- a/worlds/cv64/__init__.py
+++ b/worlds/cv64/__init__.py
@@ -8,7 +8,7 @@ from BaseClasses import Item, Region, Tutorial, ItemClassification
from .items import CV64Item, filler_item_names, get_item_info, get_item_names_to_ids, get_item_counts
from .locations import CV64Location, get_location_info, verify_locations, get_location_names_to_ids, base_id
from .entrances import verify_entrances, get_warp_entrances
-from .options import CV64Options, CharacterStages, DraculasCondition, SubWeaponShuffle
+from .options import CV64Options, cv64_option_groups, CharacterStages, DraculasCondition, SubWeaponShuffle
from .stages import get_locations_from_stage, get_normal_stage_exits, vanilla_stage_order, \
shuffle_stages, generate_warps, get_region_names
from .regions import get_region_info
@@ -45,6 +45,8 @@ class CV64Web(WebWorld):
["Liquid Cat"]
)]
+ option_groups = cv64_option_groups
+
class CV64World(World):
"""
diff --git a/worlds/cv64/options.py b/worlds/cv64/options.py
index da2b9f9496..93b417ad26 100644
--- a/worlds/cv64/options.py
+++ b/worlds/cv64/options.py
@@ -1,10 +1,11 @@
from dataclasses import dataclass
-from Options import Choice, DefaultOnToggle, Range, Toggle, PerGameCommonOptions, StartInventoryPool
+from Options import OptionGroup, Choice, DefaultOnToggle, Range, Toggle, PerGameCommonOptions, StartInventoryPool
class CharacterStages(Choice):
- """Whether to include Reinhardt-only stages, Carrie-only stages, or both with or without branching paths at the end
- of Villa and Castle Center."""
+ """
+ Whether to include Reinhardt-only stages, Carrie-only stages, or both with or without branching paths at the end of Villa and Castle Center.
+ """
display_name = "Character Stages"
option_both = 0
option_branchless_both = 1
@@ -14,14 +15,18 @@ class CharacterStages(Choice):
class StageShuffle(Toggle):
- """Shuffles which stages appear in which stage slots. Villa and Castle Center will never appear in any character
- stage slots if Character Stages is set to Both; they can only be somewhere on the main path.
- Castle Keep will always be at the end of the line."""
+ """
+ Shuffles which stages appear in which stage slots.
+ Villa and Castle Center will never appear in any character stage slots if Character Stages is set to Both; they can only be somewhere on the main path.
+ Castle Keep will always be at the end of the line.
+ """
display_name = "Stage Shuffle"
class StartingStage(Choice):
- """Which stage to start at if Stage Shuffle is turned on."""
+ """
+ Which stage to start at if Stage Shuffle is turned on.
+ """
display_name = "Starting Stage"
option_forest_of_silence = 0
option_castle_wall = 1
@@ -39,8 +44,9 @@ class StartingStage(Choice):
class WarpOrder(Choice):
- """Arranges the warps in the warp menu in whichever stage order chosen,
- thereby changing the order they are unlocked in."""
+ """
+ Arranges the warps in the warp menu in whichever stage order chosen, thereby changing the order they are unlocked in.
+ """
display_name = "Warp Order"
option_seed_stage_order = 0
option_vanilla_stage_order = 1
@@ -49,7 +55,9 @@ class WarpOrder(Choice):
class SubWeaponShuffle(Choice):
- """Shuffles all sub-weapons in the game within each other in their own pool or in the main item pool."""
+ """
+ Shuffles all sub-weapons in the game within each other in their own pool or in the main item pool.
+ """
display_name = "Sub-weapon Shuffle"
option_off = 0
option_own_pool = 1
@@ -58,8 +66,10 @@ class SubWeaponShuffle(Choice):
class SpareKeys(Choice):
- """Puts an additional copy of every non-Special key item in the pool for every key item that there is.
- Chance gives each key item a 50% chance of having a duplicate instead of guaranteeing one for all of them."""
+ """
+ Puts an additional copy of every non-Special key item in the pool for every key item that there is.
+ Chance gives each key item a 50% chance of having a duplicate instead of guaranteeing one for all of them.
+ """
display_name = "Spare Keys"
option_off = 0
option_on = 1
@@ -68,14 +78,17 @@ class SpareKeys(Choice):
class HardItemPool(Toggle):
- """Replaces some items in the item pool with less valuable ones, to make the item pool sort of resemble Hard Mode
- in the PAL version."""
+ """
+ Replaces some items in the item pool with less valuable ones, to make the item pool sort of resemble Hard Mode in the PAL version.
+ """
display_name = "Hard Item Pool"
class Special1sPerWarp(Range):
- """Sets how many Special1 jewels are needed per warp menu option unlock.
- This will decrease until the number x 7 is less than or equal to the Total Specail1s if it isn't already."""
+ """
+ Sets how many Special1 jewels are needed per warp menu option unlock.
+ This will decrease until the number x 7 is less than or equal to the Total Specail1s if it isn't already.
+ """
range_start = 1
range_end = 10
default = 1
@@ -83,7 +96,9 @@ class Special1sPerWarp(Range):
class TotalSpecial1s(Range):
- """Sets how many Speical1 jewels are in the pool in total."""
+ """
+ Sets how many Speical1 jewels are in the pool in total.
+ """
range_start = 7
range_end = 70
default = 7
@@ -91,11 +106,13 @@ class TotalSpecial1s(Range):
class DraculasCondition(Choice):
- """Sets the requirement for unlocking and opening the door to Dracula's chamber.
+ """
+ Sets the requirement for unlocking and opening the door to Dracula's chamber.
None: No requirement. Door is unlocked from the start.
Crystal: Activate the big crystal in Castle Center's basement. Neither boss afterwards has to be defeated.
Bosses: Kill a specified number of bosses with health bars and claim their Trophies.
- Specials: Find a specified number of Special2 jewels shuffled in the main item pool."""
+ Specials: Find a specified number of Special2 jewels shuffled in the main item pool.
+ """
display_name = "Dracula's Condition"
option_none = 0
option_crystal = 1
@@ -105,7 +122,9 @@ class DraculasCondition(Choice):
class PercentSpecial2sRequired(Range):
- """Percentage of Special2s required to enter Dracula's chamber when Dracula's Condition is Special2s."""
+ """
+ Percentage of Special2s required to enter Dracula's chamber when Dracula's Condition is Special2s.
+ """
range_start = 1
range_end = 100
default = 80
@@ -113,7 +132,9 @@ class PercentSpecial2sRequired(Range):
class TotalSpecial2s(Range):
- """How many Speical2 jewels are in the pool in total when Dracula's Condition is Special2s."""
+ """
+ How many Speical2 jewels are in the pool in total when Dracula's Condition is Special2s.
+ """
range_start = 1
range_end = 70
default = 25
@@ -121,58 +142,70 @@ class TotalSpecial2s(Range):
class BossesRequired(Range):
- """How many bosses need to be defeated to enter Dracula's chamber when Dracula's Condition is set to Bosses.
- This will automatically adjust if there are fewer available bosses than the chosen number."""
+ """
+ How many bosses need to be defeated to enter Dracula's chamber when Dracula's Condition is set to Bosses.
+ This will automatically adjust if there are fewer available bosses than the chosen number.
+ """
range_start = 1
range_end = 16
- default = 14
+ default = 12
display_name = "Bosses Required"
class CarrieLogic(Toggle):
- """Adds the 2 checks inside Underground Waterway's crawlspace to the pool.
+ """
+ Adds the 2 checks inside Underground Waterway's crawlspace to the pool.
If you (and everyone else if racing the same seed) are planning to only ever play Reinhardt, don't enable this.
- Can be combined with Hard Logic to include Carrie-only tricks."""
+ Can be combined with Hard Logic to include Carrie-only tricks.
+ """
display_name = "Carrie Logic"
class HardLogic(Toggle):
- """Properly considers sequence break tricks in logic (i.e. maze skip). Can be combined with Carrie Logic to include
- Carrie-only tricks.
- See the Game Page for a full list of tricks and glitches that may be logically required."""
+ """
+ Properly considers sequence break tricks in logic (i.e. maze skip). Can be combined with Carrie Logic to include Carrie-only tricks.
+ See the Game Page for a full list of tricks and glitches that may be logically required.
+ """
display_name = "Hard Logic"
class MultiHitBreakables(Toggle):
- """Adds the items that drop from the objects that break in three hits to the pool. There are 18 of these throughout
- the game, adding up to 79 or 80 checks (depending on sub-weapons
- being shuffled anywhere or not) in total with all stages.
- The game will be modified to
- remember exactly which of their items you've picked up instead of simply whether they were broken or not."""
+ """
+ Adds the items that drop from the objects that break in three hits to the pool.
+ There are 18 of these throughout the game, adding up to 79 or 80 checks (depending on sub-weapons being shuffled anywhere or not) in total with all stages.
+ The game will be modified to remember exactly which of their items you've picked up instead of simply whether they were broken or not.
+ """
display_name = "Multi-hit Breakables"
class EmptyBreakables(Toggle):
- """Adds 9 check locations in the form of breakables that normally have nothing (all empty Forest coffins, etc.)
- and some additional Red Jewels and/or moneybags into the item pool to compensate."""
+ """
+ Adds 9 check locations in the form of breakables that normally have nothing (all empty Forest coffins, etc.) and some additional Red Jewels and/or moneybags into the item pool to compensate.
+ """
display_name = "Empty Breakables"
class LizardLockerItems(Toggle):
- """Adds the 6 items inside Castle Center 2F's Lizard-man generators to the pool.
- Picking up all of these can be a very tedious luck-based process, so they are off by default."""
+ """
+ Adds the 6 items inside Castle Center 2F's Lizard-man generators to the pool.
+ Picking up all of these can be a very tedious luck-based process, so they are off by default.
+ """
display_name = "Lizard Locker Items"
class Shopsanity(Toggle):
- """Adds 7 one-time purchases from Renon's shop into the location pool. After buying an item from a slot, it will
- revert to whatever it is in the vanilla game."""
+ """
+ Adds 7 one-time purchases from Renon's shop into the location pool.
+ After buying an item from a slot, it will revert to whatever it is in the vanilla game.
+ """
display_name = "Shopsanity"
class ShopPrices(Choice):
- """Randomizes the amount of gold each item costs in Renon's shop.
- Use the below options to control how much or little an item can cost."""
+ """
+ Randomizes the amount of gold each item costs in Renon's shop.
+ Use the Minimum and Maximum Gold Price options to control how much or how little an item can cost.
+ """
display_name = "Shop Prices"
option_vanilla = 0
option_randomized = 1
@@ -180,7 +213,9 @@ class ShopPrices(Choice):
class MinimumGoldPrice(Range):
- """The lowest amount of gold an item can cost in Renon's shop, divided by 100."""
+ """
+ The lowest amount of gold an item can cost in Renon's shop, divided by 100.
+ """
display_name = "Minimum Gold Price"
range_start = 1
range_end = 50
@@ -188,7 +223,9 @@ class MinimumGoldPrice(Range):
class MaximumGoldPrice(Range):
- """The highest amount of gold an item can cost in Renon's shop, divided by 100."""
+ """
+ The highest amount of gold an item can cost in Renon's shop, divided by 100.
+ """
display_name = "Maximum Gold Price"
range_start = 1
range_end = 50
@@ -196,8 +233,9 @@ class MaximumGoldPrice(Range):
class PostBehemothBoss(Choice):
- """Sets which boss is fought in the vampire triplets' room in Castle Center by which characters after defeating
- Behemoth."""
+ """
+ Sets which boss is fought in the vampire triplets' room in Castle Center by which characters after defeating Behemoth.
+ """
display_name = "Post-Behemoth Boss"
option_vanilla = 0
option_inverted = 1
@@ -207,7 +245,9 @@ class PostBehemothBoss(Choice):
class RoomOfClocksBoss(Choice):
- """Sets which boss is fought at Room of Clocks by which characters."""
+ """
+ Sets which boss is fought at Room of Clocks by which characters.
+ """
display_name = "Room of Clocks Boss"
option_vanilla = 0
option_inverted = 1
@@ -217,7 +257,9 @@ class RoomOfClocksBoss(Choice):
class RenonFightCondition(Choice):
- """Sets the condition on which the Renon fight will trigger."""
+ """
+ Sets the condition on which the Renon fight will trigger.
+ """
display_name = "Renon Fight Condition"
option_never = 0
option_spend_30k = 1
@@ -226,7 +268,9 @@ class RenonFightCondition(Choice):
class VincentFightCondition(Choice):
- """Sets the condition on which the vampire Vincent fight will trigger."""
+ """
+ Sets the condition on which the vampire Vincent fight will trigger.
+ """
display_name = "Vincent Fight Condition"
option_never = 0
option_wait_16_days = 1
@@ -235,7 +279,9 @@ class VincentFightCondition(Choice):
class BadEndingCondition(Choice):
- """Sets the condition on which the currently-controlled character's Bad Ending will trigger."""
+ """
+ Sets the condition on which the currently-controlled character's Bad Ending will trigger.
+ """
display_name = "Bad Ending Condition"
option_never = 0
option_kill_vincent = 1
@@ -244,24 +290,32 @@ class BadEndingCondition(Choice):
class IncreaseItemLimit(DefaultOnToggle):
- """Increases the holding limit of usable items from 10 to 99 of each item."""
+ """
+ Increases the holding limit of usable items from 10 to 99 of each item.
+ """
display_name = "Increase Item Limit"
class NerfHealingItems(Toggle):
- """Decreases the amount of health healed by Roast Chickens to 25%, Roast Beefs to 50%, and Healing Kits to 80%."""
+ """
+ Decreases the amount of health healed by Roast Chickens to 25%, Roast Beefs to 50%, and Healing Kits to 80%.
+ """
display_name = "Nerf Healing Items"
class LoadingZoneHeals(DefaultOnToggle):
- """Whether end-of-level loading zones restore health and cure status aliments or not.
- Recommended off for those looking for more of a survival horror experience!"""
+ """
+ Whether end-of-level loading zones restore health and cure status aliments or not.
+ Recommended off for those looking for more of a survival horror experience!
+ """
display_name = "Loading Zone Heals"
class InvisibleItems(Choice):
- """Sets which items are visible in their locations and which are invisible until picked up.
- 'Chance' gives each item a 50/50 chance of being visible or invisible."""
+ """
+ Sets which items are visible in their locations and which are invisible until picked up.
+ 'Chance' gives each item a 50/50 chance of being visible or invisible.
+ """
display_name = "Invisible Items"
option_vanilla = 0
option_reveal_all = 1
@@ -271,21 +325,25 @@ class InvisibleItems(Choice):
class DropPreviousSubWeapon(Toggle):
- """When receiving a sub-weapon, the one you had before will drop behind you, so it can be taken back if desired."""
+ """
+ When receiving a sub-weapon, the one you had before will drop behind you, so it can be taken back if desired.
+ """
display_name = "Drop Previous Sub-weapon"
class PermanentPowerUps(Toggle):
- """Replaces PowerUps with PermaUps, which upgrade your B weapon level permanently and will stay even after
- dying and/or continuing.
- To compensate, only two will be in the pool overall, and they will not drop from any enemy or projectile."""
+ """
+ Replaces PowerUps with PermaUps, which upgrade your B weapon level permanently and will stay even after dying and/or continuing.
+ To compensate, only two will be in the pool overall, and they will not drop from any enemy or projectile.
+ """
display_name = "Permanent PowerUps"
class IceTrapPercentage(Range):
- """Replaces a percentage of junk items with Ice Traps.
- These will be visibly disguised as other items, and receiving one will freeze you
- as if you were hit by Camilla's ice cloud attack."""
+ """
+ Replaces a percentage of junk items with Ice Traps.
+ These will be visibly disguised as other items, and receiving one will freeze you as if you were hit by Camilla's ice cloud attack.
+ """
display_name = "Ice Trap Percentage"
range_start = 0
range_end = 100
@@ -293,7 +351,9 @@ class IceTrapPercentage(Range):
class IceTrapAppearance(Choice):
- """What items Ice Traps can possibly be disguised as."""
+ """
+ What items Ice Traps can possibly be disguised as.
+ """
display_name = "Ice Trap Appearance"
option_major_only = 0
option_junk_only = 1
@@ -302,31 +362,34 @@ class IceTrapAppearance(Choice):
class DisableTimeRestrictions(Toggle):
- """Disables the restriction on every event and door that requires the current time
- to be within a specific range, so they can be triggered at any time.
+ """
+ Disables the restriction on every event and door that requires the current time to be within a specific range, so they can be triggered at any time.
This includes all sun/moon doors and, in the Villa, the meeting with Rosa and the fountain pillar.
- The Villa coffin is not affected by this."""
+ The Villa coffin is not affected by this.
+ """
display_name = "Disable Time Requirements"
class SkipGondolas(Toggle):
- """Makes jumping on and activating a gondola in Tunnel instantly teleport you
- to the other station, thereby skipping the entire three-minute ride.
- The item normally at the gondola transfer point is moved to instead be
- near the red gondola at its station."""
+ """
+ Makes jumping on and activating a gondola in Tunnel instantly teleport you to the other station, thereby skipping the entire three-minute ride.
+ The item normally at the gondola transfer point is moved to instead be near the red gondola at its station.
+ """
display_name = "Skip Gondolas"
class SkipWaterwayBlocks(Toggle):
- """Opens the door to the third switch in Underground Waterway from the start so that the jumping across floating
- brick platforms won't have to be done. Shopping at the Contract on the other side of them may still be logically
- required if Shopsanity is on."""
+ """
+ Opens the door to the third switch in Underground Waterway from the start so that the jumping across floating brick platforms won't have to be done.
+ Shopping at the Contract on the other side of them may still be logically required if Shopsanity is on.
+ """
display_name = "Skip Waterway Blocks"
class Countdown(Choice):
- """Displays, near the HUD clock and below the health bar, the number of unobtained progression-marked items
- or the total check locations remaining in the stage you are currently in."""
+ """
+ Displays, near the HUD clock and below the health bar, the number of unobtained progression-marked items or the total check locations remaining in the stage you are currently in.
+ """
display_name = "Countdown"
option_none = 0
option_majors = 1
@@ -335,19 +398,21 @@ class Countdown(Choice):
class BigToss(Toggle):
- """Makes every non-immobilizing damage source launch you as if you got hit by Behemoth's charge.
+ """
+ Makes every non-immobilizing damage source launch you as if you got hit by Behemoth's charge.
Press A while tossed to cancel the launch momentum and avoid being thrown off ledges.
Hold Z to have all incoming damage be treated as it normally would.
- Any tricks that might be possible with it are NOT considered in logic by any options."""
+ Any tricks that might be possible with it are not in logic.
+ """
display_name = "Big Toss"
class PantherDash(Choice):
- """Hold C-right at any time to sprint way faster. Any tricks that might be
- possible with it are NOT considered in logic by any options and any boss
- fights with boss health meters, if started, are expected to be finished
- before leaving their arenas if Dracula's Condition is bosses. Jumpless will
- prevent jumping while moving at the increased speed to ensure logic cannot be broken with it."""
+ """
+ Hold C-right at any time to sprint way faster.
+ Any tricks that are possible with it are not in logic and any boss fights with boss health meters, if started, are expected to be finished before leaving their arenas if Dracula's Condition is bosses.
+ Jumpless will prevent jumping while moving at the increased speed to make logic harder to break with it.
+ """
display_name = "Panther Dash"
option_off = 0
option_on = 1
@@ -356,19 +421,25 @@ class PantherDash(Choice):
class IncreaseShimmySpeed(Toggle):
- """Increases the speed at which characters shimmy left and right while hanging on ledges."""
+ """
+ Increases the speed at which characters shimmy left and right while hanging on ledges.
+ """
display_name = "Increase Shimmy Speed"
class FallGuard(Toggle):
- """Removes fall damage from landing too hard. Note that falling for too long will still result in instant death."""
+ """
+ Removes fall damage from landing too hard. Note that falling for too long will still result in instant death.
+ """
display_name = "Fall Guard"
class BackgroundMusic(Choice):
- """Randomizes or disables the music heard throughout the game.
+ """
+ Randomizes or disables the music heard throughout the game.
Randomized music is split into two pools: songs that loop and songs that don't.
- The "lead-in" versions of some songs will be paired accordingly."""
+ The "lead-in" versions of some songs will be paired accordingly.
+ """
display_name = "Background Music"
option_normal = 0
option_disabled = 1
@@ -377,8 +448,10 @@ class BackgroundMusic(Choice):
class MapLighting(Choice):
- """Randomizes the lighting color RGB values on every map during every time of day to be literally anything.
- The colors and/or shading of the following things are affected: fog, maps, player, enemies, and some objects."""
+ """
+ Randomizes the lighting color RGB values on every map during every time of day to be literally anything.
+ The colors and/or shading of the following things are affected: fog, maps, player, enemies, and some objects.
+ """
display_name = "Map Lighting"
option_normal = 0
option_randomized = 1
@@ -386,12 +459,16 @@ class MapLighting(Choice):
class CinematicExperience(Toggle):
- """Enables an unused film reel effect on every cutscene in the game. Purely cosmetic."""
+ """
+ Enables an unused film reel effect on every cutscene in the game. Purely cosmetic.
+ """
display_name = "Cinematic Experience"
class WindowColorR(Range):
- """The red value for the background color of the text windows during gameplay."""
+ """
+ The red value for the background color of the text windows during gameplay.
+ """
display_name = "Window Color R"
range_start = 0
range_end = 15
@@ -399,7 +476,9 @@ class WindowColorR(Range):
class WindowColorG(Range):
- """The green value for the background color of the text windows during gameplay."""
+ """
+ The green value for the background color of the text windows during gameplay.
+ """
display_name = "Window Color G"
range_start = 0
range_end = 15
@@ -407,7 +486,9 @@ class WindowColorG(Range):
class WindowColorB(Range):
- """The blue value for the background color of the text windows during gameplay."""
+ """
+ The blue value for the background color of the text windows during gameplay.
+ """
display_name = "Window Color B"
range_start = 0
range_end = 15
@@ -415,7 +496,9 @@ class WindowColorB(Range):
class WindowColorA(Range):
- """The alpha value for the background color of the text windows during gameplay."""
+ """
+ The alpha value for the background color of the text windows during gameplay.
+ """
display_name = "Window Color A"
range_start = 0
range_end = 15
@@ -423,9 +506,10 @@ class WindowColorA(Range):
class DeathLink(Choice):
- """When you die, everyone dies. Of course the reverse is true too.
- Explosive: Makes received DeathLinks kill you via the Magical Nitro explosion
- instead of the normal death animation."""
+ """
+ When you die, everyone dies. Of course the reverse is true too.
+ Explosive: Makes received DeathLinks kill you via the Magical Nitro explosion instead of the normal death animation.
+ """
display_name = "DeathLink"
option_off = 0
alias_no = 0
@@ -437,6 +521,7 @@ class DeathLink(Choice):
@dataclass
class CV64Options(PerGameCommonOptions):
+ start_inventory_from_pool: StartInventoryPool
character_stages: CharacterStages
stage_shuffle: StageShuffle
starting_stage: StartingStage
@@ -479,13 +564,26 @@ class CV64Options(PerGameCommonOptions):
big_toss: BigToss
panther_dash: PantherDash
increase_shimmy_speed: IncreaseShimmySpeed
- background_music: BackgroundMusic
- map_lighting: MapLighting
- fall_guard: FallGuard
- cinematic_experience: CinematicExperience
window_color_r: WindowColorR
window_color_g: WindowColorG
window_color_b: WindowColorB
window_color_a: WindowColorA
+ background_music: BackgroundMusic
+ map_lighting: MapLighting
+ fall_guard: FallGuard
+ cinematic_experience: CinematicExperience
death_link: DeathLink
- start_inventory_from_pool: StartInventoryPool
+
+
+cv64_option_groups = [
+ OptionGroup("gameplay tweaks", [
+ HardItemPool, ShopPrices, MinimumGoldPrice, MaximumGoldPrice, PostBehemothBoss, RoomOfClocksBoss,
+ RenonFightCondition, VincentFightCondition, BadEndingCondition, IncreaseItemLimit, NerfHealingItems,
+ LoadingZoneHeals, InvisibleItems, DropPreviousSubWeapon, PermanentPowerUps, IceTrapPercentage,
+ IceTrapAppearance, DisableTimeRestrictions, SkipGondolas, SkipWaterwayBlocks, Countdown, BigToss, PantherDash,
+ IncreaseShimmySpeed, FallGuard, DeathLink
+ ]),
+ OptionGroup("cosmetics", [
+ WindowColorR, WindowColorG, WindowColorB, WindowColorA, BackgroundMusic, MapLighting, CinematicExperience
+ ])
+]
diff --git a/worlds/dark_souls_3/Items.py b/worlds/dark_souls_3/Items.py
index a13235b12a..3dd5cb2d3c 100644
--- a/worlds/dark_souls_3/Items.py
+++ b/worlds/dark_souls_3/Items.py
@@ -1272,11 +1272,7 @@ _cut_content_items = [DS3ItemData(row[0], row[1], False, row[2]) for row in [
]]
item_descriptions = {
- "Cinders": """
- All four Cinders of a Lord.
-
- Once you have these four, you can fight Soul of Cinder and win the game.
- """,
+ "Cinders": "All four Cinders of a Lord.\n\nOnce you have these four, you can fight Soul of Cinder and win the game.",
}
_all_items = _vanilla_items + _dlc_items
diff --git a/worlds/dark_souls_3/__init__.py b/worlds/dark_souls_3/__init__.py
index b4c231cdea..c4b2232b32 100644
--- a/worlds/dark_souls_3/__init__.py
+++ b/worlds/dark_souls_3/__init__.py
@@ -35,6 +35,8 @@ class DarkSouls3Web(WebWorld):
tutorials = [setup_en, setup_fr]
+ item_descriptions = item_descriptions
+
class DarkSouls3World(World):
"""
@@ -61,8 +63,6 @@ class DarkSouls3World(World):
"Cinders of a Lord - Lothric Prince"
}
}
- item_descriptions = item_descriptions
-
def __init__(self, multiworld: MultiWorld, player: int):
super().__init__(multiworld, player)
diff --git a/worlds/generic/docs/triggers_en.md b/worlds/generic/docs/triggers_en.md
index 73cca66543..c084b53fb1 100644
--- a/worlds/generic/docs/triggers_en.md
+++ b/worlds/generic/docs/triggers_en.md
@@ -123,10 +123,21 @@ again using the new options `normal`, `pupdunk_hard`, and `pupdunk_mystery`, and
new weights for 150 and 200. This allows for two more triggers that will only be used for the new `pupdunk_hard`
and `pupdunk_mystery` options so that they will only be triggered on "pupdunk AND hard/mystery".
-Options that define a list, set, or dict can additionally have the character `+` added to the start of their name, which applies the contents of
-the activated trigger to the already present equivalents in the game options.
+## Adding or Removing from a List, Set, or Dict Option
+
+List, set, and dict options can additionally have values added to or removed from itself without overriding the existing
+option value by prefixing the option name in the trigger block with `+` (add) or `-` (remove). The exact behavior for
+each will depend on the option type.
+
+- For sets, `+` will add the value(s) to the set and `-` will remove any value(s) of the set. Sets do not allow
+ duplicates.
+- For lists, `+` will add new values(s) to the list and `-` will remove the first matching values(s) it comes across.
+ Lists allow duplicate values.
+- For dicts, `+` will add the value(s) to the given key(s) inside the dict if it exists, or add it otherwise. `-` is the
+ inverse operation of addition (and negative values are allowed).
For example:
+
```yaml
Super Metroid:
start_location:
@@ -134,18 +145,21 @@ Super Metroid:
aqueduct: 50
start_hints:
- Morph Ball
-triggers:
- - option_category: Super Metroid
- option_name: start_location
- option_result: aqueduct
- options:
- Super Metroid:
- +start_hints:
- - Gravity Suit
+ start_inventory:
+ Power Bombs: 1
+ triggers:
+ - option_category: Super Metroid
+ option_name: start_location
+ option_result: aqueduct
+ options:
+ Super Metroid:
+ +start_hints:
+ - Gravity Suit
```
-In this example, if the `start_location` option rolls `landing_site`, only a starting hint for Morph Ball will be created.
-If `aqueduct` is rolled, a starting hint for Gravity Suit will also be created alongside the hint for Morph Ball.
+In this example, if the `start_location` option rolls `landing_site`, only a starting hint for Morph Ball will be
+created. If `aqueduct` is rolled, a starting hint for Gravity Suit will also be created alongside the hint for Morph
+Ball.
-Note that for lists, items can only be added, not removed or replaced. For dicts, defining a value for a present key will
-replace that value within the dict.
+Note that for lists, items can only be added, not removed or replaced. For dicts, defining a value for a present key
+will replace that value within the dict.
diff --git a/worlds/lingo/__init__.py b/worlds/lingo/__init__.py
index 113c3928d2..fa24fdc3bc 100644
--- a/worlds/lingo/__init__.py
+++ b/worlds/lingo/__init__.py
@@ -9,12 +9,13 @@ from worlds.AutoWorld import WebWorld, World
from .datatypes import Room, RoomEntrance
from .items import ALL_ITEM_TABLE, ITEMS_BY_GROUP, TRAP_ITEMS, LingoItem
from .locations import ALL_LOCATION_TABLE, LOCATIONS_BY_GROUP
-from .options import LingoOptions
+from .options import LingoOptions, lingo_option_groups
from .player_logic import LingoPlayerLogic
from .regions import create_regions
class LingoWebWorld(WebWorld):
+ option_groups = lingo_option_groups
theme = "grass"
tutorials = [Tutorial(
"Multiworld Setup Guide",
diff --git a/worlds/lingo/data/LL1.yaml b/worlds/lingo/data/LL1.yaml
index c33cad393b..4d6771a735 100644
--- a/worlds/lingo/data/LL1.yaml
+++ b/worlds/lingo/data/LL1.yaml
@@ -2052,6 +2052,7 @@
door: Rhyme Room Entrance
Art Gallery:
warp: True
+ Roof: True # by parkouring through the Bearer shortcut
panels:
RED:
id: Color Arrow Room/Panel_red_afar
@@ -2333,6 +2334,7 @@
# This is the MASTERY on the other side of THE FEARLESS. It can only be
# accessed by jumping from the top of the tower.
id: Master Room/Panel_mastery_mastery8
+ location_name: The Fearless - MASTERY
tag: midwhite
hunt: True
required_door:
@@ -4098,6 +4100,7 @@
Number Hunt:
room: Number Hunt
door: Door to Directional Gallery
+ Roof: True # through ceiling of sunwarp
panels:
PEPPER:
id: Backside Room/Panel_pepper_salt
@@ -5390,6 +5393,7 @@
- The Artistic (Apple)
- The Artistic (Lattice)
check: True
+ location_name: The Artistic - Achievement
achievement: The Artistic
FINE:
id: Ceiling Room/Panel_yellow_top_5
@@ -6046,7 +6050,7 @@
paintings:
- id: symmetry_painting_a_5
orientation: east
- - id: symmetry_painting_a_5
+ - id: symmetry_painting_b_5
disable: True
The Wondrous (Window):
entrances:
@@ -6814,9 +6818,6 @@
tag: syn rhyme
subtag: bot
link: rhyme FALL
- LEAP:
- id: Double Room/Panel_leap_leap
- tag: midwhite
doors:
Exit:
id: Double Room Area Doors/Door_room_exit
@@ -7065,6 +7066,9 @@
tag: syn rhyme
subtag: bot
link: rhyme CREATIVE
+ LEAP:
+ id: Double Room/Panel_leap_leap
+ tag: midwhite
doors:
Door to Cross:
id: Double Room Area Doors/Door_room_4a
@@ -7272,6 +7276,7 @@
MASTERY:
id: Master Room/Panel_mastery_mastery
tag: midwhite
+ hunt: True
required_door:
room: Orange Tower Seventh Floor
door: Mastery
diff --git a/worlds/lingo/data/generated.dat b/worlds/lingo/data/generated.dat
index 304109ca28..6c8c925138 100644
Binary files a/worlds/lingo/data/generated.dat and b/worlds/lingo/data/generated.dat differ
diff --git a/worlds/lingo/data/ids.yaml b/worlds/lingo/data/ids.yaml
index 918af7aba9..1fa06d2425 100644
--- a/worlds/lingo/data/ids.yaml
+++ b/worlds/lingo/data/ids.yaml
@@ -766,7 +766,6 @@ panels:
BOUNCE: 445010
SCRAWL: 445011
PLUNGE: 445012
- LEAP: 445013
Rhyme Room (Circle):
BIRD: 445014
LETTER: 445015
@@ -790,6 +789,7 @@ panels:
GEM: 445031
INNOVATIVE (Top): 445032
INNOVATIVE (Bottom): 445033
+ LEAP: 445013
Room Room:
DOOR (1): 445034
DOOR (2): 445035
diff --git a/worlds/lingo/datatypes.py b/worlds/lingo/datatypes.py
index e466558f87..36141daa41 100644
--- a/worlds/lingo/datatypes.py
+++ b/worlds/lingo/datatypes.py
@@ -63,6 +63,7 @@ class Panel(NamedTuple):
exclude_reduce: bool
achievement: bool
non_counting: bool
+ location_name: Optional[str]
class Painting(NamedTuple):
diff --git a/worlds/lingo/locations.py b/worlds/lingo/locations.py
index 5ffedee367..c527e522fb 100644
--- a/worlds/lingo/locations.py
+++ b/worlds/lingo/locations.py
@@ -39,7 +39,7 @@ def load_location_data():
for room_name, panels in PANELS_BY_ROOM.items():
for panel_name, panel in panels.items():
- location_name = f"{room_name} - {panel_name}"
+ location_name = f"{room_name} - {panel_name}" if panel.location_name is None else panel.location_name
classification = LocationClassification.insanity
if panel.check:
diff --git a/worlds/lingo/options.py b/worlds/lingo/options.py
index 65f27269f2..1c1f645b86 100644
--- a/worlds/lingo/options.py
+++ b/worlds/lingo/options.py
@@ -2,7 +2,8 @@ from dataclasses import dataclass
from schema import And, Schema
-from Options import Toggle, Choice, DefaultOnToggle, Range, PerGameCommonOptions, StartInventoryPool, OptionDict
+from Options import Toggle, Choice, DefaultOnToggle, Range, PerGameCommonOptions, StartInventoryPool, OptionDict, \
+ OptionGroup
from .items import TRAP_ITEMS
@@ -32,8 +33,8 @@ class ProgressiveColorful(DefaultOnToggle):
class LocationChecks(Choice):
- """On "normal", there will be a location check for each panel set that would ordinarily open a door, as well as for
- achievement panels and a small handful of other panels.
+ """Determines what locations are available.
+ On "normal", there will be a location check for each panel set that would ordinarily open a door, as well as for achievement panels and a small handful of other panels.
On "reduced", many of the locations that are associated with opening doors are removed.
On "insanity", every individual panel in the game is a location check."""
display_name = "Location Checks"
@@ -43,8 +44,10 @@ class LocationChecks(Choice):
class ShuffleColors(DefaultOnToggle):
- """If on, an item is added to the pool for every puzzle color (besides White).
- You will need to unlock the requisite colors in order to be able to solve puzzles of that color."""
+ """
+ If on, an item is added to the pool for every puzzle color (besides White).
+ You will need to unlock the requisite colors in order to be able to solve puzzles of that color.
+ """
display_name = "Shuffle Colors"
@@ -62,20 +65,25 @@ class ShufflePaintings(Toggle):
class EnablePilgrimage(Toggle):
- """If on, you are required to complete a pilgrimage in order to access the Pilgrim Antechamber.
+ """Determines how the pilgrimage works.
+ If on, you are required to complete a pilgrimage in order to access the Pilgrim Antechamber.
If off, the pilgrimage will be deactivated, and the sun painting will be added to the pool, even if door shuffle is off."""
display_name = "Enable Pilgrimage"
class PilgrimageAllowsRoofAccess(DefaultOnToggle):
- """If on, you may use the Crossroads roof access during a pilgrimage (and you may be expected to do so).
- Otherwise, pilgrimage will be deactivated when going up the stairs."""
+ """
+ If on, you may use the Crossroads roof access during a pilgrimage (and you may be expected to do so).
+ Otherwise, pilgrimage will be deactivated when going up the stairs.
+ """
display_name = "Allow Roof Access for Pilgrimage"
class PilgrimageAllowsPaintings(DefaultOnToggle):
- """If on, you may use paintings during a pilgrimage (and you may be expected to do so).
- Otherwise, pilgrimage will be deactivated when going through a painting."""
+ """
+ If on, you may use paintings during a pilgrimage (and you may be expected to do so).
+ Otherwise, pilgrimage will be deactivated when going through a painting.
+ """
display_name = "Allow Paintings for Pilgrimage"
@@ -137,8 +145,10 @@ class Level2Requirement(Range):
class EarlyColorHallways(Toggle):
- """When on, a painting warp to the color hallways area will appear in the starting room.
- This lets you avoid being trapped in the starting room for long periods of time when door shuffle is on."""
+ """
+ When on, a painting warp to the color hallways area will appear in the starting room.
+ This lets you avoid being trapped in the starting room for long periods of time when door shuffle is on.
+ """
display_name = "Early Color Hallways"
@@ -151,8 +161,10 @@ class TrapPercentage(Range):
class TrapWeights(OptionDict):
- """Specify the distribution of traps that should be placed into the pool.
- If you don't want a specific type of trap, set the weight to zero."""
+ """
+ Specify the distribution of traps that should be placed into the pool.
+ If you don't want a specific type of trap, set the weight to zero.
+ """
display_name = "Trap Weights"
schema = Schema({trap_name: And(int, lambda n: n >= 0) for trap_name in TRAP_ITEMS})
default = {trap_name: 1 for trap_name in TRAP_ITEMS}
@@ -171,6 +183,26 @@ class DeathLink(Toggle):
display_name = "Death Link"
+lingo_option_groups = [
+ OptionGroup("Pilgrimage", [
+ EnablePilgrimage,
+ PilgrimageAllowsRoofAccess,
+ PilgrimageAllowsPaintings,
+ SunwarpAccess,
+ ShuffleSunwarps,
+ ]),
+ OptionGroup("Fine-tuning", [
+ ProgressiveOrangeTower,
+ ProgressiveColorful,
+ MasteryAchievements,
+ Level2Requirement,
+ TrapPercentage,
+ TrapWeights,
+ PuzzleSkipPercentage,
+ ])
+]
+
+
@dataclass
class LingoOptions(PerGameCommonOptions):
shuffle_doors: ShuffleDoors
diff --git a/worlds/lingo/utils/pickle_static_data.py b/worlds/lingo/utils/pickle_static_data.py
index 10ec69be35..e40c21ce3e 100644
--- a/worlds/lingo/utils/pickle_static_data.py
+++ b/worlds/lingo/utils/pickle_static_data.py
@@ -150,8 +150,6 @@ def process_entrance(source_room, doors, room_obj):
def process_panel(room_name, panel_name, panel_data):
global PANELS_BY_ROOM
- full_name = f"{room_name} - {panel_name}"
-
# required_room can either be a single room or a list of rooms.
if "required_room" in panel_data:
if isinstance(panel_data["required_room"], list):
@@ -229,8 +227,13 @@ def process_panel(room_name, panel_name, panel_data):
else:
non_counting = False
+ if "location_name" in panel_data:
+ location_name = panel_data["location_name"]
+ else:
+ location_name = None
+
panel_obj = Panel(required_rooms, required_doors, required_panels, colors, check, event, exclude_reduce,
- achievement, non_counting)
+ achievement, non_counting, location_name)
PANELS_BY_ROOM[room_name][panel_name] = panel_obj
diff --git a/worlds/lingo/utils/validate_config.rb b/worlds/lingo/utils/validate_config.rb
index 831fee2ad3..498980bb71 100644
--- a/worlds/lingo/utils/validate_config.rb
+++ b/worlds/lingo/utils/validate_config.rb
@@ -39,11 +39,12 @@ mentioned_doors = Set[]
mentioned_panels = Set[]
mentioned_sunwarp_entrances = Set[]
mentioned_sunwarp_exits = Set[]
+mentioned_paintings = Set[]
door_groups = {}
directives = Set["entrances", "panels", "doors", "paintings", "sunwarps", "progression"]
-panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt"]
+panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt", "location_name"]
door_directives = Set["id", "painting_id", "panels", "item_name", "item_group", "location_name", "skip_location", "skip_item", "door_group", "include_reduce", "event", "warp_id"]
painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"]
@@ -257,6 +258,12 @@ config.each do |room_name, room|
unless paintings.include? painting["id"] then
puts "#{room_name} :::: Invalid Painting ID #{painting["id"]}"
end
+
+ if mentioned_paintings.include?(painting["id"]) then
+ puts "Painting #{painting["id"]} is mentioned more than once"
+ else
+ mentioned_paintings.add(painting["id"])
+ end
else
puts "#{room_name} :::: Painting is missing an ID"
end
diff --git a/worlds/musedash/MuseDashData.txt b/worlds/musedash/MuseDashData.txt
index 0a8beba37b..b0f3b80c99 100644
--- a/worlds/musedash/MuseDashData.txt
+++ b/worlds/musedash/MuseDashData.txt
@@ -538,10 +538,16 @@ Reality Show|71-2|Valentine Stage|False|5|7|10|
SIG feat.Tobokegao|71-3|Valentine Stage|True|3|6|8|
Rose Love|71-4|Valentine Stage|True|2|4|7|
Euphoria|71-5|Valentine Stage|True|1|3|6|
-P E R O P E R O Brother Dance|72-0|Legends of Muse Warriors|False|0|?|0|
+P E R O P E R O Brother Dance|72-0|Legends of Muse Warriors|True|0|?|0|
PA PPA PANIC|72-1|Legends of Muse Warriors|False|4|8|10|
-How To Make Music Game Song!|72-2|Legends of Muse Warriors|False|6|8|10|11
-Re Re|72-3|Legends of Muse Warriors|False|7|9|11|12
-Marmalade Twins|72-4|Legends of Muse Warriors|False|5|8|10|
-DOMINATOR|72-5|Legends of Muse Warriors|False|7|9|11|
-Teshikani TESHiKANi|72-6|Legends of Muse Warriors|False|5|7|9|
+How To Make Music Game Song!|72-2|Legends of Muse Warriors|True|6|8|10|11
+Re Re|72-3|Legends of Muse Warriors|True|7|9|11|12
+Marmalade Twins|72-4|Legends of Muse Warriors|True|5|8|10|
+DOMINATOR|72-5|Legends of Muse Warriors|True|7|9|11|
+Teshikani TESHiKANi|72-6|Legends of Muse Warriors|True|5|7|9|
+Urban Magic|73-0|Happy Otaku Pack Vol.19|True|3|5|7|
+Maid's Prank|73-1|Happy Otaku Pack Vol.19|True|5|7|10|
+Dance Dance Good Night Dance|73-2|Happy Otaku Pack Vol.19|True|2|4|7|
+Ops Limone|73-3|Happy Otaku Pack Vol.19|True|5|8|11|
+NOVA|73-4|Happy Otaku Pack Vol.19|True|6|8|10|
+Heaven's Gradius|73-5|Happy Otaku Pack Vol.19|True|6|8|10|
diff --git a/worlds/noita/options.py b/worlds/noita/options.py
index f2ccbfbc4d..0fdd62365a 100644
--- a/worlds/noita/options.py
+++ b/worlds/noita/options.py
@@ -3,11 +3,13 @@ from dataclasses import dataclass
class PathOption(Choice):
- """Choose where you would like Hidden Chest and Pedestal checks to be placed.
+ """
+ Choose where you would like Hidden Chest and Pedestal checks to be placed.
Main Path includes the main 7 biomes you typically go through to get to the final boss.
Side Path includes the Lukki Lair and Fungal Caverns. 9 biomes total.
Main World includes the full world (excluding parallel worlds). 15 biomes total.
- Note: The Collapsed Mines have been combined into the Mines as the biome is tiny."""
+ Note: The Collapsed Mines have been combined into the Mines as the biome is tiny.
+ """
display_name = "Path Option"
option_main_path = 1
option_side_path = 2
@@ -16,7 +18,9 @@ class PathOption(Choice):
class HiddenChests(Range):
- """Number of hidden chest checks added to the applicable biomes."""
+ """
+ Number of hidden chest checks added to the applicable biomes.
+ """
display_name = "Hidden Chests per Biome"
range_start = 0
range_end = 20
@@ -24,7 +28,9 @@ class HiddenChests(Range):
class PedestalChecks(Range):
- """Number of checks that will spawn on pedestals in the applicable biomes."""
+ """
+ Number of checks that will spawn on pedestals in the applicable biomes.
+ """
display_name = "Pedestal Checks per Biome"
range_start = 0
range_end = 20
@@ -32,15 +38,19 @@ class PedestalChecks(Range):
class Traps(DefaultOnToggle):
- """Whether negative effects on the Noita world are added to the item pool."""
+ """
+ Whether negative effects on the Noita world are added to the item pool.
+ """
display_name = "Traps"
class OrbsAsChecks(Choice):
- """Decides whether finding the orbs that naturally spawn in the world count as checks.
+ """
+ Decides whether finding the orbs that naturally spawn in the world count as checks.
The Main Path option includes only the Floating Island and Abyss Orb Room orbs.
The Side Path option includes the Main Path, Magical Temple, Lukki Lair, and Lava Lake orbs.
- The Main World option includes all 11 orbs."""
+ The Main World option includes all 11 orbs.
+ """
display_name = "Orbs as Location Checks"
option_no_orbs = 0
option_main_path = 1
@@ -50,10 +60,12 @@ class OrbsAsChecks(Choice):
class BossesAsChecks(Choice):
- """Makes bosses count as location checks. The boss only needs to die, you do not need the kill credit.
+ """
+ Makes bosses count as location checks. The boss only needs to die, you do not need the kill credit.
The Main Path option includes Gate Guardian, Suomuhauki, and Kolmisilmä.
The Side Path option includes the Main Path bosses, Sauvojen Tuntija, and Ylialkemisti.
- The All Bosses option includes all 15 bosses."""
+ The All Bosses option includes all 15 bosses.
+ """
display_name = "Bosses as Location Checks"
option_no_bosses = 0
option_main_path = 1
@@ -65,11 +77,13 @@ class BossesAsChecks(Choice):
# Note: the Sampo is an item that is picked up to trigger the boss fight at the normal ending location.
# The sampo is required for every ending (having orbs and bringing the sampo to a different spot changes the ending).
class VictoryCondition(Choice):
- """Greed is to get to the bottom, beat the boss, and win the game.
+ """
+ Greed is to get to the bottom, beat the boss, and win the game.
Pure is to get 11 orbs, grab the sampo, and bring it to the mountain altar.
Peaceful is to get all 33 orbs, grab the sampo, and bring it to the mountain altar.
Orbs will be added to the randomizer pool based on which victory condition you chose.
- The base game orbs will not count towards these victory conditions."""
+ The base game orbs will not count towards these victory conditions.
+ """
display_name = "Victory Condition"
option_greed_ending = 0
option_pure_ending = 1
@@ -78,9 +92,11 @@ class VictoryCondition(Choice):
class ExtraOrbs(Range):
- """Add extra orbs to your item pool, to prevent you from needing to wait as long for the last orb you need for your victory condition.
+ """
+ Add extra orbs to your item pool, to prevent you from needing to wait as long for the last orb you need for your victory condition.
Extra orbs received past your victory condition's amount will be received as hearts instead.
- Can be turned on for the Greed Ending goal, but will only really make it harder."""
+ Can be turned on for the Greed Ending goal, but will only really make it harder.
+ """
display_name = "Extra Orbs"
range_start = 0
range_end = 10
@@ -88,8 +104,10 @@ class ExtraOrbs(Range):
class ShopPrice(Choice):
- """Reduce the costs of Archipelago items in shops.
- By default, the price of Archipelago items matches the price of wands at that shop."""
+ """
+ Reduce the costs of Archipelago items in shops.
+ By default, the price of Archipelago items matches the price of wands at that shop.
+ """
display_name = "Shop Price Reduction"
option_full_price = 100
option_25_percent_off = 75
@@ -98,10 +116,17 @@ class ShopPrice(Choice):
default = 100
+class NoitaDeathLink(DeathLink):
+ """
+ When you die, everyone dies. Of course, the reverse is true too.
+ You can disable this in the in-game mod options.
+ """
+
+
@dataclass
class NoitaOptions(PerGameCommonOptions):
start_inventory_from_pool: StartInventoryPool
- death_link: DeathLink
+ death_link: NoitaDeathLink
bad_effects: Traps
victory_condition: VictoryCondition
path_option: PathOption
diff --git a/worlds/pokemon_emerald/docs/setup_es.md b/worlds/pokemon_emerald/docs/setup_es.md
index 28c3a4a01a..1d3721862a 100644
--- a/worlds/pokemon_emerald/docs/setup_es.md
+++ b/worlds/pokemon_emerald/docs/setup_es.md
@@ -14,51 +14,51 @@ Una vez que hayas instalado BizHawk, abre `EmuHawk.exe` y cambia las siguientes
`NLua+KopiLua` a `Lua+LuaInterface`, luego reinicia EmuHawk. (Si estás usando BizHawk 2.9, puedes saltar este paso.)
- En `Config > Customize`, activa la opción "Run in background" para prevenir desconexiones del cliente mientras
la aplicación activa no sea EmuHawk.
-- Abre el archivo `.gba` en EmuHawk y luego ve a `Config > Controllers…` para configurar los controles. Si no puedes
+- Abre el archivo `.gba` en EmuHawk y luego ve a `Config > Controllers…` para configurar los controles. Si no puedes
hacer clic en `Controllers…`, debes abrir cualquier ROM `.gba` primeramente.
-- Considera limpiar tus macros y atajos en `Config > Hotkeys…` si no quieres usarlas de manera intencional. Para
+- Considera limpiar tus macros y atajos en `Config > Hotkeys…` si no quieres usarlas de manera intencional. Para
limpiarlas, selecciona el atajo y presiona la tecla Esc.
## Software Opcional
-- [Pokémon Emerald AP Tracker](https://github.com/seto10987/Archipelago-Emerald-AP-Tracker/releases/latest), para usar con
-[PopTracker](https://github.com/black-sliver/PopTracker/releases)
+- [Pokémon Emerald AP Tracker](https://github.com/seto10987/Archipelago-Emerald-AP-Tracker/releases/latest), para usar
+con [PopTracker](https://github.com/black-sliver/PopTracker/releases)
## Generando y Parcheando el Juego
-1. Crea tu archivo de configuración (YAML). Puedes hacerlo en
+1. Crea tu archivo de configuración (YAML). Puedes hacerlo en
[Página de Opciones de Pokémon Emerald](../../../games/Pokemon%20Emerald/player-options).
-2. Sigue las instrucciones generales de Archipelago para [Generar un juego]
-(../../Archipelago/setup/en#generating-a-game). Esto generará un archivo de salida (output file) para ti. Tu archivo
-de parche tendrá la extensión de archivo`.apemerald`.
+2. Sigue las instrucciones generales de Archipelago para
+[Generar un juego](../../Archipelago/setup/en#generating-a-game). Esto generará un archivo de salida (output file) para
+ti. Tu archivo de parche tendrá la extensión de archivo `.apemerald`.
3. Abre `ArchipelagoLauncher.exe`
4. Selecciona "Open Patch" en el lado derecho y elige tu archivo de parcheo.
5. Si esta es la primera vez que vas a parchear, se te pedirá que selecciones la ROM sin parchear.
6. Un archivo parcheado con extensión `.gba` será creado en el mismo lugar que el archivo de parcheo.
-7. La primera vez que abras un archivo parcheado con el BizHawk Client, se te preguntará donde está localizado
+7. La primera vez que abras un archivo parcheado con el BizHawk Client, se te preguntará donde está localizado
`EmuHawk.exe` en tu instalación de BizHawk.
-Si estás jugando una seed Single-Player y no te interesa el auto-tracking o las pistas, puedes parar aquí, cierra el
-cliente, y carga la ROM ya parcheada en cualquier emulador. Pero para partidas multi-worlds y para otras
-implementaciones de Archipelago, continúa usando BizHawk como tu emulador
+Si estás jugando una seed Single-Player y no te interesa el auto-tracking o las pistas, puedes parar aquí, cierra el
+cliente, y carga la ROM ya parcheada en cualquier emulador. Pero para partidas multi-worlds y para otras
+implementaciones de Archipelago, continúa usando BizHawk como tu emulador.
## Conectando con el Servidor
-Por defecto, al abrir un archivo parcheado, se harán de manera automática 1-5 pasos. Aun así, ten en cuenta lo
+Por defecto, al abrir un archivo parcheado, se harán de manera automática 1-5 pasos. Aun así, ten en cuenta lo
siguiente en caso de que debas cerrar y volver a abrir la ventana en mitad de la partida por algún motivo.
-1. Pokémon Emerald usa el Archipelago BizHawk Client. Si el cliente no se encuentra abierto al abrir la rom
+1. Pokémon Emerald usa el Archipelago BizHawk Client. Si el cliente no se encuentra abierto al abrir la rom
parcheada, puedes volver a abrirlo desde el Archipelago Launcher.
2. Asegúrate que EmuHawk está corriendo la ROM parcheada.
3. En EmuHawk, ve a `Tools > Lua Console`. Debes tener esta ventana abierta mientras juegas.
4. En la ventana de Lua Console, ve a `Script > Open Script…`.
5. Ve a la carpeta donde está instalado Archipelago y abre `data/lua/connector_bizhawk_generic.lua`.
-6. El emulador y el cliente eventualmente se conectarán uno con el otro. La ventana de BizHawk Client indicará que te
+6. El emulador y el cliente eventualmente se conectarán uno con el otro. La ventana de BizHawk Client indicará que te
has conectado y reconocerá Pokémon Emerald.
-7. Para conectar el cliente con el servidor, ingresa la dirección y el puerto de la sala (ej. `archipelago.gg:38281`)
+7. Para conectar el cliente con el servidor, ingresa la dirección y el puerto de la sala (ej. `archipelago.gg:38281`)
en el campo de texto que se encuentra en la parte superior del cliente y haz click en Connect.
-Ahora deberías poder enviar y recibir ítems. Debes seguir estos pasos cada vez que quieras reconectarte. Es seguro
+Ahora deberías poder enviar y recibir ítems. Debes seguir estos pasos cada vez que quieras reconectarte. Es seguro
jugar de manera offline; se sincronizará todo cuando te vuelvas a conectar.
## Tracking Automático
@@ -70,5 +70,5 @@ Pokémon Emerald tiene un Map Tracker completamente funcional que soporta auto-t
2. Coloca la carpeta del Tracker en la carpeta packs/ dentro de la carpeta de instalación del PopTracker.
3. Abre PopTracker, y carga el Pack de Pokémon Emerald Map Tracker.
4. Para utilizar el auto-tracking, haz click en el símbolo "AP" que se encuentra en la parte superior.
-5. Entra la dirección del Servidor de Archipelago (la misma a la que te conectaste para jugar), nombre del jugador, y
+5. Entra la dirección del Servidor de Archipelago (la misma a la que te conectaste para jugar), nombre del jugador, y
contraseña (deja vacío este campo en caso de no utilizar contraseña).
diff --git a/worlds/stardew_valley/__init__.py b/worlds/stardew_valley/__init__.py
index 6a82a2a26d..dafb1c6473 100644
--- a/worlds/stardew_valley/__init__.py
+++ b/worlds/stardew_valley/__init__.py
@@ -13,6 +13,7 @@ from .locations import location_table, create_locations, LocationData, locations
from .logic.bundle_logic import BundleLogic
from .logic.logic import StardewLogic
from .logic.time_logic import MAX_MONTHS
+from .option_groups import sv_option_groups
from .options import StardewValleyOptions, SeasonRandomization, Goal, BundleRandomization, BundlePrice, NumberOfLuckBuffs, NumberOfMovementBuffs, \
BackpackProgression, BuildingProgression, ExcludeGingerIsland, TrapItems, EntranceRandomization
from .presets import sv_options_presets
@@ -39,6 +40,7 @@ class StardewWebWorld(WebWorld):
theme = "dirt"
bug_report_page = "https://github.com/agilbert1412/StardewArchipelago/issues/new?labels=bug&title=%5BBug%5D%3A+Brief+Description+of+bug+here"
options_presets = sv_options_presets
+ option_groups = sv_option_groups
tutorials = [
Tutorial(
diff --git a/worlds/stardew_valley/option_groups.py b/worlds/stardew_valley/option_groups.py
new file mode 100644
index 0000000000..50709c10fd
--- /dev/null
+++ b/worlds/stardew_valley/option_groups.py
@@ -0,0 +1,65 @@
+from Options import OptionGroup, DeathLink, ProgressionBalancing, Accessibility
+from .options import (Goal, StartingMoney, ProfitMargin, BundleRandomization, BundlePrice,
+ EntranceRandomization, SeasonRandomization, Cropsanity, BackpackProgression,
+ ToolProgression, ElevatorProgression, SkillProgression, BuildingProgression,
+ FestivalLocations, ArcadeMachineLocations, SpecialOrderLocations,
+ QuestLocations, Fishsanity, Museumsanity, Friendsanity, FriendsanityHeartSize,
+ NumberOfMovementBuffs, NumberOfLuckBuffs, ExcludeGingerIsland, TrapItems,
+ MultipleDaySleepEnabled, MultipleDaySleepCost, ExperienceMultiplier,
+ FriendshipMultiplier, DebrisMultiplier, QuickStart, Gifting, FarmType,
+ Monstersanity, Shipsanity, Cooksanity, Chefsanity, Craftsanity, Mods)
+
+sv_option_groups = [
+ OptionGroup("General", [
+ Goal,
+ FarmType,
+ BundleRandomization,
+ BundlePrice,
+ EntranceRandomization,
+ ExcludeGingerIsland,
+ ]),
+ OptionGroup("Major Unlocks", [
+ SeasonRandomization,
+ Cropsanity,
+ BackpackProgression,
+ ToolProgression,
+ ElevatorProgression,
+ SkillProgression,
+ BuildingProgression,
+ ]),
+ OptionGroup("Extra Shuffling", [
+ FestivalLocations,
+ ArcadeMachineLocations,
+ SpecialOrderLocations,
+ QuestLocations,
+ Fishsanity,
+ Museumsanity,
+ Friendsanity,
+ FriendsanityHeartSize,
+ Monstersanity,
+ Shipsanity,
+ Cooksanity,
+ Chefsanity,
+ Craftsanity,
+ ]),
+ OptionGroup("Multipliers and Buffs", [
+ StartingMoney,
+ ProfitMargin,
+ ExperienceMultiplier,
+ FriendshipMultiplier,
+ DebrisMultiplier,
+ NumberOfMovementBuffs,
+ NumberOfLuckBuffs,
+ TrapItems,
+ MultipleDaySleepEnabled,
+ MultipleDaySleepCost,
+ QuickStart,
+ ]),
+ OptionGroup("Advanced Options", [
+ Gifting,
+ DeathLink,
+ Mods,
+ ProgressionBalancing,
+ Accessibility,
+ ]),
+]
diff --git a/worlds/stardew_valley/options.py b/worlds/stardew_valley/options.py
index 191a634496..ba1ebfb9c1 100644
--- a/worlds/stardew_valley/options.py
+++ b/worlds/stardew_valley/options.py
@@ -697,8 +697,6 @@ class Mods(OptionSet):
class StardewValleyOptions(PerGameCommonOptions):
goal: Goal
farm_type: FarmType
- starting_money: StartingMoney
- profit_margin: ProfitMargin
bundle_randomization: BundleRandomization
bundle_price: BundlePrice
entrance_randomization: EntranceRandomization
@@ -722,16 +720,18 @@ class StardewValleyOptions(PerGameCommonOptions):
craftsanity: Craftsanity
friendsanity: Friendsanity
friendsanity_heart_size: FriendsanityHeartSize
- movement_buff_number: NumberOfMovementBuffs
- luck_buff_number: NumberOfLuckBuffs
exclude_ginger_island: ExcludeGingerIsland
- trap_items: TrapItems
- multiple_day_sleep_enabled: MultipleDaySleepEnabled
- multiple_day_sleep_cost: MultipleDaySleepCost
+ quick_start: QuickStart
+ starting_money: StartingMoney
+ profit_margin: ProfitMargin
experience_multiplier: ExperienceMultiplier
friendship_multiplier: FriendshipMultiplier
debris_multiplier: DebrisMultiplier
- quick_start: QuickStart
+ movement_buff_number: NumberOfMovementBuffs
+ luck_buff_number: NumberOfLuckBuffs
+ trap_items: TrapItems
+ multiple_day_sleep_enabled: MultipleDaySleepEnabled
+ multiple_day_sleep_cost: MultipleDaySleepCost
gifting: Gifting
mods: Mods
death_link: DeathLink
diff --git a/worlds/tunic/__init__.py b/worlds/tunic/__init__.py
index 8e8957144d..cff8c39c9f 100644
--- a/worlds/tunic/__init__.py
+++ b/worlds/tunic/__init__.py
@@ -8,7 +8,7 @@ from .er_rules import set_er_location_rules
from .regions import tunic_regions
from .er_scripts import create_er_regions
from .er_data import portal_mapping
-from .options import TunicOptions, EntranceRando, tunic_option_groups
+from .options import TunicOptions, EntranceRando, tunic_option_groups, tunic_option_presets
from worlds.AutoWorld import WebWorld, World
from worlds.generic import PlandoConnection
from decimal import Decimal, ROUND_HALF_UP
@@ -28,6 +28,7 @@ class TunicWeb(WebWorld):
theme = "grassFlowers"
game = "TUNIC"
option_groups = tunic_option_groups
+ options_presets = tunic_option_presets
class TunicItem(Item):
diff --git a/worlds/tunic/docs/setup_en.md b/worlds/tunic/docs/setup_en.md
index 94a8a03841..58cc1bcf25 100644
--- a/worlds/tunic/docs/setup_en.md
+++ b/worlds/tunic/docs/setup_en.md
@@ -31,6 +31,8 @@ Download [BepInEx](https://github.com/BepInEx/BepInEx/releases/download/v6.0.0-p
If playing on Steam Deck, follow this [guide to set up BepInEx via Proton](https://docs.bepinex.dev/articles/advanced/proton_wine.html).
+If playing on Linux, you may be able to add `WINEDLLOVERRIDES="winhttp=n,b" %command%` to your Steam launch options. If this does not work, follow the guide for Steam Deck above.
+
Extract the contents of the BepInEx .zip file into your TUNIC game directory:
- **Steam**: Steam\steamapps\common\TUNIC
- **PC Game Pass**: XboxGames\Tunic\Content
diff --git a/worlds/tunic/options.py b/worlds/tunic/options.py
index 1f12b5053d..a45ee71b05 100644
--- a/worlds/tunic/options.py
+++ b/worlds/tunic/options.py
@@ -1,5 +1,5 @@
from dataclasses import dataclass
-
+from typing import Dict, Any
from Options import (DefaultOnToggle, Toggle, StartInventoryPool, Choice, Range, TextChoice, PerGameCommonOptions,
OptionGroup)
@@ -199,3 +199,24 @@ tunic_option_groups = [
Maskless,
])
]
+
+tunic_option_presets: Dict[str, Dict[str, Any]] = {
+ "Sync": {
+ "ability_shuffling": True,
+ },
+ "Async": {
+ "progression_balancing": 0,
+ "ability_shuffling": True,
+ "shuffle_ladders": True,
+ "laurels_location": "10_fairies",
+ },
+ "Glace Mode": {
+ "accessibility": "minimal",
+ "ability_shuffling": True,
+ "entrance_rando": "yes",
+ "fool_traps": "onslaught",
+ "logic_rules": "unrestricted",
+ "maskless": True,
+ "lanternless": True,
+ },
+}