XCOM 2
Add Rank Nation
WolkenKatz  [developer] 14 Mar, 2016 @ 9:41pm
How To Activate the Commander Rank
First, you must be subscribed to this mod for it to work; you will be modifying this mod to make it do so.

Step 1:
In File Explorer, go to the hard drive XCOM 2 is installed on and navigate through the following files: SteamLibrary\SteamApps\workshop\content\268500\642086911

Step 2:
In the Config folder, open the XComGameBoard.ini file (in notepad if Windows asks). Scroll down to the bottom of the document.

Step 3:
Remove the //'s from the following so that this...
// [Country_Rank9 X2CountryTemplate] // FlagArchetype="UILibrary_Commander.CountryFlags.Flag_Rank9_Arc" // FlagImage="img:///UILibrary_Commander.CountryFlags.UIFlag_Rank9" // Races=(iCaucasian=1, iAfrican=1, iHispanic=1, iAsian=1) // Language="english" // UnitWeight=0

Looks like this....
[Country_Rank9 X2CountryTemplate] FlagArchetype="UILibrary_Commander.CountryFlags.Flag_Rank9_Arc" FlagImage="img:///UILibrary_Commander.CountryFlags.UIFlag_Rank9" Races=(iCaucasian=1, iAfrican=1, iHispanic=1, iAsian=1) Language="english" UnitWeight=0

Be sure to remove that extra space too. Save and close the file.

Step 4:
Go back to the root folder and then go into the Localization folder, and open the XComGame.int file (in notepad if Windows asks). Scroll down to the bottom of the document.

Step 5:
Remove the //'s from the following so that this...
// [Country_Rank9 X2CountryTemplate] // DisplayName="8: Commander Rank" // DisplayNameWithArticle="(REDACTED)" // DisplayNameWithArticleLower="(REDACTED)" // DisplayNamePossessive="(REDACTED)" // DisplayAdjective="(REDACTED)"

Looks like this...
[Country_Rank9 X2CountryTemplate] DisplayName="8: Commander Rank" DisplayNameWithArticle="(REDACTED)" DisplayNameWithArticleLower="(REDACTED)" DisplayNamePossessive="(REDACTED)" DisplayAdjective="(REDACTED)"

Be sure to remove that extra space too. Save and close the file.

Step 6:
Go back to the root folder and then go into Src, and then into AddRankNation, and then Classes. Open the AddRankNation.uc fil (in Notepad if Windows asks). There will be a list of Countries.AddItem near the top of the document. At the bottom of that list, remove the "//" from the last item, so that this...

{ local array<X2DataTemplate> Countries; Countries.AddItem(CreateRank1Template()); Countries.AddItem(CreateRank2Template()); Countries.AddItem(CreateRank3Template()); Countries.AddItem(CreateRank4Template()); Countries.AddItem(CreateRank5Template()); Countries.AddItem(CreateRank6Template()); Countries.AddItem(CreateRank7Template()); Countries.AddItem(CreateRank8Template()); Countries.AddItem(CreatePsi1Template()); Countries.AddItem(CreatePsi2Template()); Countries.AddItem(CreatePsi3Template()); Countries.AddItem(CreatePsi4Template()); Countries.AddItem(CreatePsi5Template()); Countries.AddItem(CreatePsi6Template()); Countries.AddItem(CreatePsi7Template()); // Countries.AddItem(CreateRank9Template()); return Countries; }

Looks like this...
{ local array<X2DataTemplate> Countries; Countries.AddItem(CreateRank1Template()); Countries.AddItem(CreateRank2Template()); Countries.AddItem(CreateRank3Template()); Countries.AddItem(CreateRank4Template()); Countries.AddItem(CreateRank5Template()); Countries.AddItem(CreateRank6Template()); Countries.AddItem(CreateRank7Template()); Countries.AddItem(CreateRank8Template()); Countries.AddItem(CreatePsi1Template()); Countries.AddItem(CreatePsi2Template()); Countries.AddItem(CreatePsi3Template()); Countries.AddItem(CreatePsi4Template()); Countries.AddItem(CreatePsi5Template()); Countries.AddItem(CreatePsi6Template()); Countries.AddItem(CreatePsi7Template()); Countries.AddItem(CreateRank9Template()); return Countries; }

Step 7:
Scroll down to the bottom of the document, and again remove the "//" from the file, so that this...
//static function X2DataTemplate CreateRank9Template() //{ // local X2CountryTemplate Template; // local CountryNames NameStruct; // // `CREATE_X2TEMPLATE(class'X2CountryTemplate', Template, 'Country_Rank9'); // // NameStruct.MaleNames = class'XGCharacterGenerator'.default.m_arrAmMFirstNames; // NameStruct.FemaleNames = class'XGCharacterGenerator'.default.m_arrAmFFirstNames; // NameStruct.MaleLastNames = class'XGCharacterGenerator'.default.m_arrAmLastNames; // NameStruct.FemaleLastNames = class'XGCharacterGenerator'.default.m_arrAmLastNames; // NameStruct.PercentChance = 100; // Template.Names.AddItem(NameStruct); // // return Template; //}

Looks like this...
static function X2DataTemplate CreateRank9Template() { local X2CountryTemplate Template; local CountryNames NameStruct; `CREATE_X2TEMPLATE(class'X2CountryTemplate', Template, 'Country_Rank9'); NameStruct.MaleNames = class'XGCharacterGenerator'.default.m_arrAmMFirstNames; NameStruct.FemaleNames = class'XGCharacterGenerator'.default.m_arrAmFFirstNames; NameStruct.MaleLastNames = class'XGCharacterGenerator'.default.m_arrAmLastNames; NameStruct.FemaleLastNames = class'XGCharacterGenerator'.default.m_arrAmLastNames; NameStruct.PercentChance = 100; Template.Names.AddItem(NameStruct); return Template; }

Then save and close the file.

Congrats! You have modded the mod!
Last edited by WolkenKatz; 14 Mar, 2016 @ 9:44pm
< >
Showing 1-3 of 3 comments
Ariel 20 Mar, 2016 @ 1:01am 
Much appreciated, thanks for helping my obsession over minor details.
I followed this tutorial and went to double check just to make sure I didn't forgot to remove any // or if I typed something by accident, and I did everything exactly as explained. All the other ranks are there, but not this one.
The following is direct copy/paste code from my files :


1)

[Country_Rank9 X2CountryTemplate]
FlagArchetype="UILibrary_Commander.CountryFlags.Flag_Rank9_Arc"
FlagImage="img:///UILibrary_Commander.CountryFlags.UIFlag_Rank9"
Races=(iCaucasian=1, iAfrican=1, iHispanic=1, iAsian=1)
Language="english"
UnitWeight=0


2)

[Country_Rank9 X2CountryTemplate]
DisplayName="8: Commander Rank"
DisplayNameWithArticle="(REDACTED)"
DisplayNameWithArticleLower="(REDACTED)"
DisplayNamePossessive="(REDACTED)"
DisplayAdjective="(REDACTED)"


3)

static function array<X2DataTemplate> CreateTemplates()
{
local array<X2DataTemplate> Countries;

Countries.AddItem(CreateRank1Template());
Countries.AddItem(CreateRank2Template());
Countries.AddItem(CreateRank3Template());
Countries.AddItem(CreateRank4Template());
Countries.AddItem(CreateRank5Template());
Countries.AddItem(CreateRank6Template());
Countries.AddItem(CreateRank7Template());
Countries.AddItem(CreateRank8Template());
Countries.AddItem(CreatePsi1Template());
Countries.AddItem(CreatePsi2Template());
Countries.AddItem(CreatePsi3Template());
Countries.AddItem(CreatePsi4Template());
Countries.AddItem(CreatePsi5Template());
Countries.AddItem(CreatePsi6Template());
Countries.AddItem(CreatePsi7Template());
Countries.AddItem(CreateRank9Template());

return Countries;
}

static function X2DataTemplate CreateRank9Template()
{
local X2CountryTemplate Template;
local CountryNames NameStruct;

`CREATE_X2TEMPLATE(class'X2CountryTemplate', Template, 'Country_Rank9');

NameStruct.MaleNames = class'XGCharacterGenerator'.default.m_arrAmMFirstNames;
NameStruct.FemaleNames = class'XGCharacterGenerator'.default.m_arrAmFFirstNames;
NameStruct.MaleLastNames = class'XGCharacterGenerator'.default.m_arrAmLastNames;
NameStruct.FemaleLastNames = class'XGCharacterGenerator'.default.m_arrAmLastNames;
NameStruct.PercentChance = 100;
Template.Names.AddItem(NameStruct);

return Template;
}
< >
Showing 1-3 of 3 comments
Per page: 1530 50