Many of the arrays in the game are dynamic arrays and so can be added to.
However, looking at the localization data it appears that all of the arrays of strings (for example CityTypeNames) are all static arrays.
I'm not sure if this is a limitation with Unreal or a design choice by Firaxis.
For something like operation names:
var const localized string m_aFirstOpName;
var const localized string m_aSecondOpName;
There are only allowed 53 FirstOpNames and 76 SecondOpNames, all of which have entries in the XComStrategyGame.int file.
It may be possible to hex edit the size of these two arrays and then add additional options. I'm not sure whether the .ini / .int file parser is pre-compiled with the array size or if dynamically determines it at run-time. (First case it wouldn't work, second case it would).
In order to resize an array you do the following :
- Find the array definition in UE Explorer (for example, XComStrategyGame.upk >> XGMission / m_aFirstOpNames
- Right-click on variable and bring up the Buffer
For EW release this is:
05 44 00 00 94 25 00 00 00 00 00 00 05 44 00 00
35 00 00 00 02 80 40 00 00 00 00 00 94 25 00 00
00 00 00 00 00 00 00 00
This will have changed for EW patch 1 (which I haven't yet updated to )
The key value is the first word in the second line. 0x35 = 53. To increase the size of the static array simply increase the value here.
As an initial test I'd recommend changing this to 0x36 (just by 1) and adding another name to the end of the list, like :
To actually get the additional names to work requires a change to XGMission.GenerateOpName
kTag.StrValue0 = m_aFirstOpName[Rand(53)];
kTag.StrValue1 = m_aSecondOpName[Rand(76)];
The array size is hard-coded as such.
To test whether the new localization data is being read (without requiring a ridiculous number of trials), I'd suggest changing the first line to:
kTag.StrValue0 = m_aFirstOpName;
which would always pull in the new 54th array element at position 53.
Edited by Amineri, 06 December 2013 - 09:51 PM.