Skip to content

Commit

Permalink
Basic integration of LW2 Information Display mod (#200)
Browse files Browse the repository at this point in the history
- Displays estimated enemy count (X-Y) with Alert level name
- Display ADVENT Force/Vigilance levels on Geoscape region label
- Displays ADVENT Vigilance level on Resistance Management UI
  • Loading branch information
Kazanir authored and pledbrook committed Jun 7, 2019
1 parent c7b6877 commit d06e254
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 7 deletions.
Binary file modified LongWarOfTheChosen/Localization/LW_Overhaul.deu
Binary file not shown.
Binary file modified LongWarOfTheChosen/Localization/LW_Overhaul.esn
Binary file not shown.
Binary file modified LongWarOfTheChosen/Localization/LW_Overhaul.fra
Binary file not shown.
Binary file modified LongWarOfTheChosen/Localization/LW_Overhaul.int
Binary file not shown.
Binary file modified LongWarOfTheChosen/Localization/LW_Overhaul.ita
Binary file not shown.
Binary file modified LongWarOfTheChosen/Localization/LW_Overhaul.pol
Binary file not shown.
Binary file modified LongWarOfTheChosen/Localization/LW_Overhaul.rus
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ var localized string m_strLiberated;
var localized string m_strIncomeLabel;
var localized string m_strADVENTUnitSingular;
var localized string m_strADVENTUnitPlural;
var localized string m_strResistanceManagementLevels;

var UIList List;
var UIBGBox ListBG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ simulated function UpdateData(bool Focused = false)
local XComGameState_Unit Liaison;
local StateObjectReference LiaisonRef;


ParamTag = XGParamTag(`XEXPANDCONTEXT.FindTag("XGParam"));
Outpost = XComGameState_LWOutpost(`XCOMHISTORY.GetGameStateForObjectID(OutpostRef.ObjectID));
Region = XComGameState_WorldRegion(`XCOMHISTORY.GetGameStateForObjectID(Outpost.Region.ObjectID));
RegionalAI = class'XComGameState_WorldRegion_LWStrategyAI'.static.GetRegionalAI(Region);
Expand Down Expand Up @@ -112,7 +112,9 @@ simulated function UpdateData(bool Focused = false)
}
else
{
strStatus = string (RegionalAI.LocalAlertLevel);
ParamTag.IntValue0 = RegionalAI.LocalAlertLevel;
ParamTag.IntValue1 = RegionalAI.LocalVigilanceLevel;
strStatus = `XEXPAND.ExpandString(class'UIResistanceManagement_LW'.default.m_strResistanceManagementLevels);
}
RegionStatusLabel.SetCenteredText (class'UIUtilities_Text'.static.GetColoredText(strStatus, Focused ? -1: eUIState_Normal, class'UIUtilities_Text'.const.BODY_FONT_SIZE_3D));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,11 @@ function string GetContactedRegionInfo(XComGameState_WorldRegion RegionState)
else
{
ParamTag = XGParamTag(`XEXPANDCONTEXT.FindTag("XGParam"));
//Primary text display
ParamTag.IntValue0 = RegionalAIState.LocalAlertLevel;
ParamTag.IntValue1 = RegionalAIState.LocalForceLevel;
ParamTag.IntValue2 = RegionalAIState.LocalVigilanceLevel;
// Re-did the main m_strAlertLevel to be the mod's previous "short version"
ScanInfo = `XEXPAND.ExpandString(m_strAlertLevel);
}
}
Expand Down
21 changes: 16 additions & 5 deletions LongWarOfTheChosen/Src/LW_Overhaul/Classes/UIUtilities_Text_LW.uc
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,31 @@ var localized string m_strHelp;

static function String GetDifficultyString(XComGameState_MissionSite MissionState)
{
local string Text;
local string Text, nums;
local int Difficulty, LabelsLength, EnemyUnits;
local array<X2CharacterTemplate> Dummy;

MissionState.GetShadowChamberMissionInfo (EnemyUnits, Dummy);
Difficulty = Max (1, (EnemyUnits-4) / 3);
LabelsLength = class'X2StrategyGameRulesetDataStructures'.default.MissionDifficultyLabels.Length;
if(Difficulty >= LabelsLength)
Text = class'X2StrategyGameRulesetDataStructures'.default.MissionDifficultyLabels[LabelsLength - 1];
if(Difficulty >= LabelsLength - 1)
{
nums = " (" $ ((LabelsLength * 3) + 1) $ "+)";
Text = class'X2StrategyGameRulesetDataStructures'.default.MissionDifficultyLabels[LabelsLength - 1] $ nums;
}
else
Text = class'X2StrategyGameRulesetDataStructures'.default.MissionDifficultyLabels[Difficulty];
{
if (Difficulty == 1)
nums = " (7-9)";
else
nums = " (" $ ((Difficulty * 3) + 4) $ "-" $ ((Difficulty * 3) + 6) $ ")";

Text = class'X2StrategyGameRulesetDataStructures'.default.MissionDifficultyLabels[Difficulty] $ nums;
}
if (EnemyUnits <= 0)
Text = class'X2StrategyGameRulesetDataStructures'.default.MissionDifficultyLabels[0];
{
Text = class'X2StrategyGameRulesetDataStructures'.default.MissionDifficultyLabels[0] $ " (???)";
}

return Caps(Text);
}
Expand Down

0 comments on commit d06e254

Please sign in to comment.