New Leaders (art, personalities, diplomacy texts)

DIPLOMATIC
• Stronger Vassals
• +2 espionage per city
• +10% commerce from Trade Routes

INDUSTRIOUS
• +1 production per city
• 50% faster production of Workers, Workboats
• Double production speed of Forge

I just wonder, what code did you use for those bonuses in bold? I really want to use them myself.
 
I just wonder, what code did you use for those bonuses in bold? I really want to use them myself.

The espionage bonus is just an xml change, here's my Diplomatic Trait xml (the bit you want is the <CommerceChanges> section):

Code:
		<TraitInfo>
			<Type>TRAIT_DIPLOMATIC</Type>
			<Description>TXT_KEY_TRAIT_DIPLOMATIC</Description>
			<ShortDescription>TXT_KEY_TRAIT_DIPLOMATIC_SHORT</ShortDescription>
			<Help>TXT_KEY_TRAIT_DIPLOMATIC_HELP</Help>
			<iHealth>0</iHealth>
			<iHappiness>0</iHappiness>
			<iMaxAnarchy>-1</iMaxAnarchy>
			<iUpkeepModifier>0</iUpkeepModifier>
			<iLevelExperienceModifier>0</iLevelExperienceModifier>
			<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
			<iGreatGeneralRateModifier>0</iGreatGeneralRateModifier>
			<iDomesticGreatGeneralRateModifier>0</iDomesticGreatGeneralRateModifier>
			<iMaxGlobalBuildingProductionModifier>0</iMaxGlobalBuildingProductionModifier>
			<iMaxTeamBuildingProductionModifier>0</iMaxTeamBuildingProductionModifier>
			<iMaxPlayerBuildingProductionModifier>0</iMaxPlayerBuildingProductionModifier>
			<ExtraYieldThresholds/>
			<TradeYieldModifiers>
				<iYield>0</iYield>
				<iYield>0</iYield>
				<iYield>10</iYield>
			</TradeYieldModifiers>
			<CommerceChanges>
				<iCommerce>0</iCommerce>
				<iCommerce>0</iCommerce>
				<iCommerce>0</iCommerce>
				<iCommerce>2</iCommerce>
			</CommerceChanges>
			<CommerceModifiers/>
			<FreePromotions/>
			<FreePromotionUnitCombats/>
		</TraitInfo>

The other requires Python, below is the code I use for the traits that add Food, Production, Commerce or a Trade Route when a city is built. Just delete the lines you don't need and change the trait names as appropriate. The '1' at the end of the lines in the bottom section is the amount of yield or trade routes added.

Code:
	def onCityBuilt(self, argsList):
		'City Built'
		city = argsList[0]

## BEGIN Traits - Extra Yield on City tile ##

		pPlayer = gc.getPlayer(city.plot().getOwner())
		iTraitFood = gc.getInfoTypeForString('TRAIT_EXPANSIVE')
		iTraitProduction = gc.getInfoTypeForString('TRAIT_INDUSTRIOUS')
		iTraitCommerce = gc.getInfoTypeForString('TRAIT_FINANCIAL')
		iTraitTradeRoute = gc.getInfoTypeForString('TRAIT_ENTERPRISING')
		iX = city.getX()
		iY = city.getY()

		if (pPlayer.hasTrait(iTraitFood)):
			CyGame().setPlotExtraYield(iX, iY, YieldTypes.YIELD_FOOD, 1)

		if (pPlayer.hasTrait(iTraitProduction)):
			CyGame().setPlotExtraYield(iX, iY, YieldTypes.YIELD_PRODUCTION, 1)

		if (pPlayer.hasTrait(iTraitCommerce)):
			CyGame().setPlotExtraYield(iX, iY, YieldTypes.YIELD_COMMERCE, 1)

		if (pPlayer.hasTrait(iTraitTradeRoute)):
			city.changeExtraTradeRoutes(1)

## END Traits - Extra Yield on City tile ##

This section is similar but handles when cities change ownership:

Code:
	def onCityAcquired(self, argsList):
		'City Acquired'
		iPreviousOwner,iNewOwner,pCity,bConquest,bTrade = argsList
		CvUtil.pyPrint('City Acquired Event: %s' %(pCity.getName()))

## BEGIN Traits - Extra Yield on City tile ##

		pNewOwner = gc.getPlayer(iNewOwner)
		pOldOwner = gc.getPlayer(iPreviousOwner)
		iX = pCity.getX()
		iY = pCity.getY()

		iTraitFood = gc.getInfoTypeForString('TRAIT_EXPANSIVE')
		iTraitProduction = gc.getInfoTypeForString('TRAIT_INDUSTRIOUS')
		iTraitCommerce = gc.getInfoTypeForString('TRAIT_FINANCIAL')
		iTraitTradeRoute = gc.getInfoTypeForString('TRAIT_ENTERPRISING')

		if (pNewOwner.hasTrait(iTraitFood)):
			CyGame().setPlotExtraYield(iX, iY, YieldTypes.YIELD_FOOD, 1)

		if (pOldOwner.hasTrait(iTraitFood)):
			CyGame().setPlotExtraYield(iX, iY, YieldTypes.YIELD_FOOD, -1)

		if (pNewOwner.hasTrait(iTraitProduction)):
			CyGame().setPlotExtraYield(iX, iY, YieldTypes.YIELD_PRODUCTION, 1)

		if (pOldOwner.hasTrait(iTraitProduction)):
			CyGame().setPlotExtraYield(iX, iY, YieldTypes.YIELD_PRODUCTION, -1)

		if (pNewOwner.hasTrait(iTraitCommerce)):
			CyGame().setPlotExtraYield(iX, iY, YieldTypes.YIELD_COMMERCE, 1)

		if (pOldOwner.hasTrait(iTraitCommerce)):
			CyGame().setPlotExtraYield(iX, iY, YieldTypes.YIELD_COMMERCE, -1)

		if (pNewOwner.hasTrait(iTraitTradeRoute)):
			pCity.changeExtraTradeRoutes(1)

		if (pOldOwner.hasTrait(iTraitTradeRoute)):
			pCity.changeExtraTradeRoutes(-1)

## END Traits - Extra Yield on City tile ##

Both go in CvEventManager.py, replacing/adding to onCityBuilt() and onCityAcquired() respectively.
 
Thanks for the help, now I have sucsessfully altered python, and it worked! :woohoo:
 
I wasn't sure which thread to use for this, so I went with this one because it hasn't seen action in seven months! :eek:

Damn, this mod is taking a lot longer to finish than I anticipated. :rolleyes:

Anyway, I think there are about three LHs I plan on adding to the mod. Two of them are female and generic (sort of) and the other one is Osman, which looks good but I planned on doing a few touch-ups to him.

Basically what we need to do is figure out who the two other "generic" LHs will be. One is a female MesoAmerican leader by Kurzer Melcher (I probably misspelled that) and the other is a female Amerindian (North American) leader by SaibotLieh. I have determined that I want to use them as leaders for the Aztecs and Iroquois respectively (although I could be convinced to use SL's for the Sioux), so here is what we need to discuss:
  • Which civ should they lead.
  • Who will the represent? Or, if the person is obscure, what type of leaders should they be to offset the other leaders.

I already have a personality and traits for Osman thanks to TadF. :goodjob:
 
Can you post pics of them? Doing so will help mus figure out which would be better suited for a civilization. I mean, if she looks like Pocahontas and she ends up as a Sioux LH, wouldn't be the best combination. That would also help us in figuring what kind of person they would represent
 
Can you post pics of them? Doing so will help mus figure out which would be better suited for a civilization. I mean, if she looks like Pocahontas and she ends up as a Sioux LH, wouldn't be the best combination. That would also help us in figuring what kind of person they would represent

Spoiler :


The first is melcher kürzer's native mesoamerican LH, second SaibotLieh's native north american LH, third is melcher's medieval european duchess
Capo, I know the 3rd lady wasn't your suggestion, but I hope you just didn't see her yet :)
 
I was thinking of using her for a modular civ, which is why I didn't mention her. Remember, there are going to be a lot of modular civs too. ;)
 
The Native American one looks like she'd be good for the Sioux, though I don't know enough about them to suggest a name. The Mesoamerican one looks like she'd be good for the Maya, though once again, I don't know any Maya female rulers to suggest.
 
The Native American one looks like she'd be good for the Sioux, though I don't know enough about them to suggest a name. The Mesoamerican one looks like she'd be good for the Maya, though once again, I don't know any Maya female rulers to suggest.

I agree, but keep in mind I am capable of editing them to look better for which Civ I'd like them to represent...
 
Melcher kurzer released a new ancient female LH:
Another one that Diplomacy cannot miss... Where should we use her?

 
She might be Greek, though I can't tell. I'm torn between saying Babylon and Greece.
 
Zenobia? Well, this is a far better version than the existing one (no offence to the maker).
 
Zenobia? Well, this is a far better version than the existing one (no offence to the maker).

Yeah if you're going to make Palmyra then definitely use the new LH.

If not then you could possibly use her as Dido (Carthaginian leader).

Capo's call.
 
The Capo already made a Dido.
 
I was going to reskin her and make some changes and use her as al-Kahina for the Berbers actually. ;)

That's pretty cool you're calling them the Berbers instead of the Numidians. Obviously they would not have referred to themselves as the latter since it was a Greek term. Are you planning on having Masinissa as the other Berber leader or someone else?
 
Massinissa shouldn't be a berber leader IMO
Cybrxkhan made a good leader for them about a year ago
 
Top Bottom