Tsentom1 Python Wonders

The real issue is that I play with CIV Gold. So that's the mod that is loaded. So, my desire is to have both your wonders and CIV Gold.

I guess the "proper" thing to do is to merge yours into the cIV Gold files, creating a hybrid mod?

Or, more proper, copy the cIV Gold into a new directory, mere yours into that, and name it GoldWonders or whatever.

Also, it looks like Cheomseongdae runs on the same code as Coperinicus--that is, in the python there is no reference to Cheom..., just to Cpern...
 
The real issue is that I play with CIV Gold. So that's the mod that is loaded. So, my desire is to have both your wonders and CIV Gold.

I guess the "proper" thing to do is to merge yours into the cIV Gold files, creating a hybrid mod?

Or, more proper, copy the cIV Gold into a new directory, mere yours into that, and name it GoldWonders or whatever.

Also, it looks like Cheomseongdae runs on the same code as Coperinicus--that is, in the python there is no reference to Cheom..., just to Cpern...

Cheomseongedae has had its code updated if you redownload it it should be labeled differently. However Cheomseongdae and Copernicus are technically the same wonder, one was just an eastern flavor of the other, so adding both would be kinda pointless.

And yeah, it would be better to just merge it with CivGold then or merging both as a separate mod, as merging it to your BTS files wont necessarily allow you to play them in any mods you then load and might even prevent loading some mods (as they would be looking for unmodified files).

If you find a folder in any of the modcomps thats not in civgold you can just move it directly in and for that part not have to merge anything.
 
Cheomseongedae has had its code updated if you redownload it it should be labeled differently. However Cheomseongdae and Copernicus are technically the same wonder, one was just an eastern flavor of the other, so adding both would be kinda pointless.
I like the randomness thing for both of them, so having both in the world seems OK to me. Thanks for the update to Cheoms.

How does the AI evaluate what wonder to build? That is, is there any code that you had to write that helps the AI understand the benefits of the new wonders?
 
I like the randomness thing for both of them, so having both in the world seems OK to me. Thanks for the update to Cheoms.

How does the AI evaluate what wonder to build? That is, is there any code that you had to write that helps the AI understand the benefits of the new wonders?

Well the XML has a flavor tag such as Military, Science, etc. All leader heads have this as well. So I've given the military wonders high military flavor, thus military orientated leaders are more likely to build them, etc. This is all done with the XML and already in, so there's nothing more you need to do.

As for whether they understand what the wonder does, not exactly, but they don't have to. They understand it has a strong military or culture function (per above). None of the wonders have any thing that needs to be actively done by the leader. For example, they don't need to do anything special to make Flavian capture cities they just have to be aggressive leaders and capture cities anyway. So Flavian has a high military flavor so that the leaders likely to capture cities will attempt to build it. Once they do capture a UB, well the UBs are pre programed into the game so they will know how to use them. Some of them, such as with Troyes, the bonus has a strong XML element so they will understand they are building more Culture or Gold than before.
 
Makes perfect sense, thanks.

In the Djenne files, it looks like you changed the obsolete tech for the Colossus from CORPORATION to ASTRONOMY. Was that intentional?

Actually, the Colossus is supposed to obsolete in Astronomy in BTS.

I'm trying to think exactly the reason I changed it to Coportation. I think with Copernicus, the Astronomy tech tree tag was already filled and I changed it in that so that it wouldn't overflow (overflowing doesn't affect gameplay, just when you look at the tech tree it will be slightly misaligned).

You probably made the change I did when you added Copernicus or Cheo and then now all the other mod comps have the normal obsolete at Astronomy and that's what you're seeing.
 
Holding these for a longer post instead a lot of one-liners. Basically, I'm just trying to confirm that changes that pop up that look like they aren't isolated to your wonders are intentional.

* In Flavian, CvGameUtils.py, iCityID is removed from getUnitCostMod. I think this is intentional, as the callback file is also modified.

* In HOotGD, CvGameUtils.py, the comment on line 257 should be Golden Dawn End, I think.

* In HOotGD, PythonCallbackDefines.xml, USE_CAN_TRAIN_CALLBACK is set to 0. This showed up as a difference with the same file as placed by Flavian. Which should it be set to? Same issue with Ice Hotel.

* In Leo's Workshop, CvGameUtils.py, after the End comment, there is a line that reads

# return -1

In the orig, that line reads

return -1 # Any value 0 or above will be used

* I assume that getRandomNumber only needs to be defined once in cvEventManager.py

Whew ... those are the questions on combining stuff. Now on to play-testing and catching all my silly typo's!
 
Holding these for a longer post instead a lot of one-liners. Basically, I'm just trying to confirm that changes that pop up that look like they aren't isolated to your wonders are intentional.

* In Flavian, CvGameUtils.py, iCityID is removed from getUnitCostMod. I think this is intentional, as the callback file is also modified.

* In HOotGD, CvGameUtils.py, the comment on line 257 should be Golden Dawn End, I think.

* In HOotGD, PythonCallbackDefines.xml, USE_CAN_TRAIN_CALLBACK is set to 0. This showed up as a difference with the same file as placed by Flavian. Which should it be set to? Same issue with Ice Hotel.

* In Leo's Workshop, CvGameUtils.py, after the End comment, there is a line that reads

# return -1

In the orig, that line reads

return -1 # Any value 0 or above will be used

* I assume that getRandomNumber only needs to be defined once in cvEventManager.py

Whew ... those are the questions on combining stuff. Now on to play-testing and catching all my silly typo's!

Okay, for Leo you need to comment out the return -1 aka (return -1 # Any value 0 or above will be used) as I make it call return upgrade price or something like that. Commenting out (adding #) just tells the game to ignore it. Likewise Golden Dawn Start should be End but it doesn't really make a difference just a typo

A few use the get random number, you do only need it once.

For the Python Callbacks. If it is set to 0 that means the game doesn't bother looking. By default in BTS they all should be 0. Now a lot of my wonders use these but each wonder only uses one or two (however they don't all use the same ones)

Now, for example if you are combining a lot of the wonders you'll need to switch a lot of them to 1 so the Golden Dawn switches the can train to 1, Djenee and Flavian switch the cannot construct to 1.

You need to keep all the ones I switch to 1 as 1 for them to work (so when comparing new wonders just look for the new ones I switch to 1 and leave the old ones, don't switch any 1 back to 0s)

Flavian doesn't use the Unit Cost section (in fact none of my wonders do - as get unit cost greatly slows down the game) so if there's anything there its just a type, though it wouldn't make a difference as they callback would be 0 so the game would never check anyway
 
I just started a test game. The first one failed because I left out a file related to the ice_hotel. Added that, cannot load that save file, so I cleared cache, started a new game. Started fine, but the first civ has the option--on turn one--to build infrastructure.

The building def code looks good, and clearly specifices Industrialiasm as a prereq tech for public works.

Any ideas?

In tracking it down, I noticed that in CIV4ProcessInfo.xml, it has:

Code:
<ProcessInfo>
[INDENT]<Type>PROCESS_INFRASTRUCTURE</Type>
<Description>TXT_KEY_PROCESS_INFRASTRUCTURE</Description>
<Strategy>TXT_KEY_PROCESS_INFRASTRUCTURE_STRATEGY</Strategy>
<TechPrereq>NONE</TechPrereq>[/INDENT]

Should that be <TechPrereq>TECH_INDUSTRIALISM</TechPrereq> ?
 
OK, last one before I crash for the night. When the second player's turn starts, the following pops up in a Python Exception window:

PHP:
File "CvEventInterface", line 23, in onEvent
File "CvEventManager", line 193, in handleEvent
File "CvEventManager", line 418, in onBeginPlayerTurn

AttributeError: 'NoneType' object has no attribute 'getObsoleteTech'

Line 418 in cvEventManger is related to the E-Bank. I went through and found a file that I was missing related to the e-bank, added it, cleared, cache, reloaded, and the error persists. I've traced through all the changes on the e-bank I can find with no luck. Any ideas?

If I hit OK, I can play that player's turn. Then I hit OK, and the error occurs again. When I hit OK on the final player (I am playing a 3 player hotseat game for testing), the error occurs 10 more times (once, I assume, for each of the AI controlled civs, plus once for civ #1 who is back up).
 
Uhmm, for that it'll be easier for me to see what's wrong if you post your eventmanager python file here as it has to be something in how you merged that bit of code.
 
Fair enough. Attached ... I am wondering if the issue is in one of the other files--that is in the definition of the obsolete tech property.

I wonder this because the line that i causing the error is

PHP:
obsoleteTech = gc.getBuildingInfo(b_eBank).getObsoleteTech()

which, without tracing the code, reads like it is trying to read an XML node for the ObsoleteTech setting ... BINGO! Found it. Stupidity with the BuildingInfo XML.
 

Attachments

Fair enough. Attached ... I am wondering if the issue is in one of the other files--that is in the definition of the obsolete tech property.

I wonder this because the line that i causing the error is

PHP:
obsoleteTech = gc.getBuildingInfo(b_eBank).getObsoleteTech()

which, without tracing the code, reads like it is trying to read an XML node for the ObsoleteTech setting ... BINGO! Found it. Stupidity with the BuildingInfo XML.

Ah, well glad you fixed it.

In truth e-Bank doesn't use an obsolete tech so you could even erase that line and the references to it. I generally just put the obsolete check code in - which shouldn't cause the problem you had anyway even if there was no obsolete tech - in case people want to add an obsolete tech themselves. So I do it be default with all my wonders.
 
No errors are occurring in my current game, although none of the wonders have been built yet, so I can't say this is fully tested. But, I have a zip file that has all of Tsentom1's wonders--except the Eden Project--combined into a single mod.

You can download it here. I will update with future wonders and changes (and, of course, with any errors that are found) as I can.
 
Here's a request: How about implementing an effect like the Statue of Zeus that was in Civ3 which would give you a special unit (Ancient Cavalry) every x number of turns. I would assign this to a special Crusader unit for a King Richard's Crusade Wonder in my mod, but you might have an idea for another wonder to tie it to.

Cheers,
ripple01

I'm almost done with this, probably by mid-week
 
Unless you want me to just do an aesthetic clean up, add a help description, etc
 
Back
Top Bottom