Platyping's Python

Haha, just joking. If I wanna put up both versions, I will rather zip both together and place them at same download link.

The ones I don't want to keep as wonder are mostly those with one-off benefits.
Never liked those like oracle and taj mahal.
When it is built, you say "Wow", few turns later, the benefits wear-off and it is just there to generate GP points...
 
Haha, just joking. If I wanna put up both versions, I will rather zip both together and place them at same download link.

The ones I don't want to keep as wonder are mostly those with one-off benefits.
Never liked those like oracle and taj mahal.
When it is built, you say "Wow", few turns later, the benefits wear-off and it is just there to generate GP points...

I do see your point, but the short term ones you definatly see the effect a lot easier, depends on your style

Anyway quick question, the carhenge, you get money for destorying armor units, but you said whenever python creates a lag on a large scale, so wouldnt a modern/futuristic game where there is a war have alot of lag? i want to know before i put this into my mod
 
Well, it is only activated when a unit is killed.

Unlike unit built where 100 cities can produce 100 units each and every single lategame turn, usually we don't get to see 100 units being killed every turn.
In fact, there are some mods where you can produce multiple units per city.
Also, if the AI is killing/being killed by your units, you get to see the fighting animation anyway(by default) so for wars where your units are involved, the killing is done 1 by 1 anyway

And even if you choose to off the animations and 100 units are killed every turn, carhenge only has 1~2 lines codes. It shouldn't be that laggy, I hope
 
Well, it is only activated when a unit is killed.

Unlike unit built where 100 cities can produce 100 units each and every single lategame turn, usually we don't get to see 100 units being killed every turn.
In fact, there are some mods where you can produce multiple units per city.
Also, if the AI is killing/being killed by your units, you get to see the fighting animation anyway(by default) so for wars where your units are involved, the killing is done 1 by 1 anyway

And even if you choose to off the animations and 100 units are killed every turn, carhenge only has 1~2 lines codes. It shouldn't be that laggy, I hope

Alright thanks man, having some problem with my mod due to python, if i can figure it out i plan on putting in carhenge
 
1) Added an additional check to check if player has WTC before scrolling through list of cities to see where WTC is.

2) Moved codes at BeginPlayerTurn to EndPlayerTurn for better accuracy:

Eg 1) Olympics meant to trigger at iGameTurn % 25 == 0, means Turn 25, 50, 75.
Set at Begin will trigger at 26, 51, 76.
Set at End will trigger at 25, 50, 75.

Seti and White House untouched, since logically, if you declare war this turn, aliens should help you next turn not this turn, no issue.

Wonders Affected:
Big Ben, WTC, Olympics, Traits

Nothing new, just swapped these 2 projects benefits:

First Cloned Mammal
Spoiler :

Civ4ScreenShot0008-2.jpg


Human Genome Project
Spoiler :

Civ4ScreenShot0009-2.jpg


Basically, the benefit is extracted from protective traits. Quite appropriate for this project though


New:

National College
Spoiler :

NationalCollege.jpg


Civ V Library, National Wonder
 
Hey I remember you saying a while back you wanted to add a third trait as an effect to a wonder/project, well i had an idea for you, this modcomp adds a third trait, so maybe have all of the leaders have NONE as a third trait, having them all have 2 traits, but an option for a third, and have a wonder change the NONE to something
 
no python command related to adding/changing trait except checking whether the player has that trait :dunno:
 
Not sure what you mean.

If 1900 is your start year, let it start at 1901 then?
Or better still, since you edited the game speed file, if you know exactly which turn = which year, which month, you might as well compare game turn rather than game year.

Coz as far as I see, there is only a getTurnYear command, didn't see any for Mth or Week
 
Not sure what you mean.

If 1900 is your start year, let it start at 1901 then?
Or better still, since you edited the game speed file, if you know exactly which turn = which year, which month, you might as well compare game turn rather than game year.

Coz as far as I see, there is only a getTurnYear command, didn't see any for Mth or Week

See thats the problem cant do 1901 cuz its by months, so how do i switch it to the turns?
 
if CyGame().getTurnYear(iGameTurn) >= olympicyear:

changed to

if iGameTurn > x:

or

if iGameTurn >= x:


where x is whichever game turn you want to start the olympic cycle, depending whether you want to include game turn x

If you want to let Olympics start right from turn 3 for instance, you might as well delete that whole sentence, then instead of
if iGameTurn % 25 == 0:

change to
if iGameTurn % 25 == 3:
then take care of the indentions


Edit:
National College:
Too long never make National Wonders, forgot to set it to 0 Conquest Possibility, sorry to the one who downloaded
 
NEW!!!

As I said, don't really like white elephant wonders lying around with one off benefits.
Lotus's power have been passed over to Utopia Project.
Don't worry, Lotus is not dead. It has been granted new powers which are ever lasting and more religious.

Utopia
Spoiler :

Civ4ScreenShot0020-1.jpg


Was scouting Civ V Civilopedia for ideas and saw this description. "Stops nations and people from killing each other so often". Perfect.


Lotus Temple(Remake)
Spoiler :

Civ4ScreenShot0024.jpg


This is the 3rd wonder after SETI and WTC that is bloody tedious.
Tedious part of Lotus is due to State Religion Changes.
Although the codes look long, actually the amount of lag is minimal since chances of state religion is low compared to others like beginplayerturn or onunitbuilt


Last wonder on Chinese New Year Eve lalala~
 
I found the SETI Project and thought "This will be Perfect for my mod!".
 
@Dumanios
Thanks for appreciating :goodjob: Glad you like it. By the way, I took a look at your mod and noticed you added Tsentom's Herc Factory Wonder. The last time I tried it, it doesn't work. It allows you to build units pass the national limit, but after each turn, you will get a message "production lost and converted to gold" thingy.

WTC

Nope, not a remake. An apple fell on my head and I realised this is a much simpler and easier way of getting the same results:

Old Code:
Spoiler :
Code:
## World Trade Center Start ##
		pPlayer = gc.getPlayer(iPlayer)
		bc_WTC = gc.getInfoTypeForString("BUILDINGCLASS_WORLD_TRADE_CENTER")
		if pPlayer.getBuildingClassCount(bc_WTC) == 1:
			if pPlayer.isNoCorporations() == false:
				pTeam = gc.getTeam(pPlayer.getTeam())
				b_WTC = gc.getInfoTypeForString("BUILDING_WORLD_TRADE_CENTER")

			#### Check which city has active WTC
				(loopCity, iter) = pPlayer.firstCity(false)
				while(loopCity):
					if loopCity.getNumActiveBuilding(b_WTC) == true:

					#### Gold
						GoldChange = loopCity.getCorporationCommerce(0)
						GoldModifier = loopCity.getCommerceRateModifier(0)
						GoldChange =  int(GoldChange * (100 +GoldModifier)/100)
						pPlayer.changeGold(GoldChange)

					#### Research
						ResearchChange = loopCity.getCorporationCommerce(1)
						ResearchModifier = loopCity.getCommerceRateModifier(1)
						iCurrentTech = pPlayer.getCurrentResearch()
						ResearchChange = int(ResearchChange * (100 +ResearchModifier)/100)
						pTeam.changeResearchProgress(iCurrentTech, ResearchChange, iPlayer)

					#### Culture
						CultureChange = loopCity.getCorporationCommerce(2)
						CultureModifier = loopCity.getCommerceRateModifier(2)
						CultureChange = int(CultureChange * (100 +CultureModifier)/100)
						loopCity.changeCulture(iPlayer, CultureChange, true)

					#### Food
						FoodChange = loopCity.getCorporationYield(0)
		#### Not used for BTS		FoodModifier = loopCity.getYieldRateModifier(0)				## Not used for BTS
		#### Not used for BTS		FoodChange = int(FoodChange *(100 +FoodModifier)/100)			## Not used for BTS
						loopCity.changeFood(FoodChange)

					#### Production
						ProductionChange = loopCity.getCorporationYield(1)
						ProductionModifier = loopCity.getYieldRateModifier(1)			## Bonus From Buildings like Forge
						iCoal = gc.getInfoTypeForString("BONUS_COAL")				## Coal Bonus for IronForge
						ProductionModifier += loopCity.getBonusYieldRateModifier (1, iCoal)		
						iIron = gc.getInfoTypeForString("BONUS_IRON")				## Iron Bonus for IronForge
						ProductionModifier += loopCity.getBonusYieldRateModifier (1, iIron)
						ProductionModifier += loopCity.getProductionModifier()
						ProductionChange = int(ProductionChange *(100 +ProductionModifier)/100)	## Others like Industrious Trait or Military Academy
						loopCity.changeProduction(ProductionChange)

						break
					(loopCity, iter) = pPlayer.nextCity(iter, false)
## World Trade Center End ##

New Code:
Spoiler :
Code:
## World Trade Center Start ##
		pPlayer = gc.getPlayer(iPlayer)
		bc_WTC = gc.getInfoTypeForString("BUILDINGCLASS_WORLD_TRADE_CENTER")
		if pPlayer.getBuildingClassCount(bc_WTC) == 1:
			pTeam = gc.getTeam(pPlayer.getTeam())
			b_WTC = gc.getInfoTypeForString("BUILDING_WORLD_TRADE_CENTER")

			(loopCity, iter) = pPlayer.firstCity(false)
			while(loopCity):
				if loopCity.getNumActiveBuilding(b_WTC) == true:
					for icommerce in range (0, 3):
						iCorpCom = loopCity.getCorporationCommerce(icommerce)
						loopCity.setBuildingCommerceChange (bc_WTC, icommerce, iCorpCom)

					for iyield in range (0, 2):
						iCorpYield = loopCity.getCorporationYield(iyield)
						loopCity.setBuildingYieldChange (bc_WTC, iyield, iCorpYield)
					break
				(loopCity, iter) = pPlayer.nextCity(iter, false)
## World Trade Center End ##

As a result:
--- Still have to go through whole loop under state property
+++ More efficient since less info required
+++ Can work with all mods without additional code changes
+++ Changes reflected in screen itself unlike previous method where benefits added in invisible way

Old code left here for whoever interested in the formulae one day somehow...
 
Abu Simbel Temples
Spoiler :

AbuSimbel.jpg


Twin Temples. Buy 1 get 1 free!!!

City only gets free random temple if the religion is founded
Religion not added to the city by default although it seems logical to add the religion to the city if temple is there.

Example:
I build Buddhist Temple in Athens.
As a result, Athens get free Hindu Temple.
But, Hinduism does NOT spread to Athens.

For users who wish to add the religion as well when the free temple is built, uncomment the obvious line of code (get rid of all the ## comments in front)
 
What did you do that went wrong?
If all you do is change the name, it should be ok
 
Back
Top Bottom