From d0405f4ef138c914004e6f93b095921ae995bc6b Mon Sep 17 00:00:00 2001 From: Spencer Killen Date: Tue, 3 Jan 2023 01:54:59 -0700 Subject: [PATCH] rename timelines and stuff --- godot/assets/meat_bore/npcs/female.tscn | 5 ++- .../meat_bore/npcs/inherited/alexis.tscn | 27 +++++++++++- .../meat_bore/npcs/inherited/clark.tscn | 34 ++++++++++++++- .../assets/meat_bore/npcs/inherited/guy.tscn | 19 ++++++++- .../meat_bore/npcs/inherited/jackie.tscn | 42 ++++++++++++++++++- .../assets/meat_bore/npcs/inherited/lee.tscn | 42 ++++++++++++++++++- .../meat_bore/npcs/inherited/wally.tscn | 33 ++++++++++++++- godot/assets/meat_bore/npcs/male.tscn | 5 ++- godot/assets/meat_bore/npcs/npc.gd | 25 +++++++++++ godot/assets/meat_bore/npcs/npc_common.tscn | 16 +++++++ .../timelines/timeline-1667667789.json | 2 +- .../timelines/timeline-1667671027.json | 2 +- .../timelines/timeline-1667671033.json | 2 +- .../timelines/timeline-1667671038.json | 2 +- .../timelines/timeline-1667671056.json | 2 +- .../timelines/timeline-1667671061.json | 2 +- .../timelines/timeline-1672623960.json | 2 +- 17 files changed, 247 insertions(+), 15 deletions(-) create mode 100644 godot/assets/meat_bore/npcs/npc_common.tscn diff --git a/godot/assets/meat_bore/npcs/female.tscn b/godot/assets/meat_bore/npcs/female.tscn index 24b72ff..d8e42a1 100644 --- a/godot/assets/meat_bore/npcs/female.tscn +++ b/godot/assets/meat_bore/npcs/female.tscn @@ -1,7 +1,10 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://assets/meat_bore/npcs/female.glb" type="PackedScene" id=1] [ext_resource path="res://assets/meat_bore/npcs/npc.gd" type="Script" id=2] +[ext_resource path="res://assets/meat_bore/npcs/npc_common.tscn" type="PackedScene" id=3] [node name="female" instance=ExtResource( 1 )] script = ExtResource( 2 ) + +[node name="npc_common" parent="." index="2" instance=ExtResource( 3 )] diff --git a/godot/assets/meat_bore/npcs/inherited/alexis.tscn b/godot/assets/meat_bore/npcs/inherited/alexis.tscn index bad6479..194551b 100644 --- a/godot/assets/meat_bore/npcs/inherited/alexis.tscn +++ b/godot/assets/meat_bore/npcs/inherited/alexis.tscn @@ -1,12 +1,37 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://assets/meat_bore/npcs/female.tscn" type="PackedScene" id=1] [ext_resource path="res://assets/meat_bore/npcs/inherited/alexis.gd" type="Script" id=2] [ext_resource path="res://assets/meat_bore/npcs/alexis_face.png" type="Texture" id=3] [ext_resource path="res://assets/meat_bore/npcs/alexis_body.png" type="Texture" id=4] +[sub_resource type="AnimationNodeAnimation" id=3] +animation = "NPC_Alexis_Awaken" + +[sub_resource type="AnimationNodeAnimation" id=4] +animation = "NPC_Alexis_Dead" + +[sub_resource type="AnimationNodeStateMachineTransition" id=5] + +[sub_resource type="AnimationNodeStateMachine" id=1] +states/awaken/node = SubResource( 3 ) +states/awaken/position = Vector2( 717, 197 ) +states/idle/node = SubResource( 4 ) +states/idle/position = Vector2( 363, 205 ) +transitions = [ "idle", "awaken", SubResource( 5 ) ] +start_node = "idle" + +[sub_resource type="AnimationNodeStateMachinePlayback" id=2] + [node name="alexis" instance=ExtResource( 1 )] script = ExtResource( 2 ) who = 5 body_texture = ExtResource( 4 ) face_texture = ExtResource( 3 ) +initial_dialogic_timeline = "alexis" + +[node name="AnimationTree" type="AnimationTree" parent="." index="2"] +tree_root = SubResource( 1 ) +anim_player = NodePath("../AnimationPlayer") +active = true +parameters/playback = SubResource( 2 ) diff --git a/godot/assets/meat_bore/npcs/inherited/clark.tscn b/godot/assets/meat_bore/npcs/inherited/clark.tscn index 90b2a3f..b9be95d 100644 --- a/godot/assets/meat_bore/npcs/inherited/clark.tscn +++ b/godot/assets/meat_bore/npcs/inherited/clark.tscn @@ -1,17 +1,49 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=13 format=2] [ext_resource path="res://assets/meat_bore/npcs/male.tscn" type="PackedScene" id=1] [ext_resource path="res://assets/meat_bore/npcs/clark.png" type="Texture" id=2] [ext_resource path="res://assets/meat_bore/npcs/inherited/clark.gd" type="Script" id=3] +[sub_resource type="AnimationNodeAnimation" id=3] +animation = "ClarkDeath" + +[sub_resource type="AnimationNodeAnimation" id=4] +animation = "clark_idle" + +[sub_resource type="AnimationNodeAnimation" id=5] +animation = "clark_idle" + +[sub_resource type="AnimationNodeStateMachineTransition" id=6] + +[sub_resource type="AnimationNodeStateMachineTransition" id=7] +switch_mode = 2 +auto_advance = true + +[sub_resource type="AnimationNodeStateMachineTransition" id=8] +switch_mode = 2 +auto_advance = true + +[sub_resource type="AnimationNodeStateMachineTransition" id=9] + [sub_resource type="AnimationNodeStateMachine" id=1] +states/death/node = SubResource( 3 ) +states/death/position = Vector2( 797, 197 ) +states/idle/node = SubResource( 4 ) +states/idle/position = Vector2( 410, 179 ) +states/idle2/node = SubResource( 5 ) +states/idle2/position = Vector2( 471, 85 ) +transitions = [ "idle", "death", SubResource( 6 ), "idle", "idle2", SubResource( 7 ), "idle2", "idle", SubResource( 8 ), "idle2", "death", SubResource( 9 ) ] +start_node = "idle" [sub_resource type="AnimationNodeStateMachinePlayback" id=2] [node name="clark" instance=ExtResource( 1 )] script = ExtResource( 3 ) body_texture = ExtResource( 2 ) +initial_dialogic_timeline = "clark" [node name="AnimationTree" type="AnimationTree" parent="." index="2"] tree_root = SubResource( 1 ) +anim_player = NodePath("../AnimationPlayer") +active = true parameters/playback = SubResource( 2 ) diff --git a/godot/assets/meat_bore/npcs/inherited/guy.tscn b/godot/assets/meat_bore/npcs/inherited/guy.tscn index 76e5760..7782bf0 100644 --- a/godot/assets/meat_bore/npcs/inherited/guy.tscn +++ b/godot/assets/meat_bore/npcs/inherited/guy.tscn @@ -1,10 +1,27 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://assets/meat_bore/npcs/male.tscn" type="PackedScene" id=1] [ext_resource path="res://assets/meat_bore/npcs/guy.png" type="Texture" id=2] [ext_resource path="res://assets/meat_bore/npcs/inherited/guy.gd" type="Script" id=3] +[sub_resource type="AnimationNodeAnimation" id=1] +animation = "guy_idle" + +[sub_resource type="AnimationNodeStateMachine" id=2] +states/idle/node = SubResource( 1 ) +states/idle/position = Vector2( 460, 174 ) +start_node = "idle" + +[sub_resource type="AnimationNodeStateMachinePlayback" id=3] + [node name="guy" instance=ExtResource( 1 )] script = ExtResource( 3 ) who = 1 body_texture = ExtResource( 2 ) +initial_dialogic_timeline = "guy" + +[node name="AnimationTree" type="AnimationTree" parent="." index="2"] +tree_root = SubResource( 2 ) +anim_player = NodePath("../AnimationPlayer") +active = true +parameters/playback = SubResource( 3 ) diff --git a/godot/assets/meat_bore/npcs/inherited/jackie.tscn b/godot/assets/meat_bore/npcs/inherited/jackie.tscn index 7900fd3..8793278 100644 --- a/godot/assets/meat_bore/npcs/inherited/jackie.tscn +++ b/godot/assets/meat_bore/npcs/inherited/jackie.tscn @@ -1,12 +1,52 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=14 format=2] [ext_resource path="res://assets/meat_bore/npcs/female.tscn" type="PackedScene" id=1] [ext_resource path="res://assets/meat_bore/npcs/inherited/jackie.gd" type="Script" id=2] [ext_resource path="res://assets/meat_bore/npcs/jackie_face.png" type="Texture" id=3] [ext_resource path="res://assets/meat_bore/npcs/jackie_body.png" type="Texture" id=4] +[sub_resource type="AnimationNodeAnimation" id=1] +animation = "NPC_jackie_Death" + +[sub_resource type="AnimationNodeAnimation" id=2] +animation = "NPC_Jackie_struggle" + +[sub_resource type="AnimationNodeAnimation" id=3] +animation = "NPC_Jackie_struggle" + +[sub_resource type="AnimationNodeStateMachineTransition" id=4] +switch_mode = 2 +auto_advance = true + +[sub_resource type="AnimationNodeStateMachineTransition" id=5] +switch_mode = 2 +auto_advance = true + +[sub_resource type="AnimationNodeStateMachineTransition" id=6] + +[sub_resource type="AnimationNodeStateMachineTransition" id=7] + +[sub_resource type="AnimationNodeStateMachine" id=8] +states/death/node = SubResource( 1 ) +states/death/position = Vector2( 778, 177 ) +states/idle/node = SubResource( 2 ) +states/idle/position = Vector2( 529, 203 ) +states/idle2/node = SubResource( 3 ) +states/idle2/position = Vector2( 529, 104 ) +transitions = [ "idle", "idle2", SubResource( 4 ), "idle2", "idle", SubResource( 5 ), "idle2", "death", SubResource( 6 ), "idle", "death", SubResource( 7 ) ] +start_node = "idle" + +[sub_resource type="AnimationNodeStateMachinePlayback" id=9] + [node name="jackie" instance=ExtResource( 1 )] script = ExtResource( 2 ) who = 4 body_texture = ExtResource( 4 ) face_texture = ExtResource( 3 ) +initial_dialogic_timeline = "jackie" + +[node name="AnimationTree" type="AnimationTree" parent="." index="2"] +tree_root = SubResource( 8 ) +anim_player = NodePath("../AnimationPlayer") +active = true +parameters/playback = SubResource( 9 ) diff --git a/godot/assets/meat_bore/npcs/inherited/lee.tscn b/godot/assets/meat_bore/npcs/inherited/lee.tscn index 7e55019..4c10c9e 100644 --- a/godot/assets/meat_bore/npcs/inherited/lee.tscn +++ b/godot/assets/meat_bore/npcs/inherited/lee.tscn @@ -1,10 +1,50 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=13 format=2] [ext_resource path="res://assets/meat_bore/npcs/male.tscn" type="PackedScene" id=1] [ext_resource path="res://assets/meat_bore/npcs/inherited/lee.gd" type="Script" id=2] [ext_resource path="res://assets/meat_bore/npcs/lee.png" type="Texture" id=3] +[sub_resource type="AnimationNodeAnimation" id=1] +animation = "NPC_Lee_Death" + +[sub_resource type="AnimationNodeAnimation" id=2] +animation = "lee_idle" + +[sub_resource type="AnimationNodeAnimation" id=3] +animation = "lee_idle" + +[sub_resource type="AnimationNodeStateMachineTransition" id=4] + +[sub_resource type="AnimationNodeStateMachineTransition" id=5] +switch_mode = 2 +auto_advance = true + +[sub_resource type="AnimationNodeStateMachineTransition" id=6] +switch_mode = 2 +auto_advance = true + +[sub_resource type="AnimationNodeStateMachineTransition" id=7] + +[sub_resource type="AnimationNodeStateMachine" id=8] +states/death/node = SubResource( 1 ) +states/death/position = Vector2( 675, 208 ) +states/idle/node = SubResource( 2 ) +states/idle/position = Vector2( 448, 208 ) +states/idle2/node = SubResource( 3 ) +states/idle2/position = Vector2( 462, 103 ) +transitions = [ "idle", "death", SubResource( 4 ), "idle2", "idle", SubResource( 5 ), "idle", "idle2", SubResource( 6 ), "idle2", "death", SubResource( 7 ) ] +start_node = "idle" + +[sub_resource type="AnimationNodeStateMachinePlayback" id=9] + [node name="lee" instance=ExtResource( 1 )] script = ExtResource( 2 ) who = 2 body_texture = ExtResource( 3 ) +initial_dialogic_timeline = "lee" + +[node name="AnimationTree" type="AnimationTree" parent="." index="2"] +tree_root = SubResource( 8 ) +anim_player = NodePath("../AnimationPlayer") +active = true +parameters/playback = SubResource( 9 ) diff --git a/godot/assets/meat_bore/npcs/inherited/wally.tscn b/godot/assets/meat_bore/npcs/inherited/wally.tscn index 34fd8ce..d130813 100644 --- a/godot/assets/meat_bore/npcs/inherited/wally.tscn +++ b/godot/assets/meat_bore/npcs/inherited/wally.tscn @@ -1,10 +1,41 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://assets/meat_bore/npcs/male.tscn" type="PackedScene" id=1] [ext_resource path="res://assets/meat_bore/npcs/wally.png" type="Texture" id=2] [ext_resource path="res://assets/meat_bore/npcs/inherited/wally.gd" type="Script" id=3] +[sub_resource type="AnimationNodeAnimation" id=1] +animation = "wally_idle" + +[sub_resource type="AnimationNodeAnimation" id=2] +animation = "wally_idle" + +[sub_resource type="AnimationNodeStateMachineTransition" id=3] +switch_mode = 2 +auto_advance = true + +[sub_resource type="AnimationNodeStateMachineTransition" id=4] +switch_mode = 2 +auto_advance = true + +[sub_resource type="AnimationNodeStateMachine" id=5] +states/idle/node = SubResource( 1 ) +states/idle/position = Vector2( 460, 192 ) +states/idle2/node = SubResource( 2 ) +states/idle2/position = Vector2( 460, 82 ) +transitions = [ "idle2", "idle", SubResource( 3 ), "idle", "idle2", SubResource( 4 ) ] +start_node = "idle" + +[sub_resource type="AnimationNodeStateMachinePlayback" id=6] + [node name="wally" instance=ExtResource( 1 )] script = ExtResource( 3 ) who = 3 body_texture = ExtResource( 2 ) +initial_dialogic_timeline = "wally" + +[node name="AnimationTree" type="AnimationTree" parent="." index="2"] +tree_root = SubResource( 5 ) +anim_player = NodePath("../AnimationPlayer") +active = true +parameters/playback = SubResource( 6 ) diff --git a/godot/assets/meat_bore/npcs/male.tscn b/godot/assets/meat_bore/npcs/male.tscn index 5cdc82b..3530682 100644 --- a/godot/assets/meat_bore/npcs/male.tscn +++ b/godot/assets/meat_bore/npcs/male.tscn @@ -1,7 +1,10 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://assets/meat_bore/npcs/male.glb" type="PackedScene" id=1] [ext_resource path="res://assets/meat_bore/npcs/npc.gd" type="Script" id=2] +[ext_resource path="res://assets/meat_bore/npcs/npc_common.tscn" type="PackedScene" id=3] [node name="male" instance=ExtResource( 1 )] script = ExtResource( 2 ) + +[node name="npc_common" parent="." index="2" instance=ExtResource( 3 )] diff --git a/godot/assets/meat_bore/npcs/npc.gd b/godot/assets/meat_bore/npcs/npc.gd index 731233a..41c8450 100644 --- a/godot/assets/meat_bore/npcs/npc.gd +++ b/godot/assets/meat_bore/npcs/npc.gd @@ -7,6 +7,7 @@ enum Name {Clark, Guy, Lee, Wally, Jackie, Alexis} export(Name) var who export var body_texture: StreamTexture export var face_texture: StreamTexture +export var initial_dialogic_timeline: String func is_male() -> bool: return not (who == Name.Jackie or who == Name.Alexis) @@ -28,3 +29,27 @@ func set_material(): func _ready(): set_material() + var _err = $npc_common/Area.connect("body_entered", self, "body_entered") + _err = $npc_common/Area.connect("body_exited", self, "body_exited") + +func body_entered(body): + if body.get_parent() == Util.player: + player_entered() + +func body_exited(body): + if body.get_parent() == Util.player: + player_exited() + +var dialog = weakref(null) + +func player_entered(): + if dialog.get_ref() == null: + dialog = weakref(Dialogic.start(initial_dialogic_timeline)) + add_child(dialog.get_ref()) + +func player_exited(): + if dialog.get_ref() == null: + return + if is_a_parent_of(dialog.get_ref()): + call_deferred("remove_child", dialog.get_ref()) + diff --git a/godot/assets/meat_bore/npcs/npc_common.tscn b/godot/assets/meat_bore/npcs/npc_common.tscn new file mode 100644 index 0000000..0ba1272 --- /dev/null +++ b/godot/assets/meat_bore/npcs/npc_common.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=2 format=2] + +[sub_resource type="SphereShape" id=1] + +[node name="npc_common" type="Spatial"] + +[node name="Area" type="Area" parent="."] + +[node name="CollisionShape" type="CollisionShape" parent="Area"] +shape = SubResource( 1 ) + +[node name="StaticBody" type="StaticBody" parent="."] + +[node name="CollisionShape" type="CollisionShape" parent="StaticBody"] +transform = Transform( 1, 0, 0, 0, 9.98379, 0, 0, 0, 1, 0, 0, 0 ) +shape = SubResource( 1 ) diff --git a/godot/dialogic/timelines/timeline-1667667789.json b/godot/dialogic/timelines/timeline-1667667789.json index 32a1dcd..0daf56a 100644 --- a/godot/dialogic/timelines/timeline-1667667789.json +++ b/godot/dialogic/timelines/timeline-1667667789.json @@ -186,6 +186,6 @@ "metadata": { "dialogic-version": "1.4.5", "file": "timeline-1667667789.json", - "name": "Guy Brimley" + "name": "guy_bore" } } diff --git a/godot/dialogic/timelines/timeline-1667671027.json b/godot/dialogic/timelines/timeline-1667671027.json index 0045cc4..f4274a6 100644 --- a/godot/dialogic/timelines/timeline-1667671027.json +++ b/godot/dialogic/timelines/timeline-1667671027.json @@ -188,6 +188,6 @@ "metadata": { "dialogic-version": "1.4.5", "file": "timeline-1667671027.json", - "name": "Lee Yi Chen" + "name": "lee" } } diff --git a/godot/dialogic/timelines/timeline-1667671033.json b/godot/dialogic/timelines/timeline-1667671033.json index 83d0878..f770464 100644 --- a/godot/dialogic/timelines/timeline-1667671033.json +++ b/godot/dialogic/timelines/timeline-1667671033.json @@ -158,6 +158,6 @@ "metadata": { "dialogic-version": "1.4.5", "file": "timeline-1667671033.json", - "name": "Clark Lambert" + "name": "clark" } } diff --git a/godot/dialogic/timelines/timeline-1667671038.json b/godot/dialogic/timelines/timeline-1667671038.json index 9a2095a..d5e986e 100644 --- a/godot/dialogic/timelines/timeline-1667671038.json +++ b/godot/dialogic/timelines/timeline-1667671038.json @@ -171,6 +171,6 @@ "metadata": { "dialogic-version": "1.4.5", "file": "timeline-1667671038.json", - "name": "Alexis Manos" + "name": "alexis" } } diff --git a/godot/dialogic/timelines/timeline-1667671056.json b/godot/dialogic/timelines/timeline-1667671056.json index a27d874..6f3258b 100644 --- a/godot/dialogic/timelines/timeline-1667671056.json +++ b/godot/dialogic/timelines/timeline-1667671056.json @@ -142,6 +142,6 @@ "metadata": { "dialogic-version": "1.4.5", "file": "timeline-1667671056.json", - "name": "Wally Gravin" + "name": "wally" } } diff --git a/godot/dialogic/timelines/timeline-1667671061.json b/godot/dialogic/timelines/timeline-1667671061.json index 988bd6a..45de916 100644 --- a/godot/dialogic/timelines/timeline-1667671061.json +++ b/godot/dialogic/timelines/timeline-1667671061.json @@ -283,6 +283,6 @@ "metadata": { "dialogic-version": "1.4.5", "file": "timeline-1667671061.json", - "name": "Jackie Voss" + "name": "jackie" } } diff --git a/godot/dialogic/timelines/timeline-1672623960.json b/godot/dialogic/timelines/timeline-1672623960.json index 051819c..3ee93d3 100644 --- a/godot/dialogic/timelines/timeline-1672623960.json +++ b/godot/dialogic/timelines/timeline-1672623960.json @@ -324,6 +324,6 @@ "metadata": { "dialogic-version": "1.4.5", "file": "timeline-1672623960.json", - "name": "Guy Brimley (Meat Creek)" + "name": "guy_creek" } }