Getting the XML to accept a double-move doesn't work with custom features

Spillsandstains

Warlord
Joined
Mar 31, 2008
Messages
271
I tried the doublemove method several times and I have to say that it is 100% effective for the features in the game. It doesn't only work with new features, of which I have several dozen in my mod. I am personally convinced that somewhere in the game there is a definition full of elements used in the game and my new features need to be added to it

- so I get this rather interesting comment from hrochland. Top Minds of Civ4, is there indeed an array of features like this you have come across in your C++ travels?
 
PHP:
void CvUnit::setHasPromotion(PromotionTypes eIndex, bool bNewValue)
[...]
        for (iI = 0; iI < GC.getNumFeatureInfos(); iI++)
        {
            changeExtraFeatureAttackPercent(((FeatureTypes)iI), (GC.getPromotionInfo(eIndex).getFeatureAttackPercent(iI) * iChange));
            changeExtraFeatureDefensePercent(((FeatureTypes)iI), (GC.getPromotionInfo(eIndex).getFeatureDefensePercent(iI) * iChange));
            changeFeatureDoubleMoveCount(((FeatureTypes)iI), ((GC.getPromotionInfo(eIndex).getFeatureDoubleMove(iI)) ? iChange : 0));
        }
Looks fine to me. Should work on modded and unmodded features. I have no explanation to why it would work with vanilla features and not features added by modders.
 
Can confirm from my own experience of adding features and double moves for these new features that the baseline DLL supports this. There must be something else that prevents it from working in your case.
 
Thank you for your help, I was asking for a friend, will pass it on. Now, I have very bad body odour ... sorry, I have a friend who has very bad body odour, can you help me with this? My doctor refuses to approach near me. I mean my friend.
 
Now, I have very bad body odour ... sorry, I have a friend who has very bad body odour, can you help me with this? My doctor refuses to approach near me. I mean my friend.
CiF-40KUUAE92e7.jpg

source (because even if you post a random picture found on google, it's still polite to show the source)
 
Top Bottom