Platyping's Python

platyping

Sleeping Dragon
Joined
Oct 22, 2010
Messages
4,626
Location
Emerald Dreams
Monstrous Magical Magnificent MegaPack
120 Wonders + 30 projects
Contains Python Wonders I, II, III, IV, Python Projects I

Movie Pack1
Contains all Static Movie Files for Megapack
Copy the Movies Folder into Megapack/Assets/Modules/Megapack/Art folder


Grand Gruesome Gigantic GigaPack
Contains Python Wonders V, VI, Python Projects II, GIR's + Tsentom's Wonders
200 Wonders + 50 Projects
Requires Megapack


Movie Pack2
Contains all Static Movie Files for Gigapack only
Copy the Movies Folder into Gigapack/Assets/Modules/Gigapack/Art folder


Installation Instructions for GigaPack
Spoiler :
1) Download Moviepack1 and Megapack
2) Copy and Paste Movie Files into Megapack as stated above
3) Download Moviepack2 and Gigapack
4) Copy and Paste Movie Files into Gigapack as stated above
5) Copy the whole Megapack folder in Megapack/Assets/Modules folder
6) Paste into Gigapack/Assets/Modules folder

You should now see both Gigapack and Megapack in the Gigapack/Assets/Modules folder
 
Python Wonders IV

The Great Granary
Spoiler :

Tomb of Khalid
Spoiler :

The Pantheon
Spoiler :

Big Banana
Spoiler :

Central Bank
Spoiler :

Serpent Mound
Spoiler :

Floralis Generica
Spoiler :

Al Khazneh
Spoiler :

Alhambra
Spoiler :

Mesa Verde
Spoiler :

Red Crescent
Spoiler :

Tumen Amugulang
Spoiler :

Nalanda University
Spoiler :

Imam Reza Shrine
Spoiler :

World Financial Center
Spoiler :

Osaka Science Museum
Spoiler :

Ferrari World
Spoiler :

Laxminarayan Temple
Spoiler :

Changdeokgung
Spoiler :

Gate of the Sun
Spoiler :

Hubble Space Telescope
Spoiler :

Arg-e Bam
Spoiler :

Kamakhya Temple
Spoiler :

Crystal Palace
Spoiler :

Fort Knox
Spoiler :

Erechtheion
Spoiler :

Leshan Giant Buddha
Spoiler :

Prague Castle
Spoiler :

Buckingham Palace
Spoiler :
 
Python Wonders VI

Great Mosque of Djenne
Spoiler :

Oriental Crown
Spoiler :

Ishtar Gate
Spoiler :

Etemenanki
Spoiler :

Royal Palace
Spoiler :

Svalbard Global Seed Vault
Spoiler :

Semperoper
Spoiler :

Alte Oper
Spoiler :

Pressburg Castle
Spoiler :

Hoover Dam
Spoiler :

Petronas Towers
Spoiler :

Tower of Babel
Spoiler :

Russo-Chinese Bank
Spoiler :

Boudhanath
Spoiler :

Gediminas' Tower
Spoiler :

Torre del Oro
Spoiler :

Tomb of the Unknowns
Spoiler :

Shimabara Castle
Spoiler :

Galata Tower
Spoiler :

Mausoleum of Momine Khatun
Spoiler :

Kizil Kule
Spoiler :

Shore Temple
Spoiler :

Coptic Orthodox Cathedral
Spoiler :

Saint Stephen's Basilica
Spoiler :

Meenakshi Amman Temple
Spoiler :

Westerkerk
Spoiler :

Grand Theatre
Spoiler :
 
hmm ok, i get all my ideas from hrochland's list of wonder arts lol. have no talent in art myself
 
Added 2 more python wonders, Military ones:

Arc De Triomphe
Spoiler :



Adds 1 level to all existing units. Basically a free promotion of choice.

Thank you, thank you, thank you, for this! I have been looking for this wonder effect for a long time (although I am attaching it to an Art of War wonder. :)
 
you r welcome to use it with any wonder you like. Glad to have someone appreciate my stuff:)

However, what the code does is actually giving the minimum amount of experience required for a unit of that level to level up.
A level 2 unit will receive 5 exp regardless of how much exp he has, because u reach lvl 2 at 5 exp and reach lvl 3 at 10 exp.
So if one unit has alot of stored experience, (lvl 2 unit with 500 experience), it won't get enough to earn another free promotion.
Formula used was according to default experience system, so u may have to adjust if you changed the experience code for your mod
Otherwise, this code works regardless of what level, and whether he has charismatic trait.

I chose arc de triomphe because art of war is usually an early wonder, and most players won't have a big army which is where this wonder shine:goodjob:

Edit:
After some trials and testing, I came out with a newer code for this wonder:
What the old code does is give it a free LEVEL UP. :trophy:
It gives enough experience for the unit to just get 1 additional level.
However, the amount of experience required to reach the next level will be higher since you are higher level

What the new code does is give it a free LEVEL DOWN. :eek2:
A level 6 unit with 30/37 will become a level 5 unit with 30/26.
A) The difference is, this really gives the unit a free promotion, without affecting 1) the current exp, 2) the current level, 3) thus the exp required to reach next lvl.
B) Even if it is a lvl 3 unit with 500 exp, this method works by changing it to lvl 2 unit with 500 exp.
C) This method ignores whatever exp system your mod uses so compatible with all. And since it ignores exp system, it doesn't care whether you have charismatic trait or whatever new modified exp trait.

Only exception is lvl 1 unit:
If it has combat 1, gives it combat 2.
Else, if it is worker, ignores it
Else, if it is siege, gives it city raider1.
Else, gives it combat 1

I think this suits you better? :evil:
Spoiler :
Code:
## Arc De Triomphe Start ##
		if iBuildingType == gc.getInfoTypeForString("BUILDING_ARC_DE_TRIOMPHE"):
			pPlayer = gc.getPlayer(pCity.plot().getOwner())
			for i in range(pPlayer.getNumUnits()):
				unit = pPlayer.getUnit(i)
				unitlevel = unit.getLevel()
				
				if unitlevel == 1:
					siege = gc.getInfoTypeForString( 'UNITCOMBAT_SIEGE' )
					combat1 = gc.getInfoTypeForString( 'PROMOTION_COMBAT1' )
					combat2 = gc.getInfoTypeForString( 'PROMOTION_COMBAT2' )
					cityraider1 = gc.getInfoTypeForString( 'PROMOTION_CITY_RAIDER1' )

					if unit.isHasPromotion(combat1):
						unit.setHasPromotion(combat2,true)
					elif unit.getUnitCombatType() != (-1):
						if unit.getUnitCombatType() == siege:
							unit.setHasPromotion(cityraider1,true)
						else:
							unit.setHasPromotion(combat1,true)
				else:
					unit.changeLevel(-1)
## Arc De Triomphe End ##

Uploaded new code, but left original there for those who prefer a level rather than a promotion
 
Magellan's Voyage

And here comes the first coastal wonder :goodjob:
Spoiler :



+1 Cargo Space applies to All units with cargo space by default.
=> Will affect carrier, galleon, submarine, caraval etc
=> Won't affect frigate, battleship, tank

Because in BTS only naval units have cargo space, i never bother to check if the unit with cargo space is naval, land or air. Thus, if your mod has a transport helicopter for example, it will be affected as well.

However, as the obsolete tech is set at Combustion, this wonder will not affect Submarines and Carriers. Up to users to change this if they want.

When wonder goes obsolete, transports with full load (5/5) will become (5/4), the unit inside won't die of suffocation.:rolleyes:
 
thanks hehe, currently just uploading them here temporarily because of the artwork and the codings. Because none of the artwork is done by me and some of the artwork don't come with art define files, i still playing around with the artdefinebuilding tag to see what exactly those L_System affect. Never tried those before. Also, some without buttons, i edit myself using pictures from the web( lotus and zizkov), so er... abit crappy ^^

As for the codings, some of them i may rewrite for balance issues, or reduce lags for those with permanent effects. Also seeking for feedbacks like whether there are some "special circumstances" where they fail to work, or wonder effect too weak, or xxx wonder may be more suitable for this effect etc. So although the codes do work, they are mostly in beta stage, as I am the only modder and you know pretty well I am quite new to python so I may overlook some issues.

Anyway, after the first 2 wonders, i realised that movies take up too much space, so i never include them for the rest :mischief:

Currently trying to think of something to do for cure for cancer and women's sufferage since these 2 are old civ wonders.
 
Just for fun::lol:

SETI Program
Spoiler :


Certainly for entertainment purposes.
Every turn you are in war, there is a chance aliens will help you :goodjob:
Chances:
1% Aliens diplomats convince both sides to make peace.
5% Aliens backstab you instead. 3 Alien units spawn in each non-coastal square around your capital
5% Aliens assault the enemy's capital for you. 8 Alien units spawn near the capital.
7% Aliens give you 200 gold war funds
7% Aliens teach your commanders some tactics, +10 Great General Points
10% Aliens give you one of their mighty warriors
15% Aliens abduct an enemy unit. A random unit is killed.
50% Aliens ignore you. Nothing happens

The artwork is the hubble space telescope, by Hrochland. It floats pretty high above the city, so you have to tilt the civilopedia to see it... Thats the best I can do, my art skills limited


For SETI, I provided both a project and building version.
By right, SETI definitely should be a project rather than a building.

Differences:
Project cannot be rushed.
Industrious trait doesn't affect Projects
No artwork for project.
Project can never be captured. Once built, it is yours, not in the city.
Project cannot obsolete, in a normal way
AI does not build these custom projects, because "no benefit", AI doesn't recognise python, there is no flavour, AIWeight, iAsset, iPower etc in Project to make them like it.
Thus, although SETI and Longevity should be projects, I will suggest leaving them as wonders to be fair to the AIs:blush:
 
nice work. BTW Big Ben is not my work. I´m not sure but made it Asio I think :) I will search

EDIT: Older, it is Chamaedrys work from 2006 year :)

PS: I have some ideas. Send word if We can cooperate :)

PPS: Sory for my bad English
 
:lol: SETI :D.

AI does not build these custom projects, because "no benefit", AI doesn't recognise python, there is no flavour, AIWeight, iAsset, iPower etc in Project to make them like it.

You can force them to build projects, but I'd rather not recommend it, because it disturbs the normal AI procedures.
You can do that in CvGameUtils, AI_chooseProduction(self,argsList).
As an example from what I did:
Spoiler :

PHP:
	def AI_chooseProduction(self,argsList):
		pCity = argsList[0]
###hanseatic league - AI start (part 2 of 2)		
		iHanse = gc.getInfoTypeForString("PROJECT_HANSEATIC_LEAGUE")
		if CyGame().getProjectCreatedCount(iHanse)<=0:                        
                        pPlayer = gc.getPlayer(pCity.getOwner())
                        pTeam = gc.getTeam(pPlayer.getTeam())
                        pHanse = gc.getProjectInfo(iHanse)
                        if pTeam.isHasTech(pHanse.getTechPrereq ()):
                                pPlot = pCity.plot()
                                if pPlot.isCoastalLand():                        
                                        if pPlayer.canCreate(iHanse, True,False):
                                                if (pTeam.getAtWarCount(True)<=0) and ( (pCity.getYieldRate(YieldTypes.YIELD_PRODUCTION) - pCity.getOverflowProduction ())>=20):
                                                        pLeader = gc.getLeaderHeadInfo(pPlayer.getLeaderType () )
                                                        iFlavorGold = pLeader.getFlavorValue(gc.getInfoTypeForString("FLAVOR_GOLD"))
                                                        iRand = CyGame().getSorenRandNum(5, 'Random number for Hanse creation')
                                                        isFinancial = pLeader.hasTrait(gc.getInfoTypeForString("TRAIT_FINANCIAL"))
                                                        if (iRand ==0) or (iRand <=1 and iFlavorGold >0) or (iRand <=1 and isFinancial) or (iRand <=2 and isFinancial and iFlavorGold >0):
                                                                pCity.pushOrder(OrderTypes.ORDER_CREATE, iHanse, -1, False, False, False, False)
                                                                return True                                               
                                                
###hanseatic league - AI end  (part 2 of 2)		
		return False

You can see that I made the code so restrictive, that the AI is not allowed to be in a war to build the project :)blush: oops, we recently talked about that, and I didn't remember that I used that command before :blush:), that the city should have more than 20 hammers/turn, and that some leaders are more likely to build it.
Still not very good, and the AI also makes breaks within the project to build something else, so that the human probably wins most of the races, but at least it will somewhen be built, even if the human doesn't go for it.
 
Hmm yeah, using another python code to force the computer to build is one way. But I believe adding extra codes just to make them build, will more or less add to the waiting time for no real benefit.

Although strictly speaking, longevity, cure for cancer, women's sufferage, SETI are definitely more "project-like" than "wonder-like", personally I will choose wonder especially for those with ever-lasting effects, so that rivals have a chance to take over the wonder. It will be a pity if SETI was built by a small civ, which got terminated soon, and no more cute aliens running around ^^

P.S.
Saibotlieh made so many cute female units, such a waste not to add them ^^
 
Version 1.1

General Changes
1) Movie files and Movie def tags removed, reduce file size greatly
2) Art define tags edited, some look better in the game now
3) Common Variables used in codes standardized. Eg, all Player ID codes = iPlayer
4) Comments added throughout the codes. For new coders to understand. (I benefit alot from GIR wonders because of these comments)
5) All download links moved to first page, uploading to modding database.

Arc De Triomph
1) Uses free promotion version rather than free level version

Big Ben
1) Simplified code to determine amount of gold based on game speed. (Less If Else statements):goodjob:
2) As a result: Quick => Turns/2, Normal => Turns/3, Epic => Turns/4, Marathon => Turns/5

Brandenburg Gate
1) Different code used to determine number of Great General
2) Now compatible with other mods even if there are other specialists giving experience, or Great General give more/less than default 2 exp

Knossos Labyrinth
1) Effects affect adjacent tiles only, instead of city radius. (Less tiles checked, less time taken)
2) Added an extra check so that units in city tile itself not checked. (Again, less time)
3) To make up for the shrink in radius, units in adjacent tiles suffer 8% damage instead of 5%

Lotus Temple
1) Better Button, I hope:blush:
2) Added an extra free priest
3) Previously, Lotus improves Attitude from others to owner. Now, Lotus improves Attitude from owner to others as well. Seems weird if X is very friendly to Y, but Y is very furious with X

SETI
1) Added a check for Great Wall for Assault and Backstab cases. (Because alien spawned are barbarians, and Great Wall will push them out. :mad: For civs with GW, nothing happen instead)

Zizkov
1) New code for conceal map (Faster)
2) Reveal map for owner changed from "just terrain" to "full details" (with city locations, improvements etc)
3) Every turn after, 10% chance to conceal map for each rival (Tested in huge map, 18 civs, not much difference in turn time)
4) Civs with Satellite Tech immune to daily effect, but still affected by when built effect

And now, for today's wonder:

Helsinki Cathedral
Spoiler :


1) In short, this is a culture bomb, the effect from Great Artist in Civ V.
2) Converts all tiles in city radius to owner.
3) Set as a National Wonder, so that if you build it to flip tiles along the border, there is a chance that the enemy will build one, and flip back the tiles. Then you can do nothing about it
4) There are 2 coding parts to this wonder. The first one does the flipping. The second one is included to limit the construction ONLY in cities with foreign culture. This is because AI doesn't recognise python benefits. Without this part, the AI will just randomly build this wonder. With this part, this can ensure that AI will only build it in a city with foreign culture, even if all the tiles still belong to the AI
 
Version 1.1

General Changes
1) Movie files and Movie def tags removed, reduce file size greatly
2) Art define tags edited, some look better in the game now
3) Common Variables used in codes standardized. Eg, all Player ID codes = iPlayer
4) Comments added throughout the codes. For new coders to understand. (I benefit alot from GIR wonders because of these comments)
5) All download links moved to first page, uploading to modding database.

Excellent work and point number five is very important. I´m not coder and without comments :mischief:

:goodjob:
 
Top Bottom