From 3a78350a4c85ebe022e2b07b030d59436029c856 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 12 Jan 2024 15:00:43 -0500 Subject: Remove black block from THE RED --- Archipelago/load.gd | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Archipelago/load.gd b/Archipelago/load.gd index a2051c3..edfeb3c 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -186,6 +186,10 @@ func _load(): set_gridmap_tile(-88.5, 4.5, -41.5, "MeshInstance8") set_gridmap_tile(-89.5, 4.5, -41.5, "MeshInstance4") + # Remove black block from THE RED. + clear_gridmap_tile(68.5, 6.5, 76.5) + get_node("Decorations/PanelSign/sign19").queue_free() + if apclient.confusify_world: # Remove welcome back / color hallway / sunwarp indicators. get_node("Decorations/Signs/Welcome Back Signs").queue_free() @@ -621,6 +625,14 @@ func set_gridmap_tile(x, y, z, tile): gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, mesh_library.find_item_by_name(tile)) +func clear_gridmap_tile(x, y, z): + var gridmap = self.get_node("GridMap") + var mesh_library = gridmap.mesh_library + var mapvec = gridmap.world_to_map(gridmap.to_local(Vector3(x, y, z))) + + gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, GridMap.INVALID_CELL_ITEM) + + func set_small_gridmap_tile(x, y, z, tile): var gridmap = self.get_node("GridMapSmall") var mesh_library = gridmap.mesh_library -- cgit 1.4.1 From a66b6f5ce98be3f138a7cf76c7c15d09a9f49f0d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 12 Jan 2024 15:08:41 -0500 Subject: Deleted some glass blocks --- Archipelago/load.gd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Archipelago/load.gd b/Archipelago/load.gd index edfeb3c..ef0ec14 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -237,12 +237,12 @@ func _load(): if apclient._panel_shuffle != apclient.kNO_PANEL_SHUFFLE: # Make The Wondrous's FIRE solely midred. - set_gridmap_tile(-76.5, 1.5, -73.5, "MeshInstance18") + clear_gridmap_tile(-76.5, 1.5, -73.5) # Reduce double/triple length puzzles in Knight/Night. - set_gridmap_tile(24.5, 1.5, 11.5, "MeshInstance18") - set_gridmap_tile(25.5, 1.5, 11.5, "MeshInstance18") - set_gridmap_tile(47.5, 1.5, 11.5, "MeshInstance18") + clear_gridmap_tile(24.5, 1.5, 11.5) + clear_gridmap_tile(25.5, 1.5, 11.5) + clear_gridmap_tile(47.5, 1.5, 11.5) if apclient._panel_shuffle == apclient.kREARRANGE_PANELS: # Do the actual shuffling. -- cgit 1.4.1 From f407444ceab9284f54597830160267f250c3c4c6 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 18 Jan 2024 20:11:59 -0500 Subject: Exclude duplicate pearl painting --- Archipelago/load.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Archipelago/load.gd b/Archipelago/load.gd index ef0ec14..afe304b 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -14,7 +14,8 @@ const EXCLUDED_PAINTINGS = [ "scenery_3.tscn", "scenery_4.tscn", "scenery_5.tscn", - "pilgrim.tscn" + "pilgrim.tscn", + "so_pearl_bk.tscn" ] -- cgit 1.4.1 From f696286fdab96ccfc2bb4bddd8cc0ceda87309db Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 23 Jan 2024 15:16:37 -0500 Subject: Effects text is more prompt now Slowness and Iceland aren't forced to tick at the same time anymore. Puzzle skip popups show up instantly and disappear instantly. Puzzle skip popups do not show up for puzzles hidden behind walls (although you can still press p to skip). --- Archipelago/effects.gd | 112 ++++++++++++++++++++++++++++++------------------- Archipelago/load.gd | 9 ++++ 2 files changed, 79 insertions(+), 42 deletions(-) diff --git a/Archipelago/effects.gd b/Archipelago/effects.gd index ae134bc..e830fbc 100644 --- a/Archipelago/effects.gd +++ b/Archipelago/effects.gd @@ -9,11 +9,14 @@ var queued_iceland = 0 var skip_available = false var puzzle_focused = false var solve_mode = false +var not_behind_wall = false var puzzle_to_skip = "" +var text_dirty = true var orig_env var orig_walk var orig_run +var wallcast func _ready(): @@ -21,6 +24,8 @@ func _ready(): orig_walk = get_tree().get_root().get_node("Spatial/player").walk_speed orig_run = get_tree().get_root().get_node("Spatial/player").run_speed + wallcast = get_tree().get_root().get_node("Spatial/player/pivot/camera/wallcast") + var label = Label.new() label.set_name("label") label.margin_right = 1920.0 - 20.0 @@ -37,6 +42,18 @@ func _ready(): add_child(label) + var slowness_timer = Timer.new() + slowness_timer.name = "SlownessTimer" + slowness_timer.wait_time = 1.0 + add_child(slowness_timer) + slowness_timer.connect("timeout", self, "_tick_slowness") + + var iceland_timer = Timer.new() + iceland_timer.name = "IcelandTimer" + iceland_timer.wait_time = 1.0 + add_child(iceland_timer) + iceland_timer.connect("timeout", self, "_tick_iceland") + func activate(): activated = true @@ -53,10 +70,10 @@ func trigger_slowness_trap(): player.walk_speed = orig_walk / 2.0 player.run_speed = orig_run / 2.0 - slowness_remaining += 30 + $SlownessTimer.start() - if not effect_running: - _process_effects() + slowness_remaining += 30 + text_dirty = true func trigger_iceland_trap(): @@ -69,10 +86,10 @@ func trigger_iceland_trap(): load("res://environments/level_iceland.tres") ) - iceland_remaining += 60 + $IcelandTimer.start() - if not effect_running: - _process_effects() + iceland_remaining += 60 + text_dirty = true func trigger_atbash_trap(): @@ -82,8 +99,7 @@ func trigger_atbash_trap(): var apclient = global.get_node("Archipelago") apclient.evaluateSolvability() - if not effect_running: - _process_effects() + text_dirty = true func deactivate_atbash_trap(): @@ -93,6 +109,8 @@ func deactivate_atbash_trap(): var apclient = global.get_node("Archipelago") apclient.evaluateSolvability() + text_dirty = true + func show_puzzle_skip_message(node_path): var panel_input = get_tree().get_root().get_node(node_path) @@ -106,12 +124,15 @@ func show_puzzle_skip_message(node_path): return puzzle_focused = true + wallcast.enabled = true + not_behind_wall = false puzzle_to_skip = node_path _evaluate_puzzle_skip() func hide_puzzle_skip_message(): puzzle_focused = false + wallcast.enabled = false _evaluate_puzzle_skip() @@ -136,26 +157,49 @@ func skip_puzzle(): func _evaluate_puzzle_skip(): if puzzle_focused and not solve_mode: skip_available = true - - if not effect_running: - _process_effects() else: skip_available = false + text_dirty = true + +func _tick_slowness(): + slowness_remaining -= 1 + text_dirty = true + + if slowness_remaining == 0: + var player = get_tree().get_root().get_node("Spatial/player") + player.walk_speed = orig_walk + player.run_speed = orig_run + + $SlownessTimer.stop() + + +func _tick_iceland(): + iceland_remaining -= 1 + text_dirty = true + + if iceland_remaining == 0: + get_tree().get_root().get_node("Spatial/player/pivot/camera").set_environment( + orig_env + ) -func _process_effects(): - effect_running = true + $IcelandTimer.stop() + + +func _process(_delta): + if puzzle_focused: + if wallcast.is_colliding(): + var should_nbw = (get_tree().get_root().get_node("Spatial/player")._get_panel_from_ray(wallcast) != null) + if should_nbw != not_behind_wall: + not_behind_wall = true + text_dirty = true + + if text_dirty: + text_dirty = false - while slowness_remaining > 0 or iceland_remaining > 0 or atbash_activated or skip_available: var text = "" if atbash_activated: text += "Atbash Trap lasts until you solve a puzzle" - if skip_available: - var apclient = global.get_node("Archipelago") - if apclient.getAvailablePuzzleSkips() > 0: - if not text.empty(): - text += "\n" - text += "Press P to skip puzzle (%d available)" % apclient.getAvailablePuzzleSkips() if slowness_remaining > 0: if not text.empty(): text += "\n" @@ -164,26 +208,10 @@ func _process_effects(): if not text.empty(): text += "\n" text += "Iceland: %d seconds" % iceland_remaining + if skip_available and not_behind_wall: + var apclient = global.get_node("Archipelago") + if apclient.getAvailablePuzzleSkips() > 0: + if not text.empty(): + text += "\n" + text += "Press P to skip puzzle (%d available)" % apclient.getAvailablePuzzleSkips() self.get_node("label").text = text - - yield(get_tree().create_timer(1.0), "timeout") - - if !get_tree().paused: - if slowness_remaining > 0: - slowness_remaining -= 1 - - if slowness_remaining == 0: - var player = get_tree().get_root().get_node("Spatial/player") - player.walk_speed = orig_walk - player.run_speed = orig_run - - if iceland_remaining > 0: - iceland_remaining -= 1 - - if iceland_remaining == 0: - get_tree().get_root().get_node("Spatial/player/pivot/camera").set_environment( - orig_env - ) - - self.get_node("label").text = "" - effect_running = false diff --git a/Archipelago/load.gd b/Archipelago/load.gd index afe304b..7f86c91 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -25,6 +25,15 @@ func _load(): var apclient = global.get_node("Archipelago") var panels_parent = self.get_node("Panels") + # Add a wall-blocked raycast to the player. + var wallcast = RayCast.new() + wallcast.name = "wallcast" + wallcast.cast_to = Vector3(0, 0, -15) + wallcast.set_collision_mask_bit(1, true) + wallcast.set_collision_mask_bit(3, true) + wallcast.collide_with_areas = true + $player/pivot/camera.add_child(wallcast) + # Override the YOU panel with the AP slot name. if self.get_node_or_null("Panels/Color Arrow Room/Panel_you") != null: self.get_node("Panels/Color Arrow Room/Panel_you").answer = apclient.ap_user -- cgit 1.4.1 From f1fdf947e95761136b8abafe630fb1ba61ae3129 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 4 Feb 2024 13:15:35 -0500 Subject: More accurate wall snipe detection --- Archipelago/effects.gd | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Archipelago/effects.gd b/Archipelago/effects.gd index e830fbc..7d9df35 100644 --- a/Archipelago/effects.gd +++ b/Archipelago/effects.gd @@ -113,6 +113,9 @@ func deactivate_atbash_trap(): func show_puzzle_skip_message(node_path): + if puzzle_focused and node_path != puzzle_to_skip: + hide_puzzle_skip_message() + var panel_input = get_tree().get_root().get_node(node_path) if not panel_input.visible: return @@ -126,6 +129,7 @@ func show_puzzle_skip_message(node_path): puzzle_focused = true wallcast.enabled = true not_behind_wall = false + text_dirty = true puzzle_to_skip = node_path _evaluate_puzzle_skip() @@ -133,6 +137,8 @@ func show_puzzle_skip_message(node_path): func hide_puzzle_skip_message(): puzzle_focused = false wallcast.enabled = false + not_behind_wall = false + text_dirty = true _evaluate_puzzle_skip() @@ -188,11 +194,16 @@ func _tick_iceland(): func _process(_delta): if puzzle_focused: + var should_nbw = false if wallcast.is_colliding(): - var should_nbw = (get_tree().get_root().get_node("Spatial/player")._get_panel_from_ray(wallcast) != null) - if should_nbw != not_behind_wall: - not_behind_wall = true - text_dirty = true + var player = get_tree().get_root().get_node("Spatial/player") + var puzzlecast = player.get_node("pivot/camera/RayCast_sight") + var distance = puzzlecast.get_collision_point().distance_to(wallcast.get_collision_point()) + should_nbw = (distance < 0.05) + + if should_nbw != not_behind_wall: + not_behind_wall = should_nbw + text_dirty = true if text_dirty: text_dirty = false -- cgit 1.4.1 From 8175ffdc895392764613a8bb6c738c49926d5773 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 4 Feb 2024 13:22:18 -0500 Subject: Atbash Trap now stacks --- Archipelago/effects.gd | 22 +++++++++++++--------- Archipelago/panel.gd | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Archipelago/effects.gd b/Archipelago/effects.gd index 7d9df35..e6d2dcd 100644 --- a/Archipelago/effects.gd +++ b/Archipelago/effects.gd @@ -4,7 +4,7 @@ var activated = false var effect_running = false var slowness_remaining = 0 var iceland_remaining = 0 -var atbash_activated = false +var atbash_remaining = 0 var queued_iceland = 0 var skip_available = false var puzzle_focused = false @@ -93,21 +93,23 @@ func trigger_iceland_trap(): func trigger_atbash_trap(): - if not atbash_activated: - atbash_activated = true + var newly_atbash = (atbash_remaining == 0) + atbash_remaining += 1 + if newly_atbash: var apclient = global.get_node("Archipelago") apclient.evaluateSolvability() - text_dirty = true + text_dirty = true func deactivate_atbash_trap(): - if atbash_activated: - atbash_activated = false + if atbash_remaining > 0: + atbash_remaining -= 1 - var apclient = global.get_node("Archipelago") - apclient.evaluateSolvability() + if atbash_remaining == 0: + var apclient = global.get_node("Archipelago") + apclient.evaluateSolvability() text_dirty = true @@ -209,8 +211,10 @@ func _process(_delta): text_dirty = false var text = "" - if atbash_activated: + if atbash_remaining == 1: text += "Atbash Trap lasts until you solve a puzzle" + if atbash_remaining > 1: + text += ("Atbash Trap lasts until you solve %d puzzles" % atbash_remaining) if slowness_remaining > 0: if not text.empty(): text += "\n" diff --git a/Archipelago/panel.gd b/Archipelago/panel.gd index da5b572..aec18e8 100644 --- a/Archipelago/panel.gd +++ b/Archipelago/panel.gd @@ -46,7 +46,7 @@ func evaluate_solvability(): solvable = false if solvable: - if effects.atbash_activated: + if effects.atbash_remaining > 0: self.get_parent().get_node("Viewport/GUI/Panel/Label").text = atbash_text else: self.get_parent().get_node("Viewport/GUI/Panel/Label").text = orig_text -- cgit 1.4.1 From 72bb06c42fcab5c215ff034e8445c33057e0c23d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 4 Feb 2024 13:49:06 -0500 Subject: Persist traps between connections --- Archipelago/client.gd | 28 +++++++++++++++++++++++++++- Archipelago/effects.gd | 34 +++++++++++++++++++++++++++------- Archipelago/load.gd | 9 +++++++++ 3 files changed, 63 insertions(+), 8 deletions(-) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 788f6ca..3a2a783 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -112,6 +112,9 @@ var _progressive_progress = {} var _has_colors = ["white"] var _received_indexes = [] var _puzzle_skips = 0 +var _cached_slowness = 0 +var _cached_iceland = 0 +var _cached_atbash = 0 signal could_not_connect signal connect_status @@ -297,6 +300,21 @@ func _on_data(): if localdata.size() > 1: _puzzle_skips = localdata[1] + + if localdata.size() > 2: + _cached_slowness = localdata[2] + else: + _cached_slowness = 0 + + if localdata.size() > 3: + _cached_iceland = localdata[3] + else: + _cached_iceland = 0 + + if localdata.size() > 4: + _cached_atbash = localdata[4] + else: + _cached_atbash = 0 requestSync() @@ -450,7 +468,15 @@ func saveLocaldata(): var file = File.new() file.open(_localdata_file, File.WRITE) - var data = [_last_new_item, _puzzle_skips] + var effects_node = get_tree().get_root().get_node("Spatial/AP_Effects") + + var data = [ + _last_new_item, + _puzzle_skips, + effects_node.slowness_remaining, + effects_node.iceland_remaining, + effects_node.atbash_remaining + ] file.store_var(data, true) file.close() diff --git a/Archipelago/effects.gd b/Archipelago/effects.gd index e6d2dcd..1e2e311 100644 --- a/Archipelago/effects.gd +++ b/Archipelago/effects.gd @@ -58,13 +58,13 @@ func _ready(): func activate(): activated = true - for _i in range(0, queued_iceland): - trigger_iceland_trap() + if queued_iceland > 0: + trigger_iceland_trap(queued_iceland) queued_iceland = 0 -func trigger_slowness_trap(): +func trigger_slowness_trap(length = 30): if slowness_remaining == 0: var player = get_tree().get_root().get_node("Spatial/player") player.walk_speed = orig_walk / 2.0 @@ -72,13 +72,16 @@ func trigger_slowness_trap(): $SlownessTimer.start() - slowness_remaining += 30 + slowness_remaining += length text_dirty = true + var apclient = global.get_node("Archipelago") + apclient.saveLocaldata() -func trigger_iceland_trap(): + +func trigger_iceland_trap(length = 60): if not activated: - queued_iceland += 1 + queued_iceland += length return if iceland_remaining == 0: @@ -88,9 +91,12 @@ func trigger_iceland_trap(): $IcelandTimer.start() - iceland_remaining += 60 + iceland_remaining += length text_dirty = true + var apclient = global.get_node("Archipelago") + apclient.saveLocaldata() + func trigger_atbash_trap(): var newly_atbash = (atbash_remaining == 0) @@ -102,6 +108,9 @@ func trigger_atbash_trap(): text_dirty = true + var apclient = global.get_node("Archipelago") + apclient.saveLocaldata() + func deactivate_atbash_trap(): if atbash_remaining > 0: @@ -112,6 +121,9 @@ func deactivate_atbash_trap(): apclient.evaluateSolvability() text_dirty = true + + var apclient = global.get_node("Archipelago") + apclient.saveLocaldata() func show_puzzle_skip_message(node_path): @@ -180,6 +192,10 @@ func _tick_slowness(): player.run_speed = orig_run $SlownessTimer.stop() + + if slowness_remaining % 5 == 0: + var apclient = global.get_node("Archipelago") + apclient.saveLocaldata() func _tick_iceland(): @@ -192,6 +208,10 @@ func _tick_iceland(): ) $IcelandTimer.stop() + + if iceland_remaining % 5 == 0: + var apclient = global.get_node("Archipelago") + apclient.saveLocaldata() func _process(_delta): diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 7f86c91..a277817 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -565,6 +565,15 @@ func _load(): global._print("Hooked Load End") ._load() + # Activate any cached traps. + if apclient._cached_slowness > 0: + effects.trigger_slowness_trap(apclient._cached_slowness) + if apclient._cached_iceland > 0: + effects.trigger_iceland_trap(apclient._cached_iceland) + if apclient._cached_atbash > 0: + for _i in range(0, apclient._cached_atbash): + effects.trigger_atbash_trap() + # Process any items received while the map was loading, and send the checks # from the save load. apclient.mapFinishedLoading() -- cgit 1.4.1 From 80fd1584d1a39f7c28683019d61f56a2c69f8cc5 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 4 Feb 2024 13:50:36 -0500 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 3a2a783..06fb3a6 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -15,7 +15,7 @@ var ap_pass = "" var confusify_world = false var enable_multiplayer = false -const my_version = "1.1.0" +const my_version = "1.2.0" const ap_version = {"major": 0, "minor": 4, "build": 4, "class": "Version"} const color_items = [ "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" -- cgit 1.4.1 From 61790818f6779c9e272dc74feab888b73ed5312c Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 4 Feb 2024 14:14:06 -0500 Subject: Released v1.2.0 --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0983ad2..9915d06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # lingo-archipelago Releases +## v1.2.0 - 2024-02-04 + +- The "Press P to skip puzzle" message will no longer appear when the cursor is + over a panel that the player cannot see. These puzzles can still be skipped by + pressing P. +- Traps now persist after the game is closed. +- Atbash Traps now stack (e.g. if you receive two Atbash Traps, you must solve + two puzzles before the trap is deactivated). +- Fixed issue with the pearl painting potentially leading to two different + destinations in painting shuffle. +- Removed some unnecessary blocks. + +Download: +[lingo-archipelago-v1.2.0.zip](https://files.fourisland.com/releases/lingo-archipelago/lingo-archipelago-v1.2.0.zip)
+Source: [v1.2.0](https://code.fourisland.com/lingo-archipelago/tag/?h=v1.2.0) + ## v1.1.0 - 2024-01-11 - Confusify mode now removes tower floor indicators, turns tower doors black, -- cgit 1.4.1 From ceaff99432d67411de07ab8e5b6aa11911624566 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 9 Feb 2024 01:13:09 -0500 Subject: Fix panel count subtraction --- Archipelago/panelEnd.gd | 2 +- Archipelago/panelLevelSwitch.gd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Archipelago/panelEnd.gd b/Archipelago/panelEnd.gd index 81f07d6..136777d 100644 --- a/Archipelago/panelEnd.gd +++ b/Archipelago/panelEnd.gd @@ -4,4 +4,4 @@ extends "res://scripts/panelEnd.gd" func handle_correct(): # We don't call the base method because we want to suppress the original # behaviour. - global.solved -= 1 + pass diff --git a/Archipelago/panelLevelSwitch.gd b/Archipelago/panelLevelSwitch.gd index 06df02b..8c369ef 100644 --- a/Archipelago/panelLevelSwitch.gd +++ b/Archipelago/panelLevelSwitch.gd @@ -4,4 +4,4 @@ extends "res://scripts/panelLevelSwitch.gd" func handle_correct(): # We don't call the base method because we want to suppress the original # behaviour. - global.solved -= 1 + pass -- cgit 1.4.1