Couple of Requests

ripple01

Emperor
Joined
Mar 7, 2006
Messages
1,254
Location
New York City
I have a couple of requests: SDK preferred, but will accept Python if necessary

1) I'm looking for an effect to add a # of free promotions to all of the player's current units

2) I'm also looking for code that will be a CoastalTradeRouteModifier and a NationalTradeRouteModifier. I want top make the harbor give + Trade Route Yield only to coastal trade routes and I have a wonder that I would like to provide + Trade Route Yield to national trade routes only.

I can take care of adding the SDK tags, just need the appropraite code. I know #2 requires some slight modification to the CvCity files.

Anyone who could assist would be greatly appreciated.

Cheers,
ripple01
 
> add a # of free promos to all of the player's current units

I don't understand the "effect" part, but here is an example of how to add promos:

Code:
         	    iRaider1 = gc.getInfoTypeForString('PROMOTION_CITY_RAIDER1')
         	    iRaider2 = gc.getInfoTypeForString('PROMOTION_CITY_RAIDER2')

                    pAssimPlayer.initUnit(self.iBritonMarouderID, pCity.getX(), pCity.getY(), UnitAITypes.UNITAI_ATTACK)
                    pAssimPlayer.initUnit(self.iBritonMarouderID, pCity.getX(), pCity.getY(), UnitAITypes.UNITAI_ATTACK)
                    pAssimPlayer.initUnit(self.iBoudicaID, pCity.getX(), pCity.getY(), UnitAITypes.UNITAI_ATTACK)
		    for pUnit in pAssimPlayer.getUnitList():
		        pUnit.setHasPromotion(iRaider1, True)
		        pUnit.setHasPromotion(iRaider2, True)

It spawns Boudica + 2 other units, and then gives all of pAssimPlayer's units city raider 1 + 2.
 
Back
Top Bottom