Promotion Problems!

Ehrenia

Chieftain
Joined
Apr 1, 2008
Messages
6
Hey everyone!

I thought I'd have a fiddle with the promotions to make some a bit more worthwhile, but one in particular is giving me problems. I made it so Combat VI has it's normal effect and blitz. This works fine on units that can have blitz in the first place, but now units that cannot (like anyone on foot) do not have the option of taking this as a promotion. I thought this may be to do with the actual blitz promo, so I changed that so that any unit can take it, but that didn't fix the problem or work in itself. If I give them the promo through the Worldbuilder it's all good, so the problem is solely that they aren't allowed to take it. Any ideas? Have I missed a file?
[I'm only dealing with XMLs. Yes, I do realise that without taking the Morale promo, the blitz effect is redundant ;) Oh, and, if it matters, Combat VI still requires the unit to be led by a Great General.]

Thanks in advance, (hope this was the right place to post)
Ehrenia
 
I never tried myself. But obviously blitz will only make sense on a unit that has more than one move... Perhaps it's why it gets diabled on 1 Move units.
 
Yeah, I mentioned at the end that unless you take Morale (+1 movement), then blitz is useless. But if I give them Morale and then Combat VI through the Worldbuilder, then it does work. It's just that the game won't let them take it.
 
There is a CanAquirePromotion() method in CvUnit (and some other related). If those are exposed to python - which i dont know - you could try to change them, to drop the check for having multiple moves...
 
Refar: Sorry, I've never modded this game before and so far it is just guesswork :P How would I change this? Do I need to be able to code in Python?
 
I just took a quick look at the sdk code - never messed around with promotions myself. But...

The offending method is within CVGameCoreUtils.Cpp :
Code:
bool isPromotionValid(PromotionTypes ePromotion, UnitTypes eUnit, bool bLeader)	
[...]
        if (GC.getUnitInfo(eUnit).getMoves() == 1)
	{
		if (GC.getPromotionInfo(ePromotion).isBlitz())
		{
			return false;
		}
	}
It's a easy fix - just kick out that one condition. But it will require to rebuild the dll, making your mod incompartible with any other dll mod (or you will need to merge the sources and rebuild again).

From what i see, nothing helpful is exposed to python (tho i might be mistaken here).
 
So I just comment out or delete that section?
How do I rebuild a dll? (Or take one apart for that matter...)
 
It's already unbuilt - the source files are within the BeyondTheSword\CvGameCoreDLL\ folder.

You can comment out the "return false" line, or the whole if block.

Rebuilding it is somewhat tricky, unless you are lucky and happen to have the same version of the MS Visual C++ Civ4 was written for (i think it's 2003) - in which case it should be quite simple...
Otherwise... Its described here...
http://forums.civfanatics.com/showthread.php?t=196283
 
Well, unfortunately my computer decided to jump off a cliff, so I'll have to try this out when it's back from repairs. Grr...
 
Back
Top Bottom