First work on dialogic, resized guild, and started implementing portraits.

This commit is contained in:
2025-08-14 10:26:24 -04:00
parent 95a7db036b
commit 3aeb3d44e6
959 changed files with 47688 additions and 46 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dtt0l7qbkknfx"
path="res://.godot/imported/highlight_portrait_thumbnail.png-6fa128edf7f6ec29e7a5313b9c3e7412.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Modules/HighlightPortrait/highlight_portrait_thumbnail.png"
dest_files=["res://.godot/imported/highlight_portrait_thumbnail.png-6fa128edf7f6ec29e7a5313b9c3e7412.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

View File

@@ -0,0 +1,17 @@
@tool
extends DialogicIndexer
func _get_portrait_scene_presets() -> Array[Dictionary]:
return [
{
"path": this_folder.path_join("simple_highlight_portrait.tscn"),
"name": "Simple Highlight Portrait",
"description": "A portrait scene that displays a simple image, but changes color and moves to the front when this character is speaking.",
"author":"Dialogic",
"type": "General",
"icon":"",
"preview_image":[this_folder.path_join("highlight_portrait_thumbnail.png")],
"documentation":"",
},
]

View File

@@ -0,0 +1 @@
uid://dmo3uentc71hx

View File

@@ -0,0 +1,30 @@
@tool
extends DialogicPortrait
@export_group('Main')
@export_file var image := ""
var unhighlighted_color := Color.DARK_GRAY
var _prev_z_index := 0
## Load anything related to the given character and portrait
func _update_portrait(passed_character:DialogicCharacter, passed_portrait:String) -> void:
apply_character_and_portrait(passed_character, passed_portrait)
apply_texture($Portrait, image)
func _ready() -> void:
if not Engine.is_editor_hint():
self.modulate = unhighlighted_color
func _highlight() -> void:
create_tween().tween_property(self, 'modulate', Color.WHITE, 0.15)
_prev_z_index = DialogicUtil.autoload().Portraits.get_character_info(character).get('z_index', 0)
DialogicUtil.autoload().Portraits.change_character_z_index(character, 99)
func _unhighlight() -> void:
create_tween().tween_property(self, 'modulate', unhighlighted_color, 0.15)
DialogicUtil.autoload().Portraits.change_character_z_index(character, _prev_z_index)

View File

@@ -0,0 +1 @@
uid://bm47aei8kgirn

View File

@@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://br18lgpga2y2v"]
[ext_resource type="Script" path="res://addons/dialogic/Modules/HighlightPortrait/simple_highlight_portrait.gd" id="1_ceqva"]
[node name="DefaultPortrait" type="Node2D"]
script = ExtResource("1_ceqva")
[node name="Portrait" type="Sprite2D" parent="."]
centered = false