Old Wonders - New Abilities

Vokarya

Deity
Joined
Mar 25, 2011
Messages
6,279
Hello everyone,

This is a thread for me to post and get some feedback on giving some of the current C2C Wonders new abilities with Python. I guess we have had some Wonders around for a while that used to have unique abilities in Python, but those were lost in translation to C2C. (This is not to replace my other thread. That thread is for new Wonders. This is a thread for old Wonders that have been given new abilities.)

Several months ago, Strategyonly asked me about a Python version of Machu Picchu. At the time, I was still learning Python. Now I think I know my way around the language well enough to start converting abilities over to our format, and Machu Picchu seemed like a good place to start.

This is the current Machu Picchu:

View attachment 328844

GIR's old Machu Picchu is here (http://forums.civfanatics.com/showpost.php?p=11487912&postcount=10):

View attachment 328845

I kept the Andeanism religion-related statistics, the Culture and Great Person bonuses, and the +100% city defense. I removed everything else to make way for this:

View attachment 328846
View attachment 328847
View attachment 328848

The Python routine does the following:
  • Add +1 food, +2 production, and +1 commerce to every owned Peak
  • Add +1 commerce to every owned Peak in city radius
  • Place the "Machu Picchu" improvement on a random Peak, giving an additional +1 food and +6 commerce to the square.

I also added a Peak requirement in the City Radius (to trigger the placing of the improvement -- the original had a Python routine for this, but we have a simple XML tag) and a Mountaineering tech requirement. The current Machu Picchu has no tech requirement at all.

Is this something we should do? Would there be problems? This is something that I am proposing to liven up old Wonders. Machu Picchu in particular is one of DancingHoskuld's Wonders, so I won't change anything without permission.
 
Actually it is AAranda's I just took them over. I have no problem with you changing this one. Is it in the Religion section or the Wonder section of my mods? Either way it should be no problem as i am not working in that area at the moment. I am making a religion mod for everyone to try out but I will put that in as a mod mod to start with.
 
Actually... that is more like my version than GIR's version.
GIR's original version has more than 100 lines of codes...

Looking at the python description of what you typed, that is pretty much an older version of what I edited from GIR's, but I simplifed it even further which is why the picture does not tally with what you typed
 
I rejected your (platyping) version when I first looked at merging your stuff. In fact you were putting them out so fast that I gave up and just ignored any for which we already had one of that name.
 
Yup, but looking at this, do you think it is not mine?
The codes are rewritten by me.
The artwork is repicked from RI mod.
The movie is made by me.
The only thing leftover from GIR was the idea and the artwork for the improvement itself.

All that was done is simply edit the XML changes I believe, so how is it not my version :D

A simple analogy and you get what I mean.
We all know C2C emerges from ROM/AND with changes.
My version emerges from GIR's with a total overhaul of the whole code system which is basically the essense of python works.
If all I did was edit the variables, 1 commerce becomes 2 commerce, or 500 cost become 600 cost, I agree this is GIR version then.

So now if I download C2C, just do a simple change and change the mod name to D2D for example.
If I upload D2D now and says, "Hi, lets play this, I convert this from ROM/AND mod (nothing to do with C2C), anyone of you here happy with this?
 
Actually... that is more like my version than GIR's version.
GIR's original version has more than 100 lines of codes...

Looking at the python description of what you typed, that is pretty much an older version of what I edited from GIR's, but I simplifed it even further which is why the picture does not tally with what you typed

It was under GIR's section, so I guessed that's who it belonged to. I just borrowed the code and tweaked it. The code to place the improvement didn't quite work in a straight port, and I'm wondering if it is something that was changed with C2C.
 
Platyping just looked at all your wonders and wow. Not sure if all of those are in c2c yet and if not could we use them. Also I would like to see those traits in c2c
 
Actually it is AAranda's I just took them over. I have no problem with you changing this one. Is it in the Religion section or the Wonder section of my mods? Either way it should be no problem as i am not working in that area at the moment. I am making a religion mod for everyone to try out but I will put that in as a mod mod to start with.

Machu Picchu is in the Religion section. I will put in what I did -- it requires a few new files to handle the improvement plus changes to the building XML and game text.
 
I am not against anyone using my works, feel free to do so.
Just that it doesn't feel nice to put it under others' names.

@Vokarya
Most of those you seen over there under others' names, they are placed there mainly because the idea itself originated from them.
Artwork is mostly kept as well, although I did change some to more unique looking ones made more recently.
Since artwork itself is definitely not my work, (except the movies) I don't claim credit for them.

Most of them have changes in the codes, due to
1) Logic errors in the original codes, meaning the codes work, just that they don't do what they are supposed to do in the right situation.
Like giving more gold than expected (Himeiji Castle)
Messages activated to wrong people (Lubyanka or original name KGB)

2) Total code overhaul because the original codes are just too long and inefficient (Machu Picchu, Via Appia, Sydney Opera, Terracotta), or the effects have changed significantly (Golden Gate Bridge)

3) Errors in old coding system style.
Some of them that affect relationship for instance are using Team instance when it should be taking in Player instance.

Of course, some of them are just minor fixes so I don't really take credit for them, but when a 100 line code wonder is cut to less than 20 lines or so, then that is definitely my credit :D
 
Here is another upgrade idea. For those of you who remember Civilization II, Marco Polo's Embassy granted you an Embassy with every other player. I thought that this particular ability was too much fun to restrict to whoever gets Mesopotamism and builds the Ishtar Gate, so I took the code from Ishtar Gate and applied it to the Embassy. I then lowered the Trade Routes from 3 to 1 to compensate. I could pull the Merchant commerce bonus if necessary.

View attachment 328853
View attachment 328852
 
I am not against anyone using my works, feel free to do so.
Just that it doesn't feel nice to put it under others' names.

@Vokarya
Most of those you seen over there under others' names, they are placed there mainly because the idea itself originated from them.
Artwork is mostly kept as well, although I did change some to more unique looking ones made more recently.
Since artwork itself is definitely not my work, (except the movies) I don't claim credit for them.

Most of them have changes in the codes, due to
1) Logic errors in the original codes, meaning the codes work, just that they don't do what they are supposed to do in the right situation.
Like giving more gold than expected (Himeiji Castle)
Messages activated to wrong people (Lubyanka or original name KGB)

2) Total code overhaul because the original codes are just too long and inefficient (Machu Picchu, Via Appia, Sydney Opera, Terracotta), or the effects have changed significantly (Golden Gate Bridge)

3) Errors in old coding system style.
Some of them that affect relationship for instance are using Team instance when it should be taking in Player instance.

Of course, some of them are just minor fixes so I don't really take credit for them, but when a 100 line code wonder is cut to less than 20 lines or so, then that is definitely my credit :D

I wasn't trying to take credit for them, just offering to convert them for C2C. I've gotten some practice with Python now -- my own version of Via Appia, its cousin the Golden Spike, and a few other things, so I wanted to make some Wonders be truly "wondrous" and not just multiple XML effects. Even if I am guilty of that myself sometimes. I have used my <GlobalExtraBuildingCommerces> for several different effects.
 
Nah, not saying you claiming credit for them, but more of you planting GIR's name over it when the only thing that remained from GIR is pretty much the improvement art itself :D

It is good of course for modders to convert what they like from works of others to their own mod, so more players can benefit from them. After all, that is the point of creating mod components => to be used by mods

Just for your info:
Marco Polo's Embassy has been done with the exact same benefits :D
Just some minor code changes from tsentom1's version, using team loops rather than player loops if I remembered correctly.
P.S.
It is actually located in the same post where you download Machu Picchu from :mischief:
 
I would definitely like to see more Python wonders in C2C, either converted from Platyping or made from scratch. Those are much more unique, and as long as the effects are onBuild, it won't have much of a performance impact.

Platyping has probably been the most productive modder this year aside from C2C, and I really admire his wonders (and Python Traits too, those seem much more useful). :goodjob:
 
The thing is, Koshling or Andy? (cant remember who) mentioned before that C2C has a special function that removes python effects when activated.
Which is why, certain python wonders cannot be converted to C2C since their effects will probably be there for few turns, but when that function is activated, then their effects are gone and you are left with a white elephant wonder doing nothing but culture and GP generation.
 
The thing is, Koshling or Andy? (cant remember who) mentioned before that C2C has a special function that removes python effects when activated.
Which is why, certain python wonders cannot be converted to C2C since their effects will probably be there for few turns, but when that function is activated, then their effects are gone and you are left with a white elephant wonder doing nothing but culture and GP generation.

The Modifier recalculation? Yeah I remember that from a while back, I don't know if that is still valid. It played havoc with one-time Python things, but then again we have Tsentom1's wonders, so I don't know.:hmm:
 
Nah, not saying you claiming credit for them, but more of you planting GIR's name over it when the only thing that remained from GIR is pretty much the improvement art itself :D

Sorry about that. I couldn't tell from the post who was actually responsible.

Just for your info:
Marco Polo's Embassy has been done with the exact same benefits :D
Just some minor code changes from tsentom1's version, using team loops rather than player loops if I remembered correctly.
P.S.
It is actually located in the same post where you download Machu Picchu from :mischief:

I used the code we already had in C2C from the Ishtar Gate. I figured since that was already converted to the C2C modular format, it would be the easiest to adapt.
 
There are two problems with python wonders in c2c

- If you don't code it right the effects will be list in a recalc. However it is easy to do it right.

- The AI has no idea what the building will do so can't evaluate it correctly when deciding wha to build.
 
@Vokarya
Just take it that I am not so bored enough to simply copy from their sites and place the same thing at my site without doing anything to them.

Some are simple ones like I said, simple improvements to efficiency using coding style of 2012 rather than codes done years ago. Codes done years ago still work, just that Man improves everyday, this is also why I do updates to my old works regularly Dancing :D

I learnt python by self study from tsentom1 and GIR's works, so naturally, the first set of works of mine will contain inefficiency, logic errors and even unsolved bugs from theirs.
In fact, I think the first 50 are completed within the first month of self study, this is my 8th month of modding :D

Thus, of course the more hands on experience you gain, overtime you realise
1) there are better ways to do the same thing
2) unexpected things that can occur, which are not taken care of by the existing codes
3) major bugs left in theirs that nobody bothered to report in their threads.
Using getCity() in for loops is one of them.
Or using Team ID rather than Player ID for extra relationship codes
When you realise certain style of coding is wrong and you have been doing it for the past X works, it is not surprising that you have to update all of them, rather than keep quiet and let the next newbie who want to learn python carry on with the bugs.

I am not saying they are bad coders after all that is where I learnt from, but codes from others are good to study, but not taken for granted.
 
Back
Top Bottom