From 248447f72ace6cfc7564e6f7fc8fad27a1aee0cf Mon Sep 17 00:00:00 2001 From: Henning Waberg Date: Thu, 22 Nov 2018 01:20:40 +0100 Subject: [PATCH] Introduced Natural Aptitude as counterpart to ComInt but for stats --- Assets/NaturalAptitudeIcon.png | Bin 0 -> 3255 bytes .../{XComUI.ini => XComStatUpgradeUI.ini} | 22 +++- RPG/Config/XComEngine.ini | 4 +- .../UILibrary_LWToolbox.upk | Bin 50268 -> 61606 bytes RPG/Localization/StatUpgradeUI.int | 12 +- RPG/RPG.x2proj | 5 +- RPG/ReadMe.txt | 6 + .../UIPersonnel_SoldierListItemDetailed.uc | 34 +++++- RPG/Src/StatUpgradeUI/Classes/StatUIHelper.uc | 105 ++++++++++++++++++ .../Classes/UIPanel_StatUI_StatLine.uc | 2 +- .../StatUpgradeUI/Classes/UIScreen_StatUI.uc | 18 ++- ...X2DownloadableContentInfo_StatUpgradeUI.uc | 5 +- .../Classes/X2EventListener_StatUI.uc | 14 ++- .../Classes/X2TemplateHelper_RPGOverhaul.uc | 14 ++- 14 files changed, 216 insertions(+), 25 deletions(-) create mode 100644 Assets/NaturalAptitudeIcon.png rename RPG/Config/StatUpgradeUI/{XComUI.ini => XComStatUpgradeUI.ini} (73%) create mode 100644 RPG/Src/StatUpgradeUI/Classes/StatUIHelper.uc diff --git a/Assets/NaturalAptitudeIcon.png b/Assets/NaturalAptitudeIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..6454461e38e4c64791a531f803bb56a784c163cb GIT binary patch literal 3255 zcmV;o3`p~dP)lgsDL!9mOHtgo9^v)MPV3WC5) zUc6}1*{o?c8fIf@2~dJ}0sxDjyK>b`&(E23CTnWdstLo;EIoSExAl*VPuQv1Ig=kA zHtqI-0{_YF+xDLi9s~miV0wPu%w4@|CT3<#m`s{VY0ot4b+fs$8Z;aAz93K>8#5!5 z6GnhgZ%Ah{=AhLYJPCgK`R8^<0GOJcHRA%n$i%oQjEtJ%=&1hOk1Lli$QUEtd~uk& zj58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/Config/StatUpgradeUI/XComUI.ini b/RPG/Config/StatUpgradeUI/XComStatUpgradeUI.ini similarity index 73% rename from RPG/Config/StatUpgradeUI/XComUI.ini rename to RPG/Config/StatUpgradeUI/XComStatUpgradeUI.ini index fd57d7d..0c62d3d 100644 --- a/RPG/Config/StatUpgradeUI/XComUI.ini +++ b/RPG/Config/StatUpgradeUI/XComStatUpgradeUI.ini @@ -29,4 +29,24 @@ HealthDeltaStrikeCostLamda = 15 DefaultStatPointsPerPromotion=15 ; Class specific stat points override DefaultStatPointsPerPromotion -; +ClassStatPointsPerPromotion=(SoldierClassTemplateName=UniversalSoldier, StatPointsPerPromotion=20) \ No newline at end of file +; +ClassStatPointsPerPromotion=(SoldierClassTemplateName=UniversalSoldier, StatPointsPerPromotion=20) + +[StatUpgradeUI.StatUIHelper] +NaturalAptitudeAboveAverageChance=50 +NaturalAptitudeThresholds[0]=50 ; 25% chance +NaturalAptitudeThresholds[1]=80 ; 15% chance +NaturalAptitudeThresholds[2]=99 ; 9.5% chance +NaturalAptitudeThresholds[3]=100 ; 0.5% chance + ++NaturalAptitudeCharacterTemplates = Soldier ++NaturalAptitudeCharacterTemplates = ReaperSoldier ++NaturalAptitudeCharacterTemplates = SkirmisherSoldier ++NaturalAptitudeCharacterTemplates = TemplarSoldier ++NaturalAptitudeCharacterTemplates = XComMecSoldier ++NaturalAptitudeCharacterTemplates = SkirmXComMecSoldier + +BaseSoldierNaturalAptitude[0]=0 +BaseSoldierNaturalAptitude[1]=5 +BaseSoldierNaturalAptitude[2]=10 +BaseSoldierNaturalAptitude[3]=15 +BaseSoldierNaturalAptitude[4]=20 \ No newline at end of file diff --git a/RPG/Config/XComEngine.ini b/RPG/Config/XComEngine.ini index dcc5f2a..e84cc9c 100644 --- a/RPG/Config/XComEngine.ini +++ b/RPG/Config/XComEngine.ini @@ -5,9 +5,9 @@ +NonNativePackages=XModBase_Lib +NonNativePackages=XCOM2RPGOverhaul +NonNativePackages=ExtendedUpgrades -+NonNativePackages=DetailedSoldierListWOTC +NonNativePackages=NewPromotionScreenbyDefault +NonNativePackages=StatUpgradeUI ++NonNativePackages=DetailedSoldierListWOTC +NonNativePackages=Debug [UnrealEd.EditorEngine] @@ -17,9 +17,9 @@ +ModEditPackages=XModBase_Core_2_0_1 +ModEditPackages=XModBase_Lib +ModEditPackages=ExtendedUpgrades -+ModEditPackages=DetailedSoldierListWOTC +ModEditPackages=NewPromotionScreenbyDefault +ModEditPackages=StatUpgradeUI ++ModEditPackages=DetailedSoldierListWOTC +ModEditPackages=Debug [Engine.Engine] diff --git a/RPG/Content/DetailedSoldierListWOTC/UILibrary_LWToolbox.upk b/RPG/Content/DetailedSoldierListWOTC/UILibrary_LWToolbox.upk index 42e296f19583db3a5a52815ee45c36322e44d100..320932e2a546332c581dac2cefdedc6f523a4509 100644 GIT binary patch delta 13207 zcmch72{@GB+y66T--?nwA<4dFYgDAj2w9qtCEM8dE&D^EQc5OE${NZDWh~i+5-K9` zMV1hegk0Irry$&b^$Y>Ag&rHAn_Oy(pZlMdk~+ zDMAnh1VP%aE?5WwK|JC>2nBT;sAiyt*x5!7K`b;7qz5XgTs#Ots-ZW8pIm*ST**J} z*lY3P3;2HHJK`L~?>qQNqklYm)Suk=@%9*|Lb5W0cWnzVZx0Knqi$aIUf$MNw3Vw1 zAqYu{q$C5K7&OkG{4kpR$2SnMiCB<79?;7A`a0L<`|o|rpl|FNWpca zD!@(D$WKzc`6P$7L%Vq($mtPr2!afkc4Q|lsqsoH?kF`Mf(qwO&4&x2-buJgy~aV@GEwd-xljT6rs@C^(Q8Ue?v_~VP9^VBrjBeZ z7I0({x_%>Yc;|g_Zq>+`LulrtS`@@v`Kd2pZMomG<={Nb7J|C*_}kZnW?twL#D)Co zd(w43$H9Yg-9AA>OQXB@jD0_X>NqtOOeNd8$H}bU$nfA-c217VUd&;K$s~`+X?XFd z$Z$FI5xylPB;QeDeCBGhewSeT{Bbj1a0(|>F3M*pYEtfhZy7pH#aFM!7e>}syd2-R zK2T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?^rKCwkX`a-ecY2dcuN z&E~RVa+ft|=KV>)_oUqB9we5ODuGo#pUK zpGrJ^ZPtSRm%SHvJ(r+3)pGj{X0^`mk&jR9!ybWG)&Dw+pZD^<0m92gh&Or&*70(1 zbx73IT4+4j{o~Vf&huZV%q~wADOd9b`|@JHz?(Bn`m*9R@!;i?-kcBTylVdY(M|~~ z7x){-=zm2AACF1MzlBC`jm5*QF%uIHj4xZCNM_M1Dd5mQ|Bpv~9bud{LC?gnZp#pn zsBIo0JaKR+NzET0Uy|V+?}jl^uK#Z)e!+iMf%p3V Content - + Content @@ -209,6 +209,9 @@ tags=Gameplay, Soldier Class, Overhaul, RPG, Weapon, Item Content + + Content + Content diff --git a/RPG/ReadMe.txt b/RPG/ReadMe.txt index cbb3614..5860339 100644 --- a/RPG/ReadMe.txt +++ b/RPG/ReadMe.txt @@ -127,6 +127,12 @@ Known incompatibilities: - "Hack Plus" leads to insane high hacking stats - I am the commander here + +[b]My soldier keep getting promited to basegame/other classes?[/b] +Its a strange bug cause by the config system for some people. +Use the mod Disable Any Class Wotc and disable all classes but UniversalSoldier in the ingame mod options. +https://steamcommunity.com/sharedfiles/filedetails/?id=1148535137 + [h1]A note on the beta status[/h1] This mod will change frequently. Therefor it might be needed that you rebuild you soldiers. diff --git a/RPG/Src/DetailedSoldierListWOTC/Classes/UIPersonnel_SoldierListItemDetailed.uc b/RPG/Src/DetailedSoldierListWOTC/Classes/UIPersonnel_SoldierListItemDetailed.uc index 8f74573..4ead365 100644 --- a/RPG/Src/DetailedSoldierListWOTC/Classes/UIPersonnel_SoldierListItemDetailed.uc +++ b/RPG/Src/DetailedSoldierListWOTC/Classes/UIPersonnel_SoldierListItemDetailed.uc @@ -16,9 +16,9 @@ var UIText AimValue, DefenseValue; //icons to be shown in the name area var UIImage HealthIcon, MobilityIcon, WillIcon, HackIcon, DodgeIcon, PsiIcon, PrimaryWeaponIcon, SecondaryWeaponIcon; -var UIText HealthValue, MobilityValue, WillValue, HackValue, DodgeValue, PsiValue; +var UIText HealthValue, MobilityValue, WillValue, HackValue, DodgeValue, PsiValue, SPValue; -var UIIcon APIcon; +var UIIcon APIcon, NatAptIcon; var array BadTraitIcon; @@ -541,6 +541,27 @@ function AddNameColumnIcons(XComGameState_Unit Unit, out string traitToolTip) } } + if (NatAptIcon == none) + { + NatAptIcon = Spawn(class'UIIcon', self); + NatAptIcon.bAnimateOnInit = false; + NatAptIcon.bDisableSelectionBrackets = true; + NatAptIcon.InitIcon('NaturalAptitudeIcon', "img:///UILibrary_LWToolbox.UI.NaturalAptitudeIcon", false, false); + } + IconXPos += IconXDelta; + NatAptIcon.SetScale(IconScale * 0.6); + NatAptIcon.SetPosition(IconXPos - (IconToValueOffsetX * 0.1), IconYPos); + NatAptIcon.Show(); + + if(SPValue == none) + { + SPValue = Spawn(class'UIText', self); + SPValue.bAnimateOnInit = false; + SPValue.InitText('SPValue_ListItem_LW').SetPosition(IconXPos + IconToValueOffsetX, IconYPos + IconToValueOffsetY); + } + SPValue.SetHtmlText(class'UIUtilities_Text'.static.GetColoredText(string(class'StatUpgradeUI.StatUIHelper'.static.GetSoldierSP(Unit)), eUIState_Normal)); + SPValue.Show(); + PrimaryLoadoutImage = "img:///UILibrary_RPG.loadout_icon_" $ string(X2WeaponTemplate(Unit.GetPrimaryWeapon().GetMyTemplate()).WeaponCat); SecondaryLoadoutImage = "img:///UILibrary_RPG.loadout_icon_" $ string(X2WeaponTemplate(Unit.GetSecondaryWeapon().GetMyTemplate()).WeaponCat); @@ -548,7 +569,7 @@ function AddNameColumnIcons(XComGameState_Unit Unit, out string traitToolTip) { PrimaryWeaponIcon = Spawn(class'UIImage', self); PrimaryWeaponIcon.bAnimateOnInit = false; - PrimaryWeaponIcon.InitImage('PrimaryLoadoutImage_ListItem', PrimaryLoadoutImage).SetScale(IconScale).SetPosition(IconXPos += 35, -9.0f); + PrimaryWeaponIcon.InitImage('PrimaryLoadoutImage_ListItem', PrimaryLoadoutImage).SetScale(IconScale).SetPosition(IconXPos += 35 - IconXDelta, -9.0f); } if (SecondaryWeaponIcon == none && Unit.GetSecondaryWeapon() != none) @@ -559,7 +580,7 @@ function AddNameColumnIcons(XComGameState_Unit Unit, out string traitToolTip) } - IconXPos += IconXDelta; + //IconXPos += IconXDelta; EventTemplateManager = class'X2EventListenerTemplateManager'.static.GetEventListenerTemplateManager(); @@ -674,6 +695,11 @@ simulated function UpdateItemsForFocus(bool Focussed) { APIcon.SetForegroundColor(APColours[int(Unit.ComInt)]); } + + if (NatAptIcon != none) + { + NatAptIcon.SetForegroundColor(APColours[int(class'StatUpgradeUI.StatUIHelper'.static.GetNaturalAptitude(Unit))]); + } } } diff --git a/RPG/Src/StatUpgradeUI/Classes/StatUIHelper.uc b/RPG/Src/StatUpgradeUI/Classes/StatUIHelper.uc new file mode 100644 index 0000000..7817377 --- /dev/null +++ b/RPG/Src/StatUpgradeUI/Classes/StatUIHelper.uc @@ -0,0 +1,105 @@ +class StatUIHelper extends Object config(StatUpgradeUI); + +enum ENaturalAptitude +{ + eNaturalAptitude_Standard, + eNaturalAptitude_AboveAverage, + eNaturalAptitude_Gifted, + eNaturalAptitude_Genius, + eNaturalAptitude_Savant, +}; + + +var config array NaturalAptitudeCharacterTemplates; +var config array NaturalAptitudeThresholds; +var config int NaturalAptitudeAboveAverageChance; +var config array BaseSoldierNaturalAptitude; + +var localized string NaturalAptitudeLabel[ENaturalAptitude.EnumCount]; +var localized string NaturalAptitude; + +static function OnPostCharacterTemplatesCreated() +{ + local X2CharacterTemplateManager CharacterTemplateMgr; + local X2CharacterTemplate SoldierTemplate; + local array DataTemplates; + local int ScanTemplates, ScanAdditions; + + CharacterTemplateMgr = class'X2CharacterTemplateManager'.static.GetCharacterTemplateManager(); + + for ( ScanAdditions = 0; ScanAdditions < default.NaturalAptitudeCharacterTemplates.Length; ++ScanAdditions ) + { + CharacterTemplateMgr.FindDataTemplateAllDifficulties(default.NaturalAptitudeCharacterTemplates[ScanAdditions], DataTemplates); + for (ScanTemplates = 0; ScanTemplates < DataTemplates.Length; ++ScanTemplates) + { + SoldierTemplate = X2CharacterTemplate(DataTemplates[ScanTemplates]); + if (SoldierTemplate != none) + { + SoldierTemplate.OnStatAssignmentCompleteFn = class'StatUIHelper'.static.OnStatAssignmentCompleteNaturalAptitude; + } + } + } +} + +static function OnStatAssignmentCompleteNaturalAptitude(XComGameState_Unit UnitState) +{ + local ENaturalAptitude Apt; + + Apt = RollNaturalAptitude(); + + //`LOG(default.Class @ GetFuncName() @ Apt @ float(Apt),, 'RPG'); + UnitState.SetUnitFloatValue('NaturalAptitude', float(Apt) , eCleanUp_Never); +} + +static function int GetBonusStatPointsFromNaturalAptitude(XComGameState_Unit UnitState) +{ + //`LOG(default.Class @ GetFuncName() @ default.BaseSoldierNaturalAptitude[GetNaturalAptitude(UnitState)],, 'RPG'); + return default.BaseSoldierNaturalAptitude[GetNaturalAptitude(UnitState)]; +} + +static function ENaturalAptitude GetNaturalAptitude(XComGameState_Unit UnitState) +{ + local UnitValue NaturalAptitudeValue; + + UnitState.GetUnitValue('NaturalAptitude', NaturalAptitudeValue); + + //`LOG(default.Class @ GetFuncName() @ NaturalAptitudeValue.fValue @ GetEnum(Enum'ENaturalAptitude', NaturalAptitudeValue.fValue),, 'RPG'); + + return ENaturalAptitude(NaturalAptitudeValue.fValue); +} + +static function ENaturalAptitude RollNaturalAptitude() +{ + local array Thresholds; + local int idx, NaturalAptitudeRoll; + + if (class'X2StrategyGameRulesetDataStructures'.static.Roll(default.NaturalAptitudeAboveAverageChance)) + { + Thresholds = default.NaturalAptitudeThresholds; + NaturalAptitudeRoll = `SYNC_RAND_STATIC(100); + + for (idx = 0; idx < Thresholds.Length; idx++) + { + if (NaturalAptitudeRoll < Thresholds[idx]) + { + return ENaturalAptitude(1 + idx); + break; + } + } + } + + return eNaturalAptitude_Standard; +} + +static function string GetNaturalAptitudeLabel(ENaturalAptitude NatApt) +{ + //`LOG(default.Class @ GetFuncName() @ NatApt @ default.NaturalAptitudeLabel[NatApt] @ default.NaturalAptitudeLabel[eNaturalAptitude_Standard],, 'RPGO'); + return default.NaturalAptitudeLabel[NatApt]; +} + +static function int GetSoldierSP(XComGameState_Unit UnitState) +{ + local UnitValue StatPointsValue; + UnitState.GetUnitValue('StatPoints', StatPointsValue); + return int(StatPointsValue.fValue); +} \ No newline at end of file diff --git a/RPG/Src/StatUpgradeUI/Classes/UIPanel_StatUI_StatLine.uc b/RPG/Src/StatUpgradeUI/Classes/UIPanel_StatUI_StatLine.uc index 42a2dbe..2684587 100644 --- a/RPG/Src/StatUpgradeUI/Classes/UIPanel_StatUI_StatLine.uc +++ b/RPG/Src/StatUpgradeUI/Classes/UIPanel_StatUI_StatLine.uc @@ -1,4 +1,4 @@ -class UIPanel_StatUI_StatLine extends UIPanel config (UI); +class UIPanel_StatUI_StatLine extends UIPanel config (StatUpgradeUI); struct StatCostBind { diff --git a/RPG/Src/StatUpgradeUI/Classes/UIScreen_StatUI.uc b/RPG/Src/StatUpgradeUI/Classes/UIScreen_StatUI.uc index 455e036..adb08c7 100644 --- a/RPG/Src/StatUpgradeUI/Classes/UIScreen_StatUI.uc +++ b/RPG/Src/StatUpgradeUI/Classes/UIScreen_StatUI.uc @@ -1,4 +1,4 @@ -class UIScreen_StatUI extends UIArmory config(UI); +class UIScreen_StatUI extends UIArmory config(StatUpgradeUI); var UIPanel Container; var UIBGBox PanelBG; @@ -6,7 +6,7 @@ var UIBGBox FullBG; var UIX2PanelHeader TitleHeader; var UIImage SCImage; var UIButton SaveButton; -var UIText StatPointsText, AbilityPointsText, StatNameHeader, StatValueHeader, UpgradePointsHeader, StatCostHeader, UpgradeCostHeader; +var UIText NaturalAptitudeText, StatPointsText, AbilityPointsText, StatNameHeader, StatValueHeader, UpgradePointsHeader, StatCostHeader, UpgradeCostHeader; var array StatLines; var bool bLog; @@ -54,6 +54,10 @@ function InitPanels() AbilityPointsText.SetWidth(200); AbilityPointsText.SetPosition(Container.Width - AbilityPointsText.Width - StatPointsText.Width - LeftPadding, LeftPadding); + NaturalAptitudeText = Spawn(class'UIText', Container).InitText('NaturalAptitudeText'); + NaturalAptitudeText.SetWidth(450); + NaturalAptitudeText.SetPosition(Container.Width - NaturalAptitudeText.Width - LeftPadding, LeftPadding * 2); + TitleHeader = Spawn(class'UIX2PanelHeader', Container); TitleHeader.InitPanelHeader('', "", ""); TitleHeader.SetPosition(SCImage.Width + RunningHeaderOffsetX + 10, LeftPadding); @@ -116,7 +120,6 @@ function InitStatLines() { local UIPanel_StatUI_StatLine StatLine; local int Index, OffsetX, OffsetY; - local UnitValue StatPointsValue; local bool bUseBetaStrikeHealthProgression; bUseBetaStrikeHealthProgression = UnitState.GetSoldierClassTemplateName() == 'UniversalSoldier'; @@ -162,6 +165,8 @@ function InitStatLines() function PopulateHeaderData() { + local string NaturalAptitude; + if (UnitState.GetSoldierClassTemplate() != none) { SCImage.LoadImage(UnitState.GetSoldierClassIcon()); @@ -170,6 +175,9 @@ function PopulateHeaderData() TitleHeader.SetText(UnitState.GetName(eNameType_FullNick), Caps(UnitState.IsSoldier() ? UnitState.GetSoldierClassDisplayName() : "")); TitleHeader.MC.FunctionVoid("realize"); + + NaturalAptitude = class'UIUtilities_Text'.static.AlignRight(class'UIUtilities_Text'.static.GetColoredText(class'StatUIHelper'.default.NaturalAptitude $ ":" @ Caps(class'StatUIHelper'.static.GetNaturalAptitudeLabel(class'StatUIHelper'.static.GetNaturalAptitude(UnitState))), eUIState_Normal, FontSize)); + NaturalAptitudeText.SetHtmlText(NaturalAptitude); } function PopulateSoldierPoints() @@ -179,7 +187,7 @@ function PopulateSoldierPoints() CurrentSP = Max(GetSoldierSP() - StatPointCostSum, 0); CurrentAP = GetSoldierAP() - AbilityPointCostSum - Min(GetSoldierSP() - StatPointCostSum, 0); - StatPointsText.SetHtmlText(class'UIUtilities_Text'.static.GetColoredText(m_strSoldierSPLabel @ string(CurrentSP), eUIState_Normal, FontSize)); + StatPointsText.SetHtmlText(class'UIUtilities_Text'.static.AlignRight(class'UIUtilities_Text'.static.GetColoredText(m_strSoldierSPLabel @ string(CurrentSP), eUIState_Normal, FontSize))); AbilityPointsText.SetHtmlText(class'UIUtilities_Text'.static.GetColoredText(class'UIArmory_PromotionHero'.default.m_strSoldierAPLabel @ string(CurrentAP), eUIState_Normal, FontSize)); } @@ -360,7 +368,7 @@ simulated function bool IsAllowedToCycleSoldiers() defaultproperties { - StatOffsetY=70 + StatOffsetY=90 LeftPadding=40 Padding=20 FontSize=32 diff --git a/RPG/Src/StatUpgradeUI/Classes/X2DownloadableContentInfo_StatUpgradeUI.uc b/RPG/Src/StatUpgradeUI/Classes/X2DownloadableContentInfo_StatUpgradeUI.uc index 4e92ed8..b02d2e4 100644 --- a/RPG/Src/StatUpgradeUI/Classes/X2DownloadableContentInfo_StatUpgradeUI.uc +++ b/RPG/Src/StatUpgradeUI/Classes/X2DownloadableContentInfo_StatUpgradeUI.uc @@ -1,6 +1,9 @@ class X2DownloadableContentInfo_StatUpgradeUI extends X2DownloadableContentInfo; - +static event OnPostTemplatesCreated() +{ + class'StatUIHelper'.static.OnPostCharacterTemplatesCreated(); +} exec function DebugStatUIHeader( int StatNameHeaderWidth, diff --git a/RPG/Src/StatUpgradeUI/Classes/X2EventListener_StatUI.uc b/RPG/Src/StatUpgradeUI/Classes/X2EventListener_StatUI.uc index c876e48..d98cc3b 100644 --- a/RPG/Src/StatUpgradeUI/Classes/X2EventListener_StatUI.uc +++ b/RPG/Src/StatUpgradeUI/Classes/X2EventListener_StatUI.uc @@ -1,4 +1,4 @@ -class X2EventListener_StatUI extends X2EventListener config(UI); +class X2EventListener_StatUI extends X2EventListener config(StatUpgradeUI); struct ClassStatPoints { @@ -70,7 +70,6 @@ static function CHEventListenerTemplate CreateListenerTemplate_OnCompleteRespecS static function EventListenerReturn OnCompleteRespecSoldier(Object EventData, Object EventSource, XComGameState GameState, Name Event, Object CallbackData) { local XComGameState_Unit UnitState; - local UnitValue StatPointsValue; local int SpentSoldierSP, SoldierSP; UnitState = XComGameState_Unit(EventData); @@ -90,17 +89,20 @@ static function EventListenerReturn OnUnitRankUp(Object EventData, Object EventS { local XComGameState_Unit UnitState; local UnitValue StatPointsValue; - local int StatPointsPerPromotion; + local int StatPointsPerPromotion, BonusStatPointsNaturalAptitude; UnitState = XComGameState_Unit(EventData); if (UnitState != none) { StatPointsPerPromotion = GetClassStatPointsPerPromition(UnitState); - - UnitState = XComGameState_Unit(GameState.CreateStateObject(class'XComGameState_Unit', UnitState.ObjectID)); + BonusStatPointsNaturalAptitude = class'StatUIHelper'.static.GetBonusStatPointsFromNaturalAptitude(UnitState); + UnitState = XComGameState_Unit(GameState.CreateStateObject(class'XComGameState_Unit', UnitState.ObjectID)); UnitState.GetUnitValue('StatPoints', StatPointsValue); - UnitState.SetUnitFloatValue('StatPoints', StatPointsValue.fValue + StatPointsPerPromotion, eCleanup_Never); + + `LOG(default.Class @ GetFuncName() @ "StatPointsValue" @ int(StatPointsValue.fValue) @ "StatPointsPerPromotion" @ StatPointsPerPromotion @ "BonusStatPointsNaturalAptitude" @ BonusStatPointsNaturalAptitude,, 'RPG'); + + UnitState.SetUnitFloatValue('StatPoints', StatPointsValue.fValue + StatPointsPerPromotion + BonusStatPointsNaturalAptitude, eCleanup_Never); GameState.AddStateObject(UnitState); } diff --git a/RPG/Src/XCOM2RPGOverhaul/Classes/X2TemplateHelper_RPGOverhaul.uc b/RPG/Src/XCOM2RPGOverhaul/Classes/X2TemplateHelper_RPGOverhaul.uc index b2b7819..aa08242 100644 --- a/RPG/Src/XCOM2RPGOverhaul/Classes/X2TemplateHelper_RPGOverhaul.uc +++ b/RPG/Src/XCOM2RPGOverhaul/Classes/X2TemplateHelper_RPGOverhaul.uc @@ -270,8 +270,17 @@ static function PatchAbilitiesWeaponCondition() WeaponCondition.IncludeWeaponCategories = Restriction.WeaponCategories; Template.AbilityTargetConditions.AddItem(WeaponCondition); - Template.eAbilityIconBehaviorHUD = eAbilityIconBehavior_HideSpecificErrors; - Template.HideErrors.AddItem('AA_WeaponIncompatible'); + // Hide active abilities if no weapon matches + if ( + (Template.eAbilityIconBehaviorHUD == eAbilityIconBehavior_AlwaysShow || + Template.eAbilityIconBehaviorHUD == eAbilityIconBehavior_HideSpecificErrors) && + !Template.bIsPassive && + Template.HasTrigger('X2AbilityTrigger_PlayerInput') + ) + { + Template.eAbilityIconBehaviorHUD = eAbilityIconBehavior_HideSpecificErrors; + Template.HideErrors.AddItem('AA_WeaponIncompatible'); + } } } } @@ -576,7 +585,6 @@ static function UpdateStorage() } } - static function PatchAbilityPrerequisites() { local X2AbilityTemplateManager TemplateManager;