Skip to content

Commit 6bf66bc

Browse files
alwaysintrebleFlySniper
authored andcommitted
The Messenger: implement new game (ArchipelagoMW#1494)
* initial commit of messenger integration * setup no_logic and needed slot_data * fix some typos and determinism * make all of it deterministic * add documentation * swapped to non local items so change the fed data * ~~deathlink~~ * satisfy the docs test * update doc test to show expected name * split custom classes into a separate file and fix an errant rule * make access dependency test give more useful errors * implement tests * remove some unneccessary back entrances and make names clearer * fix some big dumbs * successful unit tests are good also some slight reorganizing * add astral tea quest line, and potentially power seals as items * if TYPE_CHECKING... aahhhhhh * oop forgot to remove legacy code * having the seed and leaves as actual items doesn't seem to do anything so remove them. locations still work though * update setup guide with some changes * Tower HQ was creating duplicate locations * allow self locking items * cleanup * move self_locking_items function to core * docstring * implement choice of notes needed for music box * test the default value * don't create any starting inventory items * make item creation faster * change default accessibility and power seals options * improve documentation * precollected_items is a dict of Items... * implement shop chest goal * tests * always assign total and required seals * add new goals and set music box as requiring shop chest on shop chest goals instead of just setting it as the completion * fix dumb test quirk * implement music box skip as an option * world rewrite/cleanup * default to apworld and add game to readme * revert bleeding commits from other PRs * more bleeds * fix some errors in options docstrings * ??? * make my set rules method not have an awful name * test cleanup * add a test for item accessibility * fix issues with tests * make the self locking item behavior work correctly * misc cleanup * more general cleanup to be a good example * quick rules rewrite * more general cleanup and typing * more speed, more clean * bump data version * make sure the locked item belongs to current player * fix bad name and indent. call MessengerItem directly for events * add poptracker pack to docs * doc cleanup and "known issues" section that I probably won't be able to fix any time soon. * missed some spots * add another bug i forgot about * be consistently wrong
1 parent 95200e9 commit 6bf66bc

14 files changed

+1005
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Currently, the following games are supported:
3838
* Wargroove
3939
* Stardew Valley
4040
* The Legend of Zelda
41+
* The Messenger
4142

4243
For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/).
4344
Downloads can be found at [Releases](https://github.com/ArchipelagoMW/Archipelago/releases), including compiled

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"Stardew Valley",
5555
"Timespinner",
5656
"Minecraft",
57+
"The Messenger",
5758
}
5859

5960

worlds/messenger/Constants.py

+153
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# items
2+
# listing individual groups first for easy lookup
3+
NOTES = [
4+
"Key of Hope",
5+
"Key of Chaos",
6+
"Key of Courage",
7+
"Key of Love",
8+
"Key of Strength",
9+
"Key of Symbiosis"
10+
]
11+
12+
PROG_ITEMS = [
13+
"Wingsuit",
14+
"Rope Dart",
15+
"Ninja Tabi",
16+
"Power Thistle",
17+
"Demon King Crown",
18+
"Ruxxtin's Amulet",
19+
"Fairy Bottle",
20+
"Sun Crest",
21+
"Moon Crest",
22+
# "Astral Seed",
23+
# "Astral Tea Leaves"
24+
]
25+
26+
PHOBEKINS = [
27+
"Necro",
28+
"Pyro",
29+
"Claustro",
30+
"Acro"
31+
]
32+
33+
USEFUL_ITEMS = [
34+
"Windmill Shuriken"
35+
]
36+
37+
# item_name_to_id needs to be deterministic and match upstream
38+
ALL_ITEMS = [
39+
*NOTES,
40+
"Windmill Shuriken",
41+
"Wingsuit",
42+
"Rope Dart",
43+
"Ninja Tabi",
44+
# "Astral Seed",
45+
# "Astral Tea Leaves",
46+
"Candle",
47+
"Seashell",
48+
"Power Thistle",
49+
"Demon King Crown",
50+
"Ruxxtin's Amulet",
51+
"Fairy Bottle",
52+
"Sun Crest",
53+
"Moon Crest",
54+
*PHOBEKINS,
55+
"Power Seal",
56+
"Time Shard" # there's 45 separate instances of this in the client lookup, but hopefully we don't care?
57+
]
58+
59+
# locations
60+
# the names of these don't actually matter, but using the upstream's names for now
61+
# order must be exactly the same as upstream
62+
ALWAYS_LOCATIONS = [
63+
# notes
64+
"Key of Love",
65+
"Key of Courage",
66+
"Key of Chaos",
67+
"Key of Symbiosis",
68+
"Key of Strength",
69+
"Key of Hope",
70+
# upgrades
71+
"Wingsuit",
72+
"Rope Dart",
73+
"Ninja Tabi",
74+
"Climbing Claws",
75+
# quest items
76+
"Astral Seed",
77+
"Astral Tea Leaves",
78+
"Candle",
79+
"Seashell",
80+
"Power Thistle",
81+
"Demon King Crown",
82+
"Ruxxtin's Amulet",
83+
"Fairy Bottle",
84+
"Sun Crest",
85+
"Moon Crest",
86+
# phobekins
87+
"Necro",
88+
"Pyro",
89+
"Claustro",
90+
"Acro"
91+
]
92+
93+
SEALS = [
94+
"Ninja Village Seal - Tree House",
95+
96+
"Autumn Hills Seal - Trip Saws",
97+
"Autumn Hills Seal - Double Swing Saws",
98+
"Autumn Hills Seal - Spike Ball Swing",
99+
"Autumn Hills Seal - Spike Ball Darts",
100+
101+
"Catacombs Seal - Triple Spike Crushers",
102+
"Catacombs Seal - Crusher Gauntlet",
103+
"Catacombs Seal - Dirty Pond",
104+
105+
"Bamboo Creek Seal - Spike Crushers and Doors",
106+
"Bamboo Creek Seal - Spike Ball Pits",
107+
"Bamboo Creek Seal - Spike Crushers and Doors v2",
108+
109+
"Howling Grotto Seal - Windy Saws and Balls",
110+
"Howling Grotto Seal - Crushing Pits",
111+
"Howling Grotto Seal - Breezy Crushers",
112+
113+
"Quillshroom Marsh Seal - Spikey Window",
114+
"Quillshroom Marsh Seal - Sand Trap",
115+
"Quillshroom Marsh Seal - Do the Spike Wave",
116+
117+
"Searing Crags Seal - Triple Ball Spinner",
118+
"Searing Crags Seal - Raining Rocks",
119+
"Searing Crags Seal - Rhythm Rocks",
120+
121+
"Glacial Peak Seal - Ice Climbers",
122+
"Glacial Peak Seal - Projectile Spike Pit",
123+
"Glacial Peak Seal - Glacial Air Swag",
124+
125+
"Tower of Time Seal - Time Waster Seal",
126+
"Tower of Time Seal - Lantern Climb",
127+
"Tower of Time Seal - Arcane Orbs",
128+
129+
"Cloud Ruins Seal - Ghost Pit",
130+
"Cloud Ruins Seal - Toothbrush Alley",
131+
"Cloud Ruins Seal - Saw Pit",
132+
"Cloud Ruins Seal - Money Farm Room",
133+
134+
"Underworld Seal - Sharp and Windy Climb",
135+
"Underworld Seal - Spike Wall",
136+
"Underworld Seal - Fireball Wave",
137+
"Underworld Seal - Rising Fanta",
138+
139+
"Forlorn Temple Seal - Rocket Maze",
140+
"Forlorn Temple Seal - Rocket Sunset",
141+
142+
"Sunken Shrine Seal - Ultra Lifeguard",
143+
"Sunken Shrine Seal - Waterfall Paradise",
144+
"Sunken Shrine Seal - Tabi Gauntlet",
145+
146+
"Riviere Turquoise Seal - Bounces and Balls",
147+
"Riviere Turquoise Seal - Launch of Faith",
148+
"Riviere Turquoise Seal - Flower Power",
149+
150+
"Elemental Skylands Seal - Air",
151+
"Elemental Skylands Seal - Water",
152+
"Elemental Skylands Seal - Fire"
153+
]

worlds/messenger/Options.py

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
from Options import DefaultOnToggle, DeathLink, Range, Accessibility, Choice
2+
3+
4+
class MessengerAccessibility(Accessibility):
5+
default = Accessibility.option_locations
6+
# defaulting to locations accessibility since items makes certain items self-locking
7+
__doc__ = Accessibility.__doc__.replace(f"default {Accessibility.default}", f"default {default}")
8+
9+
10+
class Logic(DefaultOnToggle):
11+
"""Whether the seed should be guaranteed completable."""
12+
display_name = "Use Logic"
13+
14+
15+
class PowerSeals(DefaultOnToggle):
16+
"""Whether power seal locations should be randomized."""
17+
display_name = "Shuffle Seals"
18+
19+
20+
class Goal(Choice):
21+
"""Requirement to finish the game. Power Seal Hunt will force power seal locations to be shuffled."""
22+
display_name = "Goal"
23+
option_open_music_box = 0
24+
option_power_seal_hunt = 1
25+
26+
27+
class MusicBox(DefaultOnToggle):
28+
"""Whether the music box gauntlet needs to be done."""
29+
display_name = "Music Box Gauntlet"
30+
31+
32+
class NotesNeeded(Range):
33+
"""How many notes are needed to access the Music Box."""
34+
display_name = "Notes Needed"
35+
range_start = 1
36+
range_end = 6
37+
default = range_end
38+
39+
40+
class AmountSeals(Range):
41+
"""Number of power seals that exist in the item pool when power seal hunt is the goal."""
42+
display_name = "Total Power Seals"
43+
range_start = 1
44+
range_end = 45
45+
default = range_end
46+
47+
48+
class RequiredSeals(Range):
49+
"""Percentage of total seals required to open the shop chest."""
50+
display_name = "Percent Seals Required"
51+
range_start = 10
52+
range_end = 100
53+
default = range_end
54+
55+
56+
messenger_options = {
57+
"accessibility": MessengerAccessibility,
58+
"enable_logic": Logic,
59+
"shuffle_seals": PowerSeals,
60+
"goal": Goal,
61+
"music_box": MusicBox,
62+
"notes_needed": NotesNeeded,
63+
"total_seals": AmountSeals,
64+
"percent_seals_required": RequiredSeals,
65+
"death_link": DeathLink,
66+
}

worlds/messenger/Regions.py

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
from typing import Dict, Set, List
2+
3+
REGIONS: Dict[str, List[str]] = {
4+
"Menu": [],
5+
"Tower HQ": [],
6+
"The Shop": [],
7+
"Tower of Time": [],
8+
"Ninja Village": ["Candle", "Astral Seed"],
9+
"Autumn Hills": ["Climbing Claws", "Key of Hope"],
10+
"Forlorn Temple": ["Demon King Crown"],
11+
"Catacombs": ["Necro", "Ruxxtin's Amulet"],
12+
"Bamboo Creek": ["Claustro"],
13+
"Howling Grotto": ["Wingsuit"],
14+
"Quillshroom Marsh": ["Seashell"],
15+
"Searing Crags": ["Rope Dart"],
16+
"Searing Crags Upper": ["Power Thistle", "Key of Strength", "Astral Tea Leaves"],
17+
"Glacial Peak": [],
18+
"Cloud Ruins": ["Acro"],
19+
"Underworld": ["Pyro", "Key of Chaos"],
20+
"Dark Cave": [],
21+
"Riviere Turquoise": ["Fairy Bottle"],
22+
"Sunken Shrine": ["Ninja Tabi", "Sun Crest", "Moon Crest", "Key of Love"],
23+
"Elemental Skylands": ["Key of Symbiosis"],
24+
"Corrupted Future": ["Key of Courage"],
25+
"Music Box": ["Rescue Phantom"]
26+
}
27+
"""seal locations have the region in their name and may not need to be created so skip them here"""
28+
29+
30+
REGION_CONNECTIONS: Dict[str, Set[str]] = {
31+
"Menu": {"Tower HQ"},
32+
"Tower HQ": {"Autumn Hills", "Howling Grotto", "Searing Crags", "Glacial Peak", "Tower of Time", "Riviere Turquoise",
33+
"Sunken Shrine", "Corrupted Future", "The Shop", "Music Box"},
34+
"Tower of Time": set(),
35+
"Ninja Village": set(),
36+
"Autumn Hills": {"Ninja Village", "Forlorn Temple", "Catacombs"},
37+
"Forlorn Temple": {"Catacombs", "Bamboo Creek"},
38+
"Catacombs": {"Autumn Hills", "Bamboo Creek", "Dark Cave"},
39+
"Bamboo Creek": {"Catacombs", "Howling Grotto"},
40+
"Howling Grotto": {"Bamboo Creek", "Quillshroom Marsh", "Sunken Shrine"},
41+
"Quillshroom Marsh": {"Howling Grotto", "Searing Crags"},
42+
"Searing Crags": {"Searing Crags Upper", "Quillshroom Marsh", "Underworld"},
43+
"Searing Crags Upper": {"Searing Crags", "Glacial Peak"},
44+
"Glacial Peak": {"Searing Crags Upper", "Tower HQ", "Cloud Ruins", "Elemental Skylands"},
45+
"Cloud Ruins": {"Underworld"},
46+
"Underworld": set(),
47+
"Dark Cave": {"Catacombs", "Riviere Turquoise"},
48+
"Riviere Turquoise": set(),
49+
"Sunken Shrine": {"Howling Grotto"},
50+
"Elemental Skylands": set()
51+
}
52+
"""Vanilla layout mapping with all Tower HQ portals open. from -> to"""

0 commit comments

Comments
 (0)