Tsentom1 Python Civics

Respectfully, I find most new civics redundant. What does Suzerainty have that's unique from Bureaucracy? They're almost the same in concept and implementation here (allows you consolidate wealth and raw materials in a centralized location); by the description of suzerainty is seems logical that a bureaucracy would have to be in effect for it to work anyways. Representation covers a number of possible government types including republicism and, in my view, your Parliamentary civic.

Regards,
 
Respectfully, I find most new civics redundant. What does Suzerainty have that's unique from Bureaucracy? They're almost the same in concept and implementation here (allows you consolidate wealth and raw materials in a centralized location); by the description of suzerainty is seems logical that a bureaucracy would have to be in effect for it to work anyways. Representation covers a number of possible government types including republicism and, in my view, your Parliamentary civic.

Regards,

Well, Suzerainty is -20% wonder cost in all cities and Bureaucracy is +50% production only in the capital. So, no functionally they're completely different, one encourages building up a central city while the other building wonders in multiple cities.

Additionally, saying those two are the same civic types in the real world is wrong as a suzerainty is completely different than a bureaucracy. if anything it has more akin to vassalage, though historically both were enacted differently hence the different classifications.

Parliamentary could be argued to be covered under the general term of Representation, though it stands to reason releasing additional civics here is not just for people modding the standard game but also for mods who have edited the civics quite extensively and thus might not have a general 'representation.'

Regardless, the point of these (and any of my python+xml modcomps) is not necessarily how I structured the bonus - calling it parliamentary or suzerainty - but the python itself which people could then copy and adapt to any civic they want.

Despite what you said, the bonus of suzerainty encourages almost the exact opposite building plan than bureaucracy - again ones bonus applying to all cities the other only to the capital. Additionally, dismissing the parliamentary simple because I called it that is foolish because it's bonus is not currently found in the default civics (it acts as an antithesis to police state which increases military production whereas this increases noncombatant production).

Besides, look at the standard civics in the game. Universal Suffrage isn't exactly mutually exclusive to the other government civics (yet it is presented as such). Free Speech really isn't a complete legal system, yet it is its own civic.
 
I changed the bonus of Suzerainty in my most recent patch of Thomas' War, here's the new version for people interested.

NOTE: My previous Suzerainty civic has been renamed Hegemony and the text files have been updated.

Suzerainty Civic



Hegemony Civic

 
Cool stuff. Do you know how to increase war weariness more than 100%? Or give more than one unhappy to civs without a particular civic? Like with emancipation, but with two or three unhappy per city.

Do you mean - war weariness (as in the jail, police state, etc) or + enemy war weariness (as in the statue of zeus). If it's minus, once it reaces -100 you simply suffer no war weariness at all. If it's plus, i'm not sure you can do that with civics without editing the SDK or cheating (by say creating a fake building and having that given to your capital and removed when you switch into and out of the civic).

This tag in the XML controls the emancipation unhappy:

Code:
			<iCivicPercentAnger>400</iCivicPercentAnger>

If you make the number higher it will be more unhappiness for other civs.
 
Is it possible to script that you cannot declare war on anybody while your civic is pacifism?
 
Is it possible to script that you cannot declare war on anybody while your civic is pacifism?

Yes, and it's actually really easy as the GameUtils file has def canDeclareWar. I used it in my Tesla's 'Peace' Ray wonder.

For a civic it should look something like this:

Code:
	def canDeclareWar(self,argsList):
		iAttackingTeam, iDefendingTeam = argsList

## Tesla Start ##

		pPlayer = gc.getPlayer(iAttackingTeam)

		iReligionCivicOption = CvUtil.findInfoTypeNum(gc.getCivicOptionInfo,gc.getNumCivicOptionInfos(),'CIVICOPTION_RELIGION')
		iPacifism = CvUtil.findInfoTypeNum(gc.getCivicInfo,gc.getNumCivicInfos(),'CIVIC_PACIFISM')
		iReligionCivic = pPlayer.getCivics(iReligionCivicOption)

		if (iLegalCivic == iPacifism):

			return False


## Tesla End ##

		return True

def canDeclareWar is in the GameUtils file. You'd also need to activate the function in the Python Callbacks XML file.

That's all just off the top of my head so you may need to tweak it a bit to get it working.
 
thanks so far, but I don't understand:

You'd also need to activate the function in the Python Callbacks XML file.

edit: this function is provided by your tesla files?

edit2: nevermind. got it. thanks. :)
 
Is it also possible to script: "You cannot switch to pacifism while at war" ?
 
I'm trying to tweak a civic so that one of them grants a modifier to the Barracks building to increase the XP it gives units... Any idea how that can be done?
 
I'm trying to tweak a civic so that one of them grants a modifier to the Barracks building to increase the XP it gives units... Any idea how that can be done?

You need to use OnUnitBuilt in the EventManager. Have it check if you have the civic (the same way I have to code check for the civic in the modcomps here). Then have it check if the city has a barracks and if so award experience using something like:

unit.changeExperience(1, -1, False, False, False)

with that first 1 (in bold) the amount of extra experience you want to give.
 
is it possible to make a civic which reduces the costs of special buildings (monasteries or others)?
 
Top Bottom