Tsentom1 Python Wonders

Enable python exceptions and then build it again (make a fake game give yourself the tech and engineers) and see if an error comes up. Most times people forget to add the small bit of python at the end of the eventmanager file which allows the game to get a random number.

Besides that it should work.

I missed the small amount of code at the end. Figures.

Thanks for all the new material. I still can't believe all that is possible using Python.
 
Terracotta Army

terra.jpg


This one is actually adapted from some code in Fall from Heaven 2, so credit should go to them. Basically, if you have the wonder and a unit is killed defending or attacking any one of your cities, that city gets a culture bonus equal to the killed unit's experience (plus a small base amount that scales depending on game speed).

All the python is labeled and searching for "Terracotta" should find the changes. I recommend using winmerge to help combine the files.

Credits:

Python, XML: me (tsentom1)
original python: Fall from Heaven 2 Team
Model and Button: hrochland
Wonder Movie: Arian
 
Wow awesome wonders. Will they work in multi-player?
 
Also an nice idea :goodjob:.

I think, it's maybe to weak, because your culture-cities are often not cities at your border.
And: It'll be a real catastrophe, if your enemy captures this city, and can defend it :eek:.

Well the bonus applies to all cities not just the owner city.

It has a defensive purpose in that, if you are attacked and survive, all your border cities that were attacked will now have more culture and potentially expanded borders.

End game when you are trying to win a cultural victory, in multi-player people are going to go straight to your almost legendary cities. Now attacking those cities is even harder as the more you loose the quicker you boost that city's culture.

The wonder is more for the defensive aspects of culture rather than the building up your 3 cities.
 
Tsentom, is it possible to make the TCA wonder effect a permanent 1 draft in the city ?
I think the current effect reminds me too much of a civ3 scenario and will be best used fora mesoam wonder.

I've tried to make wonders that affect drafting but there are very little things in the python that directly affect it. Actually, the only thing I could find is:

Code:
	def getConscriptUnitType(self, argsList):
		iPlayer = argsList[0]
		iConscriptUnitType = -1 #return this with the value of the UNIT TYPE you want to be conscripted, -1 uses default system
		
		return iConscriptUnitType

Which I believe at most would let you control which unit you draft. Except the game already automatically lets you draft more powerful units as they become available. Plus editing this would mean you'd have to do extensive edits in the unit XMLs giving units new draft values.
 
WOW, your Wonders are f**king awesome!
What a great work :goodjob:

(I didn't even know about the <Tag>TXT_KEY_..._HELP</Tag> tag.
This makes the hybrid modcomps so much more high quality.)

Thanks, I'll take that as a huge compliment coming from you. Actually, your original wonders are what started me making mine (and if you go through mine you'll notice I use / adapt a good deal of your code in a few of them, so thank you again). I've actually been making them more to try to figure out / learn python to add abilities towards my main mod.

The Help tag was actually only added with BTS. I was amazed when I found it myself. Almost everything has it, except for projects (and the terrain help tag - although there - doesn't actually work).
 
I am struggling with integrating the wonders into the RevolutionDCM mod.

Could you provide some detailed guidelines??
 
I am struggling with integrating the wonders into the RevolutionDCM mod.

Could you provide some detailed guidelines??

Every wonder has the bare minimum finals needed to combine them into your game, so you have to combine every single one of them in the same folder path.

For the XML files this is relatively easy. For the most part the changes are the last entries in the file. Simply open the same named file in your mod and copy and paste the new entries in. If your mod doesn't have an XML file of the same name it is even easier as you can simply put the whole XML file into your mod (as long as you make sure to keep the same folder path).

Python is tricker only because indentation and order matters. The easiest way to see the changes I made to the python is to download winmerge (http://winmerge.org/) and in winmerge open up the specific python file from the wonder and the selfnamed python file from standard BTS (as then the only difference would be the changes). All those changes you need to copy and paste into the same spot in your mod's python files. Again, if your mod doesn't use a specific python file you can just copy the whole file into your mod (like the xml) as long as you keep the same folder path.

There's unfortunately no easier way I could make the wonders to merge. Python can't be modular, and since most of them use the CvGameUtils python file I can't even make a custom event manager version. The most I could possibly do is make the XML sections modular but a) the XML is usually no problem to merge anyway, and b) the last time I did this people were just adding the module part and for some reason not combining the separate python and them complaining to me that the wonders were broken.
 
I've added the copernicus observatory to my mod (okay, i've only connected the effect to another wonder), now i have some questions:
Looking into the code, i've seen, that there are several detection for missionaries, and in the future, i want to add some religions. So the question: What effects does the requests for missionaries have?
Same question for the UU- and civilization-checking (i deleted some civs and UUs, so i replaced them with existing civs/uus).
 
I've added the copernicus observatory to my mod (okay, i've only connected the effect to another wonder), now i have some questions:
Looking into the code, i've seen, that there are several detection for missionaries, and in the future, i want to add some religions. So the question: What effects does the requests for missionaries have?
Same question for the UU- and civilization-checking (i deleted some civs and UUs, so i replaced them with existing civs/uus).

I forget which specific star it was attached to but one gave a free missionary of your state religion and another a free defensive unit based on your tech level/civ. I think this also scaled with game speed.

It shouldn't be too hard to copy what I did and modify them for additional religions, civs/UUs, though it's been a while since I looked at the code so if it turns out it is, let me know, and I can write some code for you.
 
Your consistent and neat method of demarking your parts in the python with comments and putting your XML part at the end of the file make your stuff easy to use. I just put the Andromeda unit and the Eden project together in a mod I am making and it works great. I also like the way you include just what's needed for the modification at hand, staying on point.
 
Back
Top Bottom