New Victory Conditions

Flying Pig

Utrinque Paratus
Retired Moderator
Joined
Jan 24, 2009
Messages
15,651
Location
Perfidious Albion
How do you go about adding new conditions ffo victory - say religious victory, corporate victory or wealth victory?
 
If you are familiar with Python, you could use the functions isVictoryTest and isVictory in the file CvGameUtils.py. The first function allows you to disable victories and the second one allows you to enable new victory conditions.
 
If you are familiar with Python, you could use the functions isVictoryTest and isVictory in the file CvGameUtils.py. The first function allows you to disable victories and the second one allows you to enable new victory conditions.

Right, thanks.
 
The Crossroads of the World mod has all the python for a wealth based victory, if you're looking for something to copy.
 
Religious Victory could be enabled very easily; just needs some basic XML skils.
Crossroads has an economic victory, as several have noted.
Corporate victory could probably be modded from Religious Victory (but i don't know what you mean by it).
 
So, for example, to require only one religion to remain which you cantrol?

The VictoryInfo XML file has entries like this:

Code:
		<VictoryInfo>
			<Type>VICTORY_CONQUEST</Type>
			<Description>TXT_KEY_VICTORY_CONQUEST</Description>
			<Civilopedia>TXT_KEY_VICTORY_CONQUEST_PEDIA</Civilopedia>
			<bTargetScore>0</bTargetScore>
			<bEndScore>0</bEndScore>
			<bConquest>1</bConquest>
			<bDiploVote>0</bDiploVote>
			<bPermanent>0</bPermanent>
			<iPopulationPercentLead>0</iPopulationPercentLead>
			<iLandPercent>0</iLandPercent>
			<iMinLandPercent>0</iMinLandPercent>
			<iReligionPercent>0</iReligionPercent>
			<CityCulture>NONE</CityCulture>
			<iNumCultureCities>0</iNumCultureCities>
			<iTotalCultureRatio>0</iTotalCultureRatio>
			<iVictoryDelayTurns>0</iVictoryDelayTurns>
			<VictoryMovie>ART_DEF_MOVIE_VICTORY_DOMINATION</VictoryMovie>
		</VictoryInfo>

To enable the programed in religious victory you just have to assign a percentage to:

<iReligionPercent>0</iReligionPercent>

The way this religious victory works is, say you make it 80, in order to win the game with it you then need to a) own your religious holy city, and b) have that religion have 80% influence.

The problem is this is almost impossible to do unless you have an inquisitor unit programed into your game as well, as without a way to readily remove religions you'd have to destroy a lot of cities to lower the percentage of other religions. I'm not sure how reasonable a lower percentage would be in standard BTS games but I'm sure it is doable.

If you want to add other qualifications like have only 1 holy city left you need to program that in with python.

Now the Gods of Old mod has both the python needed for the one holy city left code (as the Gods of Old has a modified form of religious victory) and the inquisitor code.

Orion's Inquisitor mod has this code as well in a more refined form.
 
Top Bottom