Converting Platyping Wonders

Vokarya

Deity
Joined
Mar 25, 2011
Messages
6,279
Since I have some time on my hands right now, I have decided to try some conversions of Platyping's amazing Python Wonders over to C2C. I've done four of them so far. I'd like to do more. There are a couple that I have questions about, which I will put in the next post. (I want to keep these separate from the new Wonders in my other thread.)

So far, all I have done is to move these to another technology (since we have so many more techs than BTS, I think we can find the best fit), adjust the base hammer costs so they match the costing scheme, get the Python working properly (at least to a first test), and maybe make a minor adjustment or two. I did not add any other requirements (partially so I could get the Wonders built and tested). I'm interested in hearing any suggestions about additional requirements.

These are the first four. I haven't added them yet to SVN.

Great Zimbabwe: Classical Era. Requires City Planning, obsolete at Imperialism. Allows your cities to gain food and grow in size when building with food (for example, when building Settlers or Workers).

View attachment 339259View attachment 339260

Helsinki Cathedral: Industrial Era. Requires Imperialism. When you conquer a city, it converts 10% of the culture around that city to yours.

View attachment 339261View attachment 339262

Reichstag: Industrial Era. Requires Imperialism. Starts a Golden Age whenever a civilization becomes your vassal. This does stack with an existing Golden Age. This was a National Wonder, but I think it fits better as a World Wonder.

View attachment 339263View attachment 339264

The Motherland Calls: Modern Era. Requires Composites. When another civilization declares war on you, The Motherland Calls conscripts 1 unit per city and gives each city +1 happiness for 10 turns. I added a free Motherland I promotion for units built in the city (since I multiplied the cost by 10, I think you should get another bonus for it), but I noticed the promotion is fairly limited to just Gunpowder and Mounted units. I think it should be widened to Wheeled and Tracked units as well.

View attachment 339266View attachment 339267

Let me know what you think.
 
There are two other Wonders where I looked at the code and what I can see raises a few questions before I try to convert them.

Crazy Horse Memorial: As coded, this provides a free Great Artist for every civilization that has been eliminated so far this game. I think with the number of civilizations we can allow in a game and especially with Revolutions on, this may be too much (anybody want 30 Great Artists?). I was thinking of converting this by changing the routine to only check the civilizations that were on the map at the start of the game. Is there an easy way to check whether or not a civilization has been around since the beginning of the game?

I think what the routine may look like is this:
  • At the beginning of the game, count the number of starting players.
  • When Crazy Horse Memorial is built, count players numbered from 1 to the number of starting civilizations. Do player numbers change as new civilizations are generated and players are eliminated? I don't think so, but I don't know for sure.
  • If any of those players is no longer alive, generate a Great Artist.

(Modern) Olympic Games: I'm modifying this one as I don't think it should be tied to a particular date. Someone will have to build the Modern Games before they begin; after that, they will travel from city to city.

What I don't completely understand is the pushOrder in the Python. From what I can see in the Python API, Python commands can remove a building from a city but not add one. Is this correct? It seems weird that Python can do removals but not adds.

I'm looking at a three-building combo for the Modern Games.
  • Olympic Games: This is enhanced somewhat from Platyping's current games, in that it will provide +4 :), +1 :) in all cities, and +100% gold, GPP, and culture for the 5 turns that it lasts. It shows up much later.
  • Olympic Torch: This is added in the city that first builds the Olympic Games as the site of the torch-lighting. It provides +2 :).
  • Olympic Park: This is added in any city that gets the Olympic Games. It provides +1 :) and serves as a marker so that this city won't host the Games again until all cities have an Olympic Park.
 
@Crazy Horse
There is already an in built check in the codes.
Max 5 Great Artists granted.

Python CAN add buildings and REMOVE buildings.
It is just that buildings added directly by python DO NOT trigger on Building Codes, such as the movies since their codes are placed there.
Also, as I have alot of other on Buildings code wonders which are affected by effects of other wonders, I no longer use the default python add building codes.
 
Culture (German) should then of course have 50% faster production of Reichstag.

Other than that I like it. At which tech will the two last wonders be added?
 
@Crazy Horse
There is already an in built check in the codes.
Max 5 Great Artists granted.

Python CAN add buildings and REMOVE buildings.
It is just that buildings added directly by python DO NOT trigger on Building Codes, such as the movies since their codes are placed there.
Also, as I have alot of other on Buildings code wonders which are affected by effects of other wonders, I no longer use the default python add building codes.

That makes sense. Thank you for the explanation; I looked at the code wrong and thought it was 5 Great Artists minimum, and I'm not sure why I thought that. I'm still concerned about Revolutions, since that can generate so many small civilizations that are easy to kill and it would be very likely that you wouldn't see anything less than the 5 GA's.

I may want to have Modern Games be placed directly then, since I may not want things to trigger on placement. I'm definitely thinking about that Olympic Torch that I want to only place in the first city that builds the Games, and I'm looking for the easiest way to have the Torch only trigger once.
 
Culture (German) should then of course have 50% faster production of Reichstag.

Other than that I like it. At which tech will the two last wonders be added?

Well, I like looking for techs that don't have a lot of content already, or that naturally fit a Wonder. (I requested Criminology specifically to have a tech to key 221B Baker Street to.) So this is what I am leaning towards:

  • Modern Olympic Games: Lawn Sports. It's the best-fitting Industrial Era sports tech.
  • Crazy Horse Memorial: Minority Rights. I don't see a better Modern Era tech than this.
 
Considering Finland has fought a war of conquest only once and even that ended briefly in defeat, I don't feel like the bonus given the Helsinki Cathedral suits it at all. I'd rather the effect be given to another wonder more suited for it (the Topkapi palace maybe? It has no functional effect right now) and the Cathedral, if implemented, got a different bonus.
 
@Vokarya

I really like Great Zimbabwe and Reichstag. Those effects sound awesome!

As for (Modern) Olympic Games I like how you split it up into 3 buildings. I assume it gets unlocked at "Modern Sports" tech right?

Also when you are done could you make a list of the new wonders that not currently do not have a production bonus on Culture Wonders so I can add them? Such as ...

German = Reichstag
Greek = (Modern) Olympic Games

I know there are other "newish" wonders not currently on a Culture yet. Please track them down for me.
 
Considering Finland has fought a war of conquest only once and even that ended briefly in defeat, I don't feel like the bonus given the Helsinki Cathedral suits it at all. I'd rather the effect be given to another wonder more suited for it (the Topkapi palace maybe? It has no functional effect right now) and the Cathedral, if implemented, got a different bonus.

I was converting it pretty much as it was originally set forth. I think the effect is supposed to represent that the cathedral was built as a tribute to the Tsar of Russia in his role as Grand Duke of Finland, with Finland as a sort of vassal state, so the cathedral converts culture to that of the master.
 
@Vokarya

I really like Great Zimbabwe and Reichstag. Those effects sound awesome!

As for (Modern) Olympic Games I like how you split it up into 3 buildings. I assume it gets unlocked at "Modern Sports" tech right?

Modern Olympic Games is going to show up at Lawn Sports. I feel Modern Sports is just too late on the tech tree, since that's fairly deep into the Modern Era (after Mass Media). I want the new Games to appear around 1900, which is late, but still clearly within, in the Industrial Era. I think the best date for the Lawn Sports tech is the first Wimbledon championship in 1877, so that makes Lawn Sports a better fit tech-wise; the Games are a couple decades after, but it's the best option.

Also when you are done could you make a list of the new wonders that not currently do not have a production bonus on Culture Wonders so I can add them? Such as ...

German = Reichstag
Greek = (Modern) Olympic Games

I know there are other "newish" wonders not currently on a Culture yet. Please track them down for me.

I can pull a list together.
 
For the "Crazy Horse" one, would it be possible to count the number of Civs that progress out of being a 'minor' nation? Then track how many of those have been destroyed. Obviously only when that option is on. It seems to me that doing it that way could reduce the number of 'unearned' Great Artists.
 
I believe its possible to count the number of players that have been in the game vs the number of players that are in the game. I can look into this in a bit.
 
I believe its possible to count the number of players that have been in the game vs the number of players that are in the game. I can look into this in a bit.

That's exactly what Platyping's original code does, like this:
Code:
for i in range(min(5, CyGame().countCivPlayersEverAlive() - CyGame().countCivPlayersAlive())):
	pPlayer.createGreatPeople(gc.getInfoTypeForString("UNIT_ARTIST"), false, false, pCity.getX(), pCity.getY())

so you get one Great Artist for every civilization that's been eliminated, up to a maximum of 5. I'm looking for a way to not count civilizations that have arisen because of revolution, because they are generally small and easily wiped out. In a No Revolutions game, it isn't a problem. Generally, in that kind of game you have to work to eliminate a civ, either with an early rush (but C2C really doesn't encourage early rushes, thanks to the Tribal Guardian being so powerful relative to other early units) or a long campaign. On the other hand, Revolution civs are usually pretty small (1-3 cities) and easily wiped out, and that would cheapen the bonus from building the Memorial, which is what I'm trying to avoid.
 
I think I've got an idea that will work for Crazy Horse Memorial. At the start of the game, a variable will be set that will be the greater of either the number of players starting on the map or the default number of players for the map size. When the Memorial is built, the game will look at the first X civilizations up to the variable limit to see if they are still alive, and won't count any of them that did not make it out of minor status. As far as I can tell, dead minor civilizations still count as minor civilizations and I can use isMinorCiv to check for that.

Does this sound workable? I'm concerned if I need an onGameLoad function to have the upper limit persist.
 
I think I've got an idea that will work for Crazy Horse Memorial. At the start of the game, a variable will be set that will be the greater of either the number of players starting on the map or the default number of players for the map size. When the Memorial is built, the game will look at the first X civilizations up to the variable limit to see if they are still alive, and won't count any of them that did not make it out of minor status. As far as I can tell, dead minor civilizations still count as minor civilizations and I can use isMinorCiv to check for that.

Does this sound workable? I'm concerned if I need an onGameLoad function to have the upper limit persist.

I could create such a count in the dll then report it to python. The wrapper read and write functions there would maintain the information throughout the game.
 
Back
Top Bottom