From b5304a74aa82f4137e1fa6671d8edccdce3dcdcb Mon Sep 17 00:00:00 2001 From: "adnan.mujkic" Date: Tue, 29 Sep 2026 23:47:17 +0200 Subject: [PATCH] Tweaks to the quests system and dialogue system bugfix, talking to npcs now triggers dialogue, questing UI made and some test quests and dialogue --- Config/DefaultGameplayTags.ini | 6 ++++-- Content/Character/BP_NpcBaseCharacter.uasset | 4 ++-- .../Dialogue/Characters/DA_Test_Speech_1.uasset | 3 +++ Content/GameData/Npc/DT_Test_Npc_Schedule.uasset | 4 ++-- Content/GameData/Quests/DA_Quest_Test.uasset | 3 +++ Content/GameData/Weather/DA_WeatherClear.uasset | 4 ++-- Content/Materials/VFX/Clouds/Clouds.uasset | 4 ++-- Content/Materials/VFX/Clouds/Clouds_Inst.uasset | 3 +++ Content/Scripts/BP_TimeOfDay.uasset | 4 ++-- Content/UI/MainUI.uasset | 4 ++-- Content/UI/Quests/WBP_QuestEntry.uasset | 3 +++ Content/UI/Quests/WBP_QuestEntry_Step.uasset | 3 +++ Content/UI/Quests/WBP_QuestsWindow.uasset | 3 +++ .../E/OB/6SG8UBX6HIJVWN1CG63KU5.uasset | 4 ++-- .../E/XN/4VXPK4RYZHM8HZESMIR8K0.uasset | 4 ++-- .../DialogueSystem/DialogueComponent.cpp | 11 ++++++++++- .../ProjectEleri/DialogueSystem/SpeechDataAsset.h | 3 +++ Source/ProjectEleri/Private/TimeOfDayManager.cpp | 15 ++++++++++++++- Source/ProjectEleri/Public/TimeOfDayManager.h | 3 +++ .../ProjectEleri/QuestSystem/QuestDataAsset.cpp | 11 ++++------- .../ProjectEleri/QuestSystem/QuestSubsystem.cpp | 3 +-- Source/ProjectEleri/QuestSystem/QuestTypes.h | 6 +++--- 22 files changed, 76 insertions(+), 32 deletions(-) create mode 100644 Content/GameData/Dialogue/Characters/DA_Test_Speech_1.uasset create mode 100644 Content/GameData/Quests/DA_Quest_Test.uasset create mode 100644 Content/Materials/VFX/Clouds/Clouds_Inst.uasset create mode 100644 Content/UI/Quests/WBP_QuestEntry.uasset create mode 100644 Content/UI/Quests/WBP_QuestEntry_Step.uasset create mode 100644 Content/UI/Quests/WBP_QuestsWindow.uasset diff --git a/Config/DefaultGameplayTags.ini b/Config/DefaultGameplayTags.ini index c30919f0..60f6a8c6 100644 --- a/Config/DefaultGameplayTags.ini +++ b/Config/DefaultGameplayTags.ini @@ -46,6 +46,10 @@ NetIndexFirstBitSegment=16 +GameplayTagList=(Tag="Items.Gold",DevComment="") +GameplayTagList=(Tag="NpcTags",DevComment="Identity of a scheduled NPC. Every NPC carrying the same tag is driven by the same schedule asset in NpcSchedules.") +GameplayTagList=(Tag="NpcTags.Test",DevComment="") ++GameplayTagList=(Tag="Quests",DevComment="Identity of a quest. Each quest data asset is tagged with Quests., and quests reference each other by these tags.") ++GameplayTagList=(Tag="Quests.Signals",DevComment="Signals a quest step waits on that no system in the game announces, fired from blueprint with NotifyQuestSignal.") ++GameplayTagList=(Tag="Quests.Test",DevComment="") ++GameplayTagList=(Tag="Quests.Test.1",DevComment="") +GameplayTagList=(Tag="SaveGameTags",DevComment="") +GameplayTagList=(Tag="SaveGameTags.Alchemy.TableLevel",DevComment="") +GameplayTagList=(Tag="SaveGameTags.Bazar.Table.InventorySpace",DevComment="") @@ -56,8 +60,6 @@ NetIndexFirstBitSegment=16 +GameplayTagList=(Tag="SaveGameTags.InteractionStage",DevComment="") +GameplayTagList=(Tag="SaveGameTags.Locked",DevComment="") +GameplayTagList=(Tag="SetByCaller.Effects.ExpModifier",DevComment="") -+GameplayTagList=(Tag="Quests",DevComment="Identity of a quest. Each quest data asset is tagged with Quests., and quests reference each other by these tags.") -+GameplayTagList=(Tag="Quests.Signals",DevComment="Signals a quest step waits on that no system in the game announces, fired from blueprint with NotifyQuestSignal.") +GameplayTagList=(Tag="Skins",DevComment="") +GameplayTagList=(Tag="Skins.Eleri.Body",DevComment="") +GameplayTagList=(Tag="Skins.Eleri.Default",DevComment="") diff --git a/Content/Character/BP_NpcBaseCharacter.uasset b/Content/Character/BP_NpcBaseCharacter.uasset index c84244aa..76e98ae8 100644 --- a/Content/Character/BP_NpcBaseCharacter.uasset +++ b/Content/Character/BP_NpcBaseCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fac901fda1334ba432c51e495cc5c4744c2724bd9e12cf1b9b93d74b6776bb8a -size 38088 +oid sha256:d004df4836cddc3a2aca1d8914cc8d49daab9f4f6b093008892da86835c26878 +size 40416 diff --git a/Content/GameData/Dialogue/Characters/DA_Test_Speech_1.uasset b/Content/GameData/Dialogue/Characters/DA_Test_Speech_1.uasset new file mode 100644 index 00000000..72b9ab47 --- /dev/null +++ b/Content/GameData/Dialogue/Characters/DA_Test_Speech_1.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:93809934f425099234564f15007bdbfdf8ea9d6f953eb559c99b64c7741e0195 +size 2588 diff --git a/Content/GameData/Npc/DT_Test_Npc_Schedule.uasset b/Content/GameData/Npc/DT_Test_Npc_Schedule.uasset index 792a604d..845de4f8 100644 --- a/Content/GameData/Npc/DT_Test_Npc_Schedule.uasset +++ b/Content/GameData/Npc/DT_Test_Npc_Schedule.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7e361458ea15c5e7d637a0e0227bcce290060954c56fb70b5580eba402898d10 -size 2465 +oid sha256:e5bf185f6757e64787952397a04a957ecf9b992041ca1b0db89c782a671a2267 +size 1228 diff --git a/Content/GameData/Quests/DA_Quest_Test.uasset b/Content/GameData/Quests/DA_Quest_Test.uasset new file mode 100644 index 00000000..21d9b5a6 --- /dev/null +++ b/Content/GameData/Quests/DA_Quest_Test.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecdbc7801ea25c6603e65ddad540c32658c7f5474939174130fa2e6e44e1ed7d +size 4454 diff --git a/Content/GameData/Weather/DA_WeatherClear.uasset b/Content/GameData/Weather/DA_WeatherClear.uasset index 59a09fb7..edc22840 100644 --- a/Content/GameData/Weather/DA_WeatherClear.uasset +++ b/Content/GameData/Weather/DA_WeatherClear.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e66e1887ed21c9d1ade28b2dd50a92c031ce2c48feab6375d1cc2a687945a154 -size 4492 +oid sha256:54ff27fa013418815156e1a2b66bc82bd408455f5559b47f31dcc686b70aad78 +size 4543 diff --git a/Content/Materials/VFX/Clouds/Clouds.uasset b/Content/Materials/VFX/Clouds/Clouds.uasset index a90ee853..bf38ac08 100644 --- a/Content/Materials/VFX/Clouds/Clouds.uasset +++ b/Content/Materials/VFX/Clouds/Clouds.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6522a37a8fdb420b932a04f597e28eeaa0d0bf75b5a99821d28f1027e425b908 -size 30122 +oid sha256:7e018c2de3b6b6b7cf350b384ac469673fb4a28667de414377faf08fc295156f +size 21615 diff --git a/Content/Materials/VFX/Clouds/Clouds_Inst.uasset b/Content/Materials/VFX/Clouds/Clouds_Inst.uasset new file mode 100644 index 00000000..9db3ac0c --- /dev/null +++ b/Content/Materials/VFX/Clouds/Clouds_Inst.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85db0c8bd78202b5032ecc618cba71d53ad1e6b22b5fd37eda597aa2fec216d5 +size 9792 diff --git a/Content/Scripts/BP_TimeOfDay.uasset b/Content/Scripts/BP_TimeOfDay.uasset index e02159d1..a7a14d4f 100644 --- a/Content/Scripts/BP_TimeOfDay.uasset +++ b/Content/Scripts/BP_TimeOfDay.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c6164451b1645cc92feaafaf18b0d67d8c9f75a8b066959f4aef254af5502c3 -size 462890 +oid sha256:1c470a2d03109aa8537289e5ee745b3cdd0e542096ff21c14e61a96cf3be9203 +size 463105 diff --git a/Content/UI/MainUI.uasset b/Content/UI/MainUI.uasset index 8c7e8bcb..a9663056 100644 --- a/Content/UI/MainUI.uasset +++ b/Content/UI/MainUI.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d34856c1776efcffc97e645ac867a9a4019a8d96a5c953f125ab4ccbe2bce016 -size 638510 +oid sha256:7acfa2b4d0c19ec9fd208893cd4b40b6f72d996f770f26f6d151ff757bb965a7 +size 640357 diff --git a/Content/UI/Quests/WBP_QuestEntry.uasset b/Content/UI/Quests/WBP_QuestEntry.uasset new file mode 100644 index 00000000..745ad25f --- /dev/null +++ b/Content/UI/Quests/WBP_QuestEntry.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a549520002b70a63333cfb4b07ce411961dd65b9ed88203ac71363dd585c47fa +size 145617 diff --git a/Content/UI/Quests/WBP_QuestEntry_Step.uasset b/Content/UI/Quests/WBP_QuestEntry_Step.uasset new file mode 100644 index 00000000..64032e9c --- /dev/null +++ b/Content/UI/Quests/WBP_QuestEntry_Step.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a77b37f2b27ed39ffcbba38f3cd4f5d321a81f3137b22222b6b0f42f1b903816 +size 85599 diff --git a/Content/UI/Quests/WBP_QuestsWindow.uasset b/Content/UI/Quests/WBP_QuestsWindow.uasset new file mode 100644 index 00000000..d50a3b8e --- /dev/null +++ b/Content/UI/Quests/WBP_QuestsWindow.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a04edac57fb47c115b4582a1624725c4ef93682b237ca62f97fac456b5b4d7c +size 133865 diff --git a/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/OB/6SG8UBX6HIJVWN1CG63KU5.uasset b/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/OB/6SG8UBX6HIJVWN1CG63KU5.uasset index f41e635c..f818ba4c 100644 --- a/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/OB/6SG8UBX6HIJVWN1CG63KU5.uasset +++ b/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/OB/6SG8UBX6HIJVWN1CG63KU5.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af1cf9e41d74e6c18e2abf87126a2593aa19a77290f2affbaf64f1dee55a2578 -size 7122 +oid sha256:b1cd54bb7bde47eadbe6ce5db49086af29dd3876a10e302b7f98a5f2bdf05206 +size 7517 diff --git a/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/XN/4VXPK4RYZHM8HZESMIR8K0.uasset b/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/XN/4VXPK4RYZHM8HZESMIR8K0.uasset index 0fa397de..b706df8a 100644 --- a/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/XN/4VXPK4RYZHM8HZESMIR8K0.uasset +++ b/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/XN/4VXPK4RYZHM8HZESMIR8K0.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d30ad7130a7aaa2f3574ba1ca5132a261dff9b2aea4352c02df1a48424b2cc2 -size 13670 +oid sha256:5d0bb88f011d32a6c2c67933c273b537a6512b3cfe787d5a65ee4404676c3782 +size 13731 diff --git a/Source/ProjectEleri/DialogueSystem/DialogueComponent.cpp b/Source/ProjectEleri/DialogueSystem/DialogueComponent.cpp index e122d8e9..93437060 100644 --- a/Source/ProjectEleri/DialogueSystem/DialogueComponent.cpp +++ b/Source/ProjectEleri/DialogueSystem/DialogueComponent.cpp @@ -10,6 +10,7 @@ #include "SpeechDataAsset.h" #include "Kismet/GameplayStatics.h" #include "ProjectEleri/GameEventSystem/GameEventSubsystem.h" +#include "QuestSystem/QuestSubsystem.h" #define LOCTEXT_NAMESPACE "DialogueSystem" @@ -195,7 +196,15 @@ void UDialogueComponent::AdvanceDialogue() } } - if (!CurrentActiveDialogue->RandomizeLines && (CurrentLineIndex <= CurrentActiveDialogue->DialogueLines.Num() - 1)) + if (!CurrentActiveDialogue->StartQuests.IsEmpty()) + { + for (const FGameplayTag& QuestTag : CurrentActiveDialogue->StartQuests) + { + UQuestSubsystem::Get(this)->OfferQuest(QuestTag); + } + } + + if (!CurrentActiveDialogue->RandomizeLines && (CurrentLineIndex < CurrentActiveDialogue->DialogueLines.Num() - 1)) { CurrentLineIndex++; DialogueWidget->AdvanceDialogue(CurrentActiveDialogue->DialogueLines[CurrentLineIndex].DialogueLine, CurrentActiveDialogue->DialogueLines[CurrentLineIndex].SpeakerName); diff --git a/Source/ProjectEleri/DialogueSystem/SpeechDataAsset.h b/Source/ProjectEleri/DialogueSystem/SpeechDataAsset.h index 23370083..0c120895 100644 --- a/Source/ProjectEleri/DialogueSystem/SpeechDataAsset.h +++ b/Source/ProjectEleri/DialogueSystem/SpeechDataAsset.h @@ -56,6 +56,9 @@ public: UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Eleri|Speech") TSoftClassPtr Npc; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Eleri|Speech", meta = (Categories = "Quests")) + FGameplayTagContainer StartQuests; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Eleri|Speech") FText PlayerAsk; diff --git a/Source/ProjectEleri/Private/TimeOfDayManager.cpp b/Source/ProjectEleri/Private/TimeOfDayManager.cpp index 0afa33ef..7350fb39 100644 --- a/Source/ProjectEleri/Private/TimeOfDayManager.cpp +++ b/Source/ProjectEleri/Private/TimeOfDayManager.cpp @@ -91,6 +91,8 @@ void ATimeOfDayManager::BeginPlay() WeatherObjectPath.Value); } })); } + + CloudsLightMaterial = CloudsLightMaterial.LoadSynchronous(); } void ATimeOfDayManager::PostLoad() @@ -283,7 +285,18 @@ void ATimeOfDayManager::UpdateLightning() CurrentWeaterFadeAlpha) : static_cast(CurrentWeatherPreset->bIsRain)); } - + + //Set clouds + if (sunLight && !sunLight->LightFunctionMaterial) + { + sunLight->SetLightFunctionMaterial(CloudsLightMaterial.Get()); + } + + if (moonLight && !moonLight->LightFunctionMaterial) + { + moonLight->SetLightFunctionMaterial(CloudsLightMaterial.Get()); + } + UpdateMajorLightning(); } diff --git a/Source/ProjectEleri/Public/TimeOfDayManager.h b/Source/ProjectEleri/Public/TimeOfDayManager.h index 2bbb19e0..66926b01 100644 --- a/Source/ProjectEleri/Public/TimeOfDayManager.h +++ b/Source/ProjectEleri/Public/TimeOfDayManager.h @@ -171,6 +171,9 @@ public: UPROPERTY(EditAnywhere) bool enableDebugLogs; + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Time of Day - Lightning Setting") + TSoftObjectPtr CloudsLightMaterial; + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Time of Day - Lightning Setting", meta = (AllowedClasses = "/Script/ProjectEleri.GameEventDataAsset")) TMap WeatherEventDataAssetMap; diff --git a/Source/ProjectEleri/QuestSystem/QuestDataAsset.cpp b/Source/ProjectEleri/QuestSystem/QuestDataAsset.cpp index f1bc946b..504d113c 100644 --- a/Source/ProjectEleri/QuestSystem/QuestDataAsset.cpp +++ b/Source/ProjectEleri/QuestSystem/QuestDataAsset.cpp @@ -3,6 +3,7 @@ #include "QuestDataAsset.h" +#include "Items/ItemDatabase.h" #include "ProjectEleri/GameEventSystem/GameEventRequirements.h" #include "ProjectEleri/Items/DataAssets/ItemDataAsset.h" @@ -124,17 +125,13 @@ void UQuestDataAsset::CollectDeliverables(const FQuestRuntimeState& State, TArra { continue; } - - const FPrimaryAssetId ItemId = Objective.TargetItem.LoadSynchronous() - ? Objective.TargetItem->GetPrimaryAssetId() - : FPrimaryAssetId(); - - if (!ItemId.IsValid()) + + if (!Objective.TargetItem.IsValid()) { continue; } - OutItems.Emplace(ItemId, FMath::Max(1, Objective.RequiredCount)); + OutItems.Emplace(Objective.TargetItem, FMath::Max(1, Objective.RequiredCount)); } } diff --git a/Source/ProjectEleri/QuestSystem/QuestSubsystem.cpp b/Source/ProjectEleri/QuestSystem/QuestSubsystem.cpp index 77afe093..b75a9dfb 100644 --- a/Source/ProjectEleri/QuestSystem/QuestSubsystem.cpp +++ b/Source/ProjectEleri/QuestSystem/QuestSubsystem.cpp @@ -925,8 +925,7 @@ bool UQuestSubsystem::RecountInventoryObjectives(FQuestRuntimeState& State) continue; } - const UItemDataAsset* ItemAsset = Objective.TargetItem.LoadSynchronous(); - const FPrimaryAssetId ItemId = ItemAsset != nullptr ? ItemAsset->GetPrimaryAssetId() : FPrimaryAssetId(); + const FPrimaryAssetId ItemId = Objective.TargetItem; if (!ItemId.IsValid()) { UE_LOG(LogTemp, Warning, TEXT("Quest '%s' step '%s' asks for an item that could not be resolved, so it can never be done."), diff --git a/Source/ProjectEleri/QuestSystem/QuestTypes.h b/Source/ProjectEleri/QuestSystem/QuestTypes.h index 3f10fe35..a352c9be 100644 --- a/Source/ProjectEleri/QuestSystem/QuestTypes.h +++ b/Source/ProjectEleri/QuestSystem/QuestTypes.h @@ -134,7 +134,7 @@ struct PROJECTELERI_API FQuestObjective /** How many times the step has to happen. Ignored by AcquireItems and DeliverItems, which count * what the inventory holds rather than how often something occurred. */ - UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Step", meta = (ClampMin = 1, EditCondition = "StepType!=EQuestStepType::AcquireItems && StepType!=EQuestStepType::DeliverItems")) + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Step", meta = (ClampMin = 1)) int32 RequiredCount = 1; /** Counted, but not required: the quest can be handed in without it */ @@ -168,8 +168,8 @@ struct PROJECTELERI_API FQuestObjective float ArrivalRadius = 0.f; /** AcquireItems / DeliverItems: the item that has to be carried */ - UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Step", meta = (EditCondition = "StepType==EQuestStepType::AcquireItems || StepType==EQuestStepType::DeliverItems", EditConditionHides)) - TSoftObjectPtr TargetItem; + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Step", meta = (EditCondition = "StepType==EQuestStepType::AcquireItems || StepType==EQuestStepType::DeliverItems", EditConditionHides, Categories = "Items")) + FPrimaryAssetId TargetItem; /** AcquireItems / DeliverItems: count only the high quality stack */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Step", meta = (EditCondition = "StepType==EQuestStepType::AcquireItems || StepType==EQuestStepType::DeliverItems", EditConditionHides))