From 6f1a8a30e71a025dc2ff5a1dad28100ebdb05334 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:59:54 +0200 Subject: [PATCH 1/7] Docs: Mention explicit_indirect_conditions https://github.com/ArchipelagoMW/Archipelago/pull/3682 --- docs/world api.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/world api.md b/docs/world api.md index bf09d965f11d..5e2a6a8c8a16 100644 --- a/docs/world api.md +++ b/docs/world api.md @@ -328,6 +328,9 @@ Even doing `state.can_reach_location` or `state.can_reach_entrance` is problemat You can use `multiworld.register_indirect_condition(region, entrance)` to explicitly tell the generator that, when a given region becomes accessible, it is necessary to re-check a specific entrance. You **must** use `multiworld.register_indirect_condition` if you perform this kind of `can_reach` from an entrance access rule, unless you have a **very** good technical understanding of the relevant code and can reason why it will never lead to problems in your case. +Alternatively, you can set [world.explicit_indirect_conditions = False]([https://github.com/ArchipelagoMW/Archipelago/pull/3682](https://github.com/ArchipelagoMW/Archipelago/blob/main/worlds/AutoWorld.py#L298-L301)), +in which case your world takes a flat performance hit to not have to worry about indirect conditions. + ### Item Rules An item rule is a function that returns `True` or `False` for a `Location` based on a single item. It can be used to From b60d0b8f41d7ca21e08ef7ba7cdd145ecd2667bb Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Thu, 5 Sep 2024 17:00:33 +0200 Subject: [PATCH 2/7] Update world api.md --- docs/world api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/world api.md b/docs/world api.md index 5e2a6a8c8a16..3460323b9622 100644 --- a/docs/world api.md +++ b/docs/world api.md @@ -328,7 +328,7 @@ Even doing `state.can_reach_location` or `state.can_reach_entrance` is problemat You can use `multiworld.register_indirect_condition(region, entrance)` to explicitly tell the generator that, when a given region becomes accessible, it is necessary to re-check a specific entrance. You **must** use `multiworld.register_indirect_condition` if you perform this kind of `can_reach` from an entrance access rule, unless you have a **very** good technical understanding of the relevant code and can reason why it will never lead to problems in your case. -Alternatively, you can set [world.explicit_indirect_conditions = False]([https://github.com/ArchipelagoMW/Archipelago/pull/3682](https://github.com/ArchipelagoMW/Archipelago/blob/main/worlds/AutoWorld.py#L298-L301)), +Alternatively, you can set [world.explicit_indirect_conditions = False](https://github.com/ArchipelagoMW/Archipelago/blob/main/worlds/AutoWorld.py#L298-L301), in which case your world takes a flat performance hit to not have to worry about indirect conditions. ### Item Rules From 6609d9f13858800746f3158b001a4bbfd6ef3a0e Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Thu, 5 Sep 2024 17:03:24 +0200 Subject: [PATCH 3/7] Docs: "Menu" -> origin_region_name https://github.com/ArchipelagoMW/Archipelago/pull/3682 --- docs/world api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/world api.md b/docs/world api.md index 3460323b9622..ba358ef92c0e 100644 --- a/docs/world api.md +++ b/docs/world api.md @@ -288,8 +288,8 @@ like entrance randomization in logic. Regions have a list called `exits`, containing `Entrance` objects representing transitions to other regions. -There must be one special region, "Menu", from which the logic unfolds. AP assumes that a player will always be able to -return to the "Menu" region by resetting the game ("Save and quit"). +There must be one special region (Called "Menu" by default, but configurable using [origin_region_name](https://github.com/ArchipelagoMW/Archipelago/blob/main/worlds/AutoWorld.py#L295-L296)), +from which the logic unfolds. AP assumes that a player will always be able to return to this starting region by resetting the game ("Save and quit"). ### Entrances From 2cbe302a4937977c836aa515d1c8a9720b3faf0f Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Thu, 5 Sep 2024 21:14:45 +0200 Subject: [PATCH 4/7] Update docs/world api.md Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> --- docs/world api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/world api.md b/docs/world api.md index ba358ef92c0e..02fc58875896 100644 --- a/docs/world api.md +++ b/docs/world api.md @@ -329,7 +329,7 @@ You can use `multiworld.register_indirect_condition(region, entrance)` to explic You **must** use `multiworld.register_indirect_condition` if you perform this kind of `can_reach` from an entrance access rule, unless you have a **very** good technical understanding of the relevant code and can reason why it will never lead to problems in your case. Alternatively, you can set [world.explicit_indirect_conditions = False](https://github.com/ArchipelagoMW/Archipelago/blob/main/worlds/AutoWorld.py#L298-L301), -in which case your world takes a flat performance hit to not have to worry about indirect conditions. +avoiding the need for indirect conditions at the expense of performance. ### Item Rules From eeea2bc85d6bce12cc563d539a6a24046049999e Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:39:13 +0200 Subject: [PATCH 5/7] Update world api.md --- docs/world api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/world api.md b/docs/world api.md index 02fc58875896..3dec76d132c8 100644 --- a/docs/world api.md +++ b/docs/world api.md @@ -519,7 +519,7 @@ def generate_early(self) -> None: ```python def create_regions(self) -> None: - # Add regions to the multiworld. "Menu" is the required starting point. + # Add regions to the multiworld. One of them must use the origin_region_name as its name ("Menu" by default). # Arguments to Region() are name, player, multiworld, and optionally hint_text menu_region = Region("Menu", self.player, self.multiworld) self.multiworld.regions.append(menu_region) # or use += [menu_region...] From 5b7cd09470a00dbe3d42654eca73c27f20f31b78 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Thu, 28 Nov 2024 21:05:58 +0100 Subject: [PATCH 6/7] I just didn't do this one and then Medic approved it anyway LMAO --- docs/world api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/world api.md b/docs/world api.md index 3dec76d132c8..5c78b306932b 100644 --- a/docs/world api.md +++ b/docs/world api.md @@ -466,7 +466,7 @@ The world has to provide the following things for generation: * the properties mentioned above * additions to the item pool -* additions to the regions list: at least one called "Menu" +* additions to the regions list: at least one using the world class's `origin_region_name` ("Menu" by default) * locations placed inside those regions * a `def create_item(self, item: str) -> MyGameItem` to create any item on demand * applying `self.multiworld.push_precollected` for world-defined start inventory From d362fa7997c74a4f58594136e21a2f92d45d705c Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Thu, 28 Nov 2024 21:06:40 +0100 Subject: [PATCH 7/7] Update world api.md --- docs/world api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/world api.md b/docs/world api.md index 5c78b306932b..20669d7ae7be 100644 --- a/docs/world api.md +++ b/docs/world api.md @@ -466,7 +466,7 @@ The world has to provide the following things for generation: * the properties mentioned above * additions to the item pool -* additions to the regions list: at least one using the world class's `origin_region_name` ("Menu" by default) +* additions to the regions list: at least one named after the world class's origin_region_name ("Menu" by default) * locations placed inside those regions * a `def create_item(self, item: str) -> MyGameItem` to create any item on demand * applying `self.multiworld.push_precollected` for world-defined start inventory