diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..0cf5ea5 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": "No Configurations" +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..aacac9a --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\Gasa.sln", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..c892393 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/.vscode/settings.json b/.vscode/settings.json index 014c294..5fbde66 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,8 @@ { "autoHide.autoHideSideBar": false, - "autoHide.autoHidePanel": false + "autoHide.autoHidePanel": false, + "files.associations": { + "*.rmd": "markdown", + "*.rh": "cpp" + } } \ No newline at end of file diff --git a/Project/Binaries/Win64/UnrealEditor-GasaEditor.dll b/Project/Binaries/Win64/UnrealEditor-GasaEditor.dll index 1cb5d39..cd288f0 100644 --- a/Project/Binaries/Win64/UnrealEditor-GasaEditor.dll +++ b/Project/Binaries/Win64/UnrealEditor-GasaEditor.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:87d9080034e6e697cb0457875a7c667ae01ef5da077e74f113491aac544d4bd5 -size 81408 +oid sha256:91601ca4d02d2526c1f8617d2b10bdaa834c84ff91fbf11d68a08078fc171705 +size 50489856 diff --git a/Project/Config/DefaultGame.ini b/Project/Config/DefaultGame.ini index 87abe9a..24bb9cb 100644 --- a/Project/Config/DefaultGame.ini +++ b/Project/Config/DefaultGame.ini @@ -5,12 +5,12 @@ ProjectName=GASATHON CopyrightNotice= [/Script/Gasa.GasaDevOptions] -Tag_PPV=Global_PPV -Tag_GlobalPPV=Global_PPV ++AttributeSets=/Game/Core/Tables/DT_AttributeSet.DT_AttributeSet +TaggedMessageTable=/Game/Core/Tables/DT_TaggedMessages.DT_TaggedMessages Template_PlayerCamera=/Game/Actors/BP_CameraMount.BP_CameraMount_C Template_HUD_HostUI=/Game/UI/UI_Host.UI_Host_C Template_HostWidgetController=/Game/UI/BP_HostWidgetController.BP_HostWidgetController_C -TaggedMessageTable=/Game/Core/Tables/DT_TaggedMessages.DT_TaggedMessages +Tag_GlobalPPV=Global_PPV [/Script/GameplayAbilities.AbilitySystemGlobals] bUseDebugTargetFromHud=true diff --git a/Project/Saved/AssetData/DataTableEditorLayout/DT_AttributeSet.json b/Project/Saved/AssetData/DataTableEditorLayout/DT_AttributeSet.json new file mode 100644 index 0000000..5d08edf --- /dev/null +++ b/Project/Saved/AssetData/DataTableEditorLayout/DT_AttributeSet.json @@ -0,0 +1,10 @@ +{ + "ColumnWidths": + { + "MaxValue": 165, + "Description": 135, + "Category": 96, + "BaseValue": 106, + "Name": 82 + } +} \ No newline at end of file diff --git a/Project/Source/Gasa/AbilitySystem/GasaAbilitySystem.h b/Project/Source/Gasa/AbilitySystem/GasaAbilitySystem.h index f16bcd4..80b87b4 100644 --- a/Project/Source/Gasa/AbilitySystem/GasaAbilitySystem.h +++ b/Project/Source/Gasa/AbilitySystem/GasaAbilitySystem.h @@ -1,5 +1,62 @@ -#pragma once +#pragma once #include "GasaCommon.h" +#include "Engine/DataTable.h" + +#include "GasaAbilitySystem.generated.h" +USTRUCT(BlueprintType) +struct GASA_API FAttributeSetField : public FTableRowBase +{ + GENERATED_BODY() + + FAttributeSetField() + : Name("Provide_Name") + , Description("Provide Description") + , Category("Optional Category") + , BaseValue(0) + , bUseMinAttribute(false) + , bUseMaxAttribute(false) + , MinAttribute("Attribute behaving has minimum value") + , MinValue(0) + , MaxAttribute("Attribute behaving has maximum value") + , MaxValue(0) + {} + virtual ~FAttributeSetField() + {} + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Gameplay Attribute") + FString Name; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Gameplay Attribute") + FString Description; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Gameplay Attribute") + FString Category; + +// UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Gameplay Attribute") +// FGameplayTag Tag; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Gameplay Attribute") + float BaseValue; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Gameplay Attribute") + bool bUseMinAttribute; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Gameplay Attribute") + bool bUseMaxAttribute; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Gameplay Attribute", meta =( EditCondition="bUseMinAttribute", EditConditionHides)) + FString MinAttribute; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Gameplay Attribute", meta =( EditCondition="bUseMinAttribute==false", EditConditionHides)) + float MinValue; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Gameplay Attribute", meta =( EditCondition="bUseMaxAttribute", EditConditionHides)) + FString MaxAttribute; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Gameplay Attribute", meta =( EditCondition="bUseMaxAttribute==false", EditConditionHides)) + float MaxValue; +}; + diff --git a/Project/Source/Gasa/AbilitySystem/GasaAttributeSet.cpp b/Project/Source/Gasa/AbilitySystem/GasaAttributeSet.cpp index 1b61d03..acb846d 100644 --- a/Project/Source/Gasa/AbilitySystem/GasaAttributeSet.cpp +++ b/Project/Source/Gasa/AbilitySystem/GasaAttributeSet.cpp @@ -109,8 +109,6 @@ void UGasaAttributeSet::PostGameplayEffectExecute( FGameplayEffectModCallbackDat { SetMaxMana( FMath::Clamp( GetMaxMana(), 0, 99999.000000 ) ); } - - PostAttributeChange_Custom(); } void UGasaAttributeSet::PreAttributeChange( FGameplayAttribute const& Attribute, float& NewValue ) @@ -149,8 +147,6 @@ void UGasaAttributeSet::PreAttributeChange( FGameplayAttribute const& Attribute, { NewValue = FMath::Clamp( NewValue, 0, 99999.000000 ); } - - PreAttributeChange_Custom(); } void UGasaAttributeSet::GetLifetimeReplicatedProps( TArray& OutLifetimeProps ) const diff --git a/Project/Source/Gasa/Game/GasaGameInstance.h b/Project/Source/Gasa/Game/GasaGameInstance.h index ded896a..59d0c48 100644 --- a/Project/Source/Gasa/Game/GasaGameInstance.h +++ b/Project/Source/Gasa/Game/GasaGameInstance.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #include "Networking/GasaNetLibrary.h" #include "GasaDevOptionsCache.h" diff --git a/Project/Source/Gasa/GasaDevOptions.h b/Project/Source/Gasa/GasaDevOptions.h index e0e5917..08eb3e4 100644 --- a/Project/Source/Gasa/GasaDevOptions.h +++ b/Project/Source/Gasa/GasaDevOptions.h @@ -16,6 +16,9 @@ public: // NOTE(Ed): Any Soft-References must have their includes defined in GasaDevOptions.cpp // They are used by GasaGen for the GasaDevOptionsCache + UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="GAS") + TArray< TSoftObjectPtr> AttributeSets; + UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="UI") TSoftObjectPtr TaggedMessageTable; diff --git a/Project/Source/Gasa/GasaDevOptionsCache.cpp b/Project/Source/Gasa/GasaDevOptionsCache.cpp index a887f76..0fcbaff 100644 --- a/Project/Source/Gasa/GasaDevOptionsCache.cpp +++ b/Project/Source/Gasa/GasaDevOptionsCache.cpp @@ -11,6 +11,12 @@ void FGasaDevOptionsCache::CachedDevOptions() { UGasaDevOptions* DevOpts = GetMutDevOptions(); + for ( auto& entry : DevOpts->AttributeSets ) + { + AttributeSets.Push( entry.LoadSynchronous() ); + ensureMsgf( entry != nullptr, TEXT( "An AttributeSets entry is null, DO NOT RUN PIE or else you may get a crash if not handled in BP or C++" ) ); + } + TaggedMessageTable = DevOpts->TaggedMessageTable.LoadSynchronous(); ensureMsgf( TaggedMessageTable != nullptr, TEXT( "TaggedMessageTable is null, DO NOT RUN PIE or else you may get a crash if not handled in BP or C++" ) ); diff --git a/Project/Source/Gasa/GasaDevOptionsCache.h b/Project/Source/Gasa/GasaDevOptionsCache.h index 818c7d3..1cb942a 100644 --- a/Project/Source/Gasa/GasaDevOptionsCache.h +++ b/Project/Source/Gasa/GasaDevOptionsCache.h @@ -8,6 +8,8 @@ struct GASA_API FGasaDevOptionsCache { GENERATED_BODY() + UPROPERTY() + TArray AttributeSets; UPROPERTY() UObject* TaggedMessageTable; UPROPERTY()