(18:47:37) hostname:~/AIWar2/GameData/Configuration/ExternalConstants $ cat Nanocaust_Constants.xml
<?xml version="1.0" encoding="utf-8"?>
<root
timeForMarkIIUpgrade="900"
timeForMarkIIIUpgrade="7200"
timeForFirstFrenzy="120"
maxNanobotLifespan="500"
minNanobotLifespan="120"
minTimeBetweenWaves="180"
>
</root>
Try making that opening line:
<root is_partial_record="true"
Without that your file functions as a
replacement for the default one (which can be useful), but with it it's just an amendment to it, which should avoid the errors you saw.
That said, if you want to be able to reference those in-game you'll need to follow the custom xml data naming pattern, like:
custom_int_nanocaust_timeForMarkIIUpgrade="900"
"custom_" is just a literal, tells it to process it as a custom field.
"int_" is the type; other valid values are bool, FInt, float, and string
"nanocaust_" is the namespace, can be whatever you want, to differentiate it from an int field some other mod names "timeForMarkIIUpgrade".
In game you could reference that as:
int timeForMarkIIUpgrade = ExternalConstants.Instance.GetCustomData( "nanocaust" ).GetInt( "timeForMarkIIUpgrade" );
Though a better pattern is:
CustomDataSet nanocaustConstants = ExternalConstants.Instance.GetCustomData( "nanocaust" );
int timeForMarkIIUpgrade = nanocaustConstants.GetInt( "timeForMarkIIUpgrade" );
I may change the getter pattern so that you're passing in int indices (or the equivalent) most of the time, for performance reasons, but for now this is fine.