Tsentom1 Python Wonders

Hey, I added Leonardo's Workshop to WolfRev. It's a very cool wonder, but unfortunately the AI doesn't see it as doing anything (other then give 2 Eng GP points), so it never builds it. Do you have any ideas about how to increase the AI incentive, using Python or XML, so that the AI will prioritize the building of LW?
 
Hey, I added Leonardo's Workshop to WolfRev. It's a very cool wonder, but unfortunately the AI doesn't see it as doing anything (other then give 2 Eng GP points), so it never builds it. Do you have any ideas about how to increase the AI incentive, using Python or XML, so that the AI will prioritize the building of LW?

Four things you can do in the XML:

Increase its Asset rating
Increase its Power rating
Increase its aiweight
Give it a high FLAVOR_(MILITARY, GOLD, PRODUCTION) whatever rating.

The AI actually uses the above to determine what to build more so than even a buildings bonuses (even for standard BTS buildings). I'm never really too sure what values to give, so it's entirely possible I set them too low (although I have seen the AI build Leonardo in games). I think the main thing that seems to prevent the AI is that they never seem to have both Engineering AND Paper, so editing the pre-req techs could also make things easier as well.
 
Ah, for some reason I thought BtS got rid of or at least reduced those weights. The Power rating would be bad though, as the AI uses this to make military calculations, at least it would be bad to give it unrealistic power. I forgot how Asset fits into AI logic, you remember? Will be nice if this works though, I was looking over CvCityAI.cpp and without a known call for the SDK to recognize the modified upgrade cost, I wasn't really sure where to start.

And the AI will build any wonder, no matter what it does if it's flagged with a wonder tag, but that's just a chance of hitting the lottery. At least form what I see the AI is not prioritizing LW.

Thanks for the quick response, any word you can give me on the progressive trait, or should I look into working on this myself? I'm not a master of trait effects like yourself, but I could give it a go if you're no longer interested.
 
Ah, for some reason I thought BtS got rid of or at least reduced those weights. The Power rating would be bad though, as the AI uses this to make military calculations, at least it would be bad to give it unrealistic power. I forgot how Asset fits into AI logic, you remember? Will be nice if this works though, I was looking over CvCityAI.cpp and without a known call for the SDK to recognize the modified upgrade cost, I wasn't really sure where to start.

And the AI will build any wonder, no matter what it does if it's flagged with a wonder tag, but that's just a chance of hitting the lottery. At least form what I see the AI is not prioritizing LW.

Thanks for the quick response, any word you can give me on the progressive trait, or should I look into working on this myself? I'm not a master of trait effects like yourself, but I could give it a go if you're no longer interested.

The traits coming, I'm re-organizing all the old code I made. Busy in real life at the moment so everything I'm doing seems slower.

You could also use python to convince the AI to build Leonardo. Either GameUtils or EventManager - I forget which - has AIChooseProduction which isn't too hard to write for.
 
Hey Tsentom, back again with another question. Is there a way to tie building a wonder to founding a random corporation? My thought is that you could build the Empire State Building and it founds a random corp without expending the great person or needing the technology.

If it can be done, would either be willing to do it or give some pointers on how to do so for myself? I'm willing to give it a try and I know you do about 8 billion things already, but I just didn't want to muck about until I knew if it was even possible.

Thanks,
Seasnake
 
Hey Tsentom, back again with another question. Is there a way to tie building a wonder to founding a random corporation? My thought is that you could build the Empire State Building and it founds a random corp without expending the great person or needing the technology.

If it can be done, would either be willing to do it or give some pointers on how to do so for myself? I'm willing to give it a try and I know you do about 8 billion things already, but I just didn't want to muck about until I knew if it was even possible.

Thanks,
Seasnake

Since corporations are founded by the building being built, it's actually relatively easy to found one through python. You can use something like:

Code:
Corp1 = "BUILDING_CORPORATION_1"

pCity.setNumRealBuilding(gc.getInfoTypeForString(Corp1), 1)

To set the building in the city and thus found it. You could use a random number generator to decide which corporation, as well. You just have to make sure to check to see which corporations have already been founded.
 
HI,Tsentom1. I´m last monts out of internet but for this while I can be here. I have one a little request, ...
Is, please, possible write some code for building what can release greater city limit as in Civilization2?
My idea is max limit 30 city size and over only with some building, for examle Sewage Treatment Plant by Asio?
Please, can you write some code for it
thanks for answer
Hrochland
 
you would need to edit the voting AI for a new resolution. a world project should be easier.
 
I get problems when trying to download the Hermetic Order of Golden Dawn.

When I click on Download File in the database a new Internet window opens that says "The webpage can't be shown".


Gurra09
 
Hey everyone, sorry I sort of vanished there for a bit. Some personal stuff has come up that I've been taking care of - still taking care of actually. Don't worry, I fully intend to continue working and will probably have an update when everything is taking care of. Until then, please bear with me and I'm sorry for not responding to all your posts and PMs.
 
The Golden Gate Bridge Wonder has three errors, one will crash the game.

1. Crash: The CIV4ImprovementInfos.xml file is missing the following line:

Code:
<bPeakMakesValid>0</bPeakMakesValid>

Note: This occurred because I have the Mountains Mod installed. If you don't have that mod you don't need this line.


2. The CIV4ArtDefines_Building.xml file has an incorrect path:

Code:
<Button>Art/Bridge Button.dds</Button>

The Fix:

Code:
<Button>Art/Bridge/GoldenGateBridge.dds</Button>


3. The path Art/bridge folder is missing the dds image file of the bridge. I created the DDS file (See Attachment).


Orion Veteran :cool:
 

Attachments

Back
Top Bottom