Tweaks to the quests system and dialogue system bugfix, talking to npcs now triggers dialogue, questing UI made and some test quests and dialogue
This commit is contained in:
@@ -46,6 +46,10 @@ NetIndexFirstBitSegment=16
|
|||||||
+GameplayTagList=(Tag="Items.Gold",DevComment="")
|
+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",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="NpcTags.Test",DevComment="")
|
||||||
|
+GameplayTagList=(Tag="Quests",DevComment="Identity of a quest. Each quest data asset is tagged with Quests.<Name>, 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",DevComment="")
|
||||||
+GameplayTagList=(Tag="SaveGameTags.Alchemy.TableLevel",DevComment="")
|
+GameplayTagList=(Tag="SaveGameTags.Alchemy.TableLevel",DevComment="")
|
||||||
+GameplayTagList=(Tag="SaveGameTags.Bazar.Table.InventorySpace",DevComment="")
|
+GameplayTagList=(Tag="SaveGameTags.Bazar.Table.InventorySpace",DevComment="")
|
||||||
@@ -56,8 +60,6 @@ NetIndexFirstBitSegment=16
|
|||||||
+GameplayTagList=(Tag="SaveGameTags.InteractionStage",DevComment="")
|
+GameplayTagList=(Tag="SaveGameTags.InteractionStage",DevComment="")
|
||||||
+GameplayTagList=(Tag="SaveGameTags.Locked",DevComment="")
|
+GameplayTagList=(Tag="SaveGameTags.Locked",DevComment="")
|
||||||
+GameplayTagList=(Tag="SetByCaller.Effects.ExpModifier",DevComment="")
|
+GameplayTagList=(Tag="SetByCaller.Effects.ExpModifier",DevComment="")
|
||||||
+GameplayTagList=(Tag="Quests",DevComment="Identity of a quest. Each quest data asset is tagged with Quests.<Name>, 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",DevComment="")
|
||||||
+GameplayTagList=(Tag="Skins.Eleri.Body",DevComment="")
|
+GameplayTagList=(Tag="Skins.Eleri.Body",DevComment="")
|
||||||
+GameplayTagList=(Tag="Skins.Eleri.Default",DevComment="")
|
+GameplayTagList=(Tag="Skins.Eleri.Default",DevComment="")
|
||||||
|
|||||||
Binary file not shown.
BIN
Content/GameData/Dialogue/Characters/DA_Test_Speech_1.uasset
LFS
Normal file
BIN
Content/GameData/Dialogue/Characters/DA_Test_Speech_1.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
BIN
Content/GameData/Quests/DA_Quest_Test.uasset
LFS
Normal file
BIN
Content/GameData/Quests/DA_Quest_Test.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Materials/VFX/Clouds/Clouds_Inst.uasset
LFS
Normal file
BIN
Content/Materials/VFX/Clouds/Clouds_Inst.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
BIN
Content/UI/MainUI.uasset
LFS
BIN
Content/UI/MainUI.uasset
LFS
Binary file not shown.
BIN
Content/UI/Quests/WBP_QuestEntry.uasset
LFS
Normal file
BIN
Content/UI/Quests/WBP_QuestEntry.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/UI/Quests/WBP_QuestEntry_Step.uasset
LFS
Normal file
BIN
Content/UI/Quests/WBP_QuestEntry_Step.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/UI/Quests/WBP_QuestsWindow.uasset
LFS
Normal file
BIN
Content/UI/Quests/WBP_QuestsWindow.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,6 +10,7 @@
|
|||||||
#include "SpeechDataAsset.h"
|
#include "SpeechDataAsset.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
#include "ProjectEleri/GameEventSystem/GameEventSubsystem.h"
|
#include "ProjectEleri/GameEventSystem/GameEventSubsystem.h"
|
||||||
|
#include "QuestSystem/QuestSubsystem.h"
|
||||||
|
|
||||||
#define LOCTEXT_NAMESPACE "DialogueSystem"
|
#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++;
|
CurrentLineIndex++;
|
||||||
DialogueWidget->AdvanceDialogue(CurrentActiveDialogue->DialogueLines[CurrentLineIndex].DialogueLine, CurrentActiveDialogue->DialogueLines[CurrentLineIndex].SpeakerName);
|
DialogueWidget->AdvanceDialogue(CurrentActiveDialogue->DialogueLines[CurrentLineIndex].DialogueLine, CurrentActiveDialogue->DialogueLines[CurrentLineIndex].SpeakerName);
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ public:
|
|||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Eleri|Speech")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Eleri|Speech")
|
||||||
TSoftClassPtr<AActor> Npc;
|
TSoftClassPtr<AActor> Npc;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Eleri|Speech", meta = (Categories = "Quests"))
|
||||||
|
FGameplayTagContainer StartQuests;
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Eleri|Speech")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Eleri|Speech")
|
||||||
FText PlayerAsk;
|
FText PlayerAsk;
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ void ATimeOfDayManager::BeginPlay()
|
|||||||
WeatherObjectPath.Value);
|
WeatherObjectPath.Value);
|
||||||
} }));
|
} }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CloudsLightMaterial = CloudsLightMaterial.LoadSynchronous();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ATimeOfDayManager::PostLoad()
|
void ATimeOfDayManager::PostLoad()
|
||||||
@@ -283,7 +285,18 @@ void ATimeOfDayManager::UpdateLightning()
|
|||||||
CurrentWeaterFadeAlpha)
|
CurrentWeaterFadeAlpha)
|
||||||
: static_cast<float>(CurrentWeatherPreset->bIsRain));
|
: static_cast<float>(CurrentWeatherPreset->bIsRain));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Set clouds
|
||||||
|
if (sunLight && !sunLight->LightFunctionMaterial)
|
||||||
|
{
|
||||||
|
sunLight->SetLightFunctionMaterial(CloudsLightMaterial.Get());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (moonLight && !moonLight->LightFunctionMaterial)
|
||||||
|
{
|
||||||
|
moonLight->SetLightFunctionMaterial(CloudsLightMaterial.Get());
|
||||||
|
}
|
||||||
|
|
||||||
UpdateMajorLightning();
|
UpdateMajorLightning();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -171,6 +171,9 @@ public:
|
|||||||
UPROPERTY(EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
bool enableDebugLogs;
|
bool enableDebugLogs;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Time of Day - Lightning Setting")
|
||||||
|
TSoftObjectPtr<UMaterialInstance> CloudsLightMaterial;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Time of Day - Lightning Setting",
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Time of Day - Lightning Setting",
|
||||||
meta = (AllowedClasses = "/Script/ProjectEleri.GameEventDataAsset"))
|
meta = (AllowedClasses = "/Script/ProjectEleri.GameEventDataAsset"))
|
||||||
TMap<FGameplayTag, FSoftObjectPath> WeatherEventDataAssetMap;
|
TMap<FGameplayTag, FSoftObjectPath> WeatherEventDataAssetMap;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "QuestDataAsset.h"
|
#include "QuestDataAsset.h"
|
||||||
|
|
||||||
|
#include "Items/ItemDatabase.h"
|
||||||
#include "ProjectEleri/GameEventSystem/GameEventRequirements.h"
|
#include "ProjectEleri/GameEventSystem/GameEventRequirements.h"
|
||||||
#include "ProjectEleri/Items/DataAssets/ItemDataAsset.h"
|
#include "ProjectEleri/Items/DataAssets/ItemDataAsset.h"
|
||||||
|
|
||||||
@@ -124,17 +125,13 @@ void UQuestDataAsset::CollectDeliverables(const FQuestRuntimeState& State, TArra
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const FPrimaryAssetId ItemId = Objective.TargetItem.LoadSynchronous()
|
if (!Objective.TargetItem.IsValid())
|
||||||
? Objective.TargetItem->GetPrimaryAssetId()
|
|
||||||
: FPrimaryAssetId();
|
|
||||||
|
|
||||||
if (!ItemId.IsValid())
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
OutItems.Emplace(ItemId, FMath::Max(1, Objective.RequiredCount));
|
OutItems.Emplace(Objective.TargetItem, FMath::Max(1, Objective.RequiredCount));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -925,8 +925,7 @@ bool UQuestSubsystem::RecountInventoryObjectives(FQuestRuntimeState& State)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const UItemDataAsset* ItemAsset = Objective.TargetItem.LoadSynchronous();
|
const FPrimaryAssetId ItemId = Objective.TargetItem;
|
||||||
const FPrimaryAssetId ItemId = ItemAsset != nullptr ? ItemAsset->GetPrimaryAssetId() : FPrimaryAssetId();
|
|
||||||
if (!ItemId.IsValid())
|
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."),
|
UE_LOG(LogTemp, Warning, TEXT("Quest '%s' step '%s' asks for an item that could not be resolved, so it can never be done."),
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ struct PROJECTELERI_API FQuestObjective
|
|||||||
|
|
||||||
/** How many times the step has to happen. Ignored by AcquireItems and DeliverItems, which count
|
/** 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. */
|
* 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;
|
int32 RequiredCount = 1;
|
||||||
|
|
||||||
/** Counted, but not required: the quest can be handed in without it */
|
/** Counted, but not required: the quest can be handed in without it */
|
||||||
@@ -168,8 +168,8 @@ struct PROJECTELERI_API FQuestObjective
|
|||||||
float ArrivalRadius = 0.f;
|
float ArrivalRadius = 0.f;
|
||||||
|
|
||||||
/** AcquireItems / DeliverItems: the item that has to be carried */
|
/** AcquireItems / DeliverItems: the item that has to be carried */
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Step", meta = (EditCondition = "StepType==EQuestStepType::AcquireItems || StepType==EQuestStepType::DeliverItems", EditConditionHides))
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Step", meta = (EditCondition = "StepType==EQuestStepType::AcquireItems || StepType==EQuestStepType::DeliverItems", EditConditionHides, Categories = "Items"))
|
||||||
TSoftObjectPtr<UItemDataAsset> TargetItem;
|
FPrimaryAssetId TargetItem;
|
||||||
|
|
||||||
/** AcquireItems / DeliverItems: count only the high quality stack */
|
/** AcquireItems / DeliverItems: count only the high quality stack */
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Step", meta = (EditCondition = "StepType==EQuestStepType::AcquireItems || StepType==EQuestStepType::DeliverItems", EditConditionHides))
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Step", meta = (EditCondition = "StepType==EQuestStepType::AcquireItems || StepType==EQuestStepType::DeliverItems", EditConditionHides))
|
||||||
|
|||||||
Reference in New Issue
Block a user