• Civilization 7 has been announced. For more info please check the forum here .

Platyping's Python

Yup, the original CT is a coastal building.
The 2nd CT only considers players with coastal cities according to Attitude.
Even if the rival is friendly but if he doesn't have any coastal city, he is out of the question.

If there is no other player in the map with coastal city besides the builder, 2nd CT will not be built
 
Reichstag
Spoiler :



Artwork by asioasioasio
 
dear platyping

thank for for your intriguing & entertaining contributions, and also for encouraging me to use code more!

keep up the good work
 
Glad to hear they are entertaining :goodjob:

The neglected World Wonder:

Catacombs of Kom el Shoqafa
Spoiler :



Let's rest in peace.... together :evil:

Seriously, out of the 7 Ancient Wonders, 7 Medieval Wonders and 7 New Wonders, this is the one and only real world wonder that never appears in any mod or any Civ series. And the fact that it is still standing today makes it look more saddening. Pretty strange how a real world wonder is never seen, while others like Himeji Castle, Eiffel Tower which are never on world wonder lists are so popular.

Since this is a mass burial tomb, for mass burial, you need to drag someone to die together... Thus, whenever a unit died defending a city, there is a chance to bury the attacker with you lol :lol:

Chance depends on how badly damaged the attacker is:
0~24% => 0%
25~49% => 10%
50~74% => 20%
75~99% => 30%

Because it is a real world wonder, its powers are extended to all cities :goodjob:

Difference between Neuschwanstein and Catacombs:
Neuschwanstein deals fixed 20% damage to attackers always.
Catacombs has % chance to instant kill attackers who are damaged.
Unless attacker is badly damage, catacombs does nothing at all

Neuschwanstein affects wonder city only.
Catacombs affects all cities.

Edit: Adjusted Burial Chance, since 40% seems too high.

Because I did not find it in any mod, obviously I can't find an exact artwork for it. This is the closest I find :egypt:


Megapack updated with Channel Tunnel, Reichstag, Catacombs.
To Date: 41 Wonders, 15 Projects
 
That could decide some wars, if the both players are on the same tech level.
Nice idea.
For the Reichstag it would be more appropriate if there was no limit after it was lost (but that would be too difficult to code, and doesn't really make sense gameplay wise).
 
Hmm, you mean keep the no limit effects even if Reichstag is razed?
Yeah, pretty hard to code unless Reichstag is a project, then will never be razed lol.
I am really curious why no one ever bothered with the catacombs :shake:

Knossos Labyrinth:
Replaced button with real Knossos pic
Prerequired Tech switched to Engineering from Philosophy which never makes sense
 
Hmm I didn't try BUG before, since there are bug, bat, bbai etc so many versions so I not sure which to make it compatible with.

So for simplicity sake, I make it compatible for normal BTS.
Anyway I started moding 40 days ago :D so I didn't know BUG doesn't use the default python files.
I can take a look at bug codes and see what is the difference if you can tell me which is the most popular version to try.

By the way, I downloaded 4 mods to "loot" wonder art and names :hammer:
Realism Invictus, History Rewritten, PieAncientEuropeIV and Invasion of Kuwait
All of them have CvEventManager, and some of them dont have BUG. 95% is definitely an overstatement :egypt:

Edit:
Hmm I do see BUG in some of them, but they still have CvEventManager as well as CvGameUtils. Does BUG stops the access to these 2 files?
 
BUG ads some sort of modular loading to the Civ4 Python, so that you don't have to fiddle around with the CvEventManager to merge things.
A tutorial can be found here. Not really difficult after you once understand it.
But don't let you put under pressure, I also normally don't provide separate BUG versions ;).

Adding a normal CvEventManager to BUG will cause under certain circumstances (...no real idea) problems with the Python, so it's not advisable.

At the versions: BUG is the core. BAT is an art extension (no additional programming), BULL is a dll extension (no real further Python programming AFAIK), everything else (e.g. Better BAT AI) are combinations out of the others.
Programmingwise you really just have to care about BUG.
 
Thanks The_J for the explanation.
Like Modular, it will be on my to-do list, but not priority list.
So far, I will still be making them based on raw BTS, but 1 day I will make a modular and/or BUG version for JUST the Megapack.
Don't expect me to make 60+ additional BUG versions of each wonder. :lol:

And like I said, making it modular doesn't make it easier for the common folks.
This is an example of what I meant.
Modders who know how to make/use modules, definitely know how to cut and paste the relevant parts themselves.
But common users with minimal mod knowledge have no ideas how to use modules at all.

Edit:
Enhanced Original Traits:
Fixed a bug for Protective Traits under def onCombatResults:
Changed UnitAITypes.UNITAI_NO_UNITAI to UnitAITypes.NO_UNITAI

Lotus Temple:
Added CommerceDoubleChange and CommerceChangeOwner tags in XML

Blessings of the Archangel:

Mont Saint-Michel
Spoiler :



The main code is basically Tsentom's Survival Promotion code.

This wonder grants a chance to revive dead troops in own cultural lands.
Without state religion, 10% chance to revive with 10% str
With state religion, 20% chance to revive with 20% str
Units are revived at wonder city.
Mechanical units are excluded. (Archangels resurrect people. They are not mechanics who repair machines:goodjob:)

Artwork by Hrochland


Efficient missionaries:

Famen Temple
Spoiler :



Straightforward, do I need to explain?

Artwork by Hrochland


Unlimited Money:

Federal Reserve Bank
Spoiler :



National Wonder
Min Gold = 200

Min Gold is set before daily income added.

If you end the turn with gold more than min gold, then this wonder doesn't do anything.
Federal Reserve Banks are there to help during depression, not economic boost lalala

Artwork by stolenrays
 
Since about 95% of the Civ4 mods now contain BUG/WoC, how about a separate section for those?

I dont even know if any mods made now even have a CvEventManger anymore?

My mod... it is getting updated every month and still uses a CvEventManager. I've found a way not to cause incompatibilities when combined with BUG. I don't have any problems with python at all. And using the CvEventManager is much more simple than using the BUG system.

---

By the way: We need wonder movies for every of your wonder. I don't implement new wonders I don't have a movie for. And Alain's are gone cause of Megaupload.

Why don't you implement them yourself? Don't you use wonder movies at all?

And: The link to "mourndraken's" is a link to his profile, not to a thread.
 
My mod... it is getting updated every month and still uses a CvEventManager. I've found a way not to cause incompatibilities when combined with BUG. I don't have any problems with python at all. And using the CvEventManager is much more simple than using the BUG system.

---

By the way: We need wonder movies for every of your wonder. I don't implement new wonders I don't have a movie for. And Alain's are gone cause of Megaupload.

Why don't you implement them yourself? Don't you use wonder movies at all?

And: The link to "mourndraken's" is a link to his profile, not to a thread.

If your so good at python why not help us out at C2C then, that would be great.

And to keep things on topic, what movies do you'll need, i am trying to go strictly with Static LH and Wonders. I have stuff all the way back to 2006, but alot is on my other PC (that i dont even use anymore.)
 
1) I am not good at Arts :crazyeye: so I do what I can, and leave what I can't to the professionals.
2) Most of these wonders are taken from other mods which have the wonders in the first place. So i presume, they will have the movies themselves in their own mods if they need.
3) Arain has made a massive library of movies. Yeah, it was badly hit by Megaupload, but the good news is he has announced that he will be uploading to a new site :D
4) Some people just take the effects and transport to their own wonders anyway :mischief:
5) Yup, I know mourndraken's link is a link to his profile, not a thread. I asked him before whether he has a thread with a list of his movie works, but he said nope, he only uploaded them into the database, although he announced new works in the PIE mod thread.
Rather than providing a link to the database which has all other things, I guess linking it to his profile directly will be more appropriate.
6) Good news is, dacubz145 has also started a new Movie making career :D

Movies are nice, but I rather not embarrass myself by making what I am obviously bad at. :rolleyes:
 
Nah... I don't say you should make the wonder movies. I just asked myself why you don't implement the movies from other people if you are using them yourself. Or don't you play with your wonders? ;)

3) nice!

-----

@strategyonly: "I don't have any problems with python" = "My mod does not have any problems with python"... I'm not so good at python, but for exactly that reason I wanted to keep the CvEventmanager.py. C2C is nice, but I have my own mod with my own ideas. Don't want to mix them with other ideas I don't like. So you have static wonder movies for nearly every wonder? Hm... Will tell you, when I need one.
 
Ah I see, misunderstanding :D

I used to add the movie files to my initial works, but found out that the movie file takes up 95% of the whole wonder file size. Currently, with the exception of SETI which has unit arts, the rest of them are less than 200 KB in size. In fact, projects which don't even have building arts, are not even 30 KB.

Adding a movie file which is usually 3MB~10MB will largely increase the file size. Thus, I remove them from the file to make it easier for people with low internet speed to access them easily.
The Megapack especially will increase from the current 4MB to 100+ MB .

Also, since the movies are definitely not my works, I was thinking providing a link to them, rather than adding to my own files would provide more exposure to the hard work of the movie makers. Although I can make a notice in the credits section, I believe there will still be people who download and use without reading the credits.
 
If 1 is nice, make it 3:

Venetian Arsenal
Spoiler :



National Wonder
Mass Production:
Every naval combat unit produced, you get 2 extra with experience split equally, rounded down.
Workboats not counted.

Modders:
I used a check on combat class type == Naval rather than domain type, so that 1 check is enough to ensure that they are ships and workboats are excluded.
If your mod has various combat class type for naval units, you may wish to use domain check instead, and up to you if you want to exclude workboats.

Artwork by Walter Hawkwood


Edit:
Springfield Armory:
Removed first few lines which defined unused variables
 
I see. But good to know that you have the wonder movies if alain fails to reupload. ;)

Venetian Arsenal might be imbalanced... :D
 
@Cybah haha I know, that's why I set it as a National Wonder, so everyone gets one of this.
If 2 extra copies is too much, can reduce to just 1 extra copy

@The_J Hehe, sometimes simple is nice. Never manage to fix that capture worker stuff, so change it to just missionaries.

Edit:
Megapack:

Fixed a typo in def onCombatResult:
pPlayer2 = gc.getPlayer(iPlayer2) instead of pPlayer2 = gc.getPlayer(iPlayer)

Updated Megapack with Saint Michel, Federal, Famen and Venetian
 
Version 1.3

XML Changes

1) Added Max Start Era Tags for various Wonders:
Spoiler :

Cyrus Classical
Nazca Classical
Zizkov Modern
Newton Renaissance
Abu Simbel Classical
Pergamon Ancient

2) Changed PreReq Techs for various Wonders:
Spoiler :

Apadana Obsolete with Constitution
Arc de Triomph Military Science
Knossos Labyrinth Construction
Catacombs Philosophy, Cost 500
Taipei, WTC, Empire Composites
Torre Chemistry, Cost 900
Springfield Assembly Line

Now only Mass Media has overflowing icons :D

3) Nazca Lines strategy section rewrote, looks better.

Python Changes

1) Added Max Start Era for various Projects:
Spoiler :

Dissolution of Monasteries Renaissance
Silk Road Medieval
Magellan Medieval


2) Magellan Project:
Can only be built in Coastal City

3) Nazca Lines:
Add a 9th option, +4 Commerce

4) Venetian Arsenal:
Nerfed. Experience Split among 3 units.
Thus, instead of getting 1 Battleship with 15 EXP, you will get 3 Battleships with 5 EXP each.

5) Megapack:
i) Bug Fixed: Moved Olympics from EndPlayerTurn to EndGameTurn
ii) Bug Fixed: Channel Tunnel, iTeam defined
iii) Compatibility fix for these wonders thanks to this code:
Code:
pNewUnit.convert(pUnit)

This code converts pNewUnit to take all the pre-python properties of pUnit, including but not limited to level, experience, promotions, base strength, unit type, moves etc
However, python changes that affect the properties of the unit are not copied to pNewUnit.
A) Extra Strength from Springfield
B) Extra CargoSpace from Magellan

Thus, extra codes are added to the following wonders for them to work compatible with Springfield and /or Magellan

I) Venetian Arsenal:
Spoiler :


Note: Make sure Venetian's Code is pasted below ALL def onUnitBuilt codes to work correctly.
Code:
## Venetian Arsenal Start ##
		b_Venetian = gc.getInfoTypeForString("BUILDING_VENETIAN_ARSENAL")
		if city.getNumActiveBuilding(b_Venetian) == true:
			if unit.getUnitCombatType() == gc.getInfoTypeForString("UNITCOMBAT_NAVAL"):
				unit.setExperience(int(unit.getExperience() / 3), 999)
				pPlayer = gc.getPlayer(city.getOwner())
				for i in range ([COLOR="Red"]3[/COLOR]):
					pNewUnit = pPlayer.initUnit(unit.getUnitType(), city.getX(), city.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)
					[COLOR="Red"]pNewUnit.convert(unit)
					pNewUnit.setBaseCombatStr(unit.baseCombatStr())
					pNewUnit.changeCargoSpace(unit.cargoSpace() - pNewUnit.cargoSpace())[/COLOR]
## Venetian Arsenal End ##

II) Mont Saint-Michel
Spoiler :


Since Saint only affects living troops, don't have to consider Magellan's effects
Code:
## Saint Start ##
		bc_Saint = gc.getInfoTypeForString("BUILDINGCLASS_MONT_ST_MICHEL")
		if pPlayer2.getBuildingClassCount(bc_Saint) == 1:
			LoserInfo = gc.getUnitInfo(pLoser.getUnitType())
			if LoserInfo.isMechUnit() == false and pLoser.getUnitCombatType() != -1:
				if pPlot2.getOwner() == iPlayer2:
					revive = CyGame().getSorenRandNum(10, "revive")
					if pPlayer2.getStateReligion() > -1:
						revive = int(revive /2)
					if revive == 0:
						b_Saint = gc.getInfoTypeForString("BUILDING_MONT_ST_MICHEL")
						(loopCity, iter) = pPlayer2.firstCity(false)
						while(loopCity):
							if loopCity.getNumActiveBuilding(b_Saint) == true:
								pNewUnit = pPlayer2.initUnit(pLoser.getUnitType(), loopCity.getX(), loopCity.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION )	
								pLoser.setDamage(90, -1)
								if pPlayer2.getStateReligion() > -1:
									pLoser.setDamage(80, -1)
								pNewUnit.convert(pLoser)
								[COLOR="red"]pNewUnit.setBaseCombatStr(pLoser.baseCombatStr())[/COLOR]								pNewUnit.finishMoves()
								CyInterface().addMessage(iPlayer2,true,20,CyTranslator().getText("TXT_REVIVE",(pLoser.getName(),)),'',0,'',-1,-1,-1, true,true)
								break
							(loopCity, iter) = pPlayer2.nextCity(iter, false)
## Saint End ##

III) Cloned Mammal
Spoiler :

Since Magellan is long obsolete, ignored
Code:
## First Cloned Mammal Start ##
		if iGameTurn % 5 ==0:
			if pTeam.getProjectCount(gc.getInfoTypeForString("PROJECT_DOLLY")) == 1:
				clone = CyGame().getSorenRandNum(pPlayer.getNumUnits(), "Clone")
				pUnit = pPlayer.getUnit(clone)
				if pUnit.isNone():
					CyInterface().addMessage(iPlayer,true,20,CyTranslator().getText("TXT_CLONE_FAIL",()),'',0,'',-1, -1, -1, true,true)
				else:
					iX = pUnit.getX()
					iY = pUnit.getY()
					u_type = pUnit.getUnitType()
					for i in range (2):
						pNewUnit = pPlayer.initUnit( u_type, iX, iY, UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION )	
						pNewUnit.convert(pUnit)
						[COLOR="red"]pNewUnit.setBaseCombatStr(pUnit.baseCombatStr())[/COLOR]						pNewUnit.finishMoves()
					CyInterface().addMessage(iPlayer,true,20,CyTranslator().getText("TXT_CLONE",(pUnit.getName(),)),'',0, pUnit.getButton(),ColorTypes(11), iX, iY, true,true)
## First Cloned Mammal End ##
 
Top Bottom