Platyping's Python

Thanks, after testing it out in game, Waterfalls look pretty weird, so I took it out.
As for Volcano, I decided to use Krakatoa since that's the one in CiV

Some Screenshots:
Civ4ScreenShot0004-16.jpg

Civ4ScreenShot0005-10.jpg

Civ4ScreenShot0006-11.jpg


Some Natural Wonders have different stats beside the random yield.
Lake Baikal for instance, provides fresh water as well
Krakatoa is set to be impassable, anyway it is mostly for graphics only since 90% of the time it is parked in the middle of the ocean...

Simple Q & A:
Easy to add more Natural Wonders?
Yes, all you need is the artwork and XML entries. Python wise, just add a new name, that's all.

Can change the benefits given to the adjacent Cities?
Yes, do what you want, extra happiness, extra health, whatever

Can change it to a modcomp activated at game start rather than as a buildable project?
Yes, dump the whole onProjectBuilt codes to onGameStart and adjust as necessary

I don't like random yield idea. Can I have different fixed yield rates for each Natural Wonder?
Yes, delete the python yield codes. Use the XML yield rate tags.

What are the conditions for deciding where to place the Natural Wonders?
1) No bonus, no city, no natural wonders, no peak
2) Check terrain with the terrain specified in XML file. The benefit of this is that you can specify more than 1 terrain type as opposed to the system used in the under development project.
3) Adjust the terrain to suit the NW, rather than check the terrain to see if it suits the NW. For instance, if the NW must spawn in flatlands, then I only bother to check if the terrain matches, then flattens it regardless whether it is flattened in the first place or not. This allows more plots to be available choices compared to the current system as well, which checks the terrain for all sorts of conditions before deciding it is an available choice.
4) Currently, there is no check to ensure that NWs are sparsely placed. In other words, it is possible that 2 NWs can spawn next to each other. Codes can be added to ensure that there are X tiles in between 2 NWs, but I don't wish to.

Why is it most NWs are not set as impassable?
Because as this is a project, the NWs are spawned halfway throughout the game. Cities that are well placed might become stupid cities, blocked by NWs if they are impassable. For instance, a coastal city with only 1 coastal tile for ships to move through, might become a stupid city, if the one and only coastal tile spawned a Sugarloaf and prevents ships from moving through.

-----------------------------------------------------------------------------------------------------------------------------------------------
Krakatoa added, total 6 Natural Wonders
Added project built check for onCityBuilt, so it will not bother to check if city built adjacent to NW before project itself is built
 
Hmm, Sugarloaf mountain?
Why is it placed in the water, and what's that graphics?
 
Don't ask me why, Dacubz said so :D
Graphics by him as well lol
 
But that's clearly a mistake
Just look at the "graphics" :)
 
Looking at this image, sugarloaf is indeed supposed to be on coastal tile.
But why is it so black like charcoal, that will have to wait for dacubz to fix :D

More screenshots of added wonders

Pravcicka Brana added as 7th Natural Wonder
 
Spam all you like, your fantastic artwork contributed to more than half of my works here :D
Basalt Organ added, but I lazy to update the download section... Wait till there are 10

Would be nice if you tell me which terrain they belong to, because currently I am just guessing:
Krakatoa => Ocean
Lake Baikal => Grass
Devil's Table => Plains
Pravcicka Brana => Grass
Basalt Organ => Grass
Sugarloaf Mountain => Coast
Uluru => Desert
Pamukkale => Tundra

Attached: Screenshot of Basalt and Buttons so far

@veBear
Those don't really look like natural wonders though.
I was thinking of the more famous ones like Mt Fuji, Grand Canyon, Great Barrier Reef etc

@Jamie
I only bother to use the XML tags available such as bFlatlands, bFreshWater etc
Since there isn't a bHills, I conveniently ignore the hills part :D
If you really insist on having it on hills, then have to do it the way you did, but since this is simplified version, I don't think it matters that much
 
Yea I know these are big trees.
But no matter how big they are, they are still... just trees.
I was thinking natural wonders would be more like caves, big rocks, mountains, waterfalls etc
Naturally formed "good looking?" landscape
Trees just don't really fit into the picture
 
Seeing that there are actually people who use more than 50 python wonders in one mod.
I guess it is time to do some slimming down of the codes of certain wonders to improve performance.

This version basically
1) Reduces certain effects of wonders so that less checks/loops are needed
2) Removes certain effects of wonders totally so that no checks/loops are needed :D
while maintaining the flavour of the wonders

Version 3.0
(In order from the way codes appear in Gigapack top down)
Those in Red are logic bug fixes.

Knossos Labyrinth
Removed check on unit health before applying damage. Unit can now die from it.

Willis Tower
Removed check on foreign corporations and state property. Willis now provide income regardless of civics

Olympics
Removed Start Era Check. Olympics now starts after year 776 BC regardless of starting era

AI Entity
Removed Anarchy Check. You can sink further into anarchy even during anarchy now.
Immobile Timer for Spawned Barbarian Assault Mech removed, they can whack you instantly.
Spawns 3 instead of 4 Barbarian Assault Mechs per tile now.

Al Khazneh
Less pPlot.getOwner checks. Can steal Resource from neutral lands now.
Checks pPlot.isHills rather than whether there is a mine for plot to place stolen resource.

Alamut
Removed Counterespionage, now left 7 missions.

Ericsson Globe
Removed All Checks per turn. No more culture boost during Golden Age.

King Richard's Crusade
Removed Spread Religion codes.

Montreal Biodome
Removed codes for Combat 5 and 6 Promotions
Removed spawn message.

Sarcofagos de Karajia
Only append unit type once to the list regardless of how many are killed. Gameplay wise, every dead unit has same chance of spawning regardless how many are killed.

Theatre of Dionysus
Removed min check

Luxor Las Vegas
Played every 5 turns instead of 4
Removed Wild Symbol Star
Removed maximum bet

White House
10% Chance to Force peace in All Wars instead of just Losing Wars. 1 Less check

World Financial Center
Reduces from 30000 to 25000. The earlier it is built, the earlier no more checks for it.

Magnum Opus
Removed Chemistry Bonus and Checks
Increases Spawn Rate to make up for it

SETI Program
Removed Immobile Timer for Barbarian Aliens
Spawns 1 instead of 2 per tile for BackStab
Spawns 5 instead of 8 for Capital Assault

Ultra
Fixed logic bug, should be gc.getMAX_CIV_PLAYERS instead of gc.getMAX_CIV_TEAMS

Neuschwanstein
Removed pWinner Health Check, units can now die from it.

Ivy Mike
Same Damage Boost regardless of distance from Explosion Plot

Burj Khalifa
No longer gives Free Engineers
Removes the need of a loop for that

Channel Tunnel
Friendly and Pleased treated the same
Removed Railroad Bonus

Erechtheion
Removed CombatUnit Check

Floralis Generica
Removed Plot Owner Check. It now adds forest to everyone

Zizkov
Removed Checks every Turn. No more conceal Chance every turn.
Increases Espionage XML Bonus from 10% to 20% to make up for it.

Machu Picchu
Places machu picchu improvement on every peak in city radius now.
No longer affects peaks in whole empire, never like it that way since new peaks gained/loss thereafter are not affected.
In short, it greatly boosts all peaks around the city now, but peaks in other parts of the empire not affected.

Art of War
Removes one check for siege units.
Removes Min Level Requirement

Silk Road
The Bonus Silk is added directly to the capital
Bonus Applied to whole Team instead of just player since this is a project

Palm Islands
Uses simpler for loop

Eden Project
Uses simpler for loop

The Necromanteion
No longer checks for All Unit Classes. Now only check for same unit type.
Removes Obsolete Tech

Tianning Temple
Removes All Religion Bonus

Thirty Six Stratagems
Removes Mechanical Check. Now Promotion for All Units

National Aquatics Center
Removes 50% Chance to Swim Check. Now it is 100%

Cheomseongdae
Checks if Team has wonder rather than player first (Bug in Megapack and Gigapack only)

Potala Palace
Added a Break

Motherland Calls
Spawns 1 instead of 2 Defenders per City

Golden Gate Bridge
Removed Water Plot Requirements, no longer needs callback
Possible that Wonder built in coastal city where Bridge may not spawn as there is no land in opposite bank

Padrao
Removed Water Plot Requirements

Pha That Luang
Removed Obsolete Tech

Swords of Qadisiyah
Now Requires Bomb Shelter in City to Build, uses XML tag so no longer needs callback

Venetian Arsenal
Builds 2 instead of 3 Similar Naval Units
Removed Experience Nerf

Temple of Heaven
Removed Obsolete Tech

Nuclear Non-Proliferation Treaty
Removed Relationship Penalty Codes
Annoyed and Furious Rivals Declare War Immediately
Removed War Allies Codes

All Standalones, Megapack, Gigapack updated
Kuwait Towers, Columbus added to Gigapack
 
@Hrochland
Palm Islands in Building Format
This is for you, just the CvEventManager file.
Currently, it is set to activate every time a Granary is built.
So just adjust the Granary to whatever wonder you want to use for your own mod.
Didn't bother with CvGameUtils since I not sure if you want to keep the requirements as well, since that will require the use of callback for buildings.

Just a little perk for you, so you can concentrate on making artwork :D
 
Thanks, I wink on :)
BTW I have one big tree model in my mod similar as want veBear. I can link it here. It is not my work. I separate and edit part of model by Walter Hawkwood. I use it in my private mod. maybe I can link it here , although it is not entirely my work :blush:
 
Wow you´re really fast. I´ll check the new codes of the wonders I´ve added. :)

I have another problem which I think I´ve located at the Azadi Tower, since error doesn´t show up when I comment out the code:

Code:
	def onPlayerGoldTrade(self, argsList):
		'Player Trades gold to another player'
		iFromPlayer, iToPlayer, iGoldAmount = argsList
## Azadi Tower Start ##
		if city.getNumActiveBuilding(gc.getInfoTypeForString("BUILDING_AZADI_TOWER")) == true:
			pPlayer = gc.getPlayer(iPlayer)
			s_Artist = gc.getInfoTypeForString("SPECIALIST_ARTIST")
			(loopCity, iter) = pPlayer.firstCity(false)
			while(loopCity):
				if loopCity.getNumWorldWonders() > 0:
					loopCity.changeFreeSpecialistCount(s_Artist, -1)
				(loopCity, iter) = pPlayer.nextCity(iter, false)
## Azadi Tower End ##

Since I´ll have a form of the BAT-Mod used to start, the python errors refers to the BugEventHandler.

Here is a Screenhot:
http://forums.civfanatics.com/attachment.php?attachmentid=328432&d=1344464451

Have you any idea what could be wrong with the code?

Thx.
 
Not sure where you get that from
Azadi only has 3 parts:
onBuildingBuilt, onCityRazed, onCityAcquired

I believe you copied one part wrongly
 
Traits 2.0
This version
1) Improves performance by killing off effects that require turn checks and giving them new benefits
2) Merges certain traits together as some of the effects are not so interesting or already present in some wonders
3) Balances some of the new ones
4) Releases all original traits as standalones
5) Modularises the Trait Pack

Traits Pack got a new name, my style :D
Mystical Mysterious Magical Traits Pack
Spoiler :
Traits.jpg


Creative Trait
Now captured cities start with fledging culture too

Expansive Trait
Now captured cities start with min 2 population too (Of course, if the captured city is big, you still get the big population)

Financial Trait
Old: 2% Daily Interest
New: Gets Back 20% of Building Production Cost when buildings built
The Good: No more checks per turn
Daily Interest was a benefit of E-Bank Wonder, this is new :D

Imperialistic Trait
Old: 2 Great General Points per turn during Golden Age
New: 4% Chance to get Great General directly after Combat
The Good: No more checks per turn
Old one too boring:D

Industrious Trait
Rewrote City Acquired part to use "elif" instead of all "if" statements

Organized Trait
Merged Old Organized Trait with Mercantile Trait
Old: No Anarchy during Civic Changes
New: +1 Trade Route in Coastal Cities (Mercantile Trait)

Philosophical Trait
Merged Old Philosophical Trait with Specialized Trait
Old: Mini Golden Age when Great People Born
Specialized Trait: +1 Hammer per Specialist
New: +1 Hammer per Settled Great People (Great General Excluded)

Protective Trait
Old: +20% Heal Rate in Cities
New: Features kept when Cities Built (Protect the Environment Yeah)
The Good: Old Benefit was same as Human Genome Project.
New Benefit Grants Extra Defense and Health when Cities Built on Forests, Jungles
More Commerce too when Built on FloodPlains

Spiritual Trait
Merged Old Spiritual Trait with Faithful Trait
Old: Cities Start with State Religion and Temple
Missionaries Survive if failed to spread
No Anarchy when Religion Changes
Faithful Trait: Starts Golden Age when Religion Founded
Cities with State Religion Builds 10% Faster
New: Gives back full No Anarchy Bonus
Cities Still Start with State Religion, but no Temple
Cities with State Religion Builds 10% Faster
The Good: No Python Codes needed for full anarchy bonus
Since Spiritual Trait has Double Temple Production, abit redundant to start with temples. Also, temple codes required to loop through whole building list, so got rid of it totally.
Since Cities start with State Religion, no need for missionaries to spread, got rid of that as well

Nomadic Trait
Added Double Production for Stables

Diplomatic Trait
Old: No Furious Rivals
Enables Free Market and Free Speech
New: Enables Free Religion as well
Double Production for Intelligence Agency and Security Bureac
The Good: No more turn checks
Changed its name to liberal

Airborne Trait
Added Double Production for Airport

Enslaver Trait
Added Double Production for Jail

Adaptive Trait
Removed leftover codes from Banaue Rice Terrace

Strategic Trait
Added Double Production for Bunker, Bomb Shelter
 
So, is this the new Natural Wonders Development Thread? Also, what happened to my wonders; Lake Baikal, Giant's Causeway, Ngorongoro Crater and Tepui?
 
nope it's not the natural wonders development thread. It was plat trying to urge us to finish. And after 2 hours work, I did :p. See the development thread :p
 


Faithful Trait: Starts Golden Age when Religion Founded

Are you sure it´s in the download? I didn´t find anything about that, but I´m not really used to python. I believe it should be here:

Code:
	def onReligionFounded(self, argsList):
		'Religion Founded'
		iReligion, iFounder = argsList
		player = PyPlayer(iFounder)

		iCityId = gc.getGame().getHolyCity(iReligion).getID()
		if (gc.getGame().isFinalInitialized() and not gc.getGame().GetWorldBuilderMode()):
			if ((not gc.getGame().isNetworkMultiPlayer()) and (iFounder == gc.getGame().getActivePlayer())):
				popupInfo = CyPopupInfo()
				popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
				popupInfo.setData1(iReligion)
				popupInfo.setData2(iCityId)
				popupInfo.setData3(1)
				popupInfo.setText(u"showWonderMovie")
				popupInfo.addPopup(iFounder)
		
		if (not self.__LOG_RELIGION):
			return
		CvUtil.pyPrint('Player %d Civilization %s has founded %s'
			%(iFounder, player.getCivilizationName(), gc.getReligionInfo(iReligion).getDescription()))
 
@Alrik
I took Faithful Trait off.
As mentioned, I merged it to the old Spiritual Trait and created the new Spiritual Trait.

@Voyhkah
Lake Baikal is in. As for the other 3, as they are not in the download database, I not sure whether they are completed or still in progress, so never add them.
 
Back
Top Bottom