Compare commits

..

2 Commits

Author SHA1 Message Date
cblech 77a7441400 Added help box 2025-01-20 19:30:43 +01:00
cblech d8b427de8f WIP 2024-12-24 06:57:00 +01:00
14 changed files with 138 additions and 131 deletions
-19
View File
@@ -1,19 +0,0 @@
{
"@path": "res://addons/dialogic/Resources/character.gd",
"@subpath": NodePath(""),
"_translation_id": "16",
"color": Color(1, 1, 1, 1),
"custom_info": {
"sound_mood_default": "",
"sound_moods": {},
"style": ""
},
"default_portrait": "",
"description": "",
"display_name": "Semi Cat",
"mirror": false,
"nicknames": [""],
"offset": Vector2(0, 0),
"portraits": {},
"scale": 1.0
}
-1
View File
@@ -1 +0,0 @@
semi_cat: Meow! #id:15
@@ -1,5 +1,3 @@
keys,en,de
Character/13/name,Defaulty the Default Character,Standardy der Standard Charakter
Character/13/nicknames,Defaulty,Standardy
Character/16/name,Semi Cat,Semi Katze
Character/16/nicknames,,
1 keys en de
2 Character/13/name Defaulty the Default Character Standardy der Standard Charakter
3 Character/13/nicknames Defaulty Standardy
Character/16/name Semi Cat Semi Katze
Character/16/nicknames
@@ -1,2 +0,0 @@
keys,en,de
Text/15/text,Meow!,Miau!
1 keys en de
2 Text/15/text Meow! Miau!
@@ -1,17 +0,0 @@
[remap]
importer="csv_translation"
type="Translation"
uid="uid://dd4q6v071u4kp"
[deps]
files=["res://dialog/translations/dialogic_semi_cat_translation.en.translation", "res://dialog/translations/dialogic_semi_cat_translation.de.translation"]
source_file="res://dialog/translations/dialogic_semi_cat_translation.csv"
dest_files=["res://dialog/translations/dialogic_semi_cat_translation.en.translation", "res://dialog/translations/dialogic_semi_cat_translation.de.translation"]
[params]
compress=true
delimiter=0
+8 -15
View File
@@ -18,18 +18,19 @@ config/icon="res://icon.svg"
[autoload]
Dialogic="*res://addons/dialogic/Core/DialogicGameHandler.gd"
HelpBox="*res://scripts/HelpBox.gd"
[dialogic]
directories/dch_directory={
"defaulty_the_default_character": "res://dialog/defaulty_the_default_character.dch",
"semi_cat": "res://dialog/semi_cat.dch"
"defaulty_the_default_character": "res://dialog/defaulty_the_default_character.dch"
}
directories/dtl_directory={
"semi_cat": "res://dialog/semi_cat.dtl",
"test_time_line": "res://dialog/test_time_line.dtl"
}
variables={}
variables={
"TestVariable": "none"
}
glossary/default_case_sensitive=true
layout/style_list=[]
layout/default_style="Default"
@@ -61,12 +62,14 @@ translation/add_separator=false
translation/intern/save_mode=0
translation/intern/file_mode=1
translation/intern/translation_folder="res://dialog/translations"
translation/id_counter=22
translation/id_counter=20
translation/locales=["de", "en"]
text/autopauses={}
[display]
window/size/viewport_width=1920
window/size/viewport_height=1080
window/size/always_on_top=true
[dotnet]
@@ -113,17 +116,7 @@ click={
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
interact={
"deadzone": 0.5,
"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)
]
}
[internationalization]
locale/translations=PackedStringArray("res://dialog/translations/dialogic_character_translations.en.translation", "res://dialog/translations/dialogic_test_time_line_translation.de.translation", "res://dialog/translations/dialogic_test_time_line_translation.en.translation", "res://dialog/translations/dialogic_character_translations.de.translation", "res://dialog/translations/dialogic_semi_cat_translation.de.translation", "res://dialog/translations/dialogic_semi_cat_translation.en.translation")
[layer_names]
3d_physics/layer_1="General"
3d_physics/layer_5="Player"
+5 -20
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=34 format=3 uid="uid://clxs6xfesi82s"]
[gd_scene load_steps=33 format=3 uid="uid://vxj2hkqp3gpx"]
[ext_resource type="Texture2D" uid="uid://cg1cxmqbo1pa" path="res://graphics/mockups/darktree1.png" id="1_u6vd6"]
[ext_resource type="Texture2D" uid="uid://fcm6etmmj65d" path="res://graphics/mockups/darktree2.png" id="2_tcvf7"]
@@ -16,7 +16,6 @@
[ext_resource type="Texture2D" uid="uid://bcah7lrg2oae1" path="res://graphics/testingground/IveSeenSomeShit.png" id="13_gcssn"]
[ext_resource type="Texture2D" uid="uid://dj1syhq0dmf3p" path="res://graphics/testingground/Doll.png" id="14_qxv15"]
[ext_resource type="Texture2D" uid="uid://bnb3bjk274vgn" path="res://graphics/testingground/mushroom4.png" id="16_5f343"]
[ext_resource type="Script" path="res://scripts/dialogic_starter.gd" id="16_frq8l"]
[ext_resource type="Texture2D" uid="uid://0oy8by6pd2wg" path="res://graphics/testingground/mushroom5.png" id="17_odxxd"]
[ext_resource type="Texture2D" uid="uid://b1h55mnc1giqu" path="res://graphics/testingground/mushroom6.png" id="18_i7vrp"]
[ext_resource type="Texture2D" uid="uid://c5lsjern0iqmc" path="res://graphics/testingground/mushroom7.png" id="19_yb8aa"]
@@ -27,8 +26,8 @@
[ext_resource type="Texture2D" uid="uid://dfynp0xqtpcke" path="res://graphics/testingground/chestnut1.png" id="24_ohuks"]
[ext_resource type="Texture2D" uid="uid://63rgrra0tdef" path="res://graphics/testingground/chestnut2.png" id="25_j83yj"]
[ext_resource type="Texture2D" uid="uid://cygt1j1m0vpqg" path="res://graphics/mockups/field_placeholder.png" id="26_7nyv4"]
[ext_resource type="PackedScene" uid="uid://de2fn2m114eaw" path="res://scenes/props/Player3D.tscn" id="27_mqdni"]
[ext_resource type="PackedScene" uid="uid://ob04y3syvo0e" path="res://scenes/props/interaction_area.tscn" id="28_h5ibf"]
[ext_resource type="PackedScene" path="res://scenes/props/Player3D.tscn" id="27_mqdni"]
[ext_resource type="PackedScene" uid="uid://ba238rhu5e887" path="res://scenes/props/ui_help_overlay.tscn" id="28_jn4e8"]
[sub_resource type="PlaneMesh" id="PlaneMesh_8dxh5"]
@@ -1254,26 +1253,12 @@ billboard = 1
shaded = true
texture = ExtResource("13_gcssn")
[node name="semi_cat" type="Sprite3D" parent="."]
[node name="player4" type="Sprite3D" parent="."]
transform = Transform3D(0.04, 0, 0, 0, 0.04, 0, 0, 0, 0.04, -0.568754, 0.116035, -0.275782)
billboard = 1
shaded = true
texture = ExtResource("14_qxv15")
[node name="InteractionArea" parent="semi_cat" instance=ExtResource("28_h5ibf")]
transform = Transform3D(2.875, 0, 0, 0, 2.875, 0, 0, 0, 2.875, 0, -0.291344, 0.404458)
[node name="Dialogic" type="Node" parent="semi_cat"]
script = ExtResource("16_frq8l")
[node name="Label3D" type="Label3D" parent="semi_cat"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.92228, 1.02561, -4.76837e-07)
billboard = 1
no_depth_test = true
alpha_antialiasing_mode = 1
text = "Cat ->"
font_size = 188
[node name="details" type="Node" parent="."]
[node name="mushroom" type="Sprite3D" parent="details"]
@@ -1377,4 +1362,4 @@ texture = ExtResource("26_7nyv4")
[node name="Player3d" parent="." instance=ExtResource("27_mqdni")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.110292, 0.0067718, 0.0825893)
[connection signal="interacted" from="semi_cat/InteractionArea" to="semi_cat/Dialogic" method="open" binds= ["semi_cat"]]
[node name="UiHelpOverlay" parent="." instance=ExtResource("28_jn4e8")]
+5 -6
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=5 format=3 uid="uid://de2fn2m114eaw"]
[gd_scene load_steps=5 format=3 uid="uid://dbd1niu3tp8y5"]
[ext_resource type="Texture2D" uid="uid://cvn2p215jq2am" path="res://graphics/testingground/concerned.png" id="1_5jpx2"]
[ext_resource type="Script" path="res://scripts/player_3d.gd" id="1_08wm4"]
@@ -11,8 +11,6 @@ height = 0.234557
[node name="Player3d" type="Node3D"]
[node name="CharacterBody3D" type="CharacterBody3D" parent="."]
collision_layer = 16
collision_mask = 17
script = ExtResource("1_08wm4")
SPEED = 0.5
@@ -29,10 +27,11 @@ shape = SubResource("CapsuleShape3D_1vdrh")
[node name="CameraPivot" type="Node3D" parent="CharacterBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.159723, 0)
script = ExtResource("3_drcdp")
canPitch = true
canYaw = true
[node name="SubPivot" type="Node3D" parent="CharacterBody3D/CameraPivot"]
transform = Transform3D(1, 0, 0, 0, 0.901878, 0.431991, 0, -0.431991, 0.901878, 0, 0, 0)
[node name="Camera3D" type="Camera3D" parent="CharacterBody3D/CameraPivot/SubPivot"]
transform = Transform3D(1, 0, 0, 0, 0.897258, 0.441506, 0, -0.441506, 0.897258, 0, 0.788471, 1.52789)
fov = 24.0844
transform = Transform3D(1, 0, 0, 0, 0.871025, 0.491238, 0, -0.491238, 0.871025, 0, 0.658355, 1.24487)
fov = 28.5
-28
View File
@@ -1,28 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://ob04y3syvo0e"]
[ext_resource type="Script" path="res://scripts/interaction_area.gd" id="1_26v5g"]
[sub_resource type="SphereShape3D" id="SphereShape3D_i8sim"]
radius = 1.0
[node name="InteractionArea" type="Node3D"]
script = ExtResource("1_26v5g")
[node name="Area3D" type="Area3D" parent="."]
collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
shape = SubResource("SphereShape3D_i8sim")
[node name="Label3D" type="Label3D" parent="."]
sorting_offset = 100.0
pixel_size = 0.001
billboard = 1
no_depth_test = true
fixed_size = true
text = "<E>"
font_size = 98
outline_size = 22
[connection signal="body_entered" from="Area3D" to="Label3D" method="show"]
[connection signal="body_exited" from="Area3D" to="Label3D" method="hide"]
+39
View File
@@ -0,0 +1,39 @@
[gd_scene load_steps=3 format=3 uid="uid://ba238rhu5e887"]
[ext_resource type="Script" path="res://scripts/HelpBoxContainer.gd" id="1_qafrk"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ots6x"]
[node name="UiHelpOverlay" type="Node2D"]
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="PanelContainer" type="PanelContainer" parent="CanvasLayer"]
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -77.0
offset_top = -110.0
offset_right = -19.0
offset_bottom = -20.0
grow_horizontal = 0
grow_vertical = 0
theme_override_styles/panel = SubResource("StyleBoxEmpty_ots6x")
[node name="PanelContainer" type="PanelContainer" parent="CanvasLayer/PanelContainer"]
layout_mode = 2
script = ExtResource("1_qafrk")
[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer/PanelContainer/PanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="Label" type="Label" parent="CanvasLayer/PanelContainer/PanelContainer/MarginContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 51
text = "H"
+26
View File
@@ -0,0 +1,26 @@
extends Node
var container: HelpBoxContainer
func showHelp(text:String)->void:
container.showHelp(text)
func hideHelp()->void:
container.hideHelp()
func registerContainer(container: HelpBoxContainer)->void:
self.container = container
func _input(event: InputEvent) -> void:
if event.is_action_pressed("ui_left"):
HelpBox.showHelp("This is a test help text.")
if event.is_action_pressed("ui_right"):
HelpBox.hideHelp()
if event.is_action_pressed("ui_up"):
Dialogic.start_timeline("test_time_line")
+55
View File
@@ -0,0 +1,55 @@
extends PanelContainer
class_name HelpBoxContainer
@onready var textLabel: Label = $MarginContainer/Label
var animationTween:Tween
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
HelpBox.registerContainer(self)
await get_tree().process_frame
hideHelpInstant()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func showHelp(text: String) -> void:
textLabel.text = text
if animationTween:
animationTween.kill()
visible = false
visible = true
var offset = get_rect().size.x + 40
animationTween = get_tree().create_tween()
animationTween.set_ease(Tween.EASE_OUT)
animationTween.set_trans(Tween.TRANS_QUAD)
animationTween.tween_property(self, "position:x", 0, .5).from(offset)
func hideHelp() -> void:
if animationTween:
animationTween.kill()
var offset = get_rect().size.x + 40
animationTween = get_tree().create_tween()
animationTween.set_ease(Tween.EASE_IN)
animationTween.set_trans(Tween.TRANS_QUAD)
animationTween.tween_property(self, "position:x", offset, .5)
func hideHelpInstant() -> void:
if animationTween:
animationTween.kill()
var offset = get_rect().size.x + 40
animationTween = get_tree().create_tween()
animationTween.set_ease(Tween.EASE_IN)
animationTween.set_trans(Tween.TRANS_QUAD)
animationTween.tween_property(self, "position:x", offset, 0)
-5
View File
@@ -1,5 +0,0 @@
extends Node
class_name DialogicStarter
func open(timeline: String):
Dialogic.start(timeline)
-16
View File
@@ -1,16 +0,0 @@
extends Node3D
@onready var area_3d: Area3D = $Area3D
@onready var label_3d: Label3D = $Label3D
signal interacted
func _process(delta: float) -> void:
if area_3d.has_overlapping_bodies():
label_3d.show()
else:
label_3d.hide()
func _input(event: InputEvent) -> void:
if event.is_action("interact") && event.is_pressed() && area_3d.has_overlapping_bodies():
interacted.emit()