Question: Blitz hidden requirements?

Blitzconfusion

Chieftain
Joined
Jul 30, 2014
Messages
70
I have been modifying the excelent k-mod to my own needs, including promotions.
I have noticed, that regardless of my modifications for the Blitz promotion in XML, the promotion does not exist for Units with movement 1 (making the leader promo Morale even more worthless). This is regardless of whether the unit has access to/STARTS WITH a Promotion that increases movement.
I know that Blitz can indeed be made an available Promotion for Units with movement 1, as it is so in Fall from Heaven 2 (for example: Giant, and pretty much everything else).

EDIT: Original question answered. Now, as the recommended editing tools have not co-operated with me, I would like to ask someone with the skills, tools, heart and time to compile the attached cpp for me.
I have made the required code changes already (deleted the line about Blitz-checking), compiling needed.
I know, a lot of work, but would be much appreciated. (File in post below).
 
It's done in the DLL. Changing it would require modifying the source code and compiling a new DLL.

In the file CvGameCoreUtils.cpp there is a function called isPromotionValid. In this function it returns false in a couple of cases related to the blitz capability:
If the unit type is defensive only it can't take a promotion that gives blitz. (The section starting on line 239 of the regular BtS version of that file.)
If the unit type has a move of 1 it can't take a promotion that gives blitz. (The section starting on line 261 of the regular BtS version of that file.)

Note that the values for the unit this function uses are based on the CvUnitInfo data for the unit type since the unit type number is passed to the function, not the actual unit. Becasue of this, all of the values for the unit which it checks are just what is in the unit type XML. That is why it is the base moves for an unpromoted unit of that unit type that matter, not the actual unit's current move total.
 
I thought it was done in the XML file (although it might be checking both).... under :

Assets\XML\Units\Civ4PromotionInfos.xml

(Relevant code)
Spoiler :
<UnitCombats>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_HELICOPTER</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
<UnitCombat>
<UnitCombatType>UNITCOMBAT_NAVAL</UnitCombatType>
<bUnitCombat>1</bUnitCombat>
</UnitCombat>
</UnitCombats>
 
Thank you for the answer. Haven't tried anything with it yet, but I have no doubt about its worth. Thanks for quick answer.
 
I thought it would, it didn't. As long as the unit has Movement 1 the Blitz won't show for the unit, regardless of type and/or promotions that giv movement.
 
It seems that most of the programs mentioned on the various dll modding forums are meant for XP or similar, not W7, and thus the programs differ and I got stuck trying to compile.

Would anyone with the tools, heart and time compile this CPP for me, so that the Blitz would work as I intended (I have already modified it, someone just would need to compile it).
I know it is a lot of work, but it would be much appreciated.
 

Attachments

Back
Top Bottom