Skip to content

Commit

Permalink
RPGO ability prerequisites should only affect rpgo class now.
Browse files Browse the repository at this point in the history
Removes double AP rewards on missions
Adds some complemtary spec fix for the warden plugin
Improves some log statements
  • Loading branch information
Musashi1584 committed Mar 18, 2020
1 parent 7a872bd commit 88d3b5c
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 29 deletions.
10 changes: 5 additions & 5 deletions XCOM2RPGOverhaul.XCOM_sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# XCOM ModBuddy Solution File, Format Version 11.00
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{5DAE07AF-E217-45C1-8DE7-FF99D6011E8A}") = "XCOM2RPGOverhaul", "XCOM2RPGOverhaul\XCOM2RPGOverhaul.x2proj", "{CF9EDB78-24F8-49FA-93F5-0BE39DC6A4A5}"
Project("{5DAE07AF-E217-45C1-8DE7-FF99D6011E8A}") = "XCOM2RPGOverhaul", "XCOM2RPGOverhaul\XCOM2RPGOverhaul.x2proj", "{219CE4B8-DA1D-49EB-A9A2-A7B292DF97F9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|XCOM 2 = Debug|XCOM 2
Default|XCOM 2 = Default|XCOM 2
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CF9EDB78-24F8-49FA-93F5-0BE39DC6A4A5}.Debug|XCOM 2.ActiveCfg = Debug|XCOM 2
{CF9EDB78-24F8-49FA-93F5-0BE39DC6A4A5}.Debug|XCOM 2.Build.0 = Debug|XCOM 2
{CF9EDB78-24F8-49FA-93F5-0BE39DC6A4A5}.Default|XCOM 2.ActiveCfg = Default|XCOM 2
{CF9EDB78-24F8-49FA-93F5-0BE39DC6A4A5}.Default|XCOM 2.Build.0 = Default|XCOM 2
{219CE4B8-DA1D-49EB-A9A2-A7B292DF97F9}.Debug|XCOM 2.ActiveCfg = Debug|XCOM 2
{219CE4B8-DA1D-49EB-A9A2-A7B292DF97F9}.Debug|XCOM 2.Build.0 = Debug|XCOM 2
{219CE4B8-DA1D-49EB-A9A2-A7B292DF97F9}.Default|XCOM 2.ActiveCfg = Default|XCOM 2
{219CE4B8-DA1D-49EB-A9A2-A7B292DF97F9}.Default|XCOM 2.Build.0 = Default|XCOM 2
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Binary file modified XCOM2RPGOverhaul.v12.XCOM_suo
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[Engine.Engine]
-ModClassOverrides=(BaseGameClass="UIPersonnel_SoldierListItem", ModClass="UIPersonnel_SoldierListItemDetailed")
-ModClassOverrides=(BaseGameClass="UIPersonnel_SoldierListItem", ModClass="DetailedSoldierListWOTC_Integrated.UIPersonnel_SoldierListItemDetailed")
+ModClassOverrides=(BaseGameClass="UIPersonnel_SoldierListItem", ModClass="XCOM2RPGOverhaul.UIPersonnel_SoldierListItemDetailed")
2 changes: 1 addition & 1 deletion XCOM2RPGOverhaul/Config/XComGameCore.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[XComGame.X2EventListener_AbilityPoints]
-MaxTacticalEventAbilityPointsPerBattle=2
+MaxTacticalEventAbilityPointsPerBattle=10
+MaxTacticalEventAbilityPointsPerBattle=5

[XModBase_Core_2_0_1.XMBConfig]
;+AllSoldierAbilitySet=EquipmentStatCaps
4 changes: 4 additions & 0 deletions XCOM2RPGOverhaul/Config/XComRPG.ini
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ IRIMetaInfo = (bMeta=true, AllowedWeaponCategories=(bioamp), InventorySlots=(eIn
+ForceComplementarySpecializations=Tactician
IRIMetaInfo = (bMeta=true, AllowedWeaponCategories=(bioamp), InventorySlots=(eInvSlot_SecondaryWeapon), iWeightSecondary=1)

; Fix for warden class and swo
[Flow X2UniversalSoldierClassInfo]
+ForceComplementarySpecializations=Ebb

[RPGO.X2Effect_ReducedRecoveryTime]
+FIELD_SURGEON_CHANCE_FOR_NUM_EFFECTS[0]=100
+FIELD_SURGEON_CHANCE_FOR_NUM_EFFECTS[1]=50
Expand Down
2 changes: 1 addition & 1 deletion XCOM2RPGOverhaul/Features.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The baseline ability cost for buying abilities is raised too however:

Individual abilities may cost more or less depending on their powerlevel.

The ability point rewards are doubled and the mission cap is raised from 2 to 10 AP/mission
The ability point mission cap is raised from 2 to 5 AP/mission

[h1]Soldier SP[/h1]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static function CHEventListenerTemplate CreateListenerTemplateScamperBegin()
Template.RegisterInStrategy = false;

Template.AddCHEvent('ScamperBegin', OnScamperBegin, ELD_OnStateSubmitted);
`LOG("Register Event OnScamperBegin",, 'RPG');
`LOG(default.class @ "Register Event OnScamperBegin",, 'RPG');

return Template;
}
Expand All @@ -37,7 +37,7 @@ static function CHEventListenerTemplate CreateListenerTemplateOnCleanupTacticalM
Template.RegisterInStrategy = false;

Template.AddCHEvent('CleanupTacticalMission', OnCleanupTacticalMission, ELD_OnStateSubmitted);
`LOG("Register Event CleanupTacticalMission",, 'RPG');
`LOG(default.class @ "Register Event CleanupTacticalMission",, 'RPG');

return Template;
}
Expand All @@ -52,10 +52,10 @@ static function CHEventListenerTemplate CreateListenerTemplateGetItemRange()
Template.RegisterInStrategy = false;

Template.AddCHEvent('OnGetItemRange', OnGetItemRangeBombard, ELD_OnStateSubmitted);
`LOG("Register Event OnGetItemRangeBombard",, 'RPG');
`LOG(default.class @ "Register Event OnGetItemRangeBombard",, 'RPG');

Template.AddCHEvent('OnGetItemRange', OnGetItemRangeScout, ELD_OnStateSubmitted);
`LOG("Register Event OnGetItemRangeScout",, 'RPG');
`LOG(default.class @ "Register Event OnGetItemRangeScout",, 'RPG');

return Template;
}
Expand All @@ -70,7 +70,7 @@ static function CHEventListenerTemplate CreateListenerTemplateFailsafe()
Template.RegisterInStrategy = false;

Template.AddCHEvent('PreAcquiredHackReward', OnPreAcquiredHackReward, ELD_OnStateSubmitted);
`LOG("Register Event PreAcquiredHackReward",, 'RPG');
`LOG(default.class @ "Register Event PreAcquiredHackReward",, 'RPG');

return Template;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static function CHEventListenerTemplate CreateMainMenuListenerTemplate()
Template.RegisterInStrategy = true;

Template.AddCHEvent('OnArmoryMainMenuUpdate', OnArmoryMainMenuUpdate, ELD_Immediate);
`LOG("Register Event OnArmoryMainMenuUpdate",, 'RPG');
`LOG(default.Class @ "Register Event OnArmoryMainMenuUpdate",, 'RPG');

return Template;
}
Expand All @@ -41,7 +41,7 @@ static function CHEventListenerTemplate CreateListenerTemplate_OnUnitRankUp()
Template.RegisterInStrategy = true;

Template.AddCHEvent('UnitRankUp', OnUnitRankUp, ELD_Immediate);
`LOG("Register Event OnUnitRankUp",, 'RPG');
`LOG(default.Class @ "Register Event OnUnitRankUp",, 'RPG');

return Template;
}
Expand All @@ -55,7 +55,7 @@ static function CHEventListenerTemplate CreateListenerTemplate_OnCompleteRespecS
Template.RegisterInStrategy = true;

Template.AddCHEvent('CompleteRespecSoldier', OnCompleteRespecSoldier, ELD_OnStateSubmitted);
`LOG("Register Event CompleteRespecSoldier",, 'RPG');
`LOG(default.Class @ "Register Event CompleteRespecSoldier",, 'RPG');

return Template;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ defaultproperties
{
MajorVersion = 0;
MinorVersion = 2;
PatchVersion = 9;
PatchVersion = 10;
Commit = "beta";
}
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ function bool CanPurchaseAbility(int Rank, int Branch, name AbilityName)
//Emulate Resistance Hero behaviour
if(AbilityRanks == 0)
{
return (Rank < UnitState.GetRank() && CanAffordAbility(Rank, Branch) && UnitState.MeetsAbilityPrerequisites(AbilityName));
return (Rank < UnitState.GetRank() && CanAffordAbility(Rank, Branch) && MeetsAbilityPrerequisites(UnitState, AbilityName));
}

//Don't allow non hero units to purchase abilities with AP without a training center
Expand All @@ -567,10 +567,28 @@ function bool CanPurchaseAbility(int Rank, int Branch, name AbilityName)
}

//Normal behaviour
// Musashi 11-05-17 do not check ability prerequisites for resistance heroes
// Musashi 11-05-17 do not check ability prerequisites for other classes than UniversalSoldier
return (Rank < UnitState.GetRank() &&
CanAffordAbility(Rank, Branch) &&
(UnitState.MeetsAbilityPrerequisites(AbilityName) || UnitState.IsResistanceHero()));
MeetsAbilityPrerequisites(UnitState, AbilityName));
}

function bool MeetsAbilityPrerequisites(XComGameState_Unit UnitState, name AbilityName)
{
local bool bMeetsAbilityPrerequisites;

bMeetsAbilityPrerequisites = UnitState.MeetsAbilityPrerequisites(AbilityName);

// Dont use RPGO AbilityPrerequisites for other classes
if (!bMeetsAbilityPrerequisites && UnitState.GetSoldierClassTemplateName() != 'UniversalSoldier')
{
if (class'X2TemplateHelper_RPGOverhaul'.static.IsPrerequisiteAbility(AbilityName))
{
return true;
}
}

return bMeetsAbilityPrerequisites;
}

function int GetAbilityPointCost(int Rank, int Branch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ var config string DisplayName;
// Double tactical ability points
static event InstallNewCampaign(XComGameState StartState)
{
local XComGameState_HeadquartersXCom XComHQ;
//local XComGameState_HeadquartersXCom XComHQ;

XComHQ = class'X2TemplateHelper_RPGOverhaul'.static.GetNewXComHQState(StartState);
//XComHQ = class'X2TemplateHelper_RPGOverhaul'.static.GetNewXComHQState(StartState);

XComHQ.BonusAbilityPointScalar *= 2.0;
//XComHQ.BonusAbilityPointScalar *= 2.0;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static function CHEventListenerTemplate CreateListenerTemplate_OnUnitRankUp()
Template.AddCHEvent('UnitRankUp', OnUnitRankUpSecondWaveRoulette, ELD_OnStateSubmitted);
// compatibility with Commanders Choice Wotc
Template.AddCHEvent('UnitRankUp', OnUnitRankUpSecondWaveRoulette, ELD_Immediate);
`LOG("Register Event OnUnitRankUpSecondWaveRoulette",, 'RPG');
`LOG(default.class @ "Register Event OnUnitRankUpSecondWaveRoulette",, 'RPG');

return Template;
}
Expand All @@ -47,7 +47,7 @@ static function CHEventListenerTemplate CreateListenerTemplate_OnCompleteRespecS
Template.RegisterInStrategy = true;

Template.AddCHEvent('CompleteRespecSoldier', OnCompleteRespecSoldierSWTR, ELD_OnStateSubmitted);
`LOG("Register Event OnCompleteRespecSoldierSWTR",, 'RPG');
`LOG(default.class @ "Register Event OnCompleteRespecSoldierSWTR",, 'RPG');

return Template;
}
Expand All @@ -63,13 +63,13 @@ static function CHEventListenerTemplate CreateListenerTemplate_OnSoldierInfo()
Template.RegisterInStrategy = true;

Template.AddCHEvent('SoldierClassIcon', OnSoldierInfo, ELD_Immediate);
`LOG("Register Event SoldierClassIcon",, 'RPG');
`LOG(default.class @ "Register Event SoldierClassIcon",, 'RPG');

Template.AddCHEvent('SoldierClassDisplayName', OnSoldierInfo, ELD_Immediate);
`LOG("Register Event SoldierClassDisplayName",, 'RPG');
`LOG(default.class @ "Register Event SoldierClassDisplayName",, 'RPG');

Template.AddCHEvent('SoldierClassSummary', OnSoldierInfo, ELD_Immediate);
`LOG("Register Event SoldierClassSummary",, 'RPG');
`LOG(default.class @ "Register Event SoldierClassSummary",, 'RPG');

return Template;
}
Expand All @@ -84,7 +84,7 @@ static function CHEventListenerTemplate CreateListenerTemplate_OnGetLocalizedCat
Template.RegisterInStrategy = true;

Template.AddCHEvent('GetLocalizedCategory', OnGetLocalizedCategory, ELD_Immediate);
`LOG("Register Event OnGetLocalizedCategory",, 'RPG');
`LOG(default.class @ "Register Event OnGetLocalizedCategory",, 'RPG');

return Template;
}
Expand Down Expand Up @@ -426,7 +426,7 @@ static function CHEventListenerTemplate CreateListenerTemplate_OnBestGearLoadout
// Setting low priority so the unit gets specializations assigned by an event listener above
Template.AddCHEvent('UnitRankUp', OnUnitRankUp_IRIRandomClass, ELD_OnStateSubmitted, 10);
`LOG("Register Event OnBestGearLoadoutApplied",, 'RPG');
`LOG(default.class @ "Register Event OnBestGearLoadoutApplied",, 'RPG');
return Template;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ static function bool IsPrerequisiteAbility(name AbiliityName)
}
return false;
}



static function AddSecondWaveOptions()
{
AddSecondWaveOption(
Expand Down

0 comments on commit 88d3b5c

Please sign in to comment.