I've been digging through the XML files in preparation for some modding. I apologize in advance if I've sounded the "BUG" cry in error. Here's a snippet from CoreWeapons.xml to frame my question (bugs are in CoreArmor.xml, next section):
Part of the "Axe" GameItem, with my comments.
Code: xml
- <!-- This part adjusts the unit’s Attack value by +6 -->
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_Attack</StrVal>
- <Value>6.0</Value>
- </GameModifier>
- <!-- This part is telling the engine something about the unit’s damage type. -->
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_CuttingDamage</StrVal>
- <!-- NOTICE: there’s no “Value” tag here to say “how much cutting damage” -->
- <!-- OPTION 1: It’s simply toggling the unit’s damage type to “Cutting” -->
- <!-- OPTION 2: It’s telling the engine that the attack value modifications that are occurring in this “batch” of effects should all by categorized as “Cutting” -->
- <!-- OPTION 3: The "Value" from the previous GameModifier is "still in effect," since this GameModifier didn't set a new one. This would mean we've just increased both Untyped and Cutting damage by 6. -->
- </GameModifier>
Could we get some clarification on which of those options (or something else entirely) is actually true here? Armor appears to follow a similar scheme, though I think UnitStat_CuttingDefense is supposed to be used instead of UnitStat_CuttingDamage.
Here's an example from CoreArmor.xml from the "Fallenchainmailshirt" GameItem (that I think is correct)
Code: xml
- <!-- Equipment Modifiers -->
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_Defense</StrVal>
- <Value>4.0</Value>
- </GameModifier>
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_CuttingDefense</StrVal>
- </GameModifier>
- <GameModifier>
Here's an example from the same file from the "FallenScaleMailShirt" GameItem (that I think is wrong)
Code: xml
- <!-- Equipment Modifiers -->
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_Defense</StrVal>
- <Value>6.0</Value>
- </GameModifier>
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <!-- This equipment appears to modify the DAMAGE the unit is doing?! -->
- <StrVal>UnitStat_CuttingDamage</StrVal>
- </GameModifier>
- <GameModifier>
There are actually quite a number of armor pieces in that file that have UnitStat_*Damage effects. You can search for "Damage<" and it will take you right to them.
But if someone could answer my question about the "cascading" Value for GameModifiers, that would be awesome. Thanks!
Happy bug hunting.
Gnilbert