From 75c36782a98947800c2006bd9e6f891334a8f383 Mon Sep 17 00:00:00 2001 From: 7heIVIaze Date: Thu, 1 May 2025 12:23:10 +0900 Subject: [PATCH] Implemented dialogue system and dialogue UI prototype Implemented Dialogue System using dialogue Component and Interface, make Dialogue UI Prototype, and change the data type of the characters to be displayed in the UI in source code --- .../Hwanyoung/Character/NPC/BP_PuzzleNPCBase.uasset | 4 ++-- .../PlayerCharacter/BP_HYPlayerCharacController.uasset | 4 ++-- .../PlayerCharacter/Input/InputActions/IA_Interact.uasset | 4 ++-- .../DialogueableSystem/BP_DialogueComponent.uasset | 3 +++ .../SystemBP/DialogueableSystem/DT_DiaglueTable.uasset | 4 ++-- .../Dialogue/BP_DialogueComponent.uasset | 3 --- .../SystemBP/DialogueableSystem/I_Dialogueable.uasset | 4 ++-- .../SystemBP/DialogueableSystem/S_DiagloueStructure.uasset | 4 ++-- .../SystemBP/DialogueableSystem/S_OptionsDialogue.uasset | 3 +++ .../UI/Dialogue_HUD/BP_DialogueOptionWidget.uasset | 3 +++ .../Hwanyoung/UI/Dialogue_HUD/BP_DialogueWidget.uasset | 4 ++-- .../Content/Hwanyoung/UI/Images/T_DialogueBox.uasset | 3 +++ .../Content/Hwanyoung/UI/Images/T_DialogueOption.uasset | 3 +++ hwanyoung2/Source/hwanyoung2.Target.cs | 2 +- hwanyoung2/Source/hwanyoung2/HYInteractableActor.cpp | 7 +++++-- hwanyoung2/Source/hwanyoung2/HYInteractableActor.h | 6 +++--- hwanyoung2/Source/hwanyoung2/HYManualPickUp.cpp | 4 ++-- hwanyoung2/Source/hwanyoung2/HYSaveGameActor.cpp | 4 ++-- 18 files changed, 42 insertions(+), 27 deletions(-) create mode 100644 hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/BP_DialogueComponent.uasset delete mode 100644 hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/Dialogue/BP_DialogueComponent.uasset create mode 100644 hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/S_OptionsDialogue.uasset create mode 100644 hwanyoung2/Content/Hwanyoung/UI/Dialogue_HUD/BP_DialogueOptionWidget.uasset create mode 100644 hwanyoung2/Content/Hwanyoung/UI/Images/T_DialogueBox.uasset create mode 100644 hwanyoung2/Content/Hwanyoung/UI/Images/T_DialogueOption.uasset diff --git a/hwanyoung2/Content/Hwanyoung/Character/NPC/BP_PuzzleNPCBase.uasset b/hwanyoung2/Content/Hwanyoung/Character/NPC/BP_PuzzleNPCBase.uasset index e3835250..9f2a65f9 100644 --- a/hwanyoung2/Content/Hwanyoung/Character/NPC/BP_PuzzleNPCBase.uasset +++ b/hwanyoung2/Content/Hwanyoung/Character/NPC/BP_PuzzleNPCBase.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2acf9c95231541b475a41ae48e1c75d3a4bdd97c7285206d5b34b100c981d260 -size 336962 +oid sha256:1425394ff3ea1476f6bb27e998084809986d2ee18cd497c8c992b8b00d4de4b8 +size 346864 diff --git a/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_HYPlayerCharacController.uasset b/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_HYPlayerCharacController.uasset index ec1173aa..d3880e0b 100644 --- a/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_HYPlayerCharacController.uasset +++ b/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/BP_HYPlayerCharacController.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f7d7d869bd31e7af9034de4aa436518f278c2078c14d5163f9f9769ff3ffb4e -size 264009 +oid sha256:0959718788f3a09685c701d890585648c19bebfa9c69944c750c895fb529526d +size 274411 diff --git a/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/Input/InputActions/IA_Interact.uasset b/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/Input/InputActions/IA_Interact.uasset index e705e6da..bdc6f87a 100644 --- a/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/Input/InputActions/IA_Interact.uasset +++ b/hwanyoung2/Content/Hwanyoung/Character/PlayerCharacter/Input/InputActions/IA_Interact.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9bc2c65682e50ec181ec86d20af08647b0272e57e928a540eac504915d906b15 -size 1872 +oid sha256:957bf99be4437370fb3a7c8aa385014a04aae82fa9203abd0d64f5b2e11fc9f6 +size 1950 diff --git a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/BP_DialogueComponent.uasset b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/BP_DialogueComponent.uasset new file mode 100644 index 00000000..52828d04 --- /dev/null +++ b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/BP_DialogueComponent.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5d77198ab0aea22714a08e1a3e778e249dba26301bce6bd5ab27e1f17ba645d +size 224602 diff --git a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/DT_DiaglueTable.uasset b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/DT_DiaglueTable.uasset index 9b47536a..d83771b1 100644 --- a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/DT_DiaglueTable.uasset +++ b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/DT_DiaglueTable.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6409821c1e44ecb17b41c796f4200844ce896ec4012f4a9abcd9f9afb8604974 -size 3548 +oid sha256:e9286f59fd11f9577c1c81beb6ba2ff08c2f6e983830275288b1108fe068ba11 +size 5678 diff --git a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/Dialogue/BP_DialogueComponent.uasset b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/Dialogue/BP_DialogueComponent.uasset deleted file mode 100644 index c7828fc0..00000000 --- a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/Dialogue/BP_DialogueComponent.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:01a83d7ca06a20cfd842b1114b960d41cd9274dbe812f27fc69730269e89385a -size 14316 diff --git a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/I_Dialogueable.uasset b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/I_Dialogueable.uasset index 06d1d1e5..d377eb1d 100644 --- a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/I_Dialogueable.uasset +++ b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/I_Dialogueable.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7000ddc3aaa06568ca46cfe0aafb610d04bddbd4c221564c4fdba62b43179fad -size 13891 +oid sha256:912b9a2275827e50a5c0c5722d0bb1706e6707ab2d2813df23945c09c625e105 +size 11615 diff --git a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/S_DiagloueStructure.uasset b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/S_DiagloueStructure.uasset index 9512da56..e072d9b4 100644 --- a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/S_DiagloueStructure.uasset +++ b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/S_DiagloueStructure.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6087626a7db244fc07c6099c375f3015ce175233a3eefd6bdf4f9e362a2642a0 -size 6758 +oid sha256:fcebe32b1fee7ec3b89d0ce2c269dfe21055ec25ceed95cf8ab3291a5ac64a53 +size 10978 diff --git a/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/S_OptionsDialogue.uasset b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/S_OptionsDialogue.uasset new file mode 100644 index 00000000..8d28395e --- /dev/null +++ b/hwanyoung2/Content/Hwanyoung/Illusions/GeneralizedBlueprints/SystemBP/DialogueableSystem/S_OptionsDialogue.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cccd69e3313e651671bcb4c4f8ddac8b17bd2365512ebece3a9aff1d1c7a257 +size 5854 diff --git a/hwanyoung2/Content/Hwanyoung/UI/Dialogue_HUD/BP_DialogueOptionWidget.uasset b/hwanyoung2/Content/Hwanyoung/UI/Dialogue_HUD/BP_DialogueOptionWidget.uasset new file mode 100644 index 00000000..0e9be9ba --- /dev/null +++ b/hwanyoung2/Content/Hwanyoung/UI/Dialogue_HUD/BP_DialogueOptionWidget.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be0f4c09f56b08474b14515fd81643f7e453fd343298adb4b2e01e38add988c8 +size 64283 diff --git a/hwanyoung2/Content/Hwanyoung/UI/Dialogue_HUD/BP_DialogueWidget.uasset b/hwanyoung2/Content/Hwanyoung/UI/Dialogue_HUD/BP_DialogueWidget.uasset index 430e4321..23048752 100644 --- a/hwanyoung2/Content/Hwanyoung/UI/Dialogue_HUD/BP_DialogueWidget.uasset +++ b/hwanyoung2/Content/Hwanyoung/UI/Dialogue_HUD/BP_DialogueWidget.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bfdf92338cb9a185077b017981b01634448b81f8791462c484251e6ae07dee41 -size 173479 +oid sha256:75894304193f711c200f49cb86b68a6f9ca881d21061415ebfed6c9caa4aff31 +size 97480 diff --git a/hwanyoung2/Content/Hwanyoung/UI/Images/T_DialogueBox.uasset b/hwanyoung2/Content/Hwanyoung/UI/Images/T_DialogueBox.uasset new file mode 100644 index 00000000..d8b1cf6f --- /dev/null +++ b/hwanyoung2/Content/Hwanyoung/UI/Images/T_DialogueBox.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e95efc44699bea3666734be7bd3eec27056d4b253d7517c052b960ca43d78a7b +size 53368 diff --git a/hwanyoung2/Content/Hwanyoung/UI/Images/T_DialogueOption.uasset b/hwanyoung2/Content/Hwanyoung/UI/Images/T_DialogueOption.uasset new file mode 100644 index 00000000..75eb2326 --- /dev/null +++ b/hwanyoung2/Content/Hwanyoung/UI/Images/T_DialogueOption.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d08f5ca5dfbc706e830682aa91aca33f6594ef524203e6abc9a70983a7b84f28 +size 57302 diff --git a/hwanyoung2/Source/hwanyoung2.Target.cs b/hwanyoung2/Source/hwanyoung2.Target.cs index 3a6f7b91..9334b417 100644 --- a/hwanyoung2/Source/hwanyoung2.Target.cs +++ b/hwanyoung2/Source/hwanyoung2.Target.cs @@ -8,7 +8,7 @@ public class hwanyoung2Target : TargetRules public hwanyoung2Target(TargetInfo Target) : base(Target) { WindowsPlatform.Compiler = WindowsCompiler.VisualStudio2022; - WindowsPlatform.CompilerVersion = "14.38.33130"; // ġ Ȯ ȣ ٲ ּ + WindowsPlatform.CompilerVersion = "14.38.33130"; // 설치된 정확한 버전 번호로 바꿔주세요 Type = TargetType.Game; DefaultBuildSettings = BuildSettingsVersion.V4; diff --git a/hwanyoung2/Source/hwanyoung2/HYInteractableActor.cpp b/hwanyoung2/Source/hwanyoung2/HYInteractableActor.cpp index 2eeea24c..50dae9b6 100644 --- a/hwanyoung2/Source/hwanyoung2/HYInteractableActor.cpp +++ b/hwanyoung2/Source/hwanyoung2/HYInteractableActor.cpp @@ -16,9 +16,12 @@ void AHYInteractableActor::Interact_Implementation(APlayerController* Controller return; } -FString AHYInteractableActor::GetInteractText() const +FText AHYInteractableActor::GetInteractText() const { - return FString::Printf(TEXT("%s: Press F to %s"), *Name, *Action); + + FText ReturnText = FText::Format(NSLOCTEXT("HYInteractableActor", "HowToInteraction", "{0}: Press F to {1}"), Name, Action); + return ReturnText; + //return FString::Printf(TEXT("%s: Press F to %s"), *Name, *Action); } // Called when the game starts or when spawned diff --git a/hwanyoung2/Source/hwanyoung2/HYInteractableActor.h b/hwanyoung2/Source/hwanyoung2/HYInteractableActor.h index 295b7d7b..6add37fb 100644 --- a/hwanyoung2/Source/hwanyoung2/HYInteractableActor.h +++ b/hwanyoung2/Source/hwanyoung2/HYInteractableActor.h @@ -25,13 +25,13 @@ public: virtual void Interact_Implementation(APlayerController* Controller); UPROPERTY(EditDefaultsOnly) - FString Name; + FText Name; UPROPERTY(EditDefaultsOnly) - FString Action; + FText Action; UFUNCTION(BlueprintCallable, Category = "Pickup") - FString GetInteractText() const; + FText GetInteractText() const; protected: // Called when the game starts or when spawned diff --git a/hwanyoung2/Source/hwanyoung2/HYManualPickUp.cpp b/hwanyoung2/Source/hwanyoung2/HYManualPickUp.cpp index 7ec7c6dc..a77bbf11 100644 --- a/hwanyoung2/Source/hwanyoung2/HYManualPickUp.cpp +++ b/hwanyoung2/Source/hwanyoung2/HYManualPickUp.cpp @@ -11,8 +11,8 @@ AHYManualPickUp::AHYManualPickUp() ItemID = FName("No ID"); - Super::Name = "Item"; - Super::Action = "pick up"; + Super::Name = NSLOCTEXT("HYManualPickUp", "InteractionName", "Item"); + Super::Action = NSLOCTEXT("HYManualPickUp", "InteractionAction", "pick up"); } void AHYManualPickUp::Interact_Implementation(APlayerController* Controller) diff --git a/hwanyoung2/Source/hwanyoung2/HYSaveGameActor.cpp b/hwanyoung2/Source/hwanyoung2/HYSaveGameActor.cpp index c6eb586e..c4d3c225 100644 --- a/hwanyoung2/Source/hwanyoung2/HYSaveGameActor.cpp +++ b/hwanyoung2/Source/hwanyoung2/HYSaveGameActor.cpp @@ -9,8 +9,8 @@ AHYSaveGameActor::AHYSaveGameActor() SavepointMesh = CreateDefaultSubobject("SavepointMesh"); RootComponent = Cast(SavepointMesh); - Super::Name = "Haetae statue"; - Super::Action = "touch"; + Super::Name = NSLOCTEXT("HYSaveGameActor", "InteractionName", "Haetae statue"); + Super::Action = NSLOCTEXT("HYSaveGameActor", "InteractionAction", "touch"); } void AHYSaveGameActor::Interact_Implementation(APlayerController* Controller)