From c5d1d14ac603e8eae12200ea43fb3df921e1f9d6 Mon Sep 17 00:00:00 2001 From: Arnaud Jamin Date: Wed, 11 Oct 2023 01:28:24 -0400 Subject: [PATCH] unify abilities data asset --- Content/Core/Debug/DA_Debug_Abilities.uasset | Bin 1850 -> 12298 bytes Content/Core/Debug/DA_Debug_Cheats.uasset | Bin 5380 -> 0 bytes Content/Core/Debug/DA_Debug_Pools.uasset | Bin 4920 -> 0 bytes Content/Core/Debug/DA_Debug_Tweaks.uasset | Bin 5418 -> 0 bytes .../Private/CogAbilityReplicator.cpp | 18 +- .../Private/CogAbilityWindow_Abilities.cpp | 25 ++- .../Private/CogAbilityWindow_Attributes.cpp | 31 +-- .../Private/CogAbilityWindow_Cheats.cpp | 30 +-- .../Private/CogAbilityWindow_Effects.cpp | 30 +-- .../Private/CogAbilityWindow_Pools.cpp | 7 +- .../Private/CogAbilityWindow_Tags.cpp | 2 +- .../Private/CogAbilityWindow_Tweaks.cpp | 37 ++-- .../CogAbility/Public/CogAbilityDataAsset.h | 203 ++++++++++++++++++ .../Public/CogAbilityDataAsset_Abilities.h | 21 -- .../Public/CogAbilityDataAsset_Cheats.h | 51 ----- .../Public/CogAbilityDataAsset_Pools.h | 47 ---- .../Public/CogAbilityDataAsset_Tweaks.h | 108 ---------- .../CogAbility/Public/CogAbilityReplicator.h | 20 +- .../Public/CogAbilityWindow_Abilities.h | 4 +- .../Public/CogAbilityWindow_Attributes.h | 4 + .../Public/CogAbilityWindow_Cheats.h | 8 +- .../Public/CogAbilityWindow_Effects.h | 6 +- .../Public/CogAbilityWindow_Pools.h | 4 +- .../Public/CogAbilityWindow_Tweaks.h | 4 +- .../Private/CogEngineWindow_Selection.cpp | 2 + Source/CogSample/CogSample.Build.cs | 1 - Source/CogSample/CogSampleGameState.cpp | 24 +-- Source/CogSample/CogSampleGameState.h | 7 +- 28 files changed, 347 insertions(+), 347 deletions(-) delete mode 100644 Content/Core/Debug/DA_Debug_Cheats.uasset delete mode 100644 Content/Core/Debug/DA_Debug_Pools.uasset delete mode 100644 Content/Core/Debug/DA_Debug_Tweaks.uasset create mode 100644 Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset.h delete mode 100644 Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Abilities.h delete mode 100644 Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Cheats.h delete mode 100644 Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Pools.h delete mode 100644 Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Tweaks.h diff --git a/Content/Core/Debug/DA_Debug_Abilities.uasset b/Content/Core/Debug/DA_Debug_Abilities.uasset index e21228fb90058a633a29983e7f7287d1e524d3ac..e752dba9cc0cf9f648676844da52825a7afb9b09 100644 GIT binary patch literal 12298 zcmds74Rln+6&^$ZF-VXf6^Wpz2!Ra&Vo1^8X7dXq1d@owpZJn}*{s>0RYd)}685XEF9Ul$fw+y(s0jdDGp?cWfT?%sa0g=u--` z%eRy-esTI$Pv`f%Y~fpXKd+1i+QHftdq2uqc;vio=}Vof^Bq?M?b3@Fy8_Cz0>!VU zxq_OSmaA5UJZZVkO8!yltn&K2hF8@A#n?|E-`|aYvh4F2y9_=vGt=|OjT?K-gbY{S z*o+Cexf7hO^!%KO6Eh}`cctgLI2yqqHwz48%mF3V9fNoiyAw*xFGBA1R_4b3t#hZg z_Rh??W%s_hPnIm3**E9a-22bkcr*Lv&Sf|@@0##O#<7eFmFwIVMgb*Ac5 z6gdZQ7v|PnSP7Wd(j5h4J4>Gime-IzNR<$_K(W(bgNjBWiK3`u+Oz zkWy^~HJ4A(byku7>z7a@r`uf`)Q#eh&+yj!ysF0jwC<7FFmvYAG$mZB1?yGK2(zLU zd%T>fVQAi}kfE{*jHH`6jwmItKI{$WlyQBrH&LfI1%T-ju04Om?m0?zoh#@IYAkEg zz7WdfQVi7-)WSt>=1bn+o{XfR$CN$ns#O((^&9WniaaCq(qPcXR<^!;Z#2BTNmc6D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%LJm*RyFviw3ukt|M#lNA(h0Is0E_oHzxGIar{g2598OuU-kd; f%O_hLlU~_`=1P}&!GksKm^kC?^=n4bK#2bjPqWi_nFOz{m#5K#Xi5vf)^yH&%#1eU^ud4s^Pks$&VSDT-|2y) z_m`v5=!Hyx+${i$I1@5(EOd>}f33f>ls9L7z)dz7jv()54nQf+Mi<}BjP{_&j1K1M z@fjVQTOr(>NAL@>z$DZHD8#|Y8KMq-7vt=7SgIX1r`2jP)mW_64JM1jQq#a$?Z?d3 zcC)26ri}4`DGLDiRE!sqCamF1BR?CUB+_*5>dI*I#KUKUvp;Gcoqs#BS{eNA8hbL= z_p0qf3GGdOD3EMSD+69f{28>WsOWIoDo!&$<0V#QGnf@QfcVaxLXJiX4i7ht6VZbE z=WJDZ`WMeKN{56Z$kk-INXL(bi;T_gAdV>V;dU_?Vxk;|#_>-A*|Y`&43;uy3U=b6 z&2y1?<(Lll{_(dWWViF)OT3RY2fe&s=;LJ}7-+?ENFmyNcW6a6hbnV->0S(2E+4T`}eLBiL65nAC?=dPEa?xu*-0pDDs5!AGXLzwAcQ`uyE?u(i~^*p7l0CiCPI=KCjZZ$pN5%pkdj_U($V zV|w>0M;I9rsKkUdEI$>OKy9ak{1Nih306@rU!ynETR}ZKJ3=x&ic1Hz4OcPevq5-(o4+i!S`278p57p=L&reh=cUY>1P|x|*InI*4{r=;p<+()4G;A@(29 zZZxBJB2{eEON#IMoBi3*t5l!-JMkujYap%_QnAI>!X1@HbG?Kd2M`G%YwB+CT!eylx} MH9J*q(s-o*7t9ZsHvj+t diff --git a/Content/Core/Debug/DA_Debug_Cheats.uasset b/Content/Core/Debug/DA_Debug_Cheats.uasset deleted file mode 100644 index b8e39b9e14ae300abaa4010d4765a68afdb56f7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5380 zcmbtY4Qv!e6do+Ug^Hz65L*OAE0kXO=?{pZT<_Ym{1!?>f{At8F73hf_T1eTj$qOV zni@1jOOQk%5fP0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d2OM5gp!&%ax;tCpk<8UcAlTGBHkum}#lp{@$ z?ZgyC!N<&Z@$;)nEK5zJY8(UKmcj@b@IHPNA`{x&$|rx{{RhT B+ui^G diff --git a/Content/Core/Debug/DA_Debug_Pools.uasset b/Content/Core/Debug/DA_Debug_Pools.uasset deleted file mode 100644 index d2d75a9732e0f20d1669137592c191c4a72471d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4920 zcmd5=Yiv|S6g~*Zt5u$rS7~_`D759#ZX2|l?e>K{y3j(c~deCCEHY8v*R{w!nP7av|o_aSfEiMpNd z*39at95Qv=r;i;{<{|G=(}D9plx@2*;_C%_JclduW+U&dp#a&~=2t1rEZ-Z{S$;XI z4>#tQd)D*LdS5W887KijI-VTByWkoOFcrHM6(wb!qT+>%U5m>-g+)cKMJ{h)QCUU# zVo!mqq`<|cNf%Rc+%*-2xvQDR6obt#%v-?c0rW4|Cz;1Z zoG#vX`E}~F;r@fhSUmZQ_Ux*36`2hOR(iEEm=S|2tU zj5gCA;Bu0)5{(NVd+uF$XS`fZOMvO{g7@5Ow7g95KjaN+K^;n#d>1A`Z?Mr*uWG6p zAs@iOE$=;r21GUq?cd58>Ex9v(;9q=*%ZT5HEHuinjw#dG$qo9t0ec0U3g5WW{PGu zLEX`URcW!|YSzdCaQ2(-i^N;52AHB-TaEP^m4lGCLTQD`n{(C?TI>rgzPhaZVHT%0 z#8?B=U&}f?LNH9FSq&&~>6ej5xCS);jz_pWGKBp7`@T=dm;r9L zlFZ_-_#hZyaAn|;bh1rN{e#SJ#?I_HdGJCevVCYorI9TU`V~!mSTWULfOHrk#ZPXD zw2=X=h#uA2vxr94xjQLJ%(dRmp+5w zAuk*UuK;%TkoL8T7G|)gU_nPVj{3{FUl$H5rl`xW_3LWL#O##u0C{hBXONHMrfQYu zkj5alsq5_6>t=Me#9pWRJGS97ZO48obRWJlap$)jPBLi50dR{m8bmMF@7E|%v1;0VXnCwq(mP5H52Xa*6 z=cJIEE9R)l7X3u{;^nAJ6ZI!2Z4fVqaC)uP*6(aFpnOfEI)FqKG8s|DrjN+3i+F$9 z^yd;2iK@JZ_W<6fKo=CRPx54&NWYx3x1=X^>?epsFV@ai#bHT70+IR1j>}0=zVni& z7*)kl`1y3TS$6SHbTHIDmm z$0|l1pUvr;kp(FEiE{W2FN5YT+ANOFP$nZ$!Qe#i7bzr}`-Bh`{e&d1X{snh6pftX zF1IOyC6(%8oHSS|$v(dYU)Ag?eJ34uG4x6r4BFB~+Z^_3{ zwutc!XBK>3PpB`Q8{6Lg{z-{b6g=lR>9Qq~)|A`E0@j+2|BbpgwzuE&%(k(mMl@O~ zJ?vP)j^`(o$`2swmVULTjPx^itbFF!bH)(B9Gf+v)|4itB208GRnpL;Jcu-*w8$oF zz4HL2D#?kQu%hqHnG&YFf*iw?mbgVQl~(DalrZJl9K*CHQme3yV~^8C#Oa3TaY~?* z#45)?Zz_`(oto|*y7t7~xS9Ju%OqJ8fFN2gS$iIB6sL7;)dV_Insb8KpeI!p(PXkL zGXE(;S+e=9M_I)G>z5Lw3>C*9?K$)>L1GT|4^m!VjzQWp=>Kqu-$b&I|D$f}yM@Uj zW_eS%Ud~lqe9r7|K1w@-p7q1%hQRkcjYX~I& EH`9vK`~Uy| diff --git a/Content/Core/Debug/DA_Debug_Tweaks.uasset b/Content/Core/Debug/DA_Debug_Tweaks.uasset deleted file mode 100644 index 2de255d52d2fad68054bce2740014d9081c10533..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5418 zcmds5Ym8Gx6h4T8g2+QwQ9-+cBCy+bVHa3Iur2#S7FWw^)R^_Moh^0mw)OTFDA8n5 z+z{graV25|H9Vq5jTm1sng|9=e4rs}RE)$2Kh$VML~sRN&o_6bEq&09uOFV|-kE#O zH|NZpIp@r@JMWtM$glnV{kIGz8g>fNL2f~V`1xVk_5XGU)5&ctM%^7nAdqG zQ8~As2BS-O0x?T?7Ko+EuxEjBoEuJ_k_{WbpSzCi7aK+Q~F8q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Jd{i&8Vp9U~9uLQ?`yYV{|hAyde5#w@~07W4IDxo`@2 z6Mtu>o<1zxQaU*!(I?DF7ByM=MhD4-u*T$)Z=xxx)nTeWGflbb;j3)IEPqH-6FQN2>N|x}w0jnO_)6 zr%Sbez5eJ!<=^wGw(wv1)$!??9KT+yJf&iqI#ow|P^N|kY357?!fn4G=?uuLt2z~Q zrPgNmDm5;x4w0upnz>O4hiXu6TeMoBS`AicmummH*ubwiP=Qk4_=XN3-4=BXeo=w+ zs{i+{@oSglw(x@Hp$|el;35Yq=cnXvqrCwHL0`wGRqF%lFT|=G3=e LpW<~s3HUz&lTweaks.Num() * TweaksAsset->TweaksCategories.Num()); @@ -324,7 +324,7 @@ float* ACogAbilityReplicator::GetTweakCurrentValuePtr(const UCogAbilityDataAsset } //-------------------------------------------------------------------------------------------------------------------------- -void ACogAbilityReplicator::SetTweakCurrentValue(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 TweakIndex, int32 TweakCategoryIndex, float Value) +void ACogAbilityReplicator::SetTweakCurrentValue(const UCogAbilityDataAsset* TweaksAsset, int32 TweakIndex, int32 TweakCategoryIndex, float Value) { if (TweaksAsset == nullptr) { @@ -344,13 +344,13 @@ void ACogAbilityReplicator::SetTweakCurrentValue(const UCogAbilityDataAsset_Twea } //-------------------------------------------------------------------------------------------------------------------------- -void ACogAbilityReplicator::SetTweakProfile(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 ProfileIndex) +void ACogAbilityReplicator::SetTweakProfile(const UCogAbilityDataAsset* TweaksAsset, int32 ProfileIndex) { Server_SetTweakProfile(TweaksAsset, ProfileIndex); } //-------------------------------------------------------------------------------------------------------------------------- -void ACogAbilityReplicator::Server_SetTweakProfile_Implementation(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 ProfileIndex) +void ACogAbilityReplicator::Server_SetTweakProfile_Implementation(const UCogAbilityDataAsset* TweaksAsset, int32 ProfileIndex) { if (TweaksAsset == nullptr) { @@ -396,7 +396,7 @@ void ACogAbilityReplicator::Server_SetTweakProfile_Implementation(const UCogAbil } //-------------------------------------------------------------------------------------------------------------------------- -void ACogAbilityReplicator::GetActorsFromTweakCategory(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 TweakCategoryIndex, TArray& Actors) +void ACogAbilityReplicator::GetActorsFromTweakCategory(const UCogAbilityDataAsset* TweaksAsset, int32 TweakCategoryIndex, TArray& Actors) { if (TweaksAsset == nullptr) { diff --git a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Abilities.cpp b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Abilities.cpp index 2fcd900..7201d89 100644 --- a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Abilities.cpp +++ b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Abilities.cpp @@ -1,14 +1,12 @@ #include "CogAbilityWindow_Abilities.h" -#include "CogAbilityDataAsset_Abilities.h" +#include "CogAbilityDataAsset.h" #include "CogAbilityHelper.h" +#include "CogImguiHelper.h" #include "CogWindowWidgets.h" #include "imgui.h" #include "imgui_internal.h" -ImVec4 ActiveColor(1.0f, 0.8f, 0.0f, 1.0f); -ImVec4 DeactiveColor(1.0f, 1.0f, 1.0f, 1.0f); - //-------------------------------------------------------------------------------------------------------------------------- void UCogAbilityWindow_Abilities::RenderHelp() { @@ -17,7 +15,7 @@ void UCogAbilityWindow_Abilities::RenderHelp() "Click the ability check box to force its activation or deactivation. " "Right click an ability to open or close the ability separate window. " "Use the 'Give Ability' menu to manually give an ability from a list defined in the '%s' data asset. " - , TCHAR_TO_ANSI(*GetNameSafe(AbilitiesAsset.Get()))); + , TCHAR_TO_ANSI(*GetNameSafe(Asset.Get()))); } //-------------------------------------------------------------------------------------------------------------------------- @@ -108,10 +106,10 @@ void UCogAbilityWindow_Abilities::RenderAbiltiesMenu(AActor* Selection) { if (ImGui::BeginMenu("Give Ability")) { - if (AbilitiesAsset != nullptr) + if (Asset != nullptr) { int Index = 0; - for (TSubclassOf AbilityClass : AbilitiesAsset->Abilities) + for (TSubclassOf AbilityClass : Asset->Abilities) { ImGui::PushID(Index); @@ -164,7 +162,11 @@ void UCogAbilityWindow_Abilities::RenderAbilitiesTable(UAbilitySystemComponent& ImGui::PushID(Index); - ImVec4 Color = Spec.ActiveCount > 0 ? ActiveColor : DeactiveColor; + ImVec4 Color(1.0f, 1.0f, 1.0f, 1.0f); + if (Asset != nullptr) + { + Color = FCogImguiHelper::ToImVec4(Spec.ActiveCount > 0 ? Asset->AbilityActiveColor : Asset->AbilityInactiveColor); + } ImGui::PushStyleColor(ImGuiCol_Text, Color); //------------------------ @@ -332,6 +334,12 @@ void UCogAbilityWindow_Abilities::RenderAbilityInfo(const UAbilitySystemComponen ImGui::TableSetupColumn("Property"); ImGui::TableSetupColumn("Value"); + ImVec4 Color(1.0f, 1.0f, 1.0f, 1.0f); + if (Asset != nullptr) + { + Color = FCogImguiHelper::ToImVec4(Spec.ActiveCount > 0 ? Asset->AbilityActiveColor : Asset->AbilityInactiveColor); + } + //------------------------ // Name //------------------------ @@ -339,7 +347,6 @@ void UCogAbilityWindow_Abilities::RenderAbilityInfo(const UAbilitySystemComponen ImGui::TableNextColumn(); ImGui::TextColored(TextColor, "Name"); ImGui::TableNextColumn(); - ImVec4 Color = Spec.ActiveCount > 0 ? ActiveColor : DeactiveColor; ImGui::PushStyleColor(ImGuiCol_Text, Color); ImGui::Text("%s", TCHAR_TO_ANSI(*GetAbilityName(Ability))); ImGui::PopStyleColor(1); diff --git a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Attributes.cpp b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Attributes.cpp index ba89a7e..ea7ee41 100644 --- a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Attributes.cpp +++ b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Attributes.cpp @@ -2,7 +2,9 @@ #include "AbilitySystemComponent.h" #include "AbilitySystemGlobals.h" +#include "CogAbilityDataAsset.h" #include "CogAbilityHelper.h" +#include "CogImguiHelper.h" #include "CogWindowWidgets.h" #include "AttributeSet.h" #include "EngineUtils.h" @@ -190,21 +192,24 @@ void UCogAbilityWindow_Attributes::RenderContent() ImGui::TableNextRow(); - ImVec4 Color; - if (CurrentValue > BaseValue) + FLinearColor Color = FLinearColor::White; + if (Asset != nullptr) { - Color = ImVec4(0.0f, 1.0f, 0.0f, 1.0f); - } - else if (CurrentValue < BaseValue) - { - Color = ImVec4(1.0f, 0.0f, 0.0f, 1.0f); - } - else - { - Color = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); + if (CurrentValue > BaseValue) + { + Color = Asset->PositiveEffectColor; + } + else if (CurrentValue < BaseValue) + { + Color = Asset->NegativeEffectColor; + } + else + { + Color = Asset->NeutralEffectColor; + } } - ImGui::PushStyleColor(ImGuiCol_Text, Color); + ImGui::PushStyleColor(ImGuiCol_Text, FCogImguiHelper::ToImVec4(Color)); //------------------------ // Name @@ -228,7 +233,7 @@ void UCogAbilityWindow_Attributes::RenderContent() FCogWindowWidgets::EndTableTooltip(); } - ImGui::PushStyleColor(ImGuiCol_Text, Color); + ImGui::PushStyleColor(ImGuiCol_Text, FCogImguiHelper::ToImVec4(Color)); //------------------------ // Base Value diff --git a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Cheats.cpp b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Cheats.cpp index 369908d..c34a694 100644 --- a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Cheats.cpp +++ b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Cheats.cpp @@ -1,7 +1,7 @@ #include "CogAbilityWindow_Cheats.h" #include "AbilitySystemGlobals.h" -#include "CogAbilityDataAsset_Cheats.h" +#include "CogAbilityDataAsset.h" #include "CogAbilityReplicator.h" #include "CogCommonAllegianceActorInterface.h" #include "CogDebugDraw.h" @@ -21,7 +21,7 @@ void UCogAbilityWindow_Cheats::RenderHelp() " [CTRL] to apply the cheat to controlled actor\n" " [ALT] to apply the cheat to the allies of the selected actor\n" " [SHIFT] to apply the cheat to the enemies of the selected actor\n" - , TCHAR_TO_ANSI(*GetNameSafe(CheatsAsset.Get())) + , TCHAR_TO_ANSI(*GetNameSafe(Asset.Get())) ); } @@ -32,9 +32,9 @@ UCogAbilityWindow_Cheats::UCogAbilityWindow_Cheats() } //-------------------------------------------------------------------------------------------------------------------------- -void UCogAbilityWindow_Cheats::SetCheatsAsset(const UCogAbilityDataAsset_Cheats* Value) +void UCogAbilityWindow_Cheats::SetAsset(const UCogAbilityDataAsset* Value) { - CheatsAsset = Value; + Asset = Value; if (bReapplyCheatsBetweenPlays == false) { @@ -48,7 +48,7 @@ void UCogAbilityWindow_Cheats::SetCheatsAsset(const UCogAbilityDataAsset_Cheats* } IsFirstLaunch = false; - if (CheatsAsset == nullptr) + if (Asset == nullptr) { return; } @@ -69,7 +69,7 @@ void UCogAbilityWindow_Cheats::SetCheatsAsset(const UCogAbilityDataAsset_Cheats* for (const FString& AppliedCheatName : AppliedCheats) { - if (const FCogAbilityCheat* Cheat = CheatsAsset->PersistentEffects.FindByPredicate( + if (const FCogAbilityCheat* Cheat = Asset->PersistentEffects.FindByPredicate( [AppliedCheatName](const FCogAbilityCheat& Cheat) { return Cheat.Name == AppliedCheatName; })) { Replicator->ApplyCheat(LocalPawn, Targets, *Cheat); @@ -88,7 +88,7 @@ void UCogAbilityWindow_Cheats::RenderContent() return; } - if (CheatsAsset == nullptr) + if (Asset == nullptr) { return; } @@ -128,7 +128,7 @@ void UCogAbilityWindow_Cheats::RenderContent() bool bHasChanged = false; int Index = 0; - for (const FCogAbilityCheat& CheatEffect : CheatsAsset->PersistentEffects) + for (const FCogAbilityCheat& CheatEffect : Asset->PersistentEffects) { ImGui::PushID(Index); bHasChanged |= AddCheat(ControlledActor, SelectedActor, CheatEffect, true); @@ -144,7 +144,7 @@ void UCogAbilityWindow_Cheats::RenderContent() { AppliedCheats.Empty(); - for (const FCogAbilityCheat& CheatEffect : CheatsAsset->PersistentEffects) + for (const FCogAbilityCheat& CheatEffect : Asset->PersistentEffects) { if (ACogAbilityReplicator::IsCheatActive(SelectedActor, CheatEffect)) { @@ -155,7 +155,7 @@ void UCogAbilityWindow_Cheats::RenderContent() ImGui::TableNextColumn(); - for (const FCogAbilityCheat& CheatEffect : CheatsAsset->InstantEffects) + for (const FCogAbilityCheat& CheatEffect : Asset->InstantEffects) { ImGui::PushID(Index); AddCheat(ControlledActor, SelectedActor, CheatEffect, false); @@ -180,17 +180,17 @@ bool UCogAbilityWindow_Cheats::AddCheat(AActor* ControlledActor, AActor* Selecte const FGameplayTagContainer& Tags = Cheat.Effect->GetDefaultObject()->InheritableGameplayEffectTags.CombinedTags; FLinearColor Color; - if (Tags.HasTag(CheatsAsset->NegativeEffectTag)) + if (Tags.HasTag(Asset->NegativeEffectTag)) { - Color = CheatsAsset->NegativeEffectColor; + Color = Asset->NegativeEffectColor; } - else if (Tags.HasTag(CheatsAsset->PositiveEffectTag)) + else if (Tags.HasTag(Asset->PositiveEffectTag)) { - Color = CheatsAsset->PositiveEffectColor; + Color = Asset->PositiveEffectColor; } else { - Color = CheatsAsset->NeutralEffectColor; + Color = Asset->NeutralEffectColor; } FCogWindowWidgets::PushBackColor(FCogImguiHelper::ToImVec4(Color)); diff --git a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Effects.cpp b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Effects.cpp index 9305d37..88e15df 100644 --- a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Effects.cpp +++ b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Effects.cpp @@ -3,6 +3,7 @@ #include "AbilitySystemComponent.h" #include "AbilitySystemGlobals.h" #include "AttributeSet.h" +#include "CogAbilityDataAsset.h" #include "CogAbilityHelper.h" #include "CogWindowWidgets.h" #include "EngineUtils.h" @@ -20,7 +21,7 @@ void UCogAbilityWindow_Effects::RenderHelp() //-------------------------------------------------------------------------------------------------------------------------- UCogAbilityWindow_Effects::UCogAbilityWindow_Effects() { - bHasMenu = true; + bHasMenu = false; } //-------------------------------------------------------------------------------------------------------------------------- @@ -88,21 +89,24 @@ void UCogAbilityWindow_Effects::RenderEffectRow(const UAbilitySystemComponent& A const FGameplayTagContainer& Tags = Effect.InheritableGameplayEffectTags.CombinedTags; - ImVec4 Color; - if (Tags.HasTag(NegativeEffectTag)) + FLinearColor Color = FLinearColor::White; + if (Asset != nullptr) { - Color = ImVec4(1.0f, 0.5f, 0.5f, 1.0f); - } - else if (Tags.HasTag(PositiveEffectTag)) - { - Color = ImVec4(0.5f, 1.0f, 0.5f, 1.0f); - } - else - { - Color = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); + if (Tags.HasTag(Asset->NegativeEffectTag)) + { + Color = Asset->NegativeEffectColor; + } + else if (Tags.HasTag(Asset->PositiveEffectTag)) + { + Color = Asset->PositiveEffectColor; + } + else + { + Color = Asset->NeutralEffectColor; + } } - ImGui::PushStyleColor(ImGuiCol_Text, Color); + ImGui::PushStyleColor(ImGuiCol_Text, FCogImguiHelper::ToImVec4(Color)); if (ImGui::Selectable(TCHAR_TO_ANSI(*GetEffectName(Effect)), Selected == Index, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowItemOverlap | ImGuiSelectableFlags_AllowDoubleClick)) { diff --git a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Pools.cpp b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Pools.cpp index f7f13b3..a4a5a28 100644 --- a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Pools.cpp +++ b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Pools.cpp @@ -1,6 +1,7 @@ #include "CogAbilityWindow_Pools.h" #include "AbilitySystemComponent.h" +#include "CogAbilityDataAsset.h" #include "CogImguiHelper.h" //-------------------------------------------------------------------------------------------------------------------------- @@ -9,7 +10,7 @@ void UCogAbilityWindow_Pools::RenderHelp() ImGui::Text( "This window displays attributes of the selected actor as pools. " "The pools can be configured in the '%s' data asset." - , TCHAR_TO_ANSI(*GetNameSafe(PoolsAsset.Get())) + , TCHAR_TO_ANSI(*GetNameSafe(Asset.Get())) ); } @@ -18,7 +19,7 @@ void UCogAbilityWindow_Pools::RenderContent() { Super::RenderContent(); - if (PoolsAsset == nullptr) + if (Asset == nullptr) { return; } @@ -34,7 +35,7 @@ void UCogAbilityWindow_Pools::RenderContent() ImGui::TableSetupColumn("Name", ImGuiTableColumnFlags_WidthStretch); ImGui::TableSetupColumn("Pool", ImGuiTableColumnFlags_WidthStretch); - for (const FCogAbilityPool& Pool : PoolsAsset->Pools) + for (const FCogAbilityPool& Pool : Asset->Pools) { DrawPool(AbilitySystem, Pool); } diff --git a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Tags.cpp b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Tags.cpp index a74603c..f7827bb 100644 --- a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Tags.cpp +++ b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Tags.cpp @@ -13,7 +13,7 @@ void UCogAbilityWindow_Tags::RenderHelp() //-------------------------------------------------------------------------------------------------------------------------- UCogAbilityWindow_Tags::UCogAbilityWindow_Tags() { - bHasMenu = true; + bHasMenu = false; } //-------------------------------------------------------------------------------------------------------------------------- diff --git a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Tweaks.cpp b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Tweaks.cpp index b86d135..71b08db 100644 --- a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Tweaks.cpp +++ b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Tweaks.cpp @@ -1,6 +1,7 @@ #include "CogAbilityWindow_Tweaks.h" #include "AbilitySystemComponent.h" +#include "CogAbilityDataAsset.h" //-------------------------------------------------------------------------------------------------------------------------- void UCogAbilityWindow_Tweaks::RenderHelp() @@ -9,7 +10,7 @@ void UCogAbilityWindow_Tweaks::RenderHelp() "This window can be used to apply tweaks to all the loaded actors. " "The tweaks are used to test various gameplay settings by actor category. " "The tweaks can be configured in the '%s' data asset. " - , TCHAR_TO_ANSI(*GetNameSafe(TweaksAsset.Get())) + , TCHAR_TO_ANSI(*GetNameSafe(Asset.Get())) ); } @@ -18,7 +19,7 @@ void UCogAbilityWindow_Tweaks::RenderContent() { Super::RenderContent(); - if (TweaksAsset == nullptr) + if (Asset == nullptr) { return; } @@ -41,9 +42,9 @@ void UCogAbilityWindow_Tweaks::RenderContent() int32 CurrentTweakProfileIndex = Replicator->GetTweakProfileIndex(); FName CurrentProfileName = FName("None"); - if (TweaksAsset->TweakProfiles.IsValidIndex(CurrentTweakProfileIndex)) + if (Asset->TweakProfiles.IsValidIndex(CurrentTweakProfileIndex)) { - CurrentProfileName = TweaksAsset->TweakProfiles[CurrentTweakProfileIndex].Name; + CurrentProfileName = Asset->TweakProfiles[CurrentTweakProfileIndex].Name; } if (ImGui::BeginCombo("Profile", TCHAR_TO_ANSI(*CurrentProfileName.ToString()))) @@ -52,18 +53,18 @@ void UCogAbilityWindow_Tweaks::RenderContent() bool IsSelected = CurrentTweakProfileIndex == INDEX_NONE; if (ImGui::Selectable("None", IsSelected)) { - Replicator->SetTweakProfile(TweaksAsset.Get(), INDEX_NONE); + Replicator->SetTweakProfile(Asset.Get(), INDEX_NONE); } } - for (int32 TweakProfileIndex = 0; TweakProfileIndex < TweaksAsset->TweakProfiles.Num(); ++TweakProfileIndex) + for (int32 TweakProfileIndex = 0; TweakProfileIndex < Asset->TweakProfiles.Num(); ++TweakProfileIndex) { - const FCogAbilityTweakProfile& TweakProfile = TweaksAsset->TweakProfiles[TweakProfileIndex]; + const FCogAbilityTweakProfile& TweakProfile = Asset->TweakProfiles[TweakProfileIndex]; bool IsSelected = TweakProfileIndex == CurrentTweakProfileIndex; if (ImGui::Selectable(TCHAR_TO_ANSI(*TweakProfile.Name.ToString()), IsSelected)) { - Replicator->SetTweakProfile(TweaksAsset.Get(), TweakProfileIndex); + Replicator->SetTweakProfile(Asset.Get(), TweakProfileIndex); } } ImGui::EndCombo(); @@ -71,12 +72,12 @@ void UCogAbilityWindow_Tweaks::RenderContent() ImGui::Separator(); - if (ImGui::BeginTable("Tweaks", 1 + TweaksAsset->TweaksCategories.Num(), ImGuiTableFlags_Resizable | ImGuiTableFlags_NoBordersInBodyUntilResize)) + if (ImGui::BeginTable("Tweaks", 1 + Asset->TweaksCategories.Num(), ImGuiTableFlags_Resizable | ImGuiTableFlags_NoBordersInBodyUntilResize)) { ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch); - for (int32 TweakCategoryIndex = 0; TweakCategoryIndex < TweaksAsset->TweaksCategories.Num(); ++TweakCategoryIndex) + for (int32 TweakCategoryIndex = 0; TweakCategoryIndex < Asset->TweaksCategories.Num(); ++TweakCategoryIndex) { - FCogAbilityTweakCategory& Category = TweaksAsset->TweaksCategories[TweakCategoryIndex]; + const FCogAbilityTweakCategory& Category = Asset->TweaksCategories[TweakCategoryIndex]; ImGui::TableSetupColumn(TCHAR_TO_ANSI(*Category.Name), ImGuiTableColumnFlags_WidthStretch); } ImGui::TableHeadersRow(); @@ -84,7 +85,7 @@ void UCogAbilityWindow_Tweaks::RenderContent() ImGui::TableNextRow(); int32 TweakIndex = 0; - for (FCogAbilityTweak& Tweak : TweaksAsset->Tweaks) + for (const FCogAbilityTweak& Tweak : Asset->Tweaks) { if (Tweak.Effect != nullptr) { @@ -93,7 +94,7 @@ void UCogAbilityWindow_Tweaks::RenderContent() ImGui::TableNextColumn(); ImGui::Text("%s", TCHAR_TO_ANSI(*Tweak.Name.ToString())); - for (int TweakCategoryIndex = 0; TweakCategoryIndex < TweaksAsset->TweaksCategories.Num(); ++TweakCategoryIndex) + for (int TweakCategoryIndex = 0; TweakCategoryIndex < Asset->TweaksCategories.Num(); ++TweakCategoryIndex) { ImGui::TableNextColumn(); ImGui::PushID(TweakCategoryIndex); @@ -113,22 +114,22 @@ void UCogAbilityWindow_Tweaks::RenderContent() //-------------------------------------------------------------------------------------------------------------------------- void UCogAbilityWindow_Tweaks::DrawTweak(ACogAbilityReplicator* Replicator, int32 TweakIndex, int32 TweakCategoryIndex) { - if (TweaksAsset->TweaksCategories.IsValidIndex(TweakCategoryIndex) == false) + if (Asset->TweaksCategories.IsValidIndex(TweakCategoryIndex) == false) { return; } - float* Value = Replicator->GetTweakCurrentValuePtr(TweaksAsset.Get(), TweakIndex, TweakCategoryIndex); + float* Value = Replicator->GetTweakCurrentValuePtr(Asset.Get(), TweakIndex, TweakCategoryIndex); if (Value == nullptr) { return; } - const FCogAbilityTweakCategory& Category = TweaksAsset->TweaksCategories[TweakCategoryIndex]; + const FCogAbilityTweakCategory& Category = Asset->TweaksCategories[TweakCategoryIndex]; FCogWindowWidgets::PushBackColor(FCogImguiHelper::ToImVec4(Category.Color)); ImGui::PushItemWidth(-1); - ImGui::SliderFloat("##Value", Value, TweaksAsset->TweakMinValue, TweaksAsset->TweakMaxValue, "%+0.0f%%", 1.0f); + ImGui::SliderFloat("##Value", Value, Asset->TweakMinValue, Asset->TweakMaxValue, "%+0.0f%%", 1.0f); ImGui::PopItemWidth(); FCogWindowWidgets::PopBackColor(); @@ -146,6 +147,6 @@ void UCogAbilityWindow_Tweaks::DrawTweak(ACogAbilityReplicator* Replicator, int3 if (bUpdateValue) { - Replicator->SetTweakValue(TweaksAsset.Get(), TweakIndex, TweakCategoryIndex, *Value); + Replicator->SetTweakValue(Asset.Get(), TweakIndex, TweakCategoryIndex, *Value); } } \ No newline at end of file diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset.h new file mode 100644 index 0000000..ba87334 --- /dev/null +++ b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset.h @@ -0,0 +1,203 @@ +#pragma once + +#include "CoreMinimal.h" +#include "Engine/DataAsset.h" +#include "GameplayEffect.h" +#include "CogAbilityDataAsset.generated.h" + + +class UGameplayEffect; + +//-------------------------------------------------------------------------------------------------------------------------- +USTRUCT() +struct COGABILITY_API FCogAbilityCheat +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere) + FString Name; + + UPROPERTY(EditAnywhere) + TSubclassOf Effect; +}; + +//-------------------------------------------------------------------------------------------------------------------------- +USTRUCT() +struct COGABILITY_API FCogAbilityPool +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere) + FString Name; + + UPROPERTY(EditAnywhere) + FGameplayAttribute Value; + + UPROPERTY(EditAnywhere) + FGameplayAttribute Min; + + UPROPERTY(EditAnywhere) + FGameplayAttribute Max; + + UPROPERTY(EditAnywhere) + FGameplayAttribute Regen; + + UPROPERTY(EditAnywhere) + FLinearColor Color = FLinearColor(0.5f, 0.5f, 0.5f, 1.0f); + + UPROPERTY(EditAnywhere) + FLinearColor BackColor = FLinearColor(0.15, 0.15, 0.15, 1.0f); +}; + + +//-------------------------------------------------------------------------------------------------------------------------- +USTRUCT() +struct FCogAbilityTweak +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere) + FName Name; + + UPROPERTY(EditAnywhere) + TSubclassOf Effect; + + UPROPERTY(EditAnywhere) + float Multiplier = 0.01f; + + UPROPERTY(EditAnywhere) + float AddPostMultiplier = 1.0f; +}; + +//-------------------------------------------------------------------------------------------------------------------------- +USTRUCT() +struct FCogAbilityTweakCategory +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere) + FString Name; + + UPROPERTY(EditAnywhere) + FGameplayTag Id; + + UPROPERTY(EditAnywhere) + TSubclassOf ActorClass; + + UPROPERTY(EditAnywhere) + FGameplayTagContainer RequiredTags; + + UPROPERTY(EditAnywhere) + FGameplayTagContainer IgnoredTags; + + UPROPERTY(EditAnywhere) + FLinearColor Color = FLinearColor::White; +}; + +//-------------------------------------------------------------------------------------------------------------------------- +USTRUCT() +struct FCogAbilityTweakProfileValue +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere) + TSubclassOf Effect; + + UPROPERTY(EditAnywhere) + FGameplayTag CategoryId; + + UPROPERTY(EditAnywhere) + float Value = 0.0f; +}; + +//-------------------------------------------------------------------------------------------------------------------------- +USTRUCT() +struct FCogAbilityTweakProfile +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere) + FName Name; + + UPROPERTY(EditAnywhere) + TArray Tweaks; +}; + + +//-------------------------------------------------------------------------------------------------------------------------- +UCLASS(Blueprintable) +class COGABILITY_API UCogAbilityDataAsset : public UPrimaryDataAsset +{ + GENERATED_BODY() + +public: + + UCogAbilityDataAsset() {} + + //---------------------------------------------------------------------------------------------------------------------- + // Abilities + //---------------------------------------------------------------------------------------------------------------------- + + UPROPERTY(Category = "Abilities", EditAnywhere) + TArray> Abilities; + + UPROPERTY(Category = "Abilities", EditAnywhere) + FLinearColor AbilityActiveColor = FLinearColor(1.0f, 0.8f, 0.0f, 1.0f); + + UPROPERTY(Category = "Abilities", EditAnywhere) + FLinearColor AbilityInactiveColor = FLinearColor(1.0f, 1.0f, 1.0f, 1.0f); + + //---------------------------------------------------------------------------------------------------------------------- + // Cheats + //---------------------------------------------------------------------------------------------------------------------- + + UPROPERTY(Category="Cheats", EditAnywhere) + FGameplayTag NegativeEffectTag; + + UPROPERTY(Category = "Cheats", EditAnywhere) + FGameplayTag PositiveEffectTag; + + UPROPERTY(Category = "Cheats", EditAnywhere) + FLinearColor NeutralEffectColor = FLinearColor(0.5f, 0.5f, 0.5f, 1.0f); + + UPROPERTY(Category = "Cheats", EditAnywhere) + FLinearColor NegativeEffectColor = FLinearColor(1.0f, 0.5f, 0.5f, 1.0f); + + UPROPERTY(Category = "Cheats", EditAnywhere) + FLinearColor PositiveEffectColor = FLinearColor(0.0f, 1.0f, 0.5f, 1.0f); + + UPROPERTY(Category = "Cheats", EditAnywhere, meta = (TitleProperty = "Name")) + TArray PersistentEffects; + + UPROPERTY(Category = "Cheats", EditAnywhere, meta = (TitleProperty = "Name")) + TArray InstantEffects; + + //---------------------------------------------------------------------------------------------------------------------- + // Pools + //---------------------------------------------------------------------------------------------------------------------- + + UPROPERTY(Category = "Pools", EditAnywhere, meta = (TitleProperty = "Name")) + TArray Pools; + + //---------------------------------------------------------------------------------------------------------------------- + // Tweaks + //---------------------------------------------------------------------------------------------------------------------- + + UPROPERTY(Category = "Tweaks", EditAnywhere) + float TweakMinValue = -100.0f; + + UPROPERTY(Category = "Tweaks", EditAnywhere) + float TweakMaxValue = 200.0f; + + UPROPERTY(Category = "Tweaks", EditAnywhere) + FGameplayTag SetByCallerMagnitudeTag; + + UPROPERTY(Category = "Tweaks", EditAnywhere, meta = (TitleProperty = "Name")) + TArray Tweaks; + + UPROPERTY(Category = "Tweaks", EditAnywhere, meta = (TitleProperty = "Name")) + TArray TweaksCategories; + + UPROPERTY(Category = "Tweaks", EditAnywhere, meta = (TitleProperty = "Name")) + TArray TweakProfiles; +}; \ No newline at end of file diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Abilities.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Abilities.h deleted file mode 100644 index 922a76d..0000000 --- a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Abilities.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include "CoreMinimal.h" -#include "Engine/DataAsset.h" -#include "CogAbilityDataAsset_Abilities.generated.h" - -class UGameplayAbility; - -//-------------------------------------------------------------------------------------------------------------------------- -UCLASS(Blueprintable) -class COGABILITY_API UCogAbilityDataAsset_Abilities : public UPrimaryDataAsset -{ - GENERATED_BODY() - -public: - - UCogAbilityDataAsset_Abilities() {} - - UPROPERTY(EditAnywhere) - TArray> Abilities; -}; diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Cheats.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Cheats.h deleted file mode 100644 index 42ebe0e..0000000 --- a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Cheats.h +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once - -#include "CoreMinimal.h" -#include "Engine/DataAsset.h" -#include "GameplayEffect.h" -#include "CogAbilityDataAsset_Cheats.generated.h" - -//-------------------------------------------------------------------------------------------------------------------------- -USTRUCT() -struct COGABILITY_API FCogAbilityCheat -{ - GENERATED_BODY() - - UPROPERTY(EditAnywhere) - FString Name; - - UPROPERTY(EditAnywhere) - TSubclassOf Effect; -}; - -//-------------------------------------------------------------------------------------------------------------------------- -UCLASS(Blueprintable) -class COGABILITY_API UCogAbilityDataAsset_Cheats : public UPrimaryDataAsset -{ - GENERATED_BODY() - -public: - - UCogAbilityDataAsset_Cheats() {} - - UPROPERTY(EditAnywhere) - FGameplayTag NegativeEffectTag; - - UPROPERTY(EditAnywhere) - FGameplayTag PositiveEffectTag; - - UPROPERTY(EditAnywhere) - FLinearColor NeutralEffectColor = FLinearColor(0.5f, 0.5f, 0.5f, 1.0f); - - UPROPERTY(EditAnywhere) - FLinearColor NegativeEffectColor = FLinearColor(1.0f, 0.5f, 0.5f, 1.0f); - - UPROPERTY(EditAnywhere) - FLinearColor PositiveEffectColor = FLinearColor(0.0f, 1.0f, 0.5f, 1.0f); - - UPROPERTY(EditAnywhere, meta = (TitleProperty = "Name")) - TArray PersistentEffects; - - UPROPERTY(EditAnywhere, meta = (TitleProperty = "Name")) - TArray InstantEffects; -}; \ No newline at end of file diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Pools.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Pools.h deleted file mode 100644 index e44c48e..0000000 --- a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Pools.h +++ /dev/null @@ -1,47 +0,0 @@ -#pragma once - -#include "CoreMinimal.h" -#include "Engine/DataAsset.h" -#include "CogAbilityDataAsset_Pools.generated.h" - -//-------------------------------------------------------------------------------------------------------------------------- -USTRUCT() -struct COGABILITY_API FCogAbilityPool -{ - GENERATED_BODY() - - UPROPERTY(EditAnywhere) - FString Name; - - UPROPERTY(EditAnywhere) - FGameplayAttribute Value; - - UPROPERTY(EditAnywhere) - FGameplayAttribute Min; - - UPROPERTY(EditAnywhere) - FGameplayAttribute Max; - - UPROPERTY(EditAnywhere) - FGameplayAttribute Regen; - - UPROPERTY(EditAnywhere) - FLinearColor Color = FLinearColor(0.5f, 0.5f, 0.5f, 1.0f); - - UPROPERTY(EditAnywhere) - FLinearColor BackColor = FLinearColor(0.15, 0.15, 0.15, 1.0f); -}; - -//-------------------------------------------------------------------------------------------------------------------------- -UCLASS(Blueprintable) -class COGABILITY_API UCogAbilityDataAsset_Pools : public UPrimaryDataAsset -{ - GENERATED_BODY() - -public: - - UCogAbilityDataAsset_Pools() {} - - UPROPERTY(EditAnywhere, meta = (TitleProperty = "Name")) - TArray Pools; -}; diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Tweaks.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Tweaks.h deleted file mode 100644 index 2e5a4da..0000000 --- a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityDataAsset_Tweaks.h +++ /dev/null @@ -1,108 +0,0 @@ -#pragma once - -#include "CoreMinimal.h" -#include "Engine/DataAsset.h" -#include "CogAbilityDataAsset_Tweaks.generated.h" - -class UGameplayEffect; - -//-------------------------------------------------------------------------------------------------------------------------- -USTRUCT() -struct FCogAbilityTweak -{ - GENERATED_BODY() - - UPROPERTY(EditAnywhere) - FName Name; - - UPROPERTY(EditAnywhere) - TSubclassOf Effect; - - UPROPERTY(EditAnywhere) - float Multiplier = 0.01f; - - UPROPERTY(EditAnywhere) - float AddPostMultiplier = 1.0f; -}; - -//-------------------------------------------------------------------------------------------------------------------------- -USTRUCT() -struct FCogAbilityTweakCategory -{ - GENERATED_BODY() - - UPROPERTY(EditAnywhere) - FString Name; - - UPROPERTY(EditAnywhere) - FGameplayTag Id; - - UPROPERTY(EditAnywhere) - TSubclassOf ActorClass; - - UPROPERTY(EditAnywhere) - FGameplayTagContainer RequiredTags; - - UPROPERTY(EditAnywhere) - FGameplayTagContainer IgnoredTags; - - UPROPERTY(EditAnywhere) - FLinearColor Color = FLinearColor::White; -}; - -//-------------------------------------------------------------------------------------------------------------------------- -USTRUCT() -struct FCogAbilityTweakProfileValue -{ - GENERATED_BODY() - - UPROPERTY(EditAnywhere) - TSubclassOf Effect; - - UPROPERTY(EditAnywhere) - FGameplayTag CategoryId; - - UPROPERTY(EditAnywhere) - float Value = 0.0f; -}; - -//-------------------------------------------------------------------------------------------------------------------------- -USTRUCT() -struct FCogAbilityTweakProfile -{ - GENERATED_BODY() - - UPROPERTY(EditAnywhere) - FName Name; - - UPROPERTY(EditAnywhere) - TArray Tweaks; -}; - -//-------------------------------------------------------------------------------------------------------------------------- -UCLASS(Blueprintable) -class COGABILITY_API UCogAbilityDataAsset_Tweaks : public UPrimaryDataAsset -{ - GENERATED_BODY() - -public: - UCogAbilityDataAsset_Tweaks() {} - - UPROPERTY(EditAnywhere) - float TweakMinValue = -100.0f; - - UPROPERTY(EditAnywhere) - float TweakMaxValue = 200.0f; - - UPROPERTY(EditAnywhere) - FGameplayTag SetByCallerMagnitudeTag; - - UPROPERTY(EditAnywhere, meta = (TitleProperty = "Name")) - TArray Tweaks; - - UPROPERTY(EditAnywhere, meta = (TitleProperty = "Name")) - TArray TweaksCategories; - - UPROPERTY(EditAnywhere, meta = (TitleProperty = "Name")) - TArray TweakProfiles; -}; diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityReplicator.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityReplicator.h index 7224231..31701e1 100644 --- a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityReplicator.h +++ b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityReplicator.h @@ -6,7 +6,7 @@ class AActor; class UAbilitySystemComponent; -class UCogAbilityDataAsset_Tweaks; +class UCogAbilityDataAsset; struct FCogAbilityCheat; struct FCogAbilityTweak; struct FGameplayTag; @@ -38,15 +38,15 @@ public: void ResetAllTweaks(); - void SetTweakValue(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 TweakIndex, int32 CategoryIndex, float Value); + void SetTweakValue(const UCogAbilityDataAsset* TweaksAsset, int32 TweakIndex, int32 CategoryIndex, float Value); - void SetTweakProfile(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 ProfileIndex); + void SetTweakProfile(const UCogAbilityDataAsset* TweaksAsset, int32 ProfileIndex); int32 GetTweakProfileIndex() const { return TweakProfileIndex; } - float GetTweakCurrentValue(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 TweakIndex, int32 CategoryIndex); + float GetTweakCurrentValue(const UCogAbilityDataAsset* TweaksAsset, int32 TweakIndex, int32 CategoryIndex); - float* GetTweakCurrentValuePtr(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 TweakIndex, int32 CategoryIndex); + float* GetTweakCurrentValuePtr(const UCogAbilityDataAsset* TweaksAsset, int32 TweakIndex, int32 CategoryIndex); private: @@ -63,15 +63,15 @@ private: void Server_ResetAllTweaks(); UFUNCTION(Reliable, Server) - void Server_SetTweakValue(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 TweakIndex, int32 TweakCategoryIndex, float Value); + void Server_SetTweakValue(const UCogAbilityDataAsset* TweaksAsset, int32 TweakIndex, int32 TweakCategoryIndex, float Value); UFUNCTION(Reliable, Server) - void Server_SetTweakProfile(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 ProfileIndex); + void Server_SetTweakProfile(const UCogAbilityDataAsset* TweaksAsset, int32 ProfileIndex); - void SetTweakCurrentValue(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 TweakIndex, int32 CategoryIndex, float Value); + void SetTweakCurrentValue(const UCogAbilityDataAsset* TweaksAsset, int32 TweakIndex, int32 CategoryIndex, float Value); void ApplyTweakOnActor(AActor* Actor, const FCogAbilityTweak& Tweak, float Value, const FGameplayTag& SetByCallerMagnitudeTag); - void ApplyAllTweaksOnActor(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 TweakCategoryIndex, AActor* Actor); - void GetActorsFromTweakCategory(const UCogAbilityDataAsset_Tweaks* TweaksAsset, int32 CategoryIndex, TArray& Actors); + void ApplyAllTweaksOnActor(const UCogAbilityDataAsset* TweaksAsset, int32 TweakCategoryIndex, AActor* Actor); + void GetActorsFromTweakCategory(const UCogAbilityDataAsset* TweaksAsset, int32 CategoryIndex, TArray& Actors); TObjectPtr OwnerPlayerController; diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Abilities.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Abilities.h index 85984ba..30cb6ec 100644 --- a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Abilities.h +++ b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Abilities.h @@ -5,7 +5,7 @@ #include "CogAbilityWindow_Abilities.generated.h" class UGameplayAbility; -class UCogAbilityDataAsset_Abilities; +class UCogAbilityDataAsset; struct FGameplayAbilitySpec; UCLASS() @@ -17,7 +17,7 @@ public: UCogAbilityWindow_Abilities(); - TWeakObjectPtr AbilitiesAsset; + TWeakObjectPtr Asset; protected: diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Attributes.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Attributes.h index 9f6c0a4..350a75d 100644 --- a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Attributes.h +++ b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Attributes.h @@ -4,6 +4,8 @@ #include "CogWindow.h" #include "CogAbilityWindow_Attributes.generated.h" +class UCogAbilityDataAsset; + UCLASS(Config = Cog) class COGABILITY_API UCogAbilityWindow_Attributes : public UCogWindow { @@ -13,6 +15,8 @@ public: UCogAbilityWindow_Attributes(); + TWeakObjectPtr Asset; + protected: virtual void RenderHelp() override; diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Cheats.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Cheats.h index efe1215..51445d5 100644 --- a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Cheats.h +++ b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Cheats.h @@ -5,7 +5,7 @@ #include "CogAbilityWindow_Cheats.generated.h" class AActor; -class UCogAbilityDataAsset_Cheats; +class UCogAbilityDataAsset; struct FCogAbilityCheat; UCLASS(Config = Cog) @@ -17,9 +17,9 @@ public: UCogAbilityWindow_Cheats(); - const UCogAbilityDataAsset_Cheats* GetCheatsAsset() const { return CheatsAsset.Get(); } + const UCogAbilityDataAsset* GetAsset() const { return Asset.Get(); } - void SetCheatsAsset(const UCogAbilityDataAsset_Cheats* Value); + void SetAsset(const UCogAbilityDataAsset* Value); protected: @@ -42,5 +42,5 @@ private: UPROPERTY(Config) TArray AppliedCheats; - TWeakObjectPtr CheatsAsset; + TWeakObjectPtr Asset; }; diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Effects.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Effects.h index 3b08088..1de1a4d 100644 --- a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Effects.h +++ b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Effects.h @@ -5,6 +5,8 @@ #include "CogWindow.h" #include "CogAbilityWindow_Effects.generated.h" +class UCogAbilityDataAsset; + UCLASS() class COGABILITY_API UCogAbilityWindow_Effects : public UCogWindow { @@ -14,9 +16,7 @@ public: UCogAbilityWindow_Effects(); - FGameplayTag NegativeEffectTag; - - FGameplayTag PositiveEffectTag; + TWeakObjectPtr Asset; protected: diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Pools.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Pools.h index e57f00f..737d320 100644 --- a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Pools.h +++ b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Pools.h @@ -5,7 +5,7 @@ #include "CogWindow.h" #include "CogAbilityWindow_Pools.generated.h" -class UCogAbilityDataAsset_Pools; +class UCogAbilityDataAsset; class UAbilitySystemComponent; struct FCogAbilityPool; @@ -16,7 +16,7 @@ class COGABILITY_API UCogAbilityWindow_Pools : public UCogWindow public: - TWeakObjectPtr PoolsAsset; + TWeakObjectPtr Asset; protected: diff --git a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Tweaks.h b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Tweaks.h index c6a0feb..c99f6d2 100644 --- a/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Tweaks.h +++ b/Plugins/CogAbility/Source/CogAbility/Public/CogAbilityWindow_Tweaks.h @@ -5,7 +5,7 @@ #include "CogAbilityWindow_Tweaks.generated.h" class ACogAbilityReplicator; -class UCogAbilityDataAsset_Tweaks; +class UCogAbilityDataAsset; UCLASS() class COGABILITY_API UCogAbilityWindow_Tweaks : public UCogWindow @@ -13,7 +13,7 @@ class COGABILITY_API UCogAbilityWindow_Tweaks : public UCogWindow GENERATED_BODY() public: - TWeakObjectPtr TweaksAsset; + TWeakObjectPtr Asset; protected: diff --git a/Plugins/CogEngine/Source/CogEngine/Private/CogEngineWindow_Selection.cpp b/Plugins/CogEngine/Source/CogEngine/Private/CogEngineWindow_Selection.cpp index d3f6c50..89d49ff 100644 --- a/Plugins/CogEngine/Source/CogEngine/Private/CogEngineWindow_Selection.cpp +++ b/Plugins/CogEngine/Source/CogEngine/Private/CogEngineWindow_Selection.cpp @@ -5,6 +5,7 @@ #include "CogWindowManager.h" #include "CogWindowWidgets.h" #include "EngineUtils.h" +#include "GameFramework/Character.h" #include "imgui.h" #include "Kismet/GameplayStatics.h" @@ -23,6 +24,7 @@ void UCogEngineWindow_Selection::RenderHelp() UCogEngineWindow_Selection::UCogEngineWindow_Selection() { bHasMenu = true; + SubClasses = { AActor::StaticClass(), ACharacter::StaticClass() }; } //-------------------------------------------------------------------------------------------------------------------------- diff --git a/Source/CogSample/CogSample.Build.cs b/Source/CogSample/CogSample.Build.cs index d99cabe..64f3500 100644 --- a/Source/CogSample/CogSample.Build.cs +++ b/Source/CogSample/CogSample.Build.cs @@ -16,7 +16,6 @@ public class CogSample : ModuleRules "GameplayTasks", "GameplayAbilities", "GameplayTags", - "HeadMountedDisplay", "InputCore", "NetCore", }); diff --git a/Source/CogSample/CogSampleGameState.cpp b/Source/CogSample/CogSampleGameState.cpp index 6b3ecdf..89f578a 100644 --- a/Source/CogSample/CogSampleGameState.cpp +++ b/Source/CogSample/CogSampleGameState.cpp @@ -2,7 +2,6 @@ #include "AssetRegistry/AssetRegistryModule.h" #include "AssetRegistry/IAssetRegistry.h" -#include "CogCommon.h" #include "CogSampleFunctionLibrary_Tag.h" #include "GameFramework/Character.h" #include "GameFramework/GameMode.h" @@ -10,10 +9,7 @@ #include "Modules/ModuleManager.h" #if ENABLE_COG -#include "CogAbilityDataAsset_Abilities.h" -#include "CogAbilityDataAsset_Cheats.h" -#include "CogAbilityDataAsset_Pools.h" -#include "CogAbilityDataAsset_Tweaks.h" +#include "CogAbilityDataAsset.h" #include "CogAbilityModule.h" #include "CogAbilityWindow_Abilities.h" #include "CogAbilityWindow_Attributes.h" @@ -167,25 +163,27 @@ void ACogSampleGameState::InitializeCog() //--------------------------------------- // Abilities //--------------------------------------- - UCogAbilityWindow_Abilities* AbilitiesWindow = CogWindowManager->CreateWindow("Gameplay.Abilities"); - AbilitiesWindow->AbilitiesAsset = GetFirstAssetByClass(); + const UCogAbilityDataAsset* AbilitiesAsset = GetFirstAssetByClass(); - CogWindowManager->CreateWindow("Gameplay.Attributes"); + UCogAbilityWindow_Abilities* AbilitiesWindow = CogWindowManager->CreateWindow("Gameplay.Abilities"); + AbilitiesWindow->Asset = AbilitiesAsset; + + UCogAbilityWindow_Attributes* AttributesWindow = CogWindowManager->CreateWindow("Gameplay.Attributes"); + AttributesWindow->Asset = AbilitiesAsset; UCogAbilityWindow_Cheats* CheatsWindow = CogWindowManager->CreateWindow("Gameplay.Cheats"); - CheatsWindow->SetCheatsAsset(GetFirstAssetByClass()); + CheatsWindow->SetAsset(AbilitiesAsset); UCogAbilityWindow_Effects* EffectsWindow = CogWindowManager->CreateWindow("Gameplay.Effects"); - EffectsWindow->NegativeEffectTag = Tag_Effect_Alignment_Negative; - EffectsWindow->PositiveEffectTag = Tag_Effect_Alignment_Positive; + EffectsWindow->Asset = AbilitiesAsset; UCogAbilityWindow_Pools* PoolsWindow = CogWindowManager->CreateWindow("Gameplay.Pools"); - PoolsWindow->PoolsAsset = GetFirstAssetByClass(); + PoolsWindow->Asset = AbilitiesAsset; CogWindowManager->CreateWindow("Gameplay.Tags"); UCogAbilityWindow_Tweaks* TweaksWindow = CogWindowManager->CreateWindow("Gameplay.Tweaks"); - TweaksWindow->TweaksAsset = GetFirstAssetByClass(); + TweaksWindow->Asset = AbilitiesAsset; //--------------------------------------- // Input diff --git a/Source/CogSample/CogSampleGameState.h b/Source/CogSample/CogSampleGameState.h index c6adefd..c3af6a7 100644 --- a/Source/CogSample/CogSampleGameState.h +++ b/Source/CogSample/CogSampleGameState.h @@ -1,7 +1,7 @@ #pragma once #include "CoreMinimal.h" -#include "CogSampleDefines.h" +#include "CogCommon.h" #include "GameFramework/GameStateBase.h" #include "CogSampleGameState.generated.h" @@ -10,7 +10,7 @@ class UCogWindowManager; UCLASS() class ACogSampleGameState : public AGameStateBase { - GENERATED_BODY() + GENERATED_BODY() ACogSampleGameState(const FObjectInitializer& ObjectInitializer); @@ -22,6 +22,9 @@ class ACogSampleGameState : public AGameStateBase private: + //-------------------------------------------------------------- + // To make sure it doesn't get garbage collected. + //-------------------------------------------------------------- UPROPERTY() TObjectPtr CogWindowManagerRef = nullptr;