diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-04-27 12:13:38 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-04-27 12:13:38 -0400 |
commit | 47755e9e28f9b8866d3c41866910594e2d8c979a (patch) | |
tree | 488df5471f58eb0c6a1f7f872a17aa0ebe07231e | |
parent | 4302e550cde189d8bc1d111e81270ed7960ad77c (diff) | |
parent | 0c25dc87e5ad9c8c8c2ff0ef5ac6502b166bc405 (diff) | |
download | lingo-archipelago-47755e9e28f9b8866d3c41866910594e2d8c979a.tar.gz lingo-archipelago-47755e9e28f9b8866d3c41866910594e2d8c979a.tar.bz2 lingo-archipelago-47755e9e28f9b8866d3c41866910594e2d8c979a.zip |
Merge branch 'main' into panels
-rw-r--r-- | Archipelago/client.gd | 153 | ||||
-rw-r--r-- | Archipelago/load.gd | 110 | ||||
-rw-r--r-- | Archipelago/mypainting.gd | 5 | ||||
-rw-r--r-- | Archipelago/painting.gd | 10 | ||||
-rw-r--r-- | Archipelago/painting_eye.gd | 16 | ||||
-rw-r--r-- | Archipelago/painting_scenery.gd | 10 | ||||
-rw-r--r-- | Archipelago/panel.gd | 2 | ||||
-rw-r--r-- | Archipelago/pilgrimage_terminator.gd | 11 | ||||
-rw-r--r-- | Archipelago/settings_screen.gd | 35 | ||||
-rw-r--r-- | Archipelago/teleport.gd | 27 | ||||
-rw-r--r-- | CHANGELOG.md | 43 | ||||
-rw-r--r-- | README.md | 62 | ||||
-rw-r--r-- | archipelago.tscn | 25 | ||||
-rw-r--r-- | util/generate_gamedata.rb | 88 |
14 files changed, 481 insertions, 116 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 6fe2cab..0944352 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
@@ -7,6 +7,7 @@ var SCRIPT_multiplayer | |||
7 | var SCRIPT_mypainting | 7 | var SCRIPT_mypainting |
8 | var SCRIPT_notifier | 8 | var SCRIPT_notifier |
9 | var SCRIPT_panel | 9 | var SCRIPT_panel |
10 | var SCRIPT_pilgrimage_terminator | ||
10 | var SCRIPT_uuid | 11 | var SCRIPT_uuid |
11 | 12 | ||
12 | var ap_server = "" | 13 | var ap_server = "" |
@@ -15,55 +16,24 @@ var ap_pass = "" | |||
15 | var confusify_world = false | 16 | var confusify_world = false |
16 | var enable_multiplayer = false | 17 | var enable_multiplayer = false |
17 | var track_player = false | 18 | var track_player = false |
19 | var connection_history = [] | ||
18 | 20 | ||
19 | const my_version = "2.1.1" | 21 | const my_version = "3.0.1" |
20 | const ap_version = {"major": 0, "minor": 4, "build": 5, "class": "Version"} | 22 | const ap_version = {"major": 0, "minor": 4, "build": 6, "class": "Version"} |
21 | const color_items = [ | 23 | const color_items = [ |
22 | "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" | 24 | "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" |
23 | ] | 25 | ] |
24 | const door_progressive_items = { | 26 | const door_progressive_items = { |
25 | "Progressive Orange Tower": | 27 | "Progressive Orange Tower": |
26 | [ | 28 | ["Second Floor", "Third Floor", "Fourth Floor", "Fifth Floor", "Sixth Floor", "Seventh Floor"], |
27 | {"item": "Orange Tower - Second Floor", "display": "Second Floor"}, | ||
28 | {"item": "Orange Tower - Third Floor", "display": "Third Floor"}, | ||
29 | {"item": "Orange Tower - Fourth Floor", "display": "Fourth Floor"}, | ||
30 | {"item": "Orange Tower - Fifth Floor", "display": "Fifth Floor"}, | ||
31 | {"item": "Orange Tower - Sixth Floor", "display": "Sixth Floor"}, | ||
32 | {"item": "Orange Tower - Seventh Floor", "display": "Seventh Floor"}, | ||
33 | ], | ||
34 | "Progressive Art Gallery": | 29 | "Progressive Art Gallery": |
35 | [ | 30 | ["Second Floor", "Third Floor", "Fourth Floor", "Fifth Floor", "Exit"], |
36 | {"item": "Art Gallery - Second Floor", "display": "Second Floor"}, | 31 | "Progressive Hallway Room": ["First Door", "Second Door", "Third Door", "Fourth Door"], |
37 | {"item": "Art Gallery - Third Floor", "display": "Third Floor"}, | 32 | "Progressive Fearless": ["Second Floor", "Third Floor"], |
38 | {"item": "Art Gallery - Fourth Floor", "display": "Fourth Floor"}, | ||
39 | {"item": "Art Gallery - Fifth Floor", "display": "Fifth Floor"}, | ||
40 | {"item": "Art Gallery - Exit", "display": "Exit"}, | ||
41 | ], | ||
42 | "Progressive Hallway Room": | ||
43 | [ | ||
44 | {"item": "Outside The Agreeable - Hallway Door", "display": "First Door"}, | ||
45 | {"item": "Hallway Room (2) - Exit", "display": "Second Door"}, | ||
46 | {"item": "Hallway Room (3) - Exit", "display": "Third Door"}, | ||
47 | {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, | ||
48 | ], | ||
49 | "Progressive Fearless": | ||
50 | [ | ||
51 | {"item": "The Fearless (First Floor) - Second Floor", "display": "Second Floor"}, | ||
52 | {"item": "The Fearless (Second Floor) - Third Floor", "display": "Third Floor"}, | ||
53 | ], | ||
54 | "Progressive Colorful": | 33 | "Progressive Colorful": |
55 | [ | 34 | ["White", "Black", "Red", "Yellow", "Blue", "Purple", "Orange", "Green", "Brown", "Gray"], |
56 | {"item": "The Colorful - White Door", "display": "White"}, | 35 | "Progressive Pilgrimage": |
57 | {"item": "The Colorful - Black Door", "display": "Black"}, | 36 | ["1 Sunwarp", "2 Sunwarp", "3 Sunwarp", "4 Sunwarp", "5 Sunwarp", "6 Sunwarp"] |
58 | {"item": "The Colorful - Red Door", "display": "Red"}, | ||
59 | {"item": "The Colorful - Yellow Door", "display": "Yellow"}, | ||
60 | {"item": "The Colorful - Blue Door", "display": "Blue"}, | ||
61 | {"item": "The Colorful - Purple Door", "display": "Purple"}, | ||
62 | {"item": "The Colorful - Orange Door", "display": "Orange"}, | ||
63 | {"item": "The Colorful - Green Door", "display": "Green"}, | ||
64 | {"item": "The Colorful - Brown Door", "display": "Brown"}, | ||
65 | {"item": "The Colorful - Gray Door", "display": "Gray"}, | ||
66 | ] | ||
67 | } | 37 | } |
68 | const panel_progressive_items = { | 38 | const panel_progressive_items = { |
69 | "Progressive Hallway Room": | 39 | "Progressive Hallway Room": |
@@ -103,6 +73,7 @@ const panel_progressive_items = { | |||
103 | const kTHE_END = 0 | 73 | const kTHE_END = 0 |
104 | const kTHE_MASTER = 1 | 74 | const kTHE_MASTER = 1 |
105 | const kLEVEL_2 = 2 | 75 | const kLEVEL_2 = 2 |
76 | const kPILGRIMAGE = 3 | ||
106 | 77 | ||
107 | const kNO_PANEL_SHUFFLE = 0 | 78 | const kNO_PANEL_SHUFFLE = 0 |
108 | const kREARRANGE_PANELS = 1 | 79 | const kREARRANGE_PANELS = 1 |
@@ -115,6 +86,12 @@ const kCLASSIFICATION_REMOTE_NORMAL = 0 | |||
115 | const kCLASSIFICATION_REMOTE_REDUCED = 1 | 86 | const kCLASSIFICATION_REMOTE_REDUCED = 1 |
116 | const kCLASSIFICATION_REMOTE_INSANITY = 2 | 87 | const kCLASSIFICATION_REMOTE_INSANITY = 2 |
117 | 88 | ||
89 | const kSUNWARP_ACCESS_NORMAL = 0 | ||
90 | const kSUNWARP_ACCESS_DISABLED = 1 | ||
91 | const kSUNWARP_ACCESS_UNLOCK = 2 | ||
92 | const kSUNWARP_ACCESS_INDIVIDUAL = 3 | ||
93 | const kSUNWARP_ACCESS_PROGRESSIVE = 4 | ||
94 | |||
118 | var _client = WebSocketClient.new() | 95 | var _client = WebSocketClient.new() |
119 | var _should_process = false | 96 | var _should_process = false |
120 | var _initiated_disconnect = false | 97 | var _initiated_disconnect = false |
@@ -148,10 +125,17 @@ var _panel_door_shuffle = false | |||
148 | var _color_shuffle = false | 125 | var _color_shuffle = false |
149 | var _panel_shuffle = 0 # none, rearrange | 126 | var _panel_shuffle = 0 # none, rearrange |
150 | var _painting_shuffle = false | 127 | var _painting_shuffle = false |
128 | var _sunwarp_access = 0 # normal, disabled, unlock, progressive | ||
151 | var _mastery_achievements = 21 | 129 | var _mastery_achievements = 21 |
152 | var _level_2_requirement = 223 | 130 | var _level_2_requirement = 223 |
153 | var _location_classification_bit = 0 | 131 | var _location_classification_bit = 0 |
154 | var _early_color_hallways = false | 132 | var _early_color_hallways = false |
133 | var _pilgrimage_compatibility = false # set to true for pre-0.4.6 | ||
134 | var _pilgrimage_enabled = false | ||
135 | var _pilgrimage_allows_roof_access = false | ||
136 | var _pilgrimage_allows_paintings = false | ||
137 | var _sunwarp_shuffle = false | ||
138 | var _sunwarp_mapping = [] | ||
155 | var _slot_seed = 0 | 139 | var _slot_seed = 0 |
156 | 140 | ||
157 | var _map_loaded = false | 141 | var _map_loaded = false |
@@ -197,6 +181,8 @@ func _init(): | |||
197 | enable_multiplayer = data[5] | 181 | enable_multiplayer = data[5] |
198 | if data.size() > 6: | 182 | if data.size() > 6: |
199 | track_player = data[6] | 183 | track_player = data[6] |
184 | if data.size() > 7: | ||
185 | connection_history = data[7] | ||
200 | 186 | ||
201 | processDatapackages() | 187 | processDatapackages() |
202 | 188 | ||
@@ -325,6 +311,10 @@ func _on_data(): | |||
325 | _painting_shuffle = _slot_data["shuffle_paintings"] | 311 | _painting_shuffle = _slot_data["shuffle_paintings"] |
326 | if _slot_data.has("shuffle_panels"): | 312 | if _slot_data.has("shuffle_panels"): |
327 | _panel_shuffle = _slot_data["shuffle_panels"] | 313 | _panel_shuffle = _slot_data["shuffle_panels"] |
314 | if _slot_data.has("sunwarp_access"): | ||
315 | _sunwarp_access = _slot_data["sunwarp_access"] | ||
316 | else: | ||
317 | _sunwarp_access = kSUNWARP_ACCESS_NORMAL | ||
328 | if _slot_data.has("seed"): | 318 | if _slot_data.has("seed"): |
329 | _slot_seed = _slot_data["seed"] | 319 | _slot_seed = _slot_data["seed"] |
330 | if _slot_data.has("painting_entrance_to_exit"): | 320 | if _slot_data.has("painting_entrance_to_exit"): |
@@ -342,6 +332,25 @@ func _on_data(): | |||
342 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY | 332 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY |
343 | if _slot_data.has("early_color_hallways"): | 333 | if _slot_data.has("early_color_hallways"): |
344 | _early_color_hallways = _slot_data["early_color_hallways"] | 334 | _early_color_hallways = _slot_data["early_color_hallways"] |
335 | if _slot_data.has("enable_pilgrimage"): | ||
336 | _pilgrimage_enabled = _slot_data["enable_pilgrimage"] | ||
337 | else: | ||
338 | _pilgrimage_compatibility = true | ||
339 | _pilgrimage_enabled = true | ||
340 | if _slot_data.has("pilgrimage_allows_roof_access"): | ||
341 | _pilgrimage_allows_roof_access = _slot_data["pilgrimage_allows_roof_access"] | ||
342 | else: | ||
343 | _pilgrimage_allows_roof_access = true | ||
344 | if _slot_data.has("pilgrimage_allows_paintings"): | ||
345 | _pilgrimage_allows_paintings = _slot_data["pilgrimage_allows_paintings"] | ||
346 | else: | ||
347 | _pilgrimage_allows_paintings = true | ||
348 | if _slot_data.has("shuffle_sunwarps"): | ||
349 | _sunwarp_shuffle = _slot_data["shuffle_sunwarps"] | ||
350 | else: | ||
351 | _sunwarp_shuffle = false | ||
352 | if _slot_data.has("sunwarp_permutation"): | ||
353 | _sunwarp_mapping = _slot_data["sunwarp_permutation"] | ||
345 | 354 | ||
346 | if track_player: | 355 | if track_player: |
347 | setValue("PlayerPos", {"x": 0, "z": 0}) | 356 | setValue("PlayerPos", {"x": 0, "z": 0}) |
@@ -527,7 +536,8 @@ func saveSettings(): | |||
527 | _datapackages, | 536 | _datapackages, |
528 | confusify_world, | 537 | confusify_world, |
529 | enable_multiplayer, | 538 | enable_multiplayer, |
530 | track_player | 539 | track_player, |
540 | connection_history | ||
531 | ] | 541 | ] |
532 | file.store_var(data, true) | 542 | file.store_var(data, true) |
533 | file.close() | 543 | file.close() |
@@ -730,26 +740,35 @@ func processItem(item, index, from, flags): | |||
730 | if painting_node != null: | 740 | if painting_node != null: |
731 | painting_node.get_node("Script").movePainting() | 741 | painting_node.get_node("Script").movePainting() |
732 | 742 | ||
743 | if gamedata.warp_ids_by_item_id.has(int(item)): | ||
744 | var warpsNode = get_tree().get_root().get_node("Spatial/Warps") | ||
745 | for warp_id in gamedata.warp_ids_by_item_id[int(item)]: | ||
746 | warpsNode.get_node(warp_id).unlock_warp() | ||
747 | |||
733 | # Handle progressive items. | 748 | # Handle progressive items. |
734 | if _door_shuffle and item_name in door_progressive_items.keys(): | 749 | var is_progressive_door = int(item) in gamedata.door_items_by_progressive_id |
735 | if not item_name in _progressive_progress: | 750 | var is_progressive_panel = int(item) in gamedata.panel_items_by_progressive_id |
736 | _progressive_progress[item_name] = 0 | 751 | var progitems = null |
737 | 752 | ||
738 | if _progressive_progress[item_name] < door_progressive_items[item_name].size(): | 753 | if is_progressive_door and is_progressive_panel: |
739 | var subitem_name = door_progressive_items[item_name][_progressive_progress[item_name]]["item"] | 754 | if _door_shuffle: |
740 | global._print(subitem_name) | 755 | progitems = gamedata.door_items_by_progressive_id[int(item)] |
741 | processItem(_item_name_to_id[subitem_name], null, null, null) | 756 | else: |
742 | _progressive_progress[item_name] += 1 | 757 | progitems = gamedata.panel_items_by_progressive_id[int(item)] |
743 | 758 | elif is_progressive_door: | |
744 | if _panel_door_shuffle and item_name in panel_progressive_items.keys(): | 759 | progitems = gamedata.door_items_by_progressive_id[int(item)] |
745 | if not item_name in _progressive_progress: | 760 | elif is_progressive_panel: |
746 | _progressive_progress[item_name] = 0 | 761 | progitems = gamedata.panel_items_by_progressive_id[int(item)] |
747 | 762 | ||
748 | if _progressive_progress[item_name] < panel_progressive_items[item_name].size(): | 763 | if progitems != null: |
749 | var subitem_name = panel_progressive_items[item_name][_progressive_progress[item_name]]["item"] | 764 | if not int(item) in _progressive_progress: |
750 | global._print(subitem_name) | 765 | _progressive_progress[int(item)] = 0 |
751 | processItem(_item_name_to_id[subitem_name], null, null, null) | 766 | |
752 | _progressive_progress[item_name] += 1 | 767 | if _progressive_progress[int(item)] < progitems.size(): |
768 | var subitem_id = progitems[_progressive_progress[int(item)]] | ||
769 | global._print("Subitem: %d" % subitem_id) | ||
770 | processItem(subitem_id, null, null, null) | ||
771 | _progressive_progress[int(item)] += 1 | ||
753 | 772 | ||
754 | if _color_shuffle and color_items.has(_item_id_to_name[item]): | 773 | if _color_shuffle and color_items.has(_item_id_to_name[item]): |
755 | var lcol = _item_id_to_name[item].to_lower() | 774 | var lcol = _item_id_to_name[item].to_lower() |
@@ -763,11 +782,11 @@ func processItem(item, index, from, flags): | |||
763 | saveLocaldata() | 782 | saveLocaldata() |
764 | 783 | ||
765 | if _door_shuffle and item_name in door_progressive_items: | 784 | if _door_shuffle and item_name in door_progressive_items: |
766 | var subitem = door_progressive_items[item_name][_progressive_progress[item_name] - 1] | 785 | var subitem = door_progressive_items[item_name][_progressive_progress[int(item)] - 1] |
767 | item_name += " (%s)" % subitem["display"] | 786 | item_name += " (%s)" % subitem["display"] |
768 | 787 | ||
769 | if _panel_door_shuffle and item_name in panel_progressive_items: | 788 | if _panel_door_shuffle and item_name in panel_progressive_items: |
770 | var subitem = panel_progressive_items[item_name][_progressive_progress[item_name] - 1] | 789 | var subitem = panel_progressive_items[item_name][_progressive_progress[int(item)] - 1] |
771 | item_name += " (%s)" % subitem["display"] | 790 | item_name += " (%s)" % subitem["display"] |
772 | 791 | ||
773 | var player_name = "Unknown" | 792 | var player_name = "Unknown" |
@@ -804,6 +823,10 @@ func paintingIsVanilla(painting): | |||
804 | return !$Gamedata.mentioned_paintings.has(painting) | 823 | return !$Gamedata.mentioned_paintings.has(painting) |
805 | 824 | ||
806 | 825 | ||
826 | func warpIsVanilla(warp): | ||
827 | return !$Gamedata.mentioned_warps.has(warp) | ||
828 | |||
829 | |||
807 | func evaluateSolvability(): | 830 | func evaluateSolvability(): |
808 | emit_signal("evaluate_solvability") | 831 | emit_signal("evaluate_solvability") |
809 | 832 | ||
@@ -849,5 +872,5 @@ func compareVersion(lhs, rhs): | |||
849 | return lhs["major"] < rhs["major"] | 872 | return lhs["major"] < rhs["major"] |
850 | 873 | ||
851 | 874 | ||
852 | func wasGeneratedBeforeVersion(rhs): | 875 | func wasGeneratedBeforeVersion(major, minor, build): |
853 | return compareVersion(_gen_version, rhs) | 876 | return compareVersion(_gen_version, {"major": major, "minor": minor, "build": build}) |
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 82f8e94..6ce4749 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd | |||
@@ -96,18 +96,19 @@ func _load(): | |||
96 | 96 | ||
97 | wanderer_achieve.translation = Vector3(-51, -33, 35) # way under the map | 97 | wanderer_achieve.translation = Vector3(-51, -33, 35) # way under the map |
98 | 98 | ||
99 | # Turn THE COLORFUL into a cdp. | ||
100 | var real_colorful = panels_parent.get_node("Countdown Panels/Panel_colorful_colorful") | ||
101 | var cdp_auto_scene = load("res://nodes/panel_countdown_auto.tscn") | 99 | var cdp_auto_scene = load("res://nodes/panel_countdown_auto.tscn") |
102 | var colorful_cdp = cdp_auto_scene.instance() | 100 | if !apclient.wasGeneratedBeforeVersion(0, 4, 5): |
103 | colorful_cdp.name = "CountdownPanel_colorful" | 101 | # Turn THE COLORFUL into a cdp. |
104 | colorful_cdp.replace_with = "../../Panels/Countdown Panels/Panel_colorful_colorful" | 102 | var real_colorful = panels_parent.get_node("Countdown Panels/Panel_colorful_colorful") |
105 | colorful_cdp.panels = "../../Panels/Doorways Room" | 103 | var colorful_cdp = cdp_auto_scene.instance() |
106 | colorful_cdp.translation = real_colorful.translation | 104 | colorful_cdp.name = "CountdownPanel_colorful" |
107 | colorful_cdp.rotation = real_colorful.rotation | 105 | colorful_cdp.replace_with = "../../Panels/Countdown Panels/Panel_colorful_colorful" |
108 | get_node("CountdownPanels").add_child(colorful_cdp) | 106 | colorful_cdp.panels = "../../Panels/Doorways Room" |
109 | real_colorful.translation = Vector3(-51, -35, 35) # way under the map | 107 | colorful_cdp.translation = real_colorful.translation |
110 | get_node("Doors/Doorway Room Doors/Door_gray2").queue_free() | 108 | colorful_cdp.rotation = real_colorful.rotation |
109 | get_node("CountdownPanels").add_child(colorful_cdp) | ||
110 | real_colorful.translation = Vector3(-51, -35, 35) # way under the map | ||
111 | get_node("Doors/Doorway Room Doors/Door_gray2").queue_free() | ||
111 | 112 | ||
112 | # Set up The Master to be variable. | 113 | # Set up The Master to be variable. |
113 | var old_master_cdp = get_node("CountdownPanels/CountdownPanel_countdown_16") | 114 | var old_master_cdp = get_node("CountdownPanels/CountdownPanel_countdown_16") |
@@ -353,6 +354,8 @@ func _load(): | |||
353 | victory_condition = "the master" | 354 | victory_condition = "the master" |
354 | elif apclient._victory_condition == apclient.kLEVEL_2: | 355 | elif apclient._victory_condition == apclient.kLEVEL_2: |
355 | victory_condition = "level 2" | 356 | victory_condition = "level 2" |
357 | elif apclient._victory_condition == apclient.kPILGRIMAGE: | ||
358 | victory_condition = "pilgrimage" | ||
356 | 359 | ||
357 | set_static_panel("Entry Room/Panel_this_this", victory_condition) | 360 | set_static_panel("Entry Room/Panel_this_this", victory_condition) |
358 | set_static_panel("Entry Room/Panel_hidden_hidden", "hewwo") | 361 | set_static_panel("Entry Room/Panel_hidden_hidden", "hewwo") |
@@ -584,11 +587,84 @@ func _load(): | |||
584 | level_2.get_node("Viewport/GUI/Panel/TextEdit").connect( | 587 | level_2.get_node("Viewport/GUI/Panel/TextEdit").connect( |
585 | "answer_correct", apclient, "completedGoal" | 588 | "answer_correct", apclient, "completedGoal" |
586 | ) | 589 | ) |
590 | elif apclient._victory_condition == apclient.kPILGRIMAGE: | ||
591 | var pilgrim_panel = self.get_node("Panels/Lingo Room/Panel_pilgrim") | ||
592 | pilgrim_panel.get_node("Viewport/GUI/Panel/TextEdit").connect( | ||
593 | "answer_correct", apclient, "completedGoal" | ||
594 | ) | ||
587 | else: | 595 | else: |
588 | var the_end = self.get_node("Decorations/EndPanel/Panel_end_end") | 596 | var the_end = self.get_node("Decorations/EndPanel/Panel_end_end") |
589 | the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( | 597 | the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( |
590 | "answer_correct", apclient, "completedGoal" | 598 | "answer_correct", apclient, "completedGoal" |
591 | ) | 599 | ) |
600 | |||
601 | # If pilgrimage does not allow roof access, add a node on the Crossroads | ||
602 | # Roof Access stairs that disables it. | ||
603 | if !apclient._pilgrimage_allows_roof_access: | ||
604 | var terminator = apclient.SCRIPT_pilgrimage_terminator.new() | ||
605 | terminator.name = "RoofAccessPilgrimageTerminator" | ||
606 | terminator.translation.x = -36 | ||
607 | terminator.translation.y = 3 | ||
608 | terminator.translation.z = -35 | ||
609 | |||
610 | var terminator_shape = CollisionShape.new() | ||
611 | terminator_shape.shape = BoxShape.new() | ||
612 | terminator_shape.shape.extents.x = 0.1 | ||
613 | |||
614 | terminator.add_child(terminator_shape) | ||
615 | get_node("Decorations").add_child(terminator) | ||
616 | |||
617 | if apclient._sunwarp_shuffle: | ||
618 | # Sunwarps 1 and 6 are rotated differently from the rest, so we have to fix that. | ||
619 | get_node("Decorations/Teleporter Windows/localmap").rotation_degrees.y = 0 | ||
620 | get_node("Decorations/Teleporter Windows/localmap2").rotation_degrees.y = 0 | ||
621 | get_node("Decorations/Teleporter Windows/localmap11").rotation_degrees.y = 0 | ||
622 | get_node("Decorations/Teleporter Windows/localmap12").rotation_degrees.y = 0 | ||
623 | get_node("Decorations/Teleporter Windows/localmap13").rotation_degrees.y = -90 | ||
624 | |||
625 | get_node("Warps/Teleporter Warps/Sunwarp_enter_1").translation.x = 19.5 | ||
626 | get_node("Warps/Teleporter Warps/Sunwarp_exit_1").translation.x = -15.5 | ||
627 | get_node("Warps/Teleporter Warps/Sunwarp_enter_6").translation.x = 4.5 | ||
628 | get_node("Warps/Teleporter Warps/Sunwarp_exit_6").translation.x = -37.5 | ||
629 | get_node("Warps/Teleporter Warps/Sunwarp_exit_7").translation.z = 23.5 | ||
630 | |||
631 | # Change the sunwarps in accordance with the mapping. | ||
632 | var sw_orig_translations = [] | ||
633 | var sw_text_translations = [] | ||
634 | var sw_text_rotations = [] | ||
635 | for i in range(1,7): | ||
636 | sw_orig_translations.append(get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).translation) | ||
637 | sw_text_translations.append(get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).translation) | ||
638 | sw_text_rotations.append(get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).rotation_degrees) | ||
639 | for i in range(1,7): | ||
640 | sw_orig_translations.append(get_node("Warps/Teleporter Warps/Sunwarp_exit_%d" % i).translation) | ||
641 | sw_text_translations.append(get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).translation) | ||
642 | sw_text_rotations.append(get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).rotation_degrees) | ||
643 | |||
644 | var sw_enter_indicators = [4, 5, 6, 12, 7, 10] | ||
645 | for i in range(1,7): | ||
646 | get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).translation = sw_orig_translations[apclient._sunwarp_mapping[i-1]] | ||
647 | get_node("Warps/Teleporter Warps/Sunwarp_exit_%d" % i).translation = sw_orig_translations[apclient._sunwarp_mapping[i+5]] | ||
648 | |||
649 | get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).translation = sw_text_translations[apclient._sunwarp_mapping[i-1]] | ||
650 | get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).rotation_degrees = sw_text_rotations[apclient._sunwarp_mapping[i-1]] | ||
651 | |||
652 | get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).translation = sw_text_translations[apclient._sunwarp_mapping[i+5]] | ||
653 | get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).rotation_degrees = sw_text_rotations[apclient._sunwarp_mapping[i+5]] | ||
654 | |||
655 | var enter_rot = _dir_to_int(gamedata.sunwarps[apclient._sunwarp_mapping[i-1]]["orientation"]) * 90 | ||
656 | var exit_rot = _dir_to_int(gamedata.sunwarps[apclient._sunwarp_mapping[i+5]]["orientation"]) * 90 | ||
657 | var final_rot = enter_rot - exit_rot | ||
658 | if final_rot < 0: | ||
659 | final_rot += 360 | ||
660 | get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).rotate = str(final_rot) | ||
661 | |||
662 | var sw_enter_indicator_pos = gamedata.sunwarps[apclient._sunwarp_mapping[i-1]]["entrance_indicator_pos"] | ||
663 | var sw_enter_indicator = get_node("Decorations/Signs/Welcome Back Signs/Sign%d" % sw_enter_indicators[i-1]) | ||
664 | sw_enter_indicator.translation.x = sw_enter_indicator_pos[0] | ||
665 | sw_enter_indicator.translation.y = sw_enter_indicator_pos[1] | ||
666 | sw_enter_indicator.translation.z = sw_enter_indicator_pos[2] | ||
667 | sw_enter_indicator.rotation_degrees.y = (enter_rot * -1) + 180 | ||
592 | 668 | ||
593 | # Create the effects node. | 669 | # Create the effects node. |
594 | var effects_script = apclient.SCRIPT_effects | 670 | var effects_script = apclient.SCRIPT_effects |
@@ -719,3 +795,15 @@ func set_small_gridmap_tile(x, y, z, tile): | |||
719 | 795 | ||
720 | func archipelago_disconnected(reason): | 796 | func archipelago_disconnected(reason): |
721 | messages.showMessage(reason) | 797 | messages.showMessage(reason) |
798 | |||
799 | |||
800 | func _dir_to_int(dir): | ||
801 | if dir == "north": | ||
802 | return 0 | ||
803 | elif dir == "west": | ||
804 | return 1 | ||
805 | elif dir == "south": | ||
806 | return 2 | ||
807 | elif dir == "east": | ||
808 | return 3 | ||
809 | return 4 | ||
diff --git a/Archipelago/mypainting.gd b/Archipelago/mypainting.gd index 5e9c703..999b122 100644 --- a/Archipelago/mypainting.gd +++ b/Archipelago/mypainting.gd | |||
@@ -86,6 +86,11 @@ func _looked_at(body, painting): | |||
86 | body.rotate_y(3 * PI / 2) | 86 | body.rotate_y(3 * PI / 2) |
87 | body.velocity = body.velocity.rotated(Vector3(0, 1, 0), 3 * PI / 2) | 87 | body.velocity = body.velocity.rotated(Vector3(0, 1, 0), 3 * PI / 2) |
88 | 88 | ||
89 | var apclient = global.get_node("Archipelago") | ||
90 | if !apclient._pilgrimage_allows_paintings: | ||
91 | global.sunwarp = 1 | ||
92 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
93 | |||
89 | 94 | ||
90 | func _dir_to_int(dir): | 95 | func _dir_to_int(dir): |
91 | if dir == "north": | 96 | if dir == "north": |
diff --git a/Archipelago/painting.gd b/Archipelago/painting.gd new file mode 100644 index 0000000..adc8337 --- /dev/null +++ b/Archipelago/painting.gd | |||
@@ -0,0 +1,10 @@ | |||
1 | extends "res://scripts/painting.gd" | ||
2 | |||
3 | func _looked_at(var body, var painting): | ||
4 | ._looked_at(body, painting) | ||
5 | |||
6 | if body.is_in_group("player") && (painting.get_name() == self.get_name()): | ||
7 | var apclient = global.get_node("Archipelago") | ||
8 | if !apclient._pilgrimage_allows_paintings: | ||
9 | global.sunwarp = 1 | ||
10 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
diff --git a/Archipelago/painting_eye.gd b/Archipelago/painting_eye.gd index 53d42b5..b2e6973 100644 --- a/Archipelago/painting_eye.gd +++ b/Archipelago/painting_eye.gd | |||
@@ -3,9 +3,23 @@ extends "res://scripts/painting_eye.gd" | |||
3 | 3 | ||
4 | func _answer_correct(): | 4 | func _answer_correct(): |
5 | var apclient = global.get_node("Archipelago") | 5 | var apclient = global.get_node("Archipelago") |
6 | if not apclient._door_shuffle or apclient.paintingIsVanilla(self.name): | 6 | if !apclient._pilgrimage_compatibility and get_name() == "pilgrim_painting2": |
7 | # When pilgrimage is enabled, the HOT CRUST panel should actually move the sun painting. | ||
8 | if apclient._pilgrimage_enabled: | ||
9 | movePainting() | ||
10 | elif not apclient._door_shuffle or apclient.paintingIsVanilla(self.name): | ||
7 | ._answer_correct() | 11 | ._answer_correct() |
8 | 12 | ||
9 | 13 | ||
10 | func movePainting(): | 14 | func movePainting(): |
11 | ._answer_correct() | 15 | ._answer_correct() |
16 | |||
17 | |||
18 | func _looked_at(var body, var painting): | ||
19 | ._looked_at(body, painting) | ||
20 | |||
21 | if body.is_in_group("player") && (painting.get_name() == self.get_name()): | ||
22 | var apclient = global.get_node("Archipelago") | ||
23 | if !apclient._pilgrimage_allows_paintings: | ||
24 | global.sunwarp = 1 | ||
25 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
diff --git a/Archipelago/painting_scenery.gd b/Archipelago/painting_scenery.gd index f49d602..1186e2f 100644 --- a/Archipelago/painting_scenery.gd +++ b/Archipelago/painting_scenery.gd | |||
@@ -9,3 +9,13 @@ func _answer_correct(): | |||
9 | 9 | ||
10 | func movePainting(): | 10 | func movePainting(): |
11 | ._answer_correct() | 11 | ._answer_correct() |
12 | |||
13 | |||
14 | func _looked_at(var body, var painting): | ||
15 | ._looked_at(body, painting) | ||
16 | |||
17 | if body.is_in_group("player") && (painting.get_name() == self.get_name()): | ||
18 | var apclient = global.get_node("Archipelago") | ||
19 | if !apclient._pilgrimage_allows_paintings: | ||
20 | global.sunwarp = 1 | ||
21 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
diff --git a/Archipelago/panel.gd b/Archipelago/panel.gd index 0e8f1df..9d30455 100644 --- a/Archipelago/panel.gd +++ b/Archipelago/panel.gd | |||
@@ -23,7 +23,7 @@ func _ready(): | |||
23 | else: | 23 | else: |
24 | atbash_text += old_char | 24 | atbash_text += old_char |
25 | 25 | ||
26 | self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").connect( | 26 | var _ignore = self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").connect( |
27 | "answer_correct", self, "answer_correct" | 27 | "answer_correct", self, "answer_correct" |
28 | ) | 28 | ) |
29 | 29 | ||
diff --git a/Archipelago/pilgrimage_terminator.gd b/Archipelago/pilgrimage_terminator.gd new file mode 100644 index 0000000..29db2ee --- /dev/null +++ b/Archipelago/pilgrimage_terminator.gd | |||
@@ -0,0 +1,11 @@ | |||
1 | extends Area | ||
2 | |||
3 | |||
4 | func _ready(): | ||
5 | var _connected = self.connect("body_entered", self, "_body_entered") | ||
6 | |||
7 | |||
8 | func _body_entered(body): | ||
9 | if body.is_in_group("player"): | ||
10 | global.sunwarp = 1 | ||
11 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index de64214..79fdcc3 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd | |||
@@ -30,6 +30,8 @@ func _ready(): | |||
30 | apclient_instance.SCRIPT_mypainting = load("user://maps/Archipelago/mypainting.gd") | 30 | apclient_instance.SCRIPT_mypainting = load("user://maps/Archipelago/mypainting.gd") |
31 | apclient_instance.SCRIPT_notifier = load("user://maps/Archipelago/notifier.gd") | 31 | apclient_instance.SCRIPT_notifier = load("user://maps/Archipelago/notifier.gd") |
32 | apclient_instance.SCRIPT_panel = load("user://maps/Archipelago/panel.gd") | 32 | apclient_instance.SCRIPT_panel = load("user://maps/Archipelago/panel.gd") |
33 | var pilg_term = load("user://maps/Archipelago/pilgrimage_terminator.gd") | ||
34 | apclient_instance.SCRIPT_pilgrimage_terminator = pilg_term | ||
33 | apclient_instance.SCRIPT_uuid = load("user://maps/Archipelago/vendor/uuid.gd") | 35 | apclient_instance.SCRIPT_uuid = load("user://maps/Archipelago/vendor/uuid.gd") |
34 | 36 | ||
35 | var apdata = ResourceLoader.load("user://maps/Archipelago/gamedata.gd") | 37 | var apdata = ResourceLoader.load("user://maps/Archipelago/gamedata.gd") |
@@ -45,6 +47,7 @@ func _ready(): | |||
45 | # Let's also inject any scripts we need to inject now. | 47 | # Let's also inject any scripts we need to inject now. |
46 | installScriptExtension(apclient_instance.SCRIPT_doorControl) | 48 | installScriptExtension(apclient_instance.SCRIPT_doorControl) |
47 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/load.gd")) | 49 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/load.gd")) |
50 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting.gd")) | ||
48 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_eye.gd")) | 51 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_eye.gd")) |
49 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_scenery.gd")) | 52 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_scenery.gd")) |
50 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelLevelSwitch.gd")) | 53 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelLevelSwitch.gd")) |
@@ -52,6 +55,7 @@ func _ready(): | |||
52 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelInput.gd")) | 55 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelInput.gd")) |
53 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/pause_menu.gd")) | 56 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/pause_menu.gd")) |
54 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/player.gd")) | 57 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/player.gd")) |
58 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/teleport.gd")) | ||
55 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/worldTransporter.gd")) | 59 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/worldTransporter.gd")) |
56 | 60 | ||
57 | var apclient = global.get_node("Archipelago") | 61 | var apclient = global.get_node("Archipelago") |
@@ -67,6 +71,19 @@ func _ready(): | |||
67 | self.get_node("Panel/multiplayer_box").pressed = apclient.enable_multiplayer | 71 | self.get_node("Panel/multiplayer_box").pressed = apclient.enable_multiplayer |
68 | self.get_node("Panel/position_box").pressed = apclient.track_player | 72 | self.get_node("Panel/position_box").pressed = apclient.track_player |
69 | 73 | ||
74 | var history_box = get_node("Panel/connection_history") | ||
75 | if apclient.connection_history.empty(): | ||
76 | history_box.disabled = true | ||
77 | else: | ||
78 | history_box.disabled = false | ||
79 | |||
80 | var i = 0 | ||
81 | for details in apclient.connection_history: | ||
82 | history_box.get_popup().add_item("%s (%s)" % [details[1], details[0]], i) | ||
83 | i += 1 | ||
84 | |||
85 | history_box.get_popup().connect("id_pressed", self, "historySelected") | ||
86 | |||
70 | # Show client version. | 87 | # Show client version. |
71 | self.get_node("Panel/title").text = "ARCHIPELAGO (%s)" % apclient.my_version | 88 | self.get_node("Panel/title").text = "ARCHIPELAGO (%s)" % apclient.my_version |
72 | 89 | ||
@@ -109,6 +126,15 @@ func connectionStatus(message): | |||
109 | func connectionSuccessful(): | 126 | func connectionSuccessful(): |
110 | var apclient = global.get_node("Archipelago") | 127 | var apclient = global.get_node("Archipelago") |
111 | 128 | ||
129 | # Save connection details | ||
130 | var connection_details = [apclient.ap_server, apclient.ap_user, apclient.ap_pass] | ||
131 | if apclient.connection_history.has(connection_details): | ||
132 | apclient.connection_history.erase(connection_details) | ||
133 | apclient.connection_history.push_front(connection_details) | ||
134 | if apclient.connection_history.size() > 10: | ||
135 | apclient.connection_history.resize(10) | ||
136 | apclient.saveSettings() | ||
137 | |||
112 | # Switch to LL1 | 138 | # Switch to LL1 |
113 | Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) | 139 | Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) |
114 | global.save_file = apclient.getSaveFileName() | 140 | global.save_file = apclient.getSaveFileName() |
@@ -130,3 +156,12 @@ func connectionUnsuccessful(error_message): | |||
130 | popup.popup_exclusive = true | 156 | popup.popup_exclusive = true |
131 | popup.get_ok().visible = true | 157 | popup.get_ok().visible = true |
132 | popup.popup_centered() | 158 | popup.popup_centered() |
159 | |||
160 | |||
161 | func historySelected(index): | ||
162 | var apclient = global.get_node("Archipelago") | ||
163 | var details = apclient.connection_history[index] | ||
164 | |||
165 | self.get_node("Panel/server_box").text = details[0] | ||
166 | self.get_node("Panel/player_box").text = details[1] | ||
167 | self.get_node("Panel/password_box").text = details[2] | ||
diff --git a/Archipelago/teleport.gd b/Archipelago/teleport.gd new file mode 100644 index 0000000..532f081 --- /dev/null +++ b/Archipelago/teleport.gd | |||
@@ -0,0 +1,27 @@ | |||
1 | extends "res://scripts/teleport.gd" | ||
2 | |||
3 | var _unlocked = true | ||
4 | |||
5 | |||
6 | func _ready(): | ||
7 | var apclient = global.get_node("Archipelago") | ||
8 | if self.get_parent().name == "Teleporter Warps": | ||
9 | if apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL: | ||
10 | _unlocked = false | ||
11 | elif apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name): | ||
12 | _unlocked = false | ||
13 | |||
14 | |||
15 | func _body_entered(body): | ||
16 | if _unlocked: | ||
17 | ._body_entered(body) | ||
18 | |||
19 | if body.is_in_group("player"): | ||
20 | var apclient = global.get_node("Archipelago") | ||
21 | if !apclient._pilgrimage_enabled: | ||
22 | global.sunwarp = 1 | ||
23 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
24 | |||
25 | |||
26 | func unlock_warp(): | ||
27 | _unlocked = true | ||
diff --git a/CHANGELOG.md b/CHANGELOG.md index 70cea6d..de47cb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
@@ -1,5 +1,48 @@ | |||
1 | # lingo-archipelago Releases | 1 | # lingo-archipelago Releases |
2 | 2 | ||
3 | ## v3.0.1 - 2024-04-22 | ||
4 | |||
5 | - Fixed issue where Progressive Hallway Room did not work properly on worlds | ||
6 | generated on Archipelago 0.4.5 or earlier. | ||
7 | |||
8 | Download: | ||
9 | [lingo-archipelago-v3.0.1.zip](https://files.fourisland.com/releases/lingo-archipelago/lingo-archipelago-v3.0.1.zip)<br/> | ||
10 | Source: [v3.0.1](https://code.fourisland.com/lingo-archipelago/tag/?h=v3.0.1) | ||
11 | |||
12 | ## v3.0.0 - 2024-04-22 | ||
13 | |||
14 | - [Archipelago 0.4.6](https://github.com/ArchipelagoMW/Archipelago/releases/tag/0.4.6) | ||
15 | has been released! This includes a major update for Lingo: The Pilgrim Update! | ||
16 | - The pilgrimage can now be disabled entirely. | ||
17 | - When enabled, the pilgrimage uses real logic to determine whether it is | ||
18 | possible, rather than a specific route. | ||
19 | - You can now specify whether paintings and/or roof access are allowed for the | ||
20 | pilgrimage. | ||
21 | - You can lock access to sunwarps behind item keys, like door shuffle. | ||
22 | - Sunwarps can be shuffled, similar to painting shuffle. | ||
23 | - Pilgrimage has been added as a win condition. | ||
24 | - This update should retain backwards compatibility with Archipelago 0.4.5 | ||
25 | worlds. World generated in Archipelago 0.4.4 will likely continue to have | ||
26 | minor problems, and it is best to downpatch to v1.2.1 if you need to play an | ||
27 | older world. | ||
28 | |||
29 | Download: | ||
30 | [lingo-archipelago-v3.0.0.zip](https://files.fourisland.com/releases/lingo-archipelago/lingo-archipelago-v3.0.0.zip)<br/> | ||
31 | Source: [v3.0.0](https://code.fourisland.com/lingo-archipelago/tag/?h=v3.0.0) | ||
32 | |||
33 | ## v2.2.0 - 2024-04-17 | ||
34 | |||
35 | - The last ten connections are now saved in a list so that you can easily switch | ||
36 | between concurrent multiworlds. | ||
37 | - THE COLORFUL is no longer turned into a countdown panel if the multiworld was | ||
38 | generated before Archipelago 0.4.5. This should improve backwards | ||
39 | compatibility, but a v1.x.x version is still the most accurate way to play an | ||
40 | older multiworld. | ||
41 | |||
42 | Download: | ||
43 | [lingo-archipelago-v2.2.0.zip](https://files.fourisland.com/releases/lingo-archipelago/lingo-archipelago-v2.2.0.zip)<br/> | ||
44 | Source: [v2.2.0](https://code.fourisland.com/lingo-archipelago/tag/?h=v2.2.0) | ||
45 | |||
3 | ## v2.1.1 - 2024-04-11 | 46 | ## v2.1.1 - 2024-04-11 |
4 | 47 | ||
5 | - Added some debug logging. | 48 | - Added some debug logging. |
diff --git a/README.md b/README.md index 68580e8..a242f95 100644 --- a/README.md +++ b/README.md | |||
@@ -87,6 +87,10 @@ pick and choose which ones you would like to use. | |||
87 | - **Painting shuffle**: This randomizes the appearance of the paintings in the | 87 | - **Painting shuffle**: This randomizes the appearance of the paintings in the |
88 | game, as well as which of them are warps, and the locations that they warp you | 88 | game, as well as which of them are warps, and the locations that they warp you |
89 | to. It is the equivalent of an entrance randomizer in another game. | 89 | to. It is the equivalent of an entrance randomizer in another game. |
90 | - **Sunwarp shuffle**: This randomizes the six pairs of sunwarps. The pairing of | ||
91 | the warps can change, whether a warp is an entrance or an exit can change, and | ||
92 | the numbering can change. You can also specify whether access to the sunwarps | ||
93 | should be locked behind receiving certain items. | ||
90 | 94 | ||
91 | ## Frequently Asked Questions | 95 | ## Frequently Asked Questions |
92 | 96 | ||
@@ -155,33 +159,31 @@ to WELCOME BACK. | |||
155 | 159 | ||
156 | ### What about the pilgrimage? | 160 | ### What about the pilgrimage? |
157 | 161 | ||
158 | The intended method of reaching the Pilgrim Room in the base game is known as | 162 | You can enable or disable the pilgrimage in the world options. It defaults to |
159 | "doing a pilgrimage". It involves entering each sunwarp in order without using | 163 | disabled. When disabled, it is impossible to perform a pilgrimage (although the |
160 | any non-painting warps in between. This is difficult to map out properly in AP | 164 | sunwarps will still work, as long as you haven't disabled them too). The Sun |
161 | logic, so we only consider one specific path through the map to be the canonical | 165 | Painting will be added to the item pool, even if you do not have door shuffle |
162 | pilgrimage route. Accessing the Pilgrim Room by pilgrimage is only in logic if | 166 | on, so that you can still access the Pilgrim Antechamber. |
163 | this specific route is available to you: | 167 | |
164 | 168 | When the pilgrimage is enabled, you are required to perform a pilgrimage in | |
165 | - From the Starting Room, proceed through the Second Room and into the Hub Room. | 169 | order to access the Pilgrim Antechamber (although the Pilgrim Room itself may |
166 | Enter the first sunwarp. | 170 | still be accessible through The Seeker if you have door shuffle on). The Sun |
167 | - From the Crossroads, use the front tower entrance (the one nearest The | 171 | Painting will not be added to the pool, and will behave as it does in vanilla |
168 | Discerning; not the one next to Sword/Words). Go through the Hot Crusts Door | 172 | (in that it only moves when you solve HOT CRUST inside the Pilgrim Antechamber). |
169 | and enter the second sunwarp. | 173 | It is non-trivial to determine whether you are able to perform a pilgrimage at |
170 | - Enter the third sunwarp immediately after. | 174 | any given state, but logic will expect you to be able to figure this out. There |
171 | - Proceed past The Initiated and through the shortcut door back to the Hub Room. | 175 | are options that let you determine whether or not paintings and/or the roof |
172 | Go through the shortcut door to the tower's first floor and enter the fourth | 176 | access stairs in Crossroads will disable a pilgrimage. When sunwarps are |
173 | sunwarp. | 177 | shuffled, your pilgrimage must take the new numbering of the warps into |
174 | - Use the shortcut to the Directional Gallery (the one outside The Undeterred; | 178 | consideration. The tracker is able to tell you whether or not the Pilgrim |
175 | not the one further down the hallway where the Number Hunt is), pass through | 179 | Antechamber is accessible (as long as there is an otherwise accessible check |
176 | the Salt Pepper Door, and return to the Hub Room. Use the nearby entrance to | 180 | inside it), but it can't tell you what your pilgrimage path should be. If you |
177 | the Crossroads and proceed to the fifth sunwarp. | 181 | are lost, you can check your world's spoiler log for direction on the pilgrimage |
178 | - Use the door that takes you to The Steady, and then the one that takes you to | 182 | path to take. |
179 | The Bearer, and then the one that takes you to The Initiated. Return to the | 183 | |
180 | Hub Room once more, and enter The Tenacious via the shortcut that opens upon | 184 | In previous versions of the randomizer, there was a "canonical pilgrimage" that |
181 | solving the palindromes. Use the top-right door to access the area Outside the | 185 | involved following a specific path in order to reach the Pilgrim Antechamber. |
182 | Agreeable, and enter the final sunwarp. | 186 | This is no longer relevant, because all possible pilgrimage paths are now in |
183 | 187 | logic, but you can still see the old route | |
184 | This route can be seen | 188 | [starting at 2:47 in this video](https://youtu.be/8GfuDRRswdA?t=167) for |
185 | [starting at 2:47 in this video](https://youtu.be/8GfuDRRswdA?t=167). Note that | 189 | reference. |
186 | this will almost never be required if door shuffle is enabled, as one of the | ||
187 | other entrances to the room will usually be available sooner. | ||
diff --git a/archipelago.tscn b/archipelago.tscn index f0b8ab9..f063af9 100644 --- a/archipelago.tscn +++ b/archipelago.tscn | |||
@@ -86,9 +86,9 @@ align = 2 | |||
86 | 86 | ||
87 | [node name="credit5" parent="Panel" instance=ExtResource( 1 )] | 87 | [node name="credit5" parent="Panel" instance=ExtResource( 1 )] |
88 | margin_left = 1239.0 | 88 | margin_left = 1239.0 |
89 | margin_top = 271.0 | 89 | margin_top = 422.0 |
90 | margin_right = 1829.0 | 90 | margin_right = 1829.0 |
91 | margin_bottom = 335.0 | 91 | margin_bottom = 486.0 |
92 | custom_fonts/font = ExtResource( 2 ) | 92 | custom_fonts/font = ExtResource( 2 ) |
93 | custom_styles/normal = SubResource( 1 ) | 93 | custom_styles/normal = SubResource( 1 ) |
94 | text = "OPTIONS" | 94 | text = "OPTIONS" |
@@ -155,9 +155,9 @@ margin_bottom = 58.0 | |||
155 | 155 | ||
156 | [node name="confusing_box" type="CheckBox" parent="Panel"] | 156 | [node name="confusing_box" type="CheckBox" parent="Panel"] |
157 | margin_left = 1227.0 | 157 | margin_left = 1227.0 |
158 | margin_top = 351.0 | 158 | margin_top = 502.0 |
159 | margin_right = 1832.0 | 159 | margin_right = 1832.0 |
160 | margin_bottom = 439.0 | 160 | margin_bottom = 590.0 |
161 | custom_fonts/font = ExtResource( 6 ) | 161 | custom_fonts/font = ExtResource( 6 ) |
162 | custom_icons/checked = ExtResource( 8 ) | 162 | custom_icons/checked = ExtResource( 8 ) |
163 | custom_icons/unchecked = ExtResource( 7 ) | 163 | custom_icons/unchecked = ExtResource( 7 ) |
@@ -165,9 +165,9 @@ text = "Make world more confusing" | |||
165 | 165 | ||
166 | [node name="multiplayer_box" type="CheckBox" parent="Panel"] | 166 | [node name="multiplayer_box" type="CheckBox" parent="Panel"] |
167 | margin_left = 1227.0 | 167 | margin_left = 1227.0 |
168 | margin_top = 461.0 | 168 | margin_top = 612.0 |
169 | margin_right = 1832.0 | 169 | margin_right = 1832.0 |
170 | margin_bottom = 549.0 | 170 | margin_bottom = 700.0 |
171 | custom_fonts/font = ExtResource( 6 ) | 171 | custom_fonts/font = ExtResource( 6 ) |
172 | custom_icons/checked = ExtResource( 8 ) | 172 | custom_icons/checked = ExtResource( 8 ) |
173 | custom_icons/unchecked = ExtResource( 7 ) | 173 | custom_icons/unchecked = ExtResource( 7 ) |
@@ -175,13 +175,22 @@ text = "Show other players" | |||
175 | 175 | ||
176 | [node name="position_box" type="CheckBox" parent="Panel"] | 176 | [node name="position_box" type="CheckBox" parent="Panel"] |
177 | margin_left = 1227.0 | 177 | margin_left = 1227.0 |
178 | margin_top = 571.0 | 178 | margin_top = 722.0 |
179 | margin_right = 1832.0 | 179 | margin_right = 1832.0 |
180 | margin_bottom = 654.0 | 180 | margin_bottom = 810.0 |
181 | custom_fonts/font = ExtResource( 6 ) | 181 | custom_fonts/font = ExtResource( 6 ) |
182 | custom_icons/checked = ExtResource( 8 ) | 182 | custom_icons/checked = ExtResource( 8 ) |
183 | custom_icons/unchecked = ExtResource( 7 ) | 183 | custom_icons/unchecked = ExtResource( 7 ) |
184 | text = "Send position to tracker" | 184 | text = "Send position to tracker" |
185 | 185 | ||
186 | [node name="connection_history" type="MenuButton" parent="Panel"] | ||
187 | margin_left = 1239.0 | ||
188 | margin_top = 276.0 | ||
189 | margin_right = 1829.0 | ||
190 | margin_bottom = 372.0 | ||
191 | custom_fonts/font = ExtResource( 6 ) | ||
192 | text = "connection history" | ||
193 | flat = false | ||
194 | |||
186 | [connection signal="pressed" from="Panel/connect_button" to="Panel/connect_button" method="_connect_pressed"] | 195 | [connection signal="pressed" from="Panel/connect_button" to="Panel/connect_button" method="_connect_pressed"] |
187 | [connection signal="pressed" from="Panel/quit_button" to="Panel/quit_button" method="_back_pressed"] | 196 | [connection signal="pressed" from="Panel/quit_button" to="Panel/quit_button" method="_back_pressed"] |
diff --git a/util/generate_gamedata.rb b/util/generate_gamedata.rb index a3f9ba5..4f9dfd7 100644 --- a/util/generate_gamedata.rb +++ b/util/generate_gamedata.rb | |||
@@ -12,17 +12,23 @@ CLASSIFICATION_INSANITY = 4 | |||
12 | panel_to_id = {} | 12 | panel_to_id = {} |
13 | door_groups = {} | 13 | door_groups = {} |
14 | panel_groups = {} | 14 | panel_groups = {} |
15 | warp_groups = {} | ||
15 | 16 | ||
16 | panel_output = [] | 17 | panel_output = [] |
17 | door_ids_by_item_id = {} | 18 | door_ids_by_item_id = {} |
18 | painting_ids_by_item_id = {} | 19 | painting_ids_by_item_id = {} |
19 | panel_ids_by_item_id = {} | 20 | panel_ids_by_item_id = {} |
21 | warp_ids_by_item_id = {} | ||
20 | panel_ids_by_location_id = {} | 22 | panel_ids_by_location_id = {} |
21 | classification_by_location_id = {} | 23 | classification_by_location_id = {} |
24 | sunwarps = Array.new(12) {Hash.new} | ||
22 | mentioned_doors = Set[] | 25 | mentioned_doors = Set[] |
23 | mentioned_paintings = Set[] | 26 | mentioned_paintings = Set[] |
24 | mentioned_panels = Set[] | 27 | mentioned_panels = Set[] |
28 | mentioned_warps = Set[] | ||
25 | painting_output = {} | 29 | painting_output = {} |
30 | door_items_by_progressive_id = {} | ||
31 | panel_items_by_progressive_id = {} | ||
26 | 32 | ||
27 | ids_config = YAML.load_file(idspath) | 33 | ids_config = YAML.load_file(idspath) |
28 | 34 | ||
@@ -91,6 +97,44 @@ config.each do |room_name, room_data| | |||
91 | painting_output[painting["id"]] = painting | 97 | painting_output[painting["id"]] = painting |
92 | end | 98 | end |
93 | end | 99 | end |
100 | |||
101 | if room_data.include? "sunwarps" | ||
102 | room_data["sunwarps"].each do |sunwarp| | ||
103 | index = sunwarp["dots"] - 1 | ||
104 | if sunwarp["direction"] == "exit" then | ||
105 | index += 6 | ||
106 | end | ||
107 | sunwarps[index] = sunwarp | ||
108 | end | ||
109 | end | ||
110 | |||
111 | if room_data.include? "progression" | ||
112 | room_data["progression"].each do |progressive_item_name, pdata| | ||
113 | progressive_id = ids_config["progression"][progressive_item_name] | ||
114 | |||
115 | if pdata.include? "doors" | ||
116 | door_items_by_progressive_id[progressive_id] = [] | ||
117 | |||
118 | pdata["doors"].each do |item| | ||
119 | item_room_name = (item.kind_of? Hash) ? item["room"] : room_name | ||
120 | item_item_name = (item.kind_of? Hash) ? item["door"] : item | ||
121 | |||
122 | door_items_by_progressive_id[progressive_id] << ids_config["doors"][item_room_name][item_item_name]["item"] | ||
123 | end | ||
124 | end | ||
125 | |||
126 | if pdata.include? "panel_doors" | ||
127 | panel_items_by_progressive_id[progressive_id] = [] | ||
128 | |||
129 | pdata["panel_doors"].each do |item| | ||
130 | item_room_name = (item.kind_of? Hash) ? item["room"] : room_name | ||
131 | item_item_name = (item.kind_of? Hash) ? item["panel_door"] : item | ||
132 | |||
133 | panel_items_by_progressive_id[progressive_id] << ids_config["panel_doors"][item_room_name][item_item_name] | ||
134 | end | ||
135 | end | ||
136 | end | ||
137 | end | ||
94 | end | 138 | end |
95 | 139 | ||
96 | config.each do |room_name, room_data| | 140 | config.each do |room_name, room_data| |
@@ -155,6 +199,23 @@ config.each do |room_name, room_data| | |||
155 | painting_ids_by_item_id[item_id] = internal_painting_ids | 199 | painting_ids_by_item_id[item_id] = internal_painting_ids |
156 | mentioned_paintings.merge(internal_painting_ids) | 200 | mentioned_paintings.merge(internal_painting_ids) |
157 | end | 201 | end |
202 | |||
203 | if door.include? "warp_id" | ||
204 | internal_warp_ids = [] | ||
205 | if door["warp_id"].kind_of? String | ||
206 | internal_warp_ids = [door["warp_id"]] | ||
207 | else | ||
208 | internal_warp_ids = door["warp_id"] | ||
209 | end | ||
210 | |||
211 | if door.include? "door_group" | ||
212 | warp_groups[door["door_group"]] ||= Set[] | ||
213 | warp_groups[door["door_group"]].merge(internal_warp_ids) | ||
214 | end | ||
215 | |||
216 | warp_ids_by_item_id[item_id] = internal_warp_ids | ||
217 | mentioned_warps.merge(internal_warp_ids) | ||
218 | end | ||
158 | end | 219 | end |
159 | end | 220 | end |
160 | end | 221 | end |
@@ -190,6 +251,11 @@ panel_groups.each do |group_name, panel_ids| | |||
190 | panel_ids_by_item_id[item_id] = panel_ids.to_a | 251 | panel_ids_by_item_id[item_id] = panel_ids.to_a |
191 | end | 252 | end |
192 | 253 | ||
254 | warp_groups.each do |group_name, warp_ids| | ||
255 | item_id = ids_config["door_groups"][group_name] | ||
256 | warp_ids_by_item_id[item_id] = warp_ids.to_a | ||
257 | end | ||
258 | |||
193 | File.open(outputpath, "w") do |f| | 259 | File.open(outputpath, "w") do |f| |
194 | f.write "extends Node\n\nvar panels = [" | 260 | f.write "extends Node\n\nvar panels = [" |
195 | f.write(panel_output.map do |panel| | 261 | f.write(panel_output.map do |panel| |
@@ -215,6 +281,12 @@ File.open(outputpath, "w") do |f| | |||
215 | "\"#{painting_id}\"" | 281 | "\"#{painting_id}\"" |
216 | end.join(",") + "]" | 282 | end.join(",") + "]" |
217 | end.join(",")) | 283 | end.join(",")) |
284 | f.write "}\nvar warp_ids_by_item_id = {" | ||
285 | f.write(warp_ids_by_item_id.map do |item_id, warp_ids| | ||
286 | "#{item_id}:[" + warp_ids.map do |warp_id| | ||
287 | "\"#{warp_id}\"" | ||
288 | end.join(",") + "]" | ||
289 | end.join(",")) | ||
218 | f.write "}\nvar panel_ids_by_location_id = {" | 290 | f.write "}\nvar panel_ids_by_location_id = {" |
219 | f.write(panel_ids_by_location_id.map do |location_id, panel_ids| | 291 | f.write(panel_ids_by_location_id.map do |location_id, panel_ids| |
220 | "#{location_id}:[" + panel_ids.map do |panel_id| | 292 | "#{location_id}:[" + panel_ids.map do |panel_id| |
@@ -233,6 +305,10 @@ File.open(outputpath, "w") do |f| | |||
233 | f.write(mentioned_panels.map do |panel_id| | 305 | f.write(mentioned_panels.map do |panel_id| |
234 | "\"#{panel_id}\"" | 306 | "\"#{panel_id}\"" |
235 | end.join(",")) | 307 | end.join(",")) |
308 | f.write "]\nvar mentioned_warps = [" | ||
309 | f.write(mentioned_warps.map do |warp_id| | ||
310 | "\"#{warp_id}\"" | ||
311 | end.join(",")) | ||
236 | f.write "]\nvar paintings = {" | 312 | f.write "]\nvar paintings = {" |
237 | f.write(painting_output.map do |painting_id, painting| | 313 | f.write(painting_output.map do |painting_id, painting| |
238 | "\"#{painting_id}\":{\"orientation\":\"#{painting["orientation"]}\",\"move\":#{painting.include? "move" and painting["move"]}}" | 314 | "\"#{painting_id}\":{\"orientation\":\"#{painting["orientation"]}\",\"move\":#{painting.include? "move" and painting["move"]}}" |
@@ -241,5 +317,17 @@ File.open(outputpath, "w") do |f| | |||
241 | f.write(classification_by_location_id.map do |location_id, classification| | 317 | f.write(classification_by_location_id.map do |location_id, classification| |
242 | "#{location_id}:#{classification}" | 318 | "#{location_id}:#{classification}" |
243 | end.join(",")) | 319 | end.join(",")) |
320 | f.write "}\nvar sunwarps = [" | ||
321 | f.write(sunwarps.map do |sunwarp| | ||
322 | "{\"orientation\":\"#{sunwarp["orientation"]}\",\"entrance_indicator_pos\":#{sunwarp["entrance_indicator_pos"].to_s}}" | ||
323 | end.join(",")) | ||
324 | f.write "]\nvar door_items_by_progressive_id = {" | ||
325 | f.write(door_items_by_progressive_id.map do |item_id, progression_ids| | ||
326 | "#{item_id}:[" + progression_ids.map(&:to_s).join(",") + "]" | ||
327 | end.join(",")) | ||
328 | f.write "}\nvar panel_items_by_progressive_id = {" | ||
329 | f.write(panel_items_by_progressive_id.map do |item_id, progression_ids| | ||
330 | "#{item_id}:[" + progression_ids.map(&:to_s).join(",") + "]" | ||
331 | end.join(",")) | ||
244 | f.write "}" | 332 | f.write "}" |
245 | end | 333 | end |