Platyping's Python

Nuclear Non-Proliferation Treaty
Spoiler :



Protects the Weak

Every time you nuke successfully, people get angry with you for breaking the treaty.
And when they are furious with you, they join in the war against you.

AI will only build if they dont have uranium


My style is, for every "for" wonder, there is always an "against" wonder
 
When you dont have uranium, it protects you.
Every time enemy nukes you, everyone else gets angry with him.
And when they are furious enough, they join in the war against him.

So for players without uranium, you won't just eat nukes and die while everyone watches you die

P.S.
I guess the description isn't clear enough :sad:
 
When you dont have uranium, it protects you.
Every time enemy nukes you, everyone else gets angry with him.
And when they are furious enough, they join in the war against him.

So for players without uranium, you won't just eat nukes and die while everyone watches you die

Ohhhhhhh, that makes a lot more sense. I thought that it was only to the player that built it... But doesnt this just duplicate the UN thing, that bans all nukes? if that is in place then the project is useless. I would like to see a project that if the world agrees to something Via UN, then you don't have to listen
 
Tada, new description should be clearer now.
Well, UN ban can be lifted if I remember correctly after some turns. Also, it can be useful, if the UN leader is Montezuma... I doubt he will ask everyone to ban nukes.

So this is the protect the weak, and kill the bully project haha

As for UN votes, there is hardly any python stuff related to it, so most likely sdk stuff
 
How about a project that disables building military units (units with a strength above 0) and gives a pernament one way defensive pack with all please/friendly lh? Thought that would be cool, would sort of represent what a couple of countries do now, like Costa Rica, doesnt sound possible though
 
Pretty easy to disable building units, but what is the point, you end up as sitting duck waiting to be slaughtered

Especially if no one is pleased with you... Then you are at defensive pack with nobody and still cannot defend yourself
 
For my modern mod im going to add your cure for cancer wonder, but since it doesnt count the future, im changing cancer to polio. I want to give the builder a relationship bonus to every other country, representing them being happy they have found the cure, could work for your cure for cancer as well

So what would i add to the python code?
 
Direct cut and paste from Taipei:
Code:
#### Check for all players, alive and non-barbarian
			for iPlayer2 in range(gc.getMAX_CIV_PLAYERS()):
				pPlayer2 = gc.getPlayer(iPlayer2)
				if (pPlayer2.isAlive()==true) and (pPlayer2.isBarbarian()==false):
					pPlayer2.AI_changeAttitudeExtra(iTeam, 1)

Assuming iTeam refers to Team which built CFC
 
Pretty easy to disable building units, but what is the point, you end up as sitting duck waiting to be slaughtered

Especially if no one is pleased with you... Then you are at defensive pack with nobody and still cannot defend yourself

Or maybe disables war with the civ that builds it? I could really use it for my mod to represent Costa Rica, maybe required the UN to already be built?
I can understand if you dont want to release it and put it in your mod, but could you possibly do it as a seperate project if it is really easy to disable building units
 
Direct cut and paste from Taipei:
Code:
#### Check for all players, alive and non-barbarian
			for iPlayer2 in range(gc.getMAX_CIV_PLAYERS()):
				pPlayer2 = gc.getPlayer(iPlayer2)
				if (pPlayer2.isAlive()==true) and (pPlayer2.isBarbarian()==false):
					pPlayer2.AI_changeAttitudeExtra(iTeam, 1)

Assuming iTeam refers to Team which built CFC

Do i place it in the cveventmanager? and at the bottom of the specific code?
 
Change this part
Code:
	def onProjectBuilt(self, argsList):
		'Project Completed'
		pCity, iProjectType = argsList
		game = gc.getGame()

## Cure For Cancer ##
		if ( iProjectType == gc.getInfoTypeForString("PROJECT_CURE_FOR_CANCER") ):

		#### Extra for Owner
			pPlayer = gc.getPlayer(pCity.getOwner())
			pPlayer.changeExtraHappiness(1)
			(loopCity, iter) = pPlayer.firstCity(false)
			while(loopCity):
				loopCity.changeExtraHealth(1)
				(loopCity, iter) = pPlayer.nextCity(iter, false)

			iTeam = pPlayer.getTeam()
			for iPlayerX in range(gc.getMAX_CIV_PLAYERS()):
				pPlayerX = gc.getPlayer(iPlayerX)
				if pPlayerX.isAlive():
					(loopCity, iter) = pPlayerX.firstCity(false)
					while(loopCity):
						loopCity.changeExtraHealth(1)
						(loopCity, iter) = pPlayerX.nextCity(iter, false)
					pPlayerX.AI_changeAttitudeExtra(iTeam, 1)
## Cure For Cancer ##
 
Change this part
Code:
	def onProjectBuilt(self, argsList):
		'Project Completed'
		pCity, iProjectType = argsList
		game = gc.getGame()

## Cure For Cancer ##
		if ( iProjectType == gc.getInfoTypeForString("PROJECT_CURE_FOR_CANCER") ):

		#### Extra for Owner
			pPlayer = gc.getPlayer(pCity.getOwner())
			pPlayer.changeExtraHappiness(1)
			(loopCity, iter) = pPlayer.firstCity(false)
			while(loopCity):
				loopCity.changeExtraHealth(1)
				(loopCity, iter) = pPlayer.nextCity(iter, false)

			iTeam = pPlayer.getTeam()
			for iPlayerX in range(gc.getMAX_CIV_PLAYERS()):
				pPlayerX = gc.getPlayer(iPlayerX)
				if pPlayerX.isAlive():
					(loopCity, iter) = pPlayerX.firstCity(false)
					while(loopCity):
						loopCity.changeExtraHealth(1)
						(loopCity, iter) = pPlayerX.nextCity(iter, false)
					pPlayerX.AI_changeAttitudeExtra(iTeam, 1)
## Cure For Cancer ##

Worked like a charm thanks:D tomorrow I plan on transforming your art of war into a modern project: Blitzkrieg :D
 
Oh yeah, come to think of it. The 2 nuclear projects are still useful with UN ban.

UN ban only prevents you from building new ones.
It doesn't stop you from launching existing ones.
 
But doesnt this just duplicate the UN thing, that bans all nukes? if that is in place then the project is useless.

Not necessarily, because at the point of the nuke ban there could already be plenty of nukes around and you can still nuke someone.
 
Not necessarily, because at the point of the nuke ban there could already be plenty of nukes around and you can still nuke someone.

True, platyping already said that about two posts up ;)

But just from expirience, if you typically play long games (w.o the winner winning at 2050) then if the nukes were banned, theres usually not that many in the first place and people that like to build them run out of them pretty quick:crazyeye:

Something that bothers me though is why do you NEED to be in the UN, is there anyway to mod something to get out of it?
 
1) Ivy Mike:
Added a nuke immune check, so that extra damage does not affect those units.

2) Empire State Building:
Code Overhaul:
Spoiler :

A) Code changed from checking individual bonus type, to checking bonus class type.
Thus, all Rush, Modern and Wonder Bonus Class Types are excluded.
Obsolete Bonuses are still excluded.
Coal is added as an Excluded Bonus specifically because it belongs to General Class Type.
Thus, ESB will now be compatible with other mods with alot of extra bonuses, without the need to add to exclusion list one by one.

B) ESB now provides 3 new random Bonus resources when captured. Previously, the 3 old resources are removed, but no new ones added, making ESB a useless wonder if captured. Now it provides 3 new ones.

3) Advisor Tag XML changes:
Changed to more appropriate ones.
Eg, Helsinki changed from Religion Advisor to Culture Advisor.
Adam Smith, CN Tower, Cyrus Cylinder, Helsinki Cathedral, Porcelain Tower

4) Megapack:
Above changes made.
Added Ivy Mike, NPT and Louvre.

And now... presenting to you, the 50th masterpiece :goodjob:

Louvre
Spoiler :



Since it is a museum, the more oldies you have, the better it is.
Obsolete ones still counted.
National ones not counted.

Artwork unsure made by who.

Note to Modders:
By right, I should do an additional check in def onBuildingBuilt, to check if there is a new Ancient/Classical Wonder built after Louvre is built, and update Louvre. But chances of that happening in Renaissance Era is negligible so I didn't bother.
 
Top Bottom