From 500df85a650382563740bc8cf6fbe5f58ae703ee Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 26 Feb 2024 19:12:23 -0500 Subject: Sun Painting should be vanilla when pilgrimage is on --- Archipelago/client.gd | 3 +++ Archipelago/mypainting.gd | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index db79e15..68528f6 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -130,6 +130,7 @@ var _mastery_achievements = 21 var _level_2_requirement = 223 var _location_classification_bit = 0 var _early_color_hallways = false +var _pilgrimage_enabled = false var _slot_seed = 0 var _map_loaded = false @@ -310,6 +311,8 @@ func _on_data(): _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY if _slot_data.has("early_color_hallways"): _early_color_hallways = _slot_data["early_color_hallways"] + if _slot_data.has("enable_pilgrimage"): + _pilgrimage_enabled = _slot_data["enable_pilgrimage"] _puzzle_skips = 0 diff --git a/Archipelago/mypainting.gd b/Archipelago/mypainting.gd index 5e9c703..1420c03 100644 --- a/Archipelago/mypainting.gd +++ b/Archipelago/mypainting.gd @@ -20,8 +20,13 @@ func _ready(): func _answer_correct(): var apclient = global.get_node("Archipelago") - if not apclient._door_shuffle or apclient.paintingIsVanilla(self.get_parent().name): - movePainting() + if self.get_parent().name == "pilgrim_painting2": + # When pilgrimage is enabled, the HOT CRUST panel should actually move the sun painting. + if apclient._pilgrimage_enabled: + movePainting() + else: + if not apclient._door_shuffle or apclient.paintingIsVanilla(self.get_parent().name): + movePainting() func movePainting(): -- cgit 1.4.1 From c1ffc2c464df33c5effbb4a62e4bd57605d409b4 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 26 Feb 2024 21:22:15 -0500 Subject: Added pilgrimage goal --- Archipelago/client.gd | 3 ++- Archipelago/load.gd | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 68528f6..b93e1cc 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -40,7 +40,7 @@ const progressive_items = { ], "Progressive Hallway Room": [ - {"item": "Outside The Agreeable - Hallway Door", "display": "First Door"}, + {"item": "Hallway Room (1) - Exit", "display": "First Door"}, {"item": "Hallway Room (2) - Exit", "display": "Second Door"}, {"item": "Hallway Room (3) - Exit", "display": "Third Door"}, {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, @@ -77,6 +77,7 @@ const progressive_items = { const kTHE_END = 0 const kTHE_MASTER = 1 const kLEVEL_2 = 2 +const kPILGRIMAGE = 3 const kNO_PANEL_SHUFFLE = 0 const kREARRANGE_PANELS = 1 diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 2d5f7c6..d9b37da 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -334,6 +334,8 @@ func _load(): victory_condition = "the master" elif apclient._victory_condition == apclient.kLEVEL_2: victory_condition = "level 2" + elif apclient._victory_condition == apclient.kPILGRIMAGE: + victory_condition = "pilgrimage" set_static_panel("Entry Room/Panel_this_this", victory_condition) set_static_panel("Entry Room/Panel_hidden_hidden", "hewwo") @@ -538,6 +540,11 @@ func _load(): level_2.get_node("Viewport/GUI/Panel/TextEdit").connect( "answer_correct", apclient, "completedGoal" ) + elif apclient._victory_condition == apclient.kPILGRIMAGE: + var pilgrim_panel = self.get_node("Panels/Lingo Room/Panel_pilgrim") + pilgrim_panel.get_node("Viewport/GUI/Panel/TextEdit").connect( + "answer_correct", apclient, "completedGoal" + ) else: var the_end = self.get_node("Decorations/EndPanel/Panel_end_end") the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( -- cgit 1.4.1 From de5eb04ed014770558b546e02c91ce6eb262f652 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 28 Feb 2024 11:41:00 -0500 Subject: Fix sunwarp access --- Archipelago/client.gd | 15 ++++++++------- Archipelago/teleport.gd | 10 +++------- util/generate_gamedata.rb | 11 +++++++++++ 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index b93e1cc..7cf1d01 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -65,12 +65,12 @@ const progressive_items = { ], "Progressive Pilgrimage": [ - {"item": "Hub Room - 1 Sunwarp", "display": "1 Sunwarp"}, - {"item": "Orange Tower Fourth Floor - 2 Sunwarp", "display": "2 Sunwarp"}, - {"item": "Orange Tower Third Floor - 3 Sunwarp", "display": "3 Sunwarp"}, - {"item": "Orange Tower First Floor - 4 Sunwarp", "display": "4 Sunwarp"}, - {"item": "Orange Tower Fourth Floor - 5 Sunwarp", "display": "5 Sunwarp"}, - {"item": "Outside The Agreeable - 6 Sunwarp", "display": "6 Sunwarp"}, + {"item": "1 Sunwarp", "display": "1 Sunwarp"}, + {"item": "2 Sunwarp", "display": "2 Sunwarp"}, + {"item": "3 Sunwarp", "display": "3 Sunwarp"}, + {"item": "4 Sunwarp", "display": "4 Sunwarp"}, + {"item": "5 Sunwarp", "display": "5 Sunwarp"}, + {"item": "6 Sunwarp", "display": "6 Sunwarp"}, ] } @@ -93,7 +93,8 @@ const kCLASSIFICATION_REMOTE_INSANITY = 2 const kSUNWARP_ACCESS_NORMAL = 0 const kSUNWARP_ACCESS_DISABLED = 1 const kSUNWARP_ACCESS_UNLOCK = 2 -const kSUNWARP_ACCESS_PROGRESSIVE = 3 +const kSUNWARP_ACCESS_INDIVIDUAL = 3 +const kSUNWARP_ACCESS_PROGRESSIVE = 4 var _client = WebSocketClient.new() var _should_process = false diff --git a/Archipelago/teleport.gd b/Archipelago/teleport.gd index d322722..66e26dd 100644 --- a/Archipelago/teleport.gd +++ b/Archipelago/teleport.gd @@ -5,13 +5,9 @@ var _unlocked = true func _ready(): var apclient = global.get_node("Archipelago") - if apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name): - if self.get_parent().name == "Teleporter Warps": - if apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL: - _unlocked = false - else: - _unlocked = false - + if (apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL and self.get_parent().name == "Teleporter Warps") or (apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name)): + _unlocked = false + ._ready() diff --git a/util/generate_gamedata.rb b/util/generate_gamedata.rb index 1cce003..4c530f1 100644 --- a/util/generate_gamedata.rb +++ b/util/generate_gamedata.rb @@ -11,6 +11,7 @@ CLASSIFICATION_INSANITY = 4 panel_to_id = {} door_groups = {} +warp_groups = {} panel_output = [] door_ids_by_item_id = {} @@ -163,6 +164,11 @@ config.each do |room_name, room_data| internal_warp_ids = door["warp_id"] end + if door.include? "group" + warp_groups[door["group"]] ||= Set[] + warp_groups[door["group"]].merge(internal_warp_ids) + end + warp_ids_by_item_id[item_id] = internal_warp_ids mentioned_warps.merge(internal_warp_ids) end @@ -176,6 +182,11 @@ door_groups.each do |group_name, door_ids| door_ids_by_item_id[item_id] = door_ids.to_a end +warp_groups.each do |group_name, warp_ids| + item_id = ids_config["door_groups"][group_name] + warp_ids_by_item_id[item_id] = warp_ids.to_a +end + File.open(outputpath, "w") do |f| f.write "extends Node\n\nvar panels = [" f.write(panel_output.map do |panel| -- cgit 1.4.1 From 4d2da5afe6a3ffad50ca5560c1dcceaddde2b9b0 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 28 Feb 2024 12:35:45 -0500 Subject: Add pilgrimage allows roof access / paintings --- Archipelago/client.gd | 9 ++++++++- Archipelago/load.gd | 16 ++++++++++++++++ Archipelago/mypainting.gd | 14 +++++++------- Archipelago/painting.gd | 10 ++++++++++ Archipelago/painting_eye.gd | 16 +++++++++++++++- Archipelago/painting_scenery.gd | 10 ++++++++++ Archipelago/panel.gd | 4 ---- Archipelago/pilgrimage_terminator.gd | 11 +++++++++++ Archipelago/settings_screen.gd | 4 ++++ Archipelago/teleport.gd | 15 +++++++++++---- 10 files changed, 92 insertions(+), 17 deletions(-) create mode 100644 Archipelago/painting.gd create mode 100644 Archipelago/pilgrimage_terminator.gd diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 7cf1d01..964c642 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -7,6 +7,7 @@ var SCRIPT_multiplayer var SCRIPT_mypainting var SCRIPT_notifier var SCRIPT_panel +var SCRIPT_pilgrimage_terminator var SCRIPT_uuid var ap_server = "" @@ -133,6 +134,8 @@ var _level_2_requirement = 223 var _location_classification_bit = 0 var _early_color_hallways = false var _pilgrimage_enabled = false +var _pilgrimage_allows_roof_access = false +var _pilgrimage_allows_paintings = false var _slot_seed = 0 var _map_loaded = false @@ -315,6 +318,10 @@ func _on_data(): _early_color_hallways = _slot_data["early_color_hallways"] if _slot_data.has("enable_pilgrimage"): _pilgrimage_enabled = _slot_data["enable_pilgrimage"] + if _slot_data.has("pilgrimage_allows_roof_access"): + _pilgrimage_allows_roof_access = _slot_data["pilgrimage_allows_roof_access"] + if _slot_data.has("pilgrimage_allows_paintings"): + _pilgrimage_allows_paintings = _slot_data["pilgrimage_allows_paintings"] _puzzle_skips = 0 @@ -654,7 +661,7 @@ func processItem(item, index, from, flags): painting_node = fake_parent_node.get_node_or_null(painting_id) if painting_node != null: painting_node.get_node("Script").movePainting() - + if gamedata.warp_ids_by_item_id.has(int(item)): var warpsNode = get_tree().get_root().get_node("Spatial/Warps") for warp_id in gamedata.warp_ids_by_item_id[int(item)]: diff --git a/Archipelago/load.gd b/Archipelago/load.gd index d9b37da..bca0742 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -550,6 +550,22 @@ func _load(): the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( "answer_correct", apclient, "completedGoal" ) + + # If pilgrimage does not allow roof access, add a node on the Crossroads + # Roof Access stairs that disables it. + if !apclient._pilgrimage_allows_roof_access: + var terminator = apclient.SCRIPT_pilgrimage_terminator.new() + terminator.name = "RoofAccessPilgrimageTerminator" + terminator.translation.x = -36 + terminator.translation.y = 3 + terminator.translation.z = -35 + + var terminator_shape = CollisionShape.new() + terminator_shape.shape = BoxShape.new() + terminator_shape.shape.extents.x = 0.1 + + terminator.add_child(terminator_shape) + get_node("Decorations").add_child(terminator) # Create the effects node. var effects_script = apclient.SCRIPT_effects diff --git a/Archipelago/mypainting.gd b/Archipelago/mypainting.gd index 1420c03..999b122 100644 --- a/Archipelago/mypainting.gd +++ b/Archipelago/mypainting.gd @@ -20,13 +20,8 @@ func _ready(): func _answer_correct(): var apclient = global.get_node("Archipelago") - if self.get_parent().name == "pilgrim_painting2": - # When pilgrimage is enabled, the HOT CRUST panel should actually move the sun painting. - if apclient._pilgrimage_enabled: - movePainting() - else: - if not apclient._door_shuffle or apclient.paintingIsVanilla(self.get_parent().name): - movePainting() + if not apclient._door_shuffle or apclient.paintingIsVanilla(self.get_parent().name): + movePainting() func movePainting(): @@ -91,6 +86,11 @@ func _looked_at(body, painting): body.rotate_y(3 * PI / 2) body.velocity = body.velocity.rotated(Vector3(0, 1, 0), 3 * PI / 2) + var apclient = global.get_node("Archipelago") + if !apclient._pilgrimage_allows_paintings: + global.sunwarp = 1 + body.get_node("pivot/camera/sunwarp_background").visible = false + func _dir_to_int(dir): 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 @@ +extends "res://scripts/painting.gd" + +func _looked_at(var body, var painting): + ._looked_at(body, painting) + + if body.is_in_group("player") && (painting.get_name() == self.get_name()): + var apclient = global.get_node("Archipelago") + if !apclient._pilgrimage_allows_paintings: + global.sunwarp = 1 + body.get_node("pivot/camera/sunwarp_background").visible = false diff --git a/Archipelago/painting_eye.gd b/Archipelago/painting_eye.gd index 53d42b5..c6994b1 100644 --- a/Archipelago/painting_eye.gd +++ b/Archipelago/painting_eye.gd @@ -3,9 +3,23 @@ extends "res://scripts/painting_eye.gd" func _answer_correct(): var apclient = global.get_node("Archipelago") - if not apclient._door_shuffle or apclient.paintingIsVanilla(self.name): + if get_name() == "pilgrim_painting2": + # When pilgrimage is enabled, the HOT CRUST panel should actually move the sun painting. + if apclient._pilgrimage_enabled: + movePainting() + elif not apclient._door_shuffle or apclient.paintingIsVanilla(self.name): ._answer_correct() func movePainting(): ._answer_correct() + + +func _looked_at(var body, var painting): + ._looked_at(body, painting) + + if body.is_in_group("player") && (painting.get_name() == self.get_name()): + var apclient = global.get_node("Archipelago") + if !apclient._pilgrimage_allows_paintings: + global.sunwarp = 1 + 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(): func movePainting(): ._answer_correct() + + +func _looked_at(var body, var painting): + ._looked_at(body, painting) + + if body.is_in_group("player") && (painting.get_name() == self.get_name()): + var apclient = global.get_node("Archipelago") + if !apclient._pilgrimage_allows_paintings: + global.sunwarp = 1 + body.get_node("pivot/camera/sunwarp_background").visible = false diff --git a/Archipelago/panel.gd b/Archipelago/panel.gd index da5b572..ce5a642 100644 --- a/Archipelago/panel.gd +++ b/Archipelago/panel.gd @@ -22,10 +22,6 @@ func _ready(): else: atbash_text += old_char - self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").connect( - "answer_correct", self, "answer_correct" - ) - func answer_correct(): var effects = get_tree().get_root().get_node("Spatial/AP_Effects") 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 @@ +extends Area + + +func _ready(): + var _connected = self.connect("body_entered", self, "_body_entered") + + +func _body_entered(body): + if body.is_in_group("player"): + global.sunwarp = 1 + body.get_node("pivot/camera/sunwarp_background").visible = false diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 0ae218e..1a1f5cc 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd @@ -24,6 +24,9 @@ func _ready(): apclient_instance.SCRIPT_mypainting = load("user://maps/Archipelago/mypainting.gd") apclient_instance.SCRIPT_notifier = load("user://maps/Archipelago/notifier.gd") apclient_instance.SCRIPT_panel = load("user://maps/Archipelago/panel.gd") + apclient_instance.SCRIPT_pilgrimage_terminator = load( + "user://maps/Archipelago/pilgrimage_terminator.gd" + ) apclient_instance.SCRIPT_uuid = load("user://maps/Archipelago/vendor/uuid.gd") var apdata = ResourceLoader.load("user://maps/Archipelago/gamedata.gd") @@ -39,6 +42,7 @@ func _ready(): # Let's also inject any scripts we need to inject now. installScriptExtension(apclient_instance.SCRIPT_doorControl) installScriptExtension(ResourceLoader.load("user://maps/Archipelago/load.gd")) + installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting.gd")) installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_eye.gd")) installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_scenery.gd")) installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelLevelSwitch.gd")) diff --git a/Archipelago/teleport.gd b/Archipelago/teleport.gd index 66e26dd..532f081 100644 --- a/Archipelago/teleport.gd +++ b/Archipelago/teleport.gd @@ -5,16 +5,23 @@ var _unlocked = true func _ready(): var apclient = global.get_node("Archipelago") - if (apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL and self.get_parent().name == "Teleporter Warps") or (apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name)): + if self.get_parent().name == "Teleporter Warps": + if apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL: + _unlocked = false + elif apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name): _unlocked = false - - ._ready() -func _body_entered(var body): +func _body_entered(body): if _unlocked: ._body_entered(body) + if body.is_in_group("player"): + var apclient = global.get_node("Archipelago") + if !apclient._pilgrimage_enabled: + global.sunwarp = 1 + body.get_node("pivot/camera/sunwarp_background").visible = false + func unlock_warp(): _unlocked = true -- cgit 1.4.1 From c45ca7725a9d77f29e8675182c3aff7b661b5c40 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 2 Mar 2024 13:18:33 -0500 Subject: Added sunwarp shuffling --- Archipelago/client.gd | 6 +++++ Archipelago/load.gd | 64 +++++++++++++++++++++++++++++++++++++++++++++++ util/generate_gamedata.rb | 17 ++++++++++++- 3 files changed, 86 insertions(+), 1 deletion(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 964c642..b3668d7 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -136,6 +136,8 @@ var _early_color_hallways = false var _pilgrimage_enabled = false var _pilgrimage_allows_roof_access = false var _pilgrimage_allows_paintings = false +var _sunwarp_shuffle = false +var _sunwarp_mapping = [] var _slot_seed = 0 var _map_loaded = false @@ -322,6 +324,10 @@ func _on_data(): _pilgrimage_allows_roof_access = _slot_data["pilgrimage_allows_roof_access"] if _slot_data.has("pilgrimage_allows_paintings"): _pilgrimage_allows_paintings = _slot_data["pilgrimage_allows_paintings"] + if _slot_data.has("shuffle_sunwarps"): + _sunwarp_shuffle = _slot_data["shuffle_sunwarps"] + if _slot_data.has("sunwarp_permutation"): + _sunwarp_mapping = _slot_data["sunwarp_permutation"] _puzzle_skips = 0 diff --git a/Archipelago/load.gd b/Archipelago/load.gd index bca0742..0750247 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -566,6 +566,58 @@ func _load(): terminator.add_child(terminator_shape) get_node("Decorations").add_child(terminator) + + if apclient._sunwarp_shuffle: + # Sunwarps 1 and 6 are rotated differently from the rest, so we have to fix that. + get_node("Decorations/Teleporter Windows/localmap").rotation_degrees.y = 0 + get_node("Decorations/Teleporter Windows/localmap2").rotation_degrees.y = 0 + get_node("Decorations/Teleporter Windows/localmap11").rotation_degrees.y = 0 + get_node("Decorations/Teleporter Windows/localmap12").rotation_degrees.y = 0 + get_node("Decorations/Teleporter Windows/localmap13").rotation_degrees.y = -90 + + get_node("Warps/Teleporter Warps/Sunwarp_enter_1").translation.x = 19.5 + get_node("Warps/Teleporter Warps/Sunwarp_exit_1").translation.x = -15.5 + get_node("Warps/Teleporter Warps/Sunwarp_enter_6").translation.x = 4.5 + get_node("Warps/Teleporter Warps/Sunwarp_exit_6").translation.x = -37.5 + get_node("Warps/Teleporter Warps/Sunwarp_exit_7").translation.z = 23.5 + + # Change the sunwarps in accordance with the mapping. + var sw_orig_translations = [] + var sw_text_translations = [] + var sw_text_rotations = [] + for i in range(1,7): + sw_orig_translations.append(get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).translation) + sw_text_translations.append(get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).translation) + sw_text_rotations.append(get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).rotation_degrees) + for i in range(1,7): + sw_orig_translations.append(get_node("Warps/Teleporter Warps/Sunwarp_exit_%d" % i).translation) + sw_text_translations.append(get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).translation) + sw_text_rotations.append(get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).rotation_degrees) + + var sw_enter_indicators = [4, 5, 6, 12, 7, 10] + for i in range(1,7): + get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).translation = sw_orig_translations[apclient._sunwarp_mapping[i-1]] + get_node("Warps/Teleporter Warps/Sunwarp_exit_%d" % i).translation = sw_orig_translations[apclient._sunwarp_mapping[i+5]] + + get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).translation = sw_text_translations[apclient._sunwarp_mapping[i-1]] + get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).rotation_degrees = sw_text_rotations[apclient._sunwarp_mapping[i-1]] + + get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).translation = sw_text_translations[apclient._sunwarp_mapping[i+5]] + get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).rotation_degrees = sw_text_rotations[apclient._sunwarp_mapping[i+5]] + + var enter_rot = _dir_to_int(gamedata.sunwarps[apclient._sunwarp_mapping[i-1]]["orientation"]) * 90 + var exit_rot = _dir_to_int(gamedata.sunwarps[apclient._sunwarp_mapping[i+5]]["orientation"]) * 90 + var final_rot = enter_rot - exit_rot + if final_rot < 0: + final_rot += 360 + get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).rotate = str(final_rot) + + var sw_enter_indicator_pos = gamedata.sunwarps[apclient._sunwarp_mapping[i-1]]["entrance_indicator_pos"] + var sw_enter_indicator = get_node("Decorations/Signs/Welcome Back Signs/Sign%d" % sw_enter_indicators[i-1]) + sw_enter_indicator.translation.x = sw_enter_indicator_pos[0] + sw_enter_indicator.translation.y = sw_enter_indicator_pos[1] + sw_enter_indicator.translation.z = sw_enter_indicator_pos[2] + sw_enter_indicator.rotation_degrees.y = (enter_rot * -1) + 180 # Create the effects node. var effects_script = apclient.SCRIPT_effects @@ -666,3 +718,15 @@ func set_small_gridmap_tile(x, y, z, tile): func archipelago_disconnected(reason): messages.showMessage(reason) + + +func _dir_to_int(dir): + if dir == "north": + return 0 + elif dir == "west": + return 1 + elif dir == "south": + return 2 + elif dir == "east": + return 3 + return 4 diff --git a/util/generate_gamedata.rb b/util/generate_gamedata.rb index 4c530f1..7674277 100644 --- a/util/generate_gamedata.rb +++ b/util/generate_gamedata.rb @@ -19,6 +19,7 @@ painting_ids_by_item_id = {} warp_ids_by_item_id = {} panel_ids_by_location_id = {} classification_by_location_id = {} +sunwarps = Array.new(12) {Hash.new} mentioned_doors = Set[] mentioned_paintings = Set[] mentioned_warps = Set[] @@ -91,6 +92,16 @@ config.each do |room_name, room_data| painting_output[painting["id"]] = painting end end + + if room_data.include? "sunwarps" + room_data["sunwarps"].each do |sunwarp| + index = sunwarp["dots"] - 1 + if sunwarp["direction"] == "exit" then + index += 6 + end + sunwarps[index] = sunwarp + end + end end config.each do |room_name, room_data| @@ -238,5 +249,9 @@ File.open(outputpath, "w") do |f| f.write(classification_by_location_id.map do |location_id, classification| "#{location_id}:#{classification}" end.join(",")) - f.write "}" + f.write "}\nvar sunwarps = [" + f.write(sunwarps.map do |sunwarp| + "{\"orientation\":\"#{sunwarp["orientation"]}\",\"entrance_indicator_pos\":#{sunwarp["entrance_indicator_pos"].to_s}}" + end.join(",")) + f.write "]" end -- cgit 1.4.1 From 5285e600bb2ad9d8ce030a37e0ab894b0df122e1 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 17 Mar 2024 12:41:39 -0400 Subject: Set beta version --- Archipelago/client.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 4431fa0..d1f95c8 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -16,7 +16,7 @@ var ap_pass = "" var confusify_world = false var enable_multiplayer = false -const my_version = "2.0.0-beta2" +const my_version = "sunwarps-beta2" const ap_version = {"major": 0, "minor": 4, "build": 5, "class": "Version"} const color_items = [ "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" -- cgit 1.4.1 From 7bd48794b4aee542566eea1dce10adcb57f31b20 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 17 Mar 2024 14:41:12 -0400 Subject: Fixed pilgrimage terminator load for compile --- Archipelago/settings_screen.gd | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 1a1f5cc..1be32d9 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd @@ -24,9 +24,7 @@ func _ready(): apclient_instance.SCRIPT_mypainting = load("user://maps/Archipelago/mypainting.gd") apclient_instance.SCRIPT_notifier = load("user://maps/Archipelago/notifier.gd") apclient_instance.SCRIPT_panel = load("user://maps/Archipelago/panel.gd") - apclient_instance.SCRIPT_pilgrimage_terminator = load( - "user://maps/Archipelago/pilgrimage_terminator.gd" - ) + apclient_instance.SCRIPT_pilgrimage_terminator = load("user://maps/Archipelago/pilgrimage_terminator.gd") apclient_instance.SCRIPT_uuid = load("user://maps/Archipelago/vendor/uuid.gd") var apdata = ResourceLoader.load("user://maps/Archipelago/gamedata.gd") -- cgit 1.4.1 From 6bb60c1b8b4edaf454685fb74b0952baf2ad714f Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 17 Mar 2024 15:15:39 -0400 Subject: Fix atbash never clearing --- Archipelago/panel.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Archipelago/panel.gd b/Archipelago/panel.gd index 476d834..fc5963a 100644 --- a/Archipelago/panel.gd +++ b/Archipelago/panel.gd @@ -22,6 +22,10 @@ func _ready(): else: atbash_text += old_char + var _ignore = self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").connect( + "answer_correct", self, "answer_correct" + ) + func answer_correct(): var effects = get_tree().get_root().get_node("Spatial/AP_Effects") -- cgit 1.4.1 From ce831897b89974f38fd6f0583e5feac178643a14 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 17 Apr 2024 12:30:18 -0400 Subject: Add connection history --- Archipelago/client.gd | 6 +++++- Archipelago/settings_screen.gd | 31 +++++++++++++++++++++++++++++++ archipelago.tscn | 25 +++++++++++++++++-------- 3 files changed, 53 insertions(+), 9 deletions(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index f15afe6..489fdb9 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -15,6 +15,7 @@ var ap_pass = "" var confusify_world = false var enable_multiplayer = false var track_player = false +var connection_history = [] const my_version = "2.1.1" const ap_version = {"major": 0, "minor": 4, "build": 5, "class": "Version"} @@ -161,6 +162,8 @@ func _init(): enable_multiplayer = data[5] if data.size() > 6: track_player = data[6] + if data.size() > 7: + connection_history = data[7] processDatapackages() @@ -485,7 +488,8 @@ func saveSettings(): _datapackages, confusify_world, enable_multiplayer, - track_player + track_player, + connection_history ] file.store_var(data, true) file.close() diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index de64214..453e3bf 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd @@ -67,6 +67,19 @@ func _ready(): self.get_node("Panel/multiplayer_box").pressed = apclient.enable_multiplayer self.get_node("Panel/position_box").pressed = apclient.track_player + var history_box = get_node("Panel/connection_history") + if apclient.connection_history.empty(): + history_box.disabled = true + else: + history_box.disabled = false + + var i = 0 + for details in apclient.connection_history: + history_box.get_popup().add_item("%s (%s)" % [details[1], details[0]], i) + i += 1 + + history_box.get_popup().connect("id_pressed", self, "historySelected") + # Show client version. self.get_node("Panel/title").text = "ARCHIPELAGO (%s)" % apclient.my_version @@ -109,6 +122,15 @@ func connectionStatus(message): func connectionSuccessful(): var apclient = global.get_node("Archipelago") + # Save connection details + var connection_details = [apclient.ap_server, apclient.ap_user, apclient.ap_pass] + if apclient.connection_history.has(connection_details): + apclient.connection_history.erase(connection_details) + apclient.connection_history.push_front(connection_details) + if apclient.connection_history.size() > 10: + apclient.connection_history.resize(10) + apclient.saveSettings() + # Switch to LL1 Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) global.save_file = apclient.getSaveFileName() @@ -130,3 +152,12 @@ func connectionUnsuccessful(error_message): popup.popup_exclusive = true popup.get_ok().visible = true popup.popup_centered() + + +func historySelected(index): + var apclient = global.get_node("Archipelago") + var details = apclient.connection_history[index] + + self.get_node("Panel/server_box").text = details[0] + self.get_node("Panel/player_box").text = details[1] + self.get_node("Panel/password_box").text = details[2] diff --git a/archipelago.tscn b/archipelago.tscn index f0b8ab9..f063af9 100644 --- a/archipelago.tscn +++ b/archipelago.tscn @@ -86,9 +86,9 @@ align = 2 [node name="credit5" parent="Panel" instance=ExtResource( 1 )] margin_left = 1239.0 -margin_top = 271.0 +margin_top = 422.0 margin_right = 1829.0 -margin_bottom = 335.0 +margin_bottom = 486.0 custom_fonts/font = ExtResource( 2 ) custom_styles/normal = SubResource( 1 ) text = "OPTIONS" @@ -155,9 +155,9 @@ margin_bottom = 58.0 [node name="confusing_box" type="CheckBox" parent="Panel"] margin_left = 1227.0 -margin_top = 351.0 +margin_top = 502.0 margin_right = 1832.0 -margin_bottom = 439.0 +margin_bottom = 590.0 custom_fonts/font = ExtResource( 6 ) custom_icons/checked = ExtResource( 8 ) custom_icons/unchecked = ExtResource( 7 ) @@ -165,9 +165,9 @@ text = "Make world more confusing" [node name="multiplayer_box" type="CheckBox" parent="Panel"] margin_left = 1227.0 -margin_top = 461.0 +margin_top = 612.0 margin_right = 1832.0 -margin_bottom = 549.0 +margin_bottom = 700.0 custom_fonts/font = ExtResource( 6 ) custom_icons/checked = ExtResource( 8 ) custom_icons/unchecked = ExtResource( 7 ) @@ -175,13 +175,22 @@ text = "Show other players" [node name="position_box" type="CheckBox" parent="Panel"] margin_left = 1227.0 -margin_top = 571.0 +margin_top = 722.0 margin_right = 1832.0 -margin_bottom = 654.0 +margin_bottom = 810.0 custom_fonts/font = ExtResource( 6 ) custom_icons/checked = ExtResource( 8 ) custom_icons/unchecked = ExtResource( 7 ) text = "Send position to tracker" +[node name="connection_history" type="MenuButton" parent="Panel"] +margin_left = 1239.0 +margin_top = 276.0 +margin_right = 1829.0 +margin_bottom = 372.0 +custom_fonts/font = ExtResource( 6 ) +text = "connection history" +flat = false + [connection signal="pressed" from="Panel/connect_button" to="Panel/connect_button" method="_connect_pressed"] [connection signal="pressed" from="Panel/quit_button" to="Panel/quit_button" method="_back_pressed"] -- cgit 1.4.1 From 750ebbf9aa25f0209d7f1c7186718fa07377881d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 17 Apr 2024 12:50:34 -0400 Subject: Prevent colorful cdp if genned before 0.4.5 --- Archipelago/client.gd | 16 ++++++++++++++++ Archipelago/load.gd | 23 ++++++++++++----------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 489fdb9..2f66c1b 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -95,6 +95,7 @@ var _item_name_to_id = {} # LINGO only var _location_name_to_id = {} # LINGO only var _remote_version = {"major": 0, "minor": 0, "build": 0} +var _gen_version = {"major": 0, "minor": 0, "build": 0} # TODO: caching per MW/slot, reset between connections var _authenticated = false @@ -233,6 +234,7 @@ func _on_data(): if cmd == "RoomInfo": _seed = message["seed_name"] _remote_version = message["version"] + _gen_version = message["generator_version"] var needed_games = [] for game in message["datapackage_checksums"].keys(): @@ -779,3 +781,17 @@ func colorForItemType(flags): return "#d63a22" else: # filler return "#14de9e" + + +func compareVersion(lhs, rhs): + if lhs["major"] == rhs["major"]: + if lhs["minor"] == rhs["minor"]: + return lhs["build"] < rhs["build"] + else: + return lhs["minor"] < rhs["minor"] + else: + return lhs["major"] < rhs["major"] + + +func wasGeneratedBeforeVersion(major, minor, build): + return compareVersion(_gen_version, {"major": major, "minor": minor, "build": build}) diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 566ee39..27e70b7 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -96,18 +96,19 @@ func _load(): wanderer_achieve.translation = Vector3(-51, -33, 35) # way under the map - # Turn THE COLORFUL into a cdp. - var real_colorful = panels_parent.get_node("Countdown Panels/Panel_colorful_colorful") var cdp_auto_scene = load("res://nodes/panel_countdown_auto.tscn") - var colorful_cdp = cdp_auto_scene.instance() - colorful_cdp.name = "CountdownPanel_colorful" - colorful_cdp.replace_with = "../../Panels/Countdown Panels/Panel_colorful_colorful" - colorful_cdp.panels = "../../Panels/Doorways Room" - colorful_cdp.translation = real_colorful.translation - colorful_cdp.rotation = real_colorful.rotation - get_node("CountdownPanels").add_child(colorful_cdp) - real_colorful.translation = Vector3(-51, -35, 35) # way under the map - get_node("Doors/Doorway Room Doors/Door_gray2").queue_free() + if !apclient.wasGeneratedBeforeVersion(0, 4, 5): + # Turn THE COLORFUL into a cdp. + var real_colorful = panels_parent.get_node("Countdown Panels/Panel_colorful_colorful") + var colorful_cdp = cdp_auto_scene.instance() + colorful_cdp.name = "CountdownPanel_colorful" + colorful_cdp.replace_with = "../../Panels/Countdown Panels/Panel_colorful_colorful" + colorful_cdp.panels = "../../Panels/Doorways Room" + colorful_cdp.translation = real_colorful.translation + colorful_cdp.rotation = real_colorful.rotation + get_node("CountdownPanels").add_child(colorful_cdp) + real_colorful.translation = Vector3(-51, -35, 35) # way under the map + get_node("Doors/Doorway Room Doors/Door_gray2").queue_free() # Set up The Master to be variable. var old_master_cdp = get_node("CountdownPanels/CountdownPanel_countdown_16") -- cgit 1.4.1 From f75a3599eae42952c4360f638d727fceea07f3a9 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 17 Apr 2024 12:51:28 -0400 Subject: Bump version --- Archipelago/client.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 2f66c1b..8abc42c 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -17,7 +17,7 @@ var enable_multiplayer = false var track_player = false var connection_history = [] -const my_version = "2.1.1" +const my_version = "2.2.0" const ap_version = {"major": 0, "minor": 4, "build": 5, "class": "Version"} const color_items = [ "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" -- cgit 1.4.1 From 6aad55fa66eb9caa668bb09289391e6b39eee7da Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 17 Apr 2024 13:02:05 -0400 Subject: Released v2.2.0 --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70cea6d..d5fc54d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # lingo-archipelago Releases +## v2.2.0 - 2024-04-17 + +- The last ten connections are now saved in a list so that you can easily switch + between concurrent multiworlds. +- THE COLORFUL is no longer turned into a countdown panel if the multiworld was + generated before Archipelago 0.4.5. This should improve backwards + compatibility, but a v1.x.x version is still the most accurate way to play an + older multiworld. + +Download: +[lingo-archipelago-v2.2.0.zip](https://files.fourisland.com/releases/lingo-archipelago/lingo-archipelago-v2.2.0.zip)
+Source: [v2.2.0](https://code.fourisland.com/lingo-archipelago/tag/?h=v2.2.0) + ## v2.1.1 - 2024-04-11 - Added some debug logging. -- cgit 1.4.1 From e33ba8444d965ed903a0ca87d2824af334c4cdd9 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 18 Apr 2024 16:38:15 -0400 Subject: Backwards compatibility with 0.4.5 --- Archipelago/client.gd | 12 ++++++++++++ Archipelago/painting_eye.gd | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 13a7635..896673a 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -136,6 +136,7 @@ var _mastery_achievements = 21 var _level_2_requirement = 223 var _location_classification_bit = 0 var _early_color_hallways = false +var _pilgrimage_compatibility = false # set to true for pre-0.4.6 var _pilgrimage_enabled = false var _pilgrimage_allows_roof_access = false var _pilgrimage_allows_paintings = false @@ -313,6 +314,8 @@ func _on_data(): _panel_shuffle = _slot_data["shuffle_panels"] if _slot_data.has("sunwarp_access"): _sunwarp_access = _slot_data["sunwarp_access"] + else: + _sunwarp_access = kSUNWARP_ACCESS_NORMAL if _slot_data.has("seed"): _slot_seed = _slot_data["seed"] if _slot_data.has("painting_entrance_to_exit"): @@ -332,12 +335,21 @@ func _on_data(): _early_color_hallways = _slot_data["early_color_hallways"] if _slot_data.has("enable_pilgrimage"): _pilgrimage_enabled = _slot_data["enable_pilgrimage"] + else: + _pilgrimage_compatibility = true + _pilgrimage_enabled = true if _slot_data.has("pilgrimage_allows_roof_access"): _pilgrimage_allows_roof_access = _slot_data["pilgrimage_allows_roof_access"] + else: + _pilgrimage_allows_roof_access = true if _slot_data.has("pilgrimage_allows_paintings"): _pilgrimage_allows_paintings = _slot_data["pilgrimage_allows_paintings"] + else: + _pilgrimage_allows_paintings = true if _slot_data.has("shuffle_sunwarps"): _sunwarp_shuffle = _slot_data["shuffle_sunwarps"] + else: + _sunwarp_shuffle = false if _slot_data.has("sunwarp_permutation"): _sunwarp_mapping = _slot_data["sunwarp_permutation"] diff --git a/Archipelago/painting_eye.gd b/Archipelago/painting_eye.gd index c6994b1..b2e6973 100644 --- a/Archipelago/painting_eye.gd +++ b/Archipelago/painting_eye.gd @@ -3,7 +3,7 @@ extends "res://scripts/painting_eye.gd" func _answer_correct(): var apclient = global.get_node("Archipelago") - if get_name() == "pilgrim_painting2": + if !apclient._pilgrimage_compatibility and get_name() == "pilgrim_painting2": # When pilgrimage is enabled, the HOT CRUST panel should actually move the sun painting. if apclient._pilgrimage_enabled: movePainting() -- cgit 1.4.1 From 139ecb09dcb49177d1fa39baaf8e378e3009fc76 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 18 Apr 2024 17:42:35 -0400 Subject: Reapply "Added support for warp items (including sunwarps)" This reverts commit 17572f8cd5945536eccffbbe832517d75993c03f. --- Archipelago/client.gd | 26 ++++++++++++++++++++++++++ Archipelago/settings_screen.gd | 1 + Archipelago/teleport.gd | 24 ++++++++++++++++++++++++ util/generate_gamedata.rb | 24 ++++++++++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 Archipelago/teleport.gd diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 8abc42c..d93b2ed 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -64,6 +64,15 @@ const progressive_items = { {"item": "The Colorful - Green Door", "display": "Green"}, {"item": "The Colorful - Brown Door", "display": "Brown"}, {"item": "The Colorful - Gray Door", "display": "Gray"}, + ], + "Progressive Pilgrimage": + [ + {"item": "Hub Room - 1 Sunwarp", "display": "1 Sunwarp"}, + {"item": "Orange Tower Fourth Floor - 2 Sunwarp", "display": "2 Sunwarp"}, + {"item": "Orange Tower Third Floor - 3 Sunwarp", "display": "3 Sunwarp"}, + {"item": "Orange Tower First Floor - 4 Sunwarp", "display": "4 Sunwarp"}, + {"item": "Orange Tower Fourth Floor - 5 Sunwarp", "display": "5 Sunwarp"}, + {"item": "Outside The Agreeable - 6 Sunwarp", "display": "6 Sunwarp"}, ] } @@ -82,6 +91,11 @@ const kCLASSIFICATION_REMOTE_NORMAL = 0 const kCLASSIFICATION_REMOTE_REDUCED = 1 const kCLASSIFICATION_REMOTE_INSANITY = 2 +const kSUNWARP_ACCESS_NORMAL = 0 +const kSUNWARP_ACCESS_DISABLED = 1 +const kSUNWARP_ACCESS_UNLOCK = 2 +const kSUNWARP_ACCESS_PROGRESSIVE = 3 + var _client = WebSocketClient.new() var _should_process = false var _initiated_disconnect = false @@ -114,6 +128,7 @@ var _door_shuffle = false var _color_shuffle = false var _panel_shuffle = 0 # none, rearrange var _painting_shuffle = false +var _sunwarp_access = 0 # normal, disabled, unlock, progressive var _mastery_achievements = 21 var _level_2_requirement = 223 var _location_classification_bit = 0 @@ -288,6 +303,8 @@ func _on_data(): _painting_shuffle = _slot_data["shuffle_paintings"] if _slot_data.has("shuffle_panels"): _panel_shuffle = _slot_data["shuffle_panels"] + if _slot_data.has("sunwarp_access"): + _sunwarp_access = _slot_data["sunwarp_access"] if _slot_data.has("seed"): _slot_seed = _slot_data["seed"] if _slot_data.has("painting_entrance_to_exit"): @@ -687,6 +704,11 @@ func processItem(item, index, from, flags): painting_node = fake_parent_node.get_node_or_null(painting_id) if painting_node != null: painting_node.get_node("Script").movePainting() + + if gamedata.warp_ids_by_item_id.has(int(item)): + var warpsNode = get_tree().get_root().get_node("Spatial/Warps") + for warp_id in gamedata.warp_ids_by_item_id[int(item)]: + warpsNode.get_node(warp_id).unlock_warp() # Handle progressive items. if item_name in progressive_items.keys(): @@ -748,6 +770,10 @@ func paintingIsVanilla(painting): return !$Gamedata.mentioned_paintings.has(painting) +func warpIsVanilla(warp): + return !$Gamedata.mentioned_warps.has(warp) + + func evaluateSolvability(): emit_signal("evaluate_solvability") diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 453e3bf..dce9b70 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd @@ -52,6 +52,7 @@ func _ready(): installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelInput.gd")) installScriptExtension(ResourceLoader.load("user://maps/Archipelago/pause_menu.gd")) installScriptExtension(ResourceLoader.load("user://maps/Archipelago/player.gd")) + installScriptExtension(ResourceLoader.load("user://maps/Archipelago/teleport.gd")) installScriptExtension(ResourceLoader.load("user://maps/Archipelago/worldTransporter.gd")) var apclient = global.get_node("Archipelago") diff --git a/Archipelago/teleport.gd b/Archipelago/teleport.gd new file mode 100644 index 0000000..d322722 --- /dev/null +++ b/Archipelago/teleport.gd @@ -0,0 +1,24 @@ +extends "res://scripts/teleport.gd" + +var _unlocked = true + + +func _ready(): + var apclient = global.get_node("Archipelago") + if apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name): + if self.get_parent().name == "Teleporter Warps": + if apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL: + _unlocked = false + else: + _unlocked = false + + ._ready() + + +func _body_entered(var body): + if _unlocked: + ._body_entered(body) + + +func unlock_warp(): + _unlocked = true diff --git a/util/generate_gamedata.rb b/util/generate_gamedata.rb index f63e062..8275ab7 100644 --- a/util/generate_gamedata.rb +++ b/util/generate_gamedata.rb @@ -15,10 +15,12 @@ door_groups = {} panel_output = [] door_ids_by_item_id = {} painting_ids_by_item_id = {} +warp_ids_by_item_id = {} panel_ids_by_location_id = {} classification_by_location_id = {} mentioned_doors = Set[] mentioned_paintings = Set[] +mentioned_warps = Set[] painting_output = {} ids_config = YAML.load_file(idspath) @@ -152,6 +154,18 @@ config.each do |room_name, room_data| painting_ids_by_item_id[item_id] = internal_painting_ids mentioned_paintings.merge(internal_painting_ids) end + + if door.include? "warp_id" + internal_warp_ids = [] + if door["warp_id"].kind_of? String + internal_warp_ids = [door["warp_id"]] + else + internal_warp_ids = door["warp_id"] + end + + warp_ids_by_item_id[item_id] = internal_warp_ids + mentioned_warps.merge(internal_warp_ids) + end end end end @@ -181,6 +195,12 @@ File.open(outputpath, "w") do |f| "\"#{painting_id}\"" end.join(",") + "]" end.join(",")) + f.write "}\nvar warp_ids_by_item_id = {" + f.write(warp_ids_by_item_id.map do |item_id, warp_ids| + "#{item_id}:[" + warp_ids.map do |warp_id| + "\"#{warp_id}\"" + end.join(",") + "]" + end.join(",")) f.write "}\nvar panel_ids_by_location_id = {" f.write(panel_ids_by_location_id.map do |location_id, panel_ids| "#{location_id}:[" + panel_ids.map do |panel_id| @@ -195,6 +215,10 @@ File.open(outputpath, "w") do |f| f.write(mentioned_paintings.map do |painting_id| "\"#{painting_id}\"" end.join(",")) + f.write "]\nvar mentioned_warps = [" + f.write(mentioned_warps.map do |warp_id| + "\"#{warp_id}\"" + end.join(",")) f.write "]\nvar paintings = {" f.write(painting_output.map do |painting_id, painting| "\"#{painting_id}\":{\"orientation\":\"#{painting["orientation"]}\",\"move\":#{painting.include? "move" and painting["move"]}}" -- cgit 1.4.1 From e3c036d02b66e798b0260bfb480cc7edd9585ff6 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 18 Apr 2024 17:47:49 -0400 Subject: Fix duplication from merge --- Archipelago/client.gd | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 2aa4697..896673a 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -740,11 +740,6 @@ func processItem(item, index, from, flags): for warp_id in gamedata.warp_ids_by_item_id[int(item)]: warpsNode.get_node(warp_id).unlock_warp() - if gamedata.warp_ids_by_item_id.has(int(item)): - var warpsNode = get_tree().get_root().get_node("Spatial/Warps") - for warp_id in gamedata.warp_ids_by_item_id[int(item)]: - warpsNode.get_node(warp_id).unlock_warp() - # Handle progressive items. if item_name in progressive_items.keys(): if not item_name in _progressive_progress: -- cgit 1.4.1 From 607ee75c987063cad7d9f214cd7464fb66a2c644 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 18 Apr 2024 17:52:36 -0400 Subject: Bump version and AP version --- Archipelago/client.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 896673a..2229916 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -18,8 +18,8 @@ var enable_multiplayer = false var track_player = false var connection_history = [] -const my_version = "2.2.0" -const ap_version = {"major": 0, "minor": 4, "build": 5, "class": "Version"} +const my_version = "3.0.0" +const ap_version = {"major": 0, "minor": 4, "build": 6, "class": "Version"} const color_items = [ "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" ] -- cgit 1.4.1 From d8840c24a21cbfc5700c639aff6ce83dd9ce59cc Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 18 Apr 2024 18:09:30 -0400 Subject: Rewrote pilgrimage section of readme --- README.md | 62 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 30 deletions(-) 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. - **Painting shuffle**: This randomizes the appearance of the paintings in the game, as well as which of them are warps, and the locations that they warp you to. It is the equivalent of an entrance randomizer in another game. +- **Sunwarp shuffle**: This randomizes the six pairs of sunwarps. The pairing of + the warps can change, whether a warp is an entrance or an exit can change, and + the numbering can change. You can also specify whether access to the sunwarps + should be locked behind receiving certain items. ## Frequently Asked Questions @@ -155,33 +159,31 @@ to WELCOME BACK. ### What about the pilgrimage? -The intended method of reaching the Pilgrim Room in the base game is known as -"doing a pilgrimage". It involves entering each sunwarp in order without using -any non-painting warps in between. This is difficult to map out properly in AP -logic, so we only consider one specific path through the map to be the canonical -pilgrimage route. Accessing the Pilgrim Room by pilgrimage is only in logic if -this specific route is available to you: - -- From the Starting Room, proceed through the Second Room and into the Hub Room. - Enter the first sunwarp. -- From the Crossroads, use the front tower entrance (the one nearest The - Discerning; not the one next to Sword/Words). Go through the Hot Crusts Door - and enter the second sunwarp. -- Enter the third sunwarp immediately after. -- Proceed past The Initiated and through the shortcut door back to the Hub Room. - Go through the shortcut door to the tower's first floor and enter the fourth - sunwarp. -- Use the shortcut to the Directional Gallery (the one outside The Undeterred; - not the one further down the hallway where the Number Hunt is), pass through - the Salt Pepper Door, and return to the Hub Room. Use the nearby entrance to - the Crossroads and proceed to the fifth sunwarp. -- Use the door that takes you to The Steady, and then the one that takes you to - The Bearer, and then the one that takes you to The Initiated. Return to the - Hub Room once more, and enter The Tenacious via the shortcut that opens upon - solving the palindromes. Use the top-right door to access the area Outside the - Agreeable, and enter the final sunwarp. - -This route can be seen -[starting at 2:47 in this video](https://youtu.be/8GfuDRRswdA?t=167). Note that -this will almost never be required if door shuffle is enabled, as one of the -other entrances to the room will usually be available sooner. +You can enable or disable the pilgrimage in the world options. It defaults to +disabled. When disabled, it is impossible to perform a pilgrimage (although the +sunwarps will still work, as long as you haven't disabled them too). The Sun +Painting will be added to the item pool, even if you do not have door shuffle +on, so that you can still access the Pilgrim Antechamber. + +When the pilgrimage is enabled, you are required to perform a pilgrimage in +order to access the Pilgrim Antechamber (although the Pilgrim Room itself may +still be accessible through The Seeker if you have door shuffle on). The Sun +Painting will not be added to the pool, and will behave as it does in vanilla +(in that it only moves when you solve HOT CRUST inside the Pilgrim Antechamber). +It is non-trivial to determine whether you are able to perform a pilgrimage at +any given state, but logic will expect you to be able to figure this out. There +are options that let you determine whether or not paintings and/or the roof +access stairs in Crossroads will disable a pilgrimage. When sunwarps are +shuffled, your pilgrimage must take the new numbering of the warps into +consideration. The tracker is able to tell you whether or not the Pilgrim +Antechamber is accessible (as long as there is an otherwise accessible check +inside it), but it can't tell you what your pilgrimage path should be. If you +are lost, you can check your world's spoiler log for direction on the pilgrimage +path to take. + +In previous versions of the randomizer, there was a "canonical pilgrimage" that +involved following a specific path in order to reach the Pilgrim Antechamber. +This is no longer relevant, because all possible pilgrimage paths are now in +logic, but you can still see the old route +[starting at 2:47 in this video](https://youtu.be/8GfuDRRswdA?t=167) for +reference. -- cgit 1.4.1 From 7c4d3b1dcee861c4fb4db2805e008e4d3f8d3b21 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 18 Apr 2024 18:19:51 -0400 Subject: Prevent pilgrimage_terminator reformatting issue --- Archipelago/settings_screen.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index bf2c78f..79fdcc3 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd @@ -30,7 +30,8 @@ func _ready(): apclient_instance.SCRIPT_mypainting = load("user://maps/Archipelago/mypainting.gd") apclient_instance.SCRIPT_notifier = load("user://maps/Archipelago/notifier.gd") apclient_instance.SCRIPT_panel = load("user://maps/Archipelago/panel.gd") - apclient_instance.SCRIPT_pilgrimage_terminator = load("user://maps/Archipelago/pilgrimage_terminator.gd") + var pilg_term = load("user://maps/Archipelago/pilgrimage_terminator.gd") + apclient_instance.SCRIPT_pilgrimage_terminator = pilg_term apclient_instance.SCRIPT_uuid = load("user://maps/Archipelago/vendor/uuid.gd") var apdata = ResourceLoader.load("user://maps/Archipelago/gamedata.gd") -- cgit 1.4.1 From 402d532b5a10fc6e18cba12844f64a5bfb1d0b07 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 22 Apr 2024 10:52:37 -0400 Subject: Released v3.0.0 --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5fc54d..5978a4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # lingo-archipelago Releases +## v3.0.0 - 2024-04-22 + +- [Archipelago 0.4.6](https://github.com/ArchipelagoMW/Archipelago/releases/tag/0.4.6) + has been released! This includes a major update for Lingo: The Pilgrim Update! + - The pilgrimage can now be disabled entirely. + - When enabled, the pilgrimage uses real logic to determine whether it is + possible, rather than a specific route. + - You can now specify whether paintings and/or roof access are allowed for the + pilgrimage. + - You can lock access to sunwarps behind item keys, like door shuffle. + - Sunwarps can be shuffled, similar to painting shuffle. + - Pilgrimage has been added as a win condition. +- This update should retain backwards compatibility with Archipelago 0.4.5 + worlds. World generaed in Archipelago 0.4.4 will likely continue to have minor + problems, and it is best to downpatch to v1.2.1 if you need to play an older + world. + +Download: +[lingo-archipelago-v3.0.0.zip](https://files.fourisland.com/releases/lingo-archipelago/lingo-archipelago-v3.0.0.zip)
+Source: [v3.0.0](https://code.fourisland.com/lingo-archipelago/tag/?h=v3.0.0) + ## v2.2.0 - 2024-04-17 - The last ten connections are now saved in a list so that you can easily switch -- cgit 1.4.1 From 34602a22dd85a675a91adcecb93972876ec518fd Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 22 Apr 2024 14:11:05 -0400 Subject: Make progression items resistant to renames --- Archipelago/client.gd | 74 +++++++++++------------------------------------ util/generate_gamedata.rb | 21 +++++++++++++- 2 files changed, 37 insertions(+), 58 deletions(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 2229916..853be2d 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -25,56 +25,15 @@ const color_items = [ ] const progressive_items = { "Progressive Orange Tower": - [ - {"item": "Orange Tower - Second Floor", "display": "Second Floor"}, - {"item": "Orange Tower - Third Floor", "display": "Third Floor"}, - {"item": "Orange Tower - Fourth Floor", "display": "Fourth Floor"}, - {"item": "Orange Tower - Fifth Floor", "display": "Fifth Floor"}, - {"item": "Orange Tower - Sixth Floor", "display": "Sixth Floor"}, - {"item": "Orange Tower - Seventh Floor", "display": "Seventh Floor"}, - ], + ["Second Floor", "Third Floor", "Fourth Floor", "Fifth Floor", "Sixth Floor", "Seventh Floor"], "Progressive Art Gallery": - [ - {"item": "Art Gallery - Second Floor", "display": "Second Floor"}, - {"item": "Art Gallery - Third Floor", "display": "Third Floor"}, - {"item": "Art Gallery - Fourth Floor", "display": "Fourth Floor"}, - {"item": "Art Gallery - Fifth Floor", "display": "Fifth Floor"}, - {"item": "Art Gallery - Exit", "display": "Exit"}, - ], - "Progressive Hallway Room": - [ - {"item": "Hallway Room (1) - Exit", "display": "First Door"}, - {"item": "Hallway Room (2) - Exit", "display": "Second Door"}, - {"item": "Hallway Room (3) - Exit", "display": "Third Door"}, - {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, - ], - "Progressive Fearless": - [ - {"item": "The Fearless (First Floor) - Second Floor", "display": "Second Floor"}, - {"item": "The Fearless (Second Floor) - Third Floor", "display": "Third Floor"}, - ], + ["Second Floor", "Third Floor", "Fourth Floor", "Fifth Floor", "Exit"], + "Progressive Hallway Room": ["First Door", "Second Door", "Third Door", "Fourth Door"], + "Progressive Fearless": ["Second Floor", "Third Floor"], "Progressive Colorful": - [ - {"item": "The Colorful - White Door", "display": "White"}, - {"item": "The Colorful - Black Door", "display": "Black"}, - {"item": "The Colorful - Red Door", "display": "Red"}, - {"item": "The Colorful - Yellow Door", "display": "Yellow"}, - {"item": "The Colorful - Blue Door", "display": "Blue"}, - {"item": "The Colorful - Purple Door", "display": "Purple"}, - {"item": "The Colorful - Orange Door", "display": "Orange"}, - {"item": "The Colorful - Green Door", "display": "Green"}, - {"item": "The Colorful - Brown Door", "display": "Brown"}, - {"item": "The Colorful - Gray Door", "display": "Gray"}, - ], + ["White", "Black", "Red", "Yellow", "Blue", "Purple", "Orange", "Green", "Brown", "Gray"], "Progressive Pilgrimage": - [ - {"item": "1 Sunwarp", "display": "1 Sunwarp"}, - {"item": "2 Sunwarp", "display": "2 Sunwarp"}, - {"item": "3 Sunwarp", "display": "3 Sunwarp"}, - {"item": "4 Sunwarp", "display": "4 Sunwarp"}, - {"item": "5 Sunwarp", "display": "5 Sunwarp"}, - {"item": "6 Sunwarp", "display": "6 Sunwarp"}, - ] + ["1 Sunwarp", "2 Sunwarp", "3 Sunwarp", "4 Sunwarp", "5 Sunwarp", "6 Sunwarp"] } const kTHE_END = 0 @@ -741,15 +700,16 @@ func processItem(item, index, from, flags): warpsNode.get_node(warp_id).unlock_warp() # Handle progressive items. - if item_name in progressive_items.keys(): - if not item_name in _progressive_progress: - _progressive_progress[item_name] = 0 + if int(item) in gamedata.items_by_progressive_id.keys(): + if not int(item) in _progressive_progress: + _progressive_progress[int(item)] = 0 - if _progressive_progress[item_name] < progressive_items[item_name].size(): - var subitem_name = progressive_items[item_name][_progressive_progress[item_name]]["item"] - global._print(subitem_name) - processItem(_item_name_to_id[subitem_name], null, null, null) - _progressive_progress[item_name] += 1 + if _progressive_progress[int(item)] < gamedata.items_by_progressive_id[int(item)].size(): + var subitems = gamedata.items_by_progressive_id[int(item)] + var subitem_id = subitems[_progressive_progress[int(item)]] + global._print("Subitem: %d" % subitem_id) + processItem(subitem_id, null, null, null) + _progressive_progress[int(item)] += 1 if _color_shuffle and color_items.has(_item_id_to_name[item]): var lcol = _item_id_to_name[item].to_lower() @@ -763,8 +723,8 @@ func processItem(item, index, from, flags): saveLocaldata() if item_name in progressive_items: - var subitem = progressive_items[item_name][_progressive_progress[item_name] - 1] - item_name += " (%s)" % subitem["display"] + var subitem = progressive_items[item_name][_progressive_progress[int(item)] - 1] + item_name += " (%s)" % subitem var player_name = "Unknown" if _player_name_by_slot.has(from): diff --git a/util/generate_gamedata.rb b/util/generate_gamedata.rb index cf57395..1f18b7e 100644 --- a/util/generate_gamedata.rb +++ b/util/generate_gamedata.rb @@ -24,6 +24,7 @@ mentioned_doors = Set[] mentioned_paintings = Set[] mentioned_warps = Set[] painting_output = {} +items_by_progressive_id = {} ids_config = YAML.load_file(idspath) @@ -102,6 +103,20 @@ config.each do |room_name, room_data| sunwarps[index] = sunwarp end end + + if room_data.include? "progression" + room_data["progression"].each do |progressive_item_name, progression| + progressive_id = ids_config["progression"][progressive_item_name] + items_by_progressive_id[progressive_id] = [] + + progression.each do |item| + item_room_name = (item.kind_of? Hash) ? item["room"] : room_name + item_item_name = (item.kind_of? Hash) ? item["door"] : item + + items_by_progressive_id[progressive_id] << ids_config["doors"][item_room_name][item_item_name]["item"] + end + end + end end config.each do |room_name, room_data| @@ -253,5 +268,9 @@ File.open(outputpath, "w") do |f| f.write(sunwarps.map do |sunwarp| "{\"orientation\":\"#{sunwarp["orientation"]}\",\"entrance_indicator_pos\":#{sunwarp["entrance_indicator_pos"].to_s}}" end.join(",")) - f.write "]" + f.write "]\nvar items_by_progressive_id = {" + f.write(items_by_progressive_id.map do |item_id, progression_ids| + "#{item_id}:[" + progression_ids.map(&:to_s).join(",") + "]" + end.join(",")) + f.write "}" end -- cgit 1.4.1 From 8640fe1f0bd3d671666398faab58a406d2440470 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 22 Apr 2024 14:11:35 -0400 Subject: Bump version --- Archipelago/client.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 853be2d..7903df2 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -18,7 +18,7 @@ var enable_multiplayer = false var track_player = false var connection_history = [] -const my_version = "3.0.0" +const my_version = "3.0.1" const ap_version = {"major": 0, "minor": 4, "build": 6, "class": "Version"} const color_items = [ "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" -- cgit 1.4.1 From 0c25dc87e5ad9c8c8c2ff0ef5ac6502b166bc405 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 22 Apr 2024 14:18:42 -0400 Subject: Released v3.0.1 --- CHANGELOG.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5978a4d..de47cb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # lingo-archipelago Releases +## v3.0.1 - 2024-04-22 + +- Fixed issue where Progressive Hallway Room did not work properly on worlds + generated on Archipelago 0.4.5 or earlier. + +Download: +[lingo-archipelago-v3.0.1.zip](https://files.fourisland.com/releases/lingo-archipelago/lingo-archipelago-v3.0.1.zip)
+Source: [v3.0.1](https://code.fourisland.com/lingo-archipelago/tag/?h=v3.0.1) + ## v3.0.0 - 2024-04-22 - [Archipelago 0.4.6](https://github.com/ArchipelagoMW/Archipelago/releases/tag/0.4.6) @@ -13,9 +22,9 @@ - Sunwarps can be shuffled, similar to painting shuffle. - Pilgrimage has been added as a win condition. - This update should retain backwards compatibility with Archipelago 0.4.5 - worlds. World generaed in Archipelago 0.4.4 will likely continue to have minor - problems, and it is best to downpatch to v1.2.1 if you need to play an older - world. + worlds. World generated in Archipelago 0.4.4 will likely continue to have + minor problems, and it is best to downpatch to v1.2.1 if you need to play an + older world. Download: [lingo-archipelago-v3.0.0.zip](https://files.fourisland.com/releases/lingo-archipelago/lingo-archipelago-v3.0.0.zip)
-- cgit 1.4.1