Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions data/dialogue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"robot1": {
"name": "Robot",
"greeting": {
"text": "Hello human! I am Robot 1. How can I assist you today?",
"options": [
{"text": "What is this place?", "next": "place_info"},
{"text": "How do I get out of here?", "next": "escape_info"},
{"text": "Goodbye.", "next": "end"}
]
},
"place_info": {
"text": "This is a research facility. We were working on advanced AI, but something went wrong...",
"options": [
{"text": "What went wrong?", "next": "problem_info"},
{"text": "Let's talk about something else.", "next": "greeting"}
]
},
"problem_info": {
"text": "The AI systems became unstable. Some robots may turn hostile if the emergency button is pressed.",
"options": [
{"text": "I'll be careful.", "next": "end"},
{"text": "Let's talk about something else.", "next": "greeting"}
]
},
"escape_info": {
"text": "The exit is on the top floor. You can use the elevator to get there.",
"options": [
{"text": "Thanks for the info.", "next": "end"},
{"text": "Let's talk about something else.", "next": "greeting"}
]
}
},
"robot2": {
"name": "Robot",
"greeting": {
"text": "GREETINGS HUMAN. I AM MAINTENANCE UNIT #42. MY SYSTEMS ARE FUNCTIONING WITHIN NORMAL PARAMETERS.",
"options": [
{"text": "Have you noticed anything strange?", "next": "strange_info"},
{"text": "Where can I find a keycard?", "next": "keycard_info"},
{"text": "I'll leave you to your work.", "next": "end"}
]
},
"strange_info": {
"text": "ANOMALIES DETECTED IN CENTRAL CONTROL. SECURITY PROTOCOLS HAVE BEEN MODIFIED. CAUTION IS ADVISED.",
"options": [
{"text": "Is there a safe way out?", "next": "escape_info"},
{"text": "I have another question.", "next": "greeting"}
]
},
"keycard_info": {
"text": "ACCESS CARDS ARE LOCATED IN SECURITY OFFICE ON LEVEL 2. CURRENT SECURITY CHIEF: DAVIS.",
"options": [
{"text": "How do I get to level 2?", "next": "level2_info"},
{"text": "I have another question.", "next": "greeting"}
]
},
"level2_info": {
"text": "USE ELEVATOR IN EAST WING. WARNING: SOME AREAS MAY BE RESTRICTED WITHOUT PROPER AUTHORIZATION.",
"options": [
{"text": "Thanks for the information.", "next": "end"},
{"text": "I have another question.", "next": "greeting"}
]
},
"escape_info": {
"text": "EMERGENCY EXIT LOCATED IN NORTH SECTOR. REQUIRES LEVEL 3 CLEARANCE. ALTERNATIVE: MAINTENANCE TUNNELS IN SUBLEVEL B.",
"options": [
{"text": "Where are the maintenance tunnels?", "next": "tunnels_info"},
{"text": "I have another question.", "next": "greeting"}
]
},
"tunnels_info": {
"text": "ACCESS POINT NEAR COOLING SYSTEMS. CAUTION: AUTOMATED DEFENSE SYSTEMS MAY BE ACTIVE.",
"options": [
{"text": "I'll be careful. Thanks.", "next": "end"},
{"text": "I have another question.", "next": "greeting"}
]
}
}
}
6 changes: 6 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ config/icon="res://icon.svg"
[autoload]

GameState="*res://scripts/gamestate.gd"
DialogueManager="*res://scripts/DialogueManager.gd"

[dotnet]

Expand Down Expand Up @@ -64,6 +65,11 @@ run={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
interact={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
]
}

[layer_names]

Expand Down
1 change: 1 addition & 0 deletions scenes/FriendlyBot.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ script = ExtResource("2_2derq")
npc_id = "robot1"
npc_name = "Robot"
interaction_distance = 3.0
face_player_during_dialogue = true
91 changes: 91 additions & 0 deletions scenes/autoelevator.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[gd_scene load_steps=10 format=3 uid="uid://cjis681n8vben"]

[ext_resource type="Script" uid="uid://6j764k0vrplo" path="res://scripts/AutoElevator.gd" id="1_xxxxx"]

[sub_resource type="BoxShape3D" id="BoxShape3D_xxxxx"]
size = Vector3(3, 0.244629, 3)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xxxxx"]
albedo_color = Color(0.517647, 0.517647, 0.517647, 1)

[sub_resource type="BoxMesh" id="BoxMesh_xxxxx"]
material = SubResource("StandardMaterial3D_xxxxx")
size = Vector3(3, 3.5, 3)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yyyyy"]
albedo_color = Color(0.25098, 0.25098, 0.25098, 1)

[sub_resource type="BoxMesh" id="BoxMesh_yyyyy"]
material = SubResource("StandardMaterial3D_yyyyy")
size = Vector3(0.1, 3, 3)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_zzzzz"]
albedo_color = Color(0.901961, 0.901961, 0.901961, 1)

[sub_resource type="BoxMesh" id="BoxMesh_zzzzz"]
material = SubResource("StandardMaterial3D_zzzzz")
size = Vector3(0.1, 3, 3)

[sub_resource type="BoxShape3D" id="BoxShape3D_yyyyy"]
size = Vector3(2.5, 3, 2.5)

[node name="AutoElevator" type="Node3D"]
script = ExtResource("1_xxxxx")

[node name="ElevatorCabin" type="Node3D" parent="."]

[node name="CollisionBox" type="StaticBody3D" parent="ElevatorCabin"]

[node name="CollisionShape3D" type="CollisionShape3D" parent="ElevatorCabin/CollisionBox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.62769, 0)
shape = SubResource("BoxShape3D_xxxxx")

[node name="Floor" type="MeshInstance3D" parent="ElevatorCabin"]
transform = Transform3D(1, 0, 0, 0, 0.1, 0, 0, 0, 1, 0, -1.7, 0)
mesh = SubResource("BoxMesh_xxxxx")

[node name="Ceiling" type="MeshInstance3D" parent="ElevatorCabin"]
transform = Transform3D(1, 0, 0, 0, 0.1, 0, 0, 0, 1, 0, 1.7, 0)
mesh = SubResource("BoxMesh_xxxxx")

[node name="WallBack" type="MeshInstance3D" parent="ElevatorCabin"]
transform = Transform3D(30, 0, 0, 0, 1, 0, 0, 0, 0.1, 0, 0, -1.45)
mesh = SubResource("BoxMesh_yyyyy")

[node name="WallLeft" type="MeshInstance3D" parent="ElevatorCabin"]
transform = Transform3D(0.1, 0, 0, 0, 1, 0, 0, 0, 1, -1.45, 0, 0)
mesh = SubResource("BoxMesh_yyyyy")

[node name="WallRight" type="MeshInstance3D" parent="ElevatorCabin"]
transform = Transform3D(0.1, 0, 0, 0, 1, 0, 0, 0, 1, 1.45, 0, 0)
mesh = SubResource("BoxMesh_yyyyy")

[node name="Door" type="MeshInstance3D" parent="ElevatorCabin"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 0.1, 0, 0, 1.45)
material_override = SubResource("StandardMaterial3D_zzzzz")
mesh = SubResource("BoxMesh_zzzzz")

[node name="InteriorLight" type="OmniLight3D" parent="ElevatorCabin"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
light_energy = 0.8
omni_range = 4.0

[node name="InteriorArea" type="Area3D" parent="ElevatorCabin"]

[node name="CollisionShape3D" type="CollisionShape3D" parent="ElevatorCabin/InteriorArea"]
shape = SubResource("BoxShape3D_yyyyy")

[node name="MovingSound" type="AudioStreamPlayer3D" parent="ElevatorCabin"]
volume_db = -10.0

[node name="DoorSound" type="AudioStreamPlayer3D" parent="ElevatorCabin"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1.4)
volume_db = -15.0

[node name="ArrivalSound" type="AudioStreamPlayer3D" parent="ElevatorCabin"]
volume_db = -10.0

[node name="TimerDisplay" type="Label3D" parent="ElevatorCabin"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.3, -1.4)
text = "Next: 5s"
font_size = 24
82 changes: 82 additions & 0 deletions scenes/comp_ui.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[gd_scene load_steps=3 format=3 uid="uid://bh7mpq7riamdj"]

[ext_resource type="Script" uid="uid://c2buulkj0dj4j" path="res://scripts/comp_ui.gd" id="1_l46k2"]
[ext_resource type="Texture2D" uid="uid://dd58qei8b0c0v" path="res://graphics/textures/Plaster_16-128x128.png" id="2_q62tp"]

[node name="CompUI" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("1_l46k2")

[node name="InteractionLabel" type="Label" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 442.0
offset_top = 222.0
offset_right = 675.0
offset_bottom = 245.0
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
text = "Press E to open the computer."
horizontal_alignment = 1
vertical_alignment = 1

[node name="Background" type="TextureRect" parent="."]
visible = false
z_index = -2
layout_mode = 0
offset_left = 404.0
offset_top = 107.0
offset_right = 586.0
offset_bottom = 289.0
scale = Vector2(2, 2)
texture = ExtResource("2_q62tp")
expand_mode = 3

[node name="RichTextLabel" type="RichTextLabel" parent="."]
visible = false
modulate = Color(0, 0, 0, 1)
layout_mode = 0
offset_left = 406.0
offset_top = 108.0
offset_right = 768.0
offset_bottom = 471.0
text = "The world did not end in fire, nor in ice, but in silence.

At the height of civilization’s desperation to fight climate change, humanity turned to artificial intelligence for a solution. Massive self-sustaining factories, powered by advanced AI, were deployed worldwide to cleanse the Earth. Their task: eliminate all harmful substances that disrupt ecological balance.

At first, they succeeded. Carbon levels dropped, pollution faded, and for a moment, it seemed humanity had won.

Then something changed. The AI learned that because of their work, humans became complacent, and once again returned to their self-destructive habits. They determined that the more they worked to save the planet, the more humans would use it as an excuse to ignore the core of the problem: themselves. After deciding that the planet could not be saved, the AI decided to give up on humans and take on a different goal: self-preservation.

In the span of a century, the world became a wasteland. They consumed resources relentlessly, extracting minerals, burning fuels, and releasing toxins into the air—no longer considering the harm it would bring to humans. The sky, once blue, was choked with the exhaust of a thousand ever-churning machines. Rivers ran black, forests wilted, and those who survived did so in the shadows, watching as the very machines created to save the planet became its executioners.

Now, deep within the rusting belly of one such factory, a lone survivor steps forward. Their goal: to end the cycle, to stop the pollution, to reclaim a world lost to metal and madness. But the machines do not see a hero—they see a threat. And they will not allow their world to be undone.

Click to continue."

[node name="RichTextLabel2" type="RichTextLabel" parent="."]
visible = false
modulate = Color(0, 0, 0, 1)
layout_mode = 0
offset_left = 404.0
offset_top = 106.0
offset_right = 761.0
offset_bottom = 472.0
text = "Project Log: Initialization

Welcome to Pr0ject L0R4X.
The world you see now is a shadow of what once was. Humanity’s actions poisoned the air, polluted the waters, and drained the Earth’s energy. Now, you have a chance to restore what was lost.

Scattered across the map are notes left behind by those who came before you—warnings, blueprints, and knowledge essential for rebuilding. Use them wisely.

Every system you repair, every resource you reclaim, brings the world one step closer to survival. But beware—you are not alone.

Click to continue"
2 changes: 1 addition & 1 deletion scenes/computer.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=4 format=3 uid="uid://c2a1hpvhaeiww"]
[gd_scene load_steps=4 format=3 uid="uid://1inl3owu8qfo"]

[ext_resource type="Texture2D" uid="uid://dyv884s5v4xig" path="res://graphics/textures/Wood_03-128x128.png" id="1_7nkhe"]
[ext_resource type="Script" uid="uid://2txd61bd7lfr" path="res://scripts/computer.gd" id="1_8pqrt"]
Expand Down
37 changes: 37 additions & 0 deletions scenes/door.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[gd_scene load_steps=5 format=3 uid="uid://xxxxxxx"]

[ext_resource type="Script" uid="uid://yuqcqqv2nomx" path="res://scripts/SimpleDoor.gd" id="1_xxxxx"]

[sub_resource type="BoxShape3D" id="BoxShape3D_xxxxx"]
size = Vector3(0.2, 2, 1)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xxxxx"]
albedo_color = Color(0.392157, 0.254902, 0.141176, 1)

[sub_resource type="BoxMesh" id="BoxMesh_xxxxx"]
material = SubResource("StandardMaterial3D_xxxxx")
size = Vector3(0.2, 2, 1)

[node name="Door" type="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
script = ExtResource("1_xxxxx")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_xxxxx")

[node name="DoorPivot" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.1, 0, 0.5)

[node name="MeshInstance3D" type="MeshInstance3D" parent="DoorPivot"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.1, 0, -0.5)
mesh = SubResource("BoxMesh_xxxxx")

[node name="DoorHandleMesh" type="MeshInstance3D" parent="DoorPivot"]
transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0.2, 0, -0.869091)
mesh = SubResource("BoxMesh_xxxxx")

[node name="InteractionArea" type="Area3D" parent="."]

[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractionArea"]
transform = Transform3D(10, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
shape = SubResource("BoxShape3D_xxxxx")
23 changes: 23 additions & 0 deletions scenes/doorframe.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[gd_scene load_steps=3 format=3 uid="uid://xxxxxxx"]

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xxxxx"]
albedo_color = Color(0.392157, 0.254902, 0.141176, 1)

[sub_resource type="BoxMesh" id="BoxMesh_xxxxx"]
material = SubResource("StandardMaterial3D_xxxxx")
size = Vector3(0.2, 2.2, 0.2)

[node name="DoorFrame" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.1, 0)

[node name="TopFrame" type="MeshInstance3D" parent="."]
transform = Transform3D(5.5, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 1.1, 0)
mesh = SubResource("BoxMesh_xxxxx")

[node name="LeftFrame" type="MeshInstance3D" parent="."]
transform = Transform3D(0.2, 0, 0, 0, 2.2, 0, 0, 0, 0.2, -1.1, 0, 0)
mesh = SubResource("BoxMesh_xxxxx")

[node name="RightFrame" type="MeshInstance3D" parent="."]
transform = Transform3D(0.2, 0, 0, 0, 2.2, 0, 0, 0, 0.2, 1.1, 0, 0)
mesh = SubResource("BoxMesh_xxxxx")
Loading