began making humanoid NPCs

This commit is contained in:
2023-02-22 11:19:35 +01:00
parent 43bbd5d032
commit ca1957d618
8 changed files with 193 additions and 41 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://boewsqe4b5yxm"
path="res://.godot/imported/dummy-npc-atlas.png-e769aca31bd129eff0fec532dee91f95.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/debug/dummy-npc-atlas.png"
dest_files=["res://.godot/imported/dummy-npc-atlas.png-e769aca31bd129eff0fec532dee91f95.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

118
scenes/base_npc.tscn Normal file
View File

@@ -0,0 +1,118 @@
[gd_scene load_steps=14 format=3 uid="uid://brh4u8w48v7po"]
[ext_resource type="Texture2D" uid="uid://boewsqe4b5yxm" path="res://assets/textures/debug/dummy-npc-atlas.png" id="1_feq0g"]
[ext_resource type="PackedScene" uid="uid://bu1xkt4xi58ox" path="res://scenes/dialog_trigger_area.tscn" id="2_cjcdi"]
[sub_resource type="AtlasTexture" id="AtlasTexture_0drx1"]
atlas = ExtResource("1_feq0g")
region = Rect2(0, 0, 84, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_gmcfr"]
atlas = ExtResource("1_feq0g")
region = Rect2(84, 0, 84, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_1fq5y"]
atlas = ExtResource("1_feq0g")
region = Rect2(168, 0, 84, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_8pv6w"]
atlas = ExtResource("1_feq0g")
region = Rect2(252, 0, 84, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_rrbg8"]
atlas = ExtResource("1_feq0g")
region = Rect2(252, 128, 84, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_dwitn"]
atlas = ExtResource("1_feq0g")
region = Rect2(0, 128, 84, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_cg6mx"]
atlas = ExtResource("1_feq0g")
region = Rect2(84, 128, 84, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_bk3e1"]
atlas = ExtResource("1_feq0g")
region = Rect2(168, 128, 84, 128)
[sub_resource type="SpriteFrames" id="SpriteFrames_rr6ht"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_0drx1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gmcfr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0drx1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1fq5y")
}],
"loop": true,
"name": &"move_down",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_8pv6w")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rrbg8")
}],
"loop": true,
"name": &"move_side",
"speed": 4.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_dwitn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cg6mx")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dwitn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bk3e1")
}],
"loop": true,
"name": &"move_up",
"speed": 5.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_rsgcw"]
radius = 7.99997
height = 32.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_sgrqb"]
size = Vector2(64, 100)
[node name="base_npc" type="CharacterBody2D"]
[node name="animated_sprite_2d" type="AnimatedSprite2D" parent="."]
texture_filter = 1
scale = Vector2(0.733398, 0.733398)
sprite_frames = SubResource("SpriteFrames_rr6ht")
animation = &"move_down"
frame_progress = 0.781605
metadata/_edit_lock_ = true
[node name="collision_shape" type="CollisionShape2D" parent="."]
position = Vector2(0, 38)
rotation = 1.57345
shape = SubResource("CapsuleShape2D_rsgcw")
metadata/_edit_lock_ = true
[node name="dialog_trigger_area" parent="." instance=ExtResource("2_cjcdi")]
file = "res://assets/lang/en/dialogue/npcs/villager_normal.json"
title = "Debug NPC"
metadata/_edit_lock_ = true
[node name="collision_shape_2d" parent="dialog_trigger_area" index="0"]
shape = SubResource("RectangleShape2D_sgrqb")
metadata/_edit_lock_ = true
[editable path="dialog_trigger_area"]

View File

@@ -18,6 +18,7 @@ offset_bottom = 189.0
custom_minimum_size = Vector2(0, 150)
layout_mode = 2
focus_mode = 2
theme_override_colors/default_color = Color(0, 1, 0, 1)
bbcode_enabled = true
text = "[color=red][b]USING CHEATS MAY PAUSE ACHIEVEMENTS WHILE THE CHEATS ARE ACTIVE[/b][/color]
"
@@ -26,6 +27,8 @@ selection_enabled = true
[node name="line_edit" type="LineEdit" parent="v_box_container"]
layout_mode = 2
theme_override_colors/font_color = Color(0, 1, 0, 1)
theme_override_colors/caret_color = Color(0, 1, 0, 1)
placeholder_text = "Type in cheat or command. Use \"help\" for help."
max_length = 200
context_menu_enabled = false

View File

@@ -1,7 +1,8 @@
[gd_scene load_steps=7 format=3 uid="uid://darnmy8nv11mc"]
[gd_scene load_steps=8 format=3 uid="uid://darnmy8nv11mc"]
[ext_resource type="TileSet" uid="uid://txl24cadn8t4" path="res://tilesets/main_tileset.tres" id="1_hewr6"]
[ext_resource type="TileSet" uid="uid://dcg1tdmkkx22p" path="res://tilesets/main_tileset.tres" id="1_hewr6"]
[ext_resource type="PackedScene" uid="uid://bxaheg7l4h1ip" path="res://scenes/player.tscn" id="2_0skrb"]
[ext_resource type="PackedScene" uid="uid://brh4u8w48v7po" path="res://scenes/base_npc.tscn" id="3_dxdug"]
[sub_resource type="SegmentShape2D" id="SegmentShape2D_4m3b4"]
resource_local_to_scene = true
@@ -39,7 +40,7 @@ layer_1/modulate = Color(1, 1, 1, 1)
layer_1/y_sort_enabled = true
layer_1/y_sort_origin = 0
layer_1/z_index = 0
layer_1/tile_data = PackedInt32Array(-4, 1, 131072, -262141, 0, 0, -196605, 0, 0, -196604, 0, 0, -196603, 0, 0, -196602, 0, 0, -262138, 0, 0, -262139, 0, 0, -262140, 0, 0, -6, 1, 131072, -8, 1, 131072, -10, 1, 131072, -262150, 2, 65536, 4, 4, 65536)
layer_1/tile_data = PackedInt32Array(-262141, 0, 0, -196605, 0, 0, -196604, 0, 0, -196603, 0, 0, -196602, 0, 0, -262138, 0, 0, -262139, 0, 0, -262140, 0, 0, -6, 1, 131072, -262150, 2, 65536, 4, 4, 65536)
metadata/_edit_lock_ = true
[node name="player" parent="." instance=ExtResource("2_0skrb")]
@@ -53,6 +54,18 @@ limit_bottom = 1023
limit_smoothed = true
editor_draw_limits = true
[node name="base_npc" parent="." instance=ExtResource("3_dxdug")]
position = Vector2(-224, 206)
metadata/_edit_lock_ = true
[node name="base_npc_2" parent="." instance=ExtResource("3_dxdug")]
position = Vector2(-319, 178)
metadata/_edit_lock_ = true
[node name="base_npc_3" parent="." instance=ExtResource("3_dxdug")]
position = Vector2(-131, 147)
metadata/_edit_lock_ = true
[node name="world_border" type="StaticBody2D" parent="."]
metadata/_edit_lock_ = true

18
scenes/tiles/cupcake.tscn Normal file
View File

@@ -0,0 +1,18 @@
[gd_scene load_steps=3 format=3 uid="uid://dckxciecwjfgf"]
[ext_resource type="Texture2D" uid="uid://p5ubildre2tg" path="res://assets/textures/debug/cupcake.png" id="1_5n0fd"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_pchpi"]
size = Vector2(64, 14.625)
[node name="dialogdebug_cupcake" type="StaticBody2D"]
metadata/_edit_lock_ = true
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_5n0fd")
metadata/_edit_lock_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 23)
shape = SubResource("RectangleShape2D_pchpi")
metadata/_edit_lock_ = true

View File

@@ -1,34 +0,0 @@
[gd_scene load_steps=5 format=3 uid="uid://dckxciecwjfgf"]
[ext_resource type="Texture2D" uid="uid://p5ubildre2tg" path="res://assets/textures/debug/cupcake.png" id="1_imilm"]
[ext_resource type="PackedScene" uid="uid://bu1xkt4xi58ox" path="res://scenes/dialog_trigger_area.tscn" id="2_blpmd"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_pchpi"]
size = Vector2(64, 14.625)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_d78tr"]
size = Vector2(64, 58)
[node name="dialogdebug_cupcake" type="StaticBody2D"]
metadata/_edit_lock_ = true
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_imilm")
metadata/_edit_lock_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 23)
shape = SubResource("RectangleShape2D_pchpi")
metadata/_edit_lock_ = true
[node name="dialog_trigger_area" parent="." instance=ExtResource("2_blpmd")]
file = "res://assets/lang/en/dialogue/npcs/villager_normal.json"
title = "Debug Cupcake"
metadata/_edit_lock_ = true
[node name="collision_shape_2d" parent="dialog_trigger_area" index="0"]
position = Vector2(0, -1)
shape = SubResource("RectangleShape2D_d78tr")
metadata/_edit_lock_ = true
[editable path="dialog_trigger_area"]

View File

@@ -1,7 +1,7 @@
[gd_resource type="TileSet" load_steps=11 format=3 uid="uid://txl24cadn8t4"]
[gd_resource type="TileSet" load_steps=11 format=3 uid="uid://dcg1tdmkkx22p"]
[ext_resource type="PackedScene" uid="uid://dk7fqaw2b3w1k" path="res://scenes/tiles/first_debug_tile.tscn" id="1_uxmn6"]
[ext_resource type="PackedScene" uid="uid://dckxciecwjfgf" path="res://scenes/tiles/dialogdebug_cupcake.tscn" id="2_0cov5"]
[ext_resource type="PackedScene" uid="uid://dckxciecwjfgf" path="res://scenes/tiles/cupcake.tscn" id="2_v4037"]
[ext_resource type="PackedScene" uid="uid://c4dkrtswpv8cv" path="res://scenes/tiles/sound_debug_tile.tscn" id="3_lf2fs"]
[ext_resource type="Texture2D" uid="uid://d3l4uomk1gw8c" path="res://assets/textures/debug/grass_tile.png" id="4_k7c1q"]
[ext_resource type="PackedScene" uid="uid://ct6s1gfjkciva" path="res://scenes/tiles/3d_cube_tile.tscn" id="5_x3uol"]
@@ -11,8 +11,8 @@ resource_name = "test"
scenes/0/scene = ExtResource("1_uxmn6")
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_eskkr"]
resource_name = "dialogdebug"
scenes/2/scene = ExtResource("2_0cov5")
resource_name = "cupcake"
scenes/2/scene = ExtResource("2_v4037")
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_xtxu0"]
resource_name = "sounddebug"