Tsentom1 Python Wonders

Thanks Arian. I would have waited till the movies were done before posting but I thought I was going to be really busy this and (maybe next) week. Instead I find myself with free time till Wednesday.

I'll update the modcomps. Thanks for the great work!
 
This one's a little interesting. Not the same bonus found in past Civs, but the +% to research can easily be done in XML and is already done by existing buildings in the game.



Those that have played Thomas' War may have noticed a little message on the top of the screen every 10 turns or so:



This was adapted from the star system found in Gods of Old. This modcomp basically does two things. First, the game now announces a new astrological sign being in the ascendant every 10 turns. (Basically the game uses a random number generator to choose a number from 0-11 and displays TXT attached to it). This on its own is purely aesthetic. I've set it to random for balance reasons but you can change the frequency and order in the python (I've labeled where I do both).

This is also 'separate' from the wonder itself. Everyone sees it all game. It's just a small message, in truth you probably won't even notice it if you aren't paying attention so it's not distracting yet at the same time adds flavor.





Now, Gods of Old used this system attached to Religion to give specific bonus. Theoretically you can attach it to anything such as civilizations or events. I created a wonder then, that will give a new bonus every time the 'stars' change.

Aries: Free Great General Counter Experience (doubled if Imp)
Taurus: Free Production Bonus in all Cities
Gemini: Free Culture Bonus in all Cities
Cancer: No Bonus
Leo: Increases Your Total Gold Reserves
Virgo: Free Missionary of Your State Religion (no bonus if no state religion)
Libra: Espionage Bonus
Scorpio: Negative Bonus in all Cities
Sagittarius: Free Defensive Unit (based on your tech level, if applicable civs will get their UU)
Capricorn: Free Food Bonus in all Cities
Aquarius: Free Great People Points in Owner City (these are pure points so they don't dilute your Great People ratio, also doubled with Phi, national epic, etc.)
Pisces: +1 Population in Owner City

Some of these bonuses are strong, some are weak, some don't do anything, and one is actually negative. It's all part of the fun of the wonder.

(Basically bare bones the python-wonder will give a random bonus every ten turns. This is just placed in the context of a theme which adds some flavor the the game. The star system can be attached to other things if you know how to handle the python).

All the python is labeled, searching for 'Copernicus' should find the changes. I recommend downloading and using Winmerge to combine files.
 
All the effects are listed in the civlopedia and on the download page


Copernicus' Observatory


Adding a negative and no bonus also let me add a really strong bonus. It was a balancing thing. If all were positive I had to make them all balanced and medium strength. But if there's a chance to get a negative bonus then I could also add a chance to get a really strong bonus. It's a trade off. The fact that the whole thing is determined by a random number generator in game is what keeps it fair. Plus if you think about it there's only a 1/12 chance to get the negative bonus (plus the negative bonus isn't really that significant if you look at the code, like -2 culture in all cities).

It's in game astrological sign (not real world) and it changed every 10 turns or so. The download page explains in greater detail.
 
I cleaned up the code a bit from Himeji (as that seems to be a popular one). Its functionally exactly the same, but I just made the code easier to merge.
 
Are all your new wonders and effects purely Python/XML based, or do they contain changes to the SDK?

If they are all Python/XML, would you mind if I incorporated a few into a mod I working on (and will probably never release in its full version despite my wild dreams of doing so)? I have been longing for a Leonardo's Workshop.

Also kind of an off-topic question, but is it easy to code a wonder effect that gives +1 happiness with farmed resources (corn, rice, wheat) in all cities? I was planning on shuffling some benefits (give the extra city defense to the Great Wall, give Chichen Itza this new effect, and make a new wonder that has the great general emergence benefit.
 
Are all your new wonders and effects purely Python/XML based, or do they contain changes to the SDK?

If they are all Python/XML, would you mind if I incorporated a few into a mod I working on (and will probably never release in its full version despite my wild dreams of doing so)? I have been longing for a Leonardo's Workshop.

Also kind of an off-topic question, but is it easy to code a wonder effect that gives +1 happiness with farmed resources (corn, rice, wheat) in all cities? I was planning on shuffling some benefits (give the extra city defense to the Great Wall, give Chichen Itza this new effect, and make a new wonder that has the great general emergence benefit.

Yes, all are only Python and XML. I feel SDK is too difficult to merge for a small modcomp so I don't make wonders with it, and please feel free to use the wonders for whatever you like that's why I post them. Let me know if you are having trouble merging the files. (I recommend using the free to download program called Winmerge it makes everything easier).

As for your question. While that would be easy with SDK with Python and XML only it would be a little difficult. I'll look into it, maybe I can think of a 'creative' way to make it work (for example you could make a new base building that can't be built that gives the bonus to one city, and then make the wonder give the building to all cities like stonehenge does with a monument)
 
Updated Himeji with new better art:



Special Thanks to Walter Hawkwood!
 
Yes, all are only Python and XML. I feel SDK is too difficult to merge for a small modcomp so I don't make wonders with it, and please feel free to use the wonders for whatever you like that's why I post them. Let me know if you are having trouble merging the files. (I recommend using the free to download program called Winmerge it makes everything easier).

As for your question. While that would be easy with SDK with Python and XML only it would be a little difficult. I'll look into it, maybe I can think of a 'creative' way to make it work (for example you could make a new bas building that can't be built that gives the bonus to one city, and then make the wonder give the building to all cities like stonehenge does with a monument)

I was thinking along the same lines, but wondered if there was a shortcut way to do it. You know, a clean, well-thought-out, clear way like you have above, where you see the wonder benefit listed right under the heading and don't have to go figure out what these little dummy buildings are that pop up everywhere. Like you have above.

I ask because, although I'm getting to be pretty skilled at XML jockeying, I have no clue how to do things in Python. The last time I tried to add events with Python effects, I somehow disabled all the Python relating to events in the game. The end result was several "baby booms", sometimes not more than 20 turns apart and in 3000 BC, because the appearance rate is so high for that event (and it is restricted in Python to only being available after a war).

I am amazed at the work that has been done in this thread and feel like a kid in the candy store. Way to go, guys. ;)
 
You updated the art in the download, but the screenshot still shows the old one. ;)

I swear I updated all the screenshots. Then I sign back on an hour later and they all reverted!!!!

Should be fixed now :lol:
 
I was thinking along the same lines, but wondered if there was a shortcut way to do it. You know, a clean, well-thought-out, clear way like you have above, where you see the wonder benefit listed right under the heading and don't have to go figure out what these little dummy buildings are that pop up everywhere. Like you have above.

I ask because, although I'm getting to be pretty skilled at XML jockeying, I have no clue how to do things in Python. The last time I tried to add events with Python effects, I somehow disabled all the Python relating to events in the game. The end result was several "baby booms", sometimes not more than 20 turns apart and in 3000 BC, because the appearance rate is so high for that event (and it is restricted in Python to only being available after a war).

I am amazed at the work that has been done in this thread and feel like a kid in the candy store. Way to go, guys. ;)

Well you could aslo do that XML way in python, i.e. have the python tell the game to give that new building to every city. That way you avoid the tag saying, free monument in every city, you can then use the XML help tag to write whatever description you want, say +1 Happy from Wheat in All Cities.

Then if you mind this free building showing up, give it no LSYSTEM in the building artdefines and it won't even show up on the map. There's additional python you can do to make it not show up in the civlopedia.

I know it's a rather convoluted way to do something easily done in XML. I actually do it once or twice in my Thomas War mod just to have it look clean and polished (even though technically I made it more complicated).

But without SDK there's no real simple way to do it.
 
Ah, okay. I'll keep thinking.

I also wanted to say that I playtested Leonardo and Himeji last night...and Leonardo's Workshop is quite powerful. A little too powerful, if you ask me; is there any easy way to modify your code to return a percentage cost reduction if you have Leonardo's Workshop? Say 50% off unit upgrades?
 
Added an Eastern Flavor Copernicus' Observatory:

Cheomseongdae Wonder




It's mostly just an aesthetic change and functions the same.
 
Ah, okay. I'll keep thinking.

I also wanted to say that I playtested Leonardo and Himeji last night...and Leonardo's Workshop is quite powerful. A little too powerful, if you ask me; is there any easy way to modify your code to return a percentage cost reduction if you have Leonardo's Workshop? Say 50% off unit upgrades?

Uhmm, yes and no. The argslist allows the iUnityType and the UpgradeType. To make a percentage you'd need to call both of those get the hammer cost and then basically right in the equation that calculates the upgrade cost (which I wasn't really sure of).

In general, I tend to release the wonders in this thread as slightly stronger than I incorporate them into my mod (people tend to complain when I don't saying it's too weak). In my Thomas' War mod though I have it set to give upgrades to always cost 50 gold (which is easy to do just turn the return 0 to return 50), which I find goes a long way to balance it. Actually when only upgrading a unit one level it tends to cost around 110 on Epic (of course upgraded more than one level say a long bowman to a rifleman then it costs a lot more.
 
Updated the Sphinx art, special thanks to Walter Hawkwood:

The Sphinx:




Also edited the e-Bank. Now it no longer gives the trade route but increases gold reserves 50% (was 25%). Still gives 2% interest on Gold Reserves

 
Uhmm, yes and no. The argslist allows the iUnityType and the UpgradeType. To make a percentage you'd need to call both of those get the hammer cost and then basically right in the equation that calculates the upgrade cost (which I wasn't really sure of).

In general, I tend to release the wonders in this thread as slightly stronger than I incorporate them into my mod (people tend to complain when I don't saying it's too weak). In my Thomas' War mod though I have it set to give upgrades to always cost 50 gold (which is easy to do just turn the return 0 to return 50), which I find goes a long way to balance it. Actually when only upgrading a unit one level it tends to cost around 110 on Epic (of course upgraded more than one level say a long bowman to a rifleman then it costs a lot more.

Figures it had to be difficult. Will the cost we put into this function be the same on all game speeds, or will it scale appropriately? So, if I say 50, will that be 50 gold on Normal and 50 gold on Marathon?

If I'm not mistaken, the upgrade formula is affected by a constant in the GameInfo, but I'm not on my Civ computer so I can't check that at the moment. I looked around for the formula online, but I was unable to find it.
 
Figures it had to be difficult. Will the cost we put into this function be the same on all game speeds, or will it scale appropriately? So, if I say 50, will that be 50 gold on Normal and 50 gold on Marathon?

If I'm not mistaken, the upgrade formula is affected by a constant in the GameInfo, but I'm not on my Civ computer so I can't check that at the moment. I looked around for the formula online, but I was unable to find it.

it will be constant but you can easily do stuff like if epic 50, else if quick 25, etc. I'm not at the computer that has civ at the moment either. I'll write an actual bit of code when i do.
 
Top Bottom