diff --git a/Config/DefaultGameplayTags.ini b/Config/DefaultGameplayTags.ini index 4e9b8603..8c0a5294 100644 --- a/Config/DefaultGameplayTags.ini +++ b/Config/DefaultGameplayTags.ini @@ -24,6 +24,7 @@ NetIndexFirstBitSegment=16 +GameplayTagList=(Tag="Dialogue.Event.Bazaar.HaggleOption2",DevComment="") +GameplayTagList=(Tag="Dialogue.Event.Bazaar.HaggleOption3",DevComment="") +GameplayTagList=(Tag="Dialogue.Event.Bazaar.QuickSell",DevComment="") ++GameplayTagList=(Tag="Dialogue.Event.Bye",DevComment="") +GameplayTagList=(Tag="Dialogue.Event.Merchant",DevComment="") +GameplayTagList=(Tag="Dialogue.Event.Merchant.Buy",DevComment="") +GameplayTagList=(Tag="Dialogue.Event.Merchant.Sell",DevComment="") diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/BaseClasses/BP_SettingSelectorManager.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/BaseClasses/BP_SettingSelectorManager.uasset index c4fd9db1..fc001020 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/BaseClasses/BP_SettingSelectorManager.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/BaseClasses/BP_SettingSelectorManager.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3bd20e5fc166d3f47377fe8c6d1728586d4ed5980aefaeb5e305c2f3dc39b4ac -size 281053 +oid sha256:679928e28298e96352c6b249370b28c23c9499100a57d1f27e1630f040c59b98 +size 281644 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingContactShadows.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingContactShadows.uasset index a201fd46..71297964 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingContactShadows.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingContactShadows.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4fcb48484482fb6609bfc55736fc6738f4e6ab4ffd3d5b04dd064a9172a5d68a -size 57473 +oid sha256:5e81049c1de417e3bd161132ecfa78fa850c78a8cd44eede8e988e4fc6b2070d +size 57659 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingFilmGrain.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingFilmGrain.uasset index c71f5bdd..b4d92d9e 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingFilmGrain.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingFilmGrain.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0d92e66f806e5e2d2a8325dcdb42a70fce2fe8fd3e1ee90bb7cf3e73ab9e277 -size 25277 +oid sha256:dee5758db3a0c28c4a9be820e3c78a756f721d1239c492f694d68f709afbb07e +size 25388 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingGlobalIllumination.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingGlobalIllumination.uasset index ed25331a..5b319a32 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingGlobalIllumination.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingGlobalIllumination.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4bebad094bcf18775e0111d20306205a7260e51c325a09d4d875e1501fb976ab -size 73608 +oid sha256:7d22beda973fad511552569d83473119f1553e8de0f2861c734dffc6ba5b9edb +size 76433 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingHardwareLumenRT.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingHardwareLumenRT.uasset index 3e88327e..7f0ff6b4 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingHardwareLumenRT.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingHardwareLumenRT.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:501b13a285fe24306851ac48ed82005b3351302e33c613cfc74bbe2bd0d9d3fa -size 73032 +oid sha256:568e2943c28b95c933a9a1b1640c822fae7345a96dc2080a11ea64c80ab329bb +size 73245 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingMotionBlurAmount.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingMotionBlurAmount.uasset index 7444e5bc..ac50c979 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingMotionBlurAmount.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingMotionBlurAmount.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2bf49b49f8f6f7b169094ea31d9c798155cec2dc0326d6f6466e5952758be049 -size 31120 +oid sha256:a12f2e6348fdf239f3e1f8f51397e97fcc58f1bf66436d4b5385525505f7063f +size 31245 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingMotionBlurQuality.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingMotionBlurQuality.uasset index 1046afa2..3303def0 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingMotionBlurQuality.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingMotionBlurQuality.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ddcb864d3ae408a9b7b8928038cf6a9d2b7966004660c819f10ee98f323207e6 -size 41759 +oid sha256:810d9bef092880c65aaee4647ec45ded5e4ff0def2b3c9c19f12fa0f9354021e +size 41976 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingReflections.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingReflections.uasset index a2303d17..01da5fa2 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingReflections.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingReflections.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f11c6fb52b9844cd3b7a78ed1b59615d553afc5a8b3e222e773ca14400a8c855 -size 72871 +oid sha256:f625a44ae870491273291a4b66c5cff3df154d4caa2b6bbe2f714bab4a45b3ba +size 54769 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingTextureFiltering.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingTextureFiltering.uasset index 3cb5b311..f94c4d98 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingTextureFiltering.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingTextureFiltering.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:65c64639539cae1e9b51952fc21d68174dc4abbeba6c57de024038503dc9c206 -size 73833 +oid sha256:ace2c788874c96af056b4111b761b19cd4046914b4d822ad32b5fd8864b68843 +size 73975 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingVirtualShadowMaps.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingVirtualShadowMaps.uasset index da2bc659..02fc081c 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingVirtualShadowMaps.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/GraphicSettings/BP_SettingVirtualShadowMaps.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f50b1c3669027d952a7da2ea12acf2d5178de22d310cba205f49b66e1e0a9ad -size 72806 +oid sha256:e337a931841dccd701fa9f15f9be57b0b6ae92f997e37c907e523e44e7929454 +size 72998 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingAntiAliasingMethod.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingAntiAliasingMethod.uasset index 17a50102..f7b39b84 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingAntiAliasingMethod.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingAntiAliasingMethod.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7ce54f64f1a822ebb6def072ee01fda223128ac6a0b5400ab953c51722765c42 -size 178446 +oid sha256:55db9c537b23c67b746a519da786c4918fb2d05566e33065c45860b4f3235a3f +size 47894 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingAntiAliasingQuality.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingAntiAliasingQuality.uasset index f21873a7..68cd3c4a 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingAntiAliasingQuality.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingAntiAliasingQuality.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:95341ded2e2b975b74b951e5f612fdb2970ee62f0d03eeb0ca17d4b1dde2b451 -size 73545 +oid sha256:a3c5c00e918fae775f22e9e1736b4f01454eb7dcea05fde95c70d966ed23d4f0 +size 73693 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingFramerateLimit.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingFramerateLimit.uasset index 8348d0bb..ddc67d50 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingFramerateLimit.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingFramerateLimit.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac9a4febaf8cbfee1036ee7895a026186a5b47eebef1d6f3b7561fa6e99189ab -size 78476 +oid sha256:e38eaa4b010997d4fe788828f5c098aea87ebe2e5c8546011284fd76384f7e74 +size 78704 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingUpscalingMethod.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingUpscalingMethod.uasset index 3138c0f2..1fc04652 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingUpscalingMethod.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingUpscalingMethod.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7133fb70de882b4083f5db7a9724904b3d618d25d66d21668f477ea68a0c0072 -size 176692 +oid sha256:cd90fe22e2e0c258d31ead7b1d160d74329500aaa35f8ae1eac96726e5fde517 +size 176905 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingUpscalingQuality.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingUpscalingQuality.uasset index a947669c..f32e2dd5 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingUpscalingQuality.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingUpscalingQuality.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3b3aad3be19f60200d4bd36ea449642660672bc8d64cc1a02f3f2920f65ec89f -size 18636 +oid sha256:2150de132905e625585d6737e92cbce4b46ffb8b728a1c197206c98fe91fcfff +size 18851 diff --git a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingVSync.uasset b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingVSync.uasset index cd198d5f..a633071f 100644 --- a/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingVSync.uasset +++ b/Content/EasyOptionsMenu/Core/SettingManagers/VideoSettings/BP_SettingVSync.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aa053e266013a6c936ec3d582e784effee71b6b386ad0092ef6352e1088d3f96 -size 127498 +oid sha256:a10aba2c49ea91b9fa78450e156f806cc49ba9bfb7c8e701b1a88a79b254f10e +size 102391 diff --git a/Content/EasyOptionsMenu/Core/WBP_EasyOptionsMenuMain.uasset b/Content/EasyOptionsMenu/Core/WBP_EasyOptionsMenuMain.uasset index 97342224..cc347440 100644 --- a/Content/EasyOptionsMenu/Core/WBP_EasyOptionsMenuMain.uasset +++ b/Content/EasyOptionsMenu/Core/WBP_EasyOptionsMenuMain.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7ed9344ac4fa10a77529778d0266ace092c34099a816cc45ee2b8c8302612e42 -size 1515911 +oid sha256:0882112b2667496a2cd63ba4b08c46cbfa13aae9874a27265b42af37b300b543 +size 1513115 diff --git a/Content/EasyOptionsMenu/Datas/E_AntiAliasingMethods.uasset b/Content/EasyOptionsMenu/Datas/E_AntiAliasingMethods.uasset index 0cfd8095..c013e9b1 100644 --- a/Content/EasyOptionsMenu/Datas/E_AntiAliasingMethods.uasset +++ b/Content/EasyOptionsMenu/Datas/E_AntiAliasingMethods.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3b8a3526f8a89f4e6840c5d3b8eb8ecc9025d3543bde61ba7556842d331733ac -size 2766 +oid sha256:09028e74b15ca26b3dcb031b9aa9bd91bb78a72c681d476da67165e94e5c4e6a +size 2828 diff --git a/Content/EasyOptionsMenu/EasyGameUI/BP_EasyMainGameHUD.uasset b/Content/EasyOptionsMenu/EasyGameUI/BP_EasyMainGameHUD.uasset index 567b6578..cf747cf7 100644 --- a/Content/EasyOptionsMenu/EasyGameUI/BP_EasyMainGameHUD.uasset +++ b/Content/EasyOptionsMenu/EasyGameUI/BP_EasyMainGameHUD.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c63860012e20e6085907ea518b90c88c9fc2635a23c62dab9a5f6d5fc50f4116 -size 2998938 +oid sha256:5e3f5f22ba851bb7af823c5d5f3307c5c174a65a5f849025e401647bfacd8790 +size 2999012 diff --git a/Content/GameData/Dialogue/GameSpecific/SDA_Merchant.uasset b/Content/GameData/Dialogue/GameSpecific/SDA_Merchant.uasset index ed624cc7..c6e5dc70 100644 --- a/Content/GameData/Dialogue/GameSpecific/SDA_Merchant.uasset +++ b/Content/GameData/Dialogue/GameSpecific/SDA_Merchant.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd78bf01280f4b42fdea5dc921197f89de4986746cdc7166c8e8a291de33ffc2 -size 4122 +oid sha256:6651512840d653c36b22ffbff9e8cc3acf94c9e68e85c9f6535b89eb70479523 +size 5638 diff --git a/Content/Scripts/InventorySystem/MerchantBP.uasset b/Content/Scripts/InventorySystem/MerchantBP.uasset index 8123430b..9221778b 100644 --- a/Content/Scripts/InventorySystem/MerchantBP.uasset +++ b/Content/Scripts/InventorySystem/MerchantBP.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf47dcca93b093d6fe6530742cd22fada6524d9dcd073360828d410b7917f4ee -size 336970 +oid sha256:ec84a50395eae7b30e0082d1f53c854ff5e1a01f46bbf16ff683611b9e7bae8b +size 342417 diff --git a/Content/Scripts/ShopAndTradeSystem/WBP_TradeItemSlot.uasset b/Content/Scripts/ShopAndTradeSystem/WBP_TradeItemSlot.uasset index 938a3838..45010e0f 100644 --- a/Content/Scripts/ShopAndTradeSystem/WBP_TradeItemSlot.uasset +++ b/Content/Scripts/ShopAndTradeSystem/WBP_TradeItemSlot.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5291c7ac47e3d259e9ba562292a000b824a1c398151606e23e8a0d952d1f0c9b -size 221966 +oid sha256:6c4360986e2cd441330f4524c1454d51b5ffe136c7dea5c2b34a236a98737a9a +size 239110 diff --git a/Content/Scripts/ShopAndTradeSystem/WBP_TradeWidget.uasset b/Content/Scripts/ShopAndTradeSystem/WBP_TradeWidget.uasset index 8e976802..36bdcf55 100644 --- a/Content/Scripts/ShopAndTradeSystem/WBP_TradeWidget.uasset +++ b/Content/Scripts/ShopAndTradeSystem/WBP_TradeWidget.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20a039879b40439379afade274601589291d1b47fad237642782fa35a1924e7f -size 823292 +oid sha256:4d97118e8882318695d7a415618249f37e5d806081f3cd45f41a6f9da28a2232 +size 810349 diff --git a/Content/__ExternalActors__/Maps/Persistent_GameWorld/6/FJ/XSLZCCYW6P0XOLD701W2BA.uasset b/Content/__ExternalActors__/Maps/Persistent_GameWorld/6/FJ/XSLZCCYW6P0XOLD701W2BA.uasset index c29bc1f4..a896b03c 100644 --- a/Content/__ExternalActors__/Maps/Persistent_GameWorld/6/FJ/XSLZCCYW6P0XOLD701W2BA.uasset +++ b/Content/__ExternalActors__/Maps/Persistent_GameWorld/6/FJ/XSLZCCYW6P0XOLD701W2BA.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8dcc5ce9ebc082de16de6cdafe9676d5467df54488853453756021d4fa6c66a1 -size 20698 +oid sha256:9662dfde003334a71061dbaa49db08759284472f7e8b2144b4897a36054d5e78 +size 20376 diff --git a/Source/ProjectEleri/Audio/EleriAudioSubsystem.cpp b/Source/ProjectEleri/Audio/EleriAudioSubsystem.cpp index c0a60f9f..8ffbb14f 100644 --- a/Source/ProjectEleri/Audio/EleriAudioSubsystem.cpp +++ b/Source/ProjectEleri/Audio/EleriAudioSubsystem.cpp @@ -17,6 +17,9 @@ void UEleriAudioSubsystem::Initialize(FSubsystemCollectionBase& Collection) { Super::Initialize(Collection); +#if WITH_EDITOR + +#elif // The rotation starts on its own, so that a level does not have to remember to ask for music. Safe // here because a game instance is handed the world it will run in before its subsystems are // initialised, so GetWorld() already answers with the world the music is going to live in. @@ -24,6 +27,7 @@ void UEleriAudioSubsystem::Initialize(FSubsystemCollectionBase& Collection) { World->GetTimerManager().SetTimer(SoundtrackTimerHandle, this, &UEleriAudioSubsystem::StartDefaultMusic, 1.f, false); } +#endif } void UEleriAudioSubsystem::Deinitialize() diff --git a/Source/ProjectEleri/DialogueSystem/DialogueComponent.cpp b/Source/ProjectEleri/DialogueSystem/DialogueComponent.cpp index e8f2bf1a..3e3900ec 100644 --- a/Source/ProjectEleri/DialogueSystem/DialogueComponent.cpp +++ b/Source/ProjectEleri/DialogueSystem/DialogueComponent.cpp @@ -136,7 +136,7 @@ void UDialogueComponent::StartDialogueInternal(USpeechDataAsset* DialogueAssetPa DialogueWidget = Cast(EleriPlayerController->ToggleDialogueWindow(true)); DialogueWidget->AssignDialogueComponent(this); - CurrentLineIndex = 0; + CurrentLineIndex = GetStartingDialogueLineIndex(DialogueAssetPath); CurrentActiveDialogue = DialogueAssetPath; CurrentDialogueReplacementMap = ReplacementMap; DialogueWidget->DisplayDialogue(CurrentActiveDialogue, GetOwner(), CurrentDialogueReplacementMap); @@ -226,7 +226,7 @@ void UDialogueComponent::AdvanceDialogue() return; } - if (CurrentLineIndex < CurrentActiveDialogue->DialogueLines.Num()) + if (CurrentLineIndex < CurrentActiveDialogue->DialogueLines.Num() && !CurrentActiveDialogue->bRandomLines) { const FSoftObjectPath EventToTrigger = CurrentActiveDialogue->DialogueLines[CurrentLineIndex].TriggerEventStart; if (!EventToTrigger.IsNull()) @@ -235,7 +235,7 @@ void UDialogueComponent::AdvanceDialogue() } } - if (!CurrentActiveDialogue->StartQuests.IsEmpty()) + if (!CurrentActiveDialogue->StartQuests.IsEmpty() && !CurrentActiveDialogue->bRandomLines) { for (const FGameplayTag& QuestTag : CurrentActiveDialogue->StartQuests) { @@ -243,7 +243,7 @@ void UDialogueComponent::AdvanceDialogue() } } - if (CurrentLineIndex < CurrentActiveDialogue->DialogueLines.Num() - 1) + if (CurrentLineIndex < CurrentActiveDialogue->DialogueLines.Num() - 1 && !CurrentActiveDialogue->bRandomLines) { CurrentLineIndex++; DialogueWidget->AdvanceDialogue(CurrentActiveDialogue->DialogueLines[CurrentLineIndex].DialogueLine, CurrentActiveDialogue->DialogueLines[CurrentLineIndex].SpeakerName); @@ -338,6 +338,28 @@ TArray UDialogueComponent::GetDialogueOptionsFromPlayerSpeakList(const TA return Options; } +int32 UDialogueComponent::GetStartingDialogueLineIndex(USpeechDataAsset* DialogueAssetPath) +{ + if (!DialogueAssetPath) return INDEX_NONE; + + TArray ValidIndexes; + for (int32 Index = 0; Index < DialogueAssetPath->DialogueLines.Num(); ++Index) + { + if (DialogueAssetPath->DialogueLines[Index].EventRequired.IsValid() && UGameEventSubsystem::GetGameEventSubsystem()->GetEventStage(DialogueAssetPath->DialogueLines[Index].EventRequired) < EEventStage::STARTED) + { + continue; + } + + ValidIndexes.Add(Index); + } + + if (ValidIndexes.IsEmpty()) return INDEX_NONE; + + if (!DialogueAssetPath->bRandomLines) return ValidIndexes[0]; + + return ValidIndexes[FMath::RandRange(0, ValidIndexes.Num() - 1)]; +} + EDialogueSceneStart UDialogueComponent::StartDialogueScene(const USpeechDataAsset* DialogueAsset, EDialogueSceneTiming Timing) { if (DialogueAsset == nullptr || DialogueAsset->Scene.IsNull() || DialogueAsset->SceneTiming != Timing) diff --git a/Source/ProjectEleri/DialogueSystem/DialogueComponent.h b/Source/ProjectEleri/DialogueSystem/DialogueComponent.h index e77f927d..2b663bfa 100644 --- a/Source/ProjectEleri/DialogueSystem/DialogueComponent.h +++ b/Source/ProjectEleri/DialogueSystem/DialogueComponent.h @@ -95,6 +95,8 @@ protected: static TArray GetPlayerAsksFromDialogueList(const TArray& DialogueList); static TArray GetDialogueOptionsFromPlayerSpeakList(const TArray& SpeakList); + + static int32 GetStartingDialogueLineIndex(USpeechDataAsset* DialogueAssetPath); UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "DialogueWidget") TSubclassOf DialogueWidgetClass; diff --git a/Source/ProjectEleri/DialogueSystem/Speech.h b/Source/ProjectEleri/DialogueSystem/Speech.h index b70a72ac..a1ae4ea6 100644 --- a/Source/ProjectEleri/DialogueSystem/Speech.h +++ b/Source/ProjectEleri/DialogueSystem/Speech.h @@ -22,6 +22,9 @@ struct FLineData { GENERATED_BODY() + UPROPERTY(EditAnywhere, BlueprintReadOnly, meta=(MetaClass="/Script/ProjectEleri.GameEventDataAsset")) + FSoftObjectPath EventRequired; + UPROPERTY(EditAnywhere, BlueprintReadOnly) EDialogueEmotion DialogueEmotion; diff --git a/Source/ProjectEleri/DialogueSystem/SpeechDataAsset.h b/Source/ProjectEleri/DialogueSystem/SpeechDataAsset.h index 9288a65e..9de39dad 100644 --- a/Source/ProjectEleri/DialogueSystem/SpeechDataAsset.h +++ b/Source/ProjectEleri/DialogueSystem/SpeechDataAsset.h @@ -97,13 +97,13 @@ class PROJECTELERI_API USpeechDataAsset : public UDataAsset GENERATED_BODY() public: - UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Eleri|Event Requirment") + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Eleri|Event Requirment", meta = (EditCondition = "!bRandomLines", EditConditionHides)) TArray EventRequirements; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Eleri|Speech", meta = (AllowedClasses = "/Script/ProjectEleri.NpcBaseCharacter")) TSoftClassPtr Npc; - UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Eleri|Speech", meta = (Categories = "Quests")) + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Eleri|Speech", meta = (Categories = "Quests", EditCondition = "!bRandomLines", EditConditionHides)) FGameplayTagContainer StartQuests; /** @@ -157,6 +157,11 @@ public: UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Eleri|Speech") bool bIsStartingDialogue; + + // Will pick one at random then display options if they're present. + // If this is enabled, dialogue cannot trigger quests or events + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Eleri|Speech") + bool bRandomLines; UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Eleri|Speech") TArray DialogueLines;