Alright, I'm trying to implement skills into the values of bonuses from things like "Merchant Master" or "Farmer" in my "Abilities and Histories Modification" (check it out!) but cannot figure out how to properly implement the code.
Here is what the code looks like right now for a merchant's passive income (intended to test the code):
<GameModifier>
<ModType>Unit</ModType>
<Attribute>ProduceResource</Attribute>
<StrVal>Gold</StrVal>
<Calculate InternalName = "Value" ValueOwner="Unit"> <!-- I've tried "castingunit" as well, no effect -->
<Expression><![CDATA[[UnitStat_Intelligence]+[UnitStat_Charisma]]]></Expression>
</Calculate>
</GameModifier>
Basically it should add the intelligence and charisma and return me that much gold per turn. So, if my merchant's intelligence and charisma are both 10 then he should make 20 gold per turn. However, its not returning anything.
My theory is that there is a problem with either the "Value", "ValueOwner", or within the expression itself (maybe it's with CDATA, for example). Maybe I need to put a "<Value> = value" line of code or something but that seems redundant (gonna try it anyways).
This could REALLY open up some possibilities into making the attributes (especially intelligence and charisma) more important for certain professions. Merchants could make more money as they get smarter, Generals could gain higher morale rewards as they get more charismatic, Researchers could output more research as they get more intelligent, and Bards could gain higher prestige as they get more charismatic.
Eventually the code will look like this for the merchant, FYI:
.2 gold + (1/100) wisdom + (1/25) charisma + (1/30) intelligence
Also, for another challenge, how do I add passive experience per turn to champions?
I appreciate any help. Thanks ahead of time!