Loooking for expert AI input

NusRa

Chieftain
Joined
May 13, 2011
Messages
16
Location
USA
To the best that i've been able to piece together, from reading about unit AI info on forum( and there isn't much to read) and looking at the xml files with AI embedded in the .py file names.

It appear that if clipping and pasting one of the entries in an xml file and changing a few values, one would think a unit assigned this AI would have a new AI to work with.

And, this is my question, is it not true, just adding a new unitAI will not have the computer players use this, as per Civ4AutomateInfos.xml changes must be reflected in CvEnums.h
In addition when this file is inspected, and other sdk files used to build the game, one can see that many of the AI algorithms are hard wired and xml changes don't just add a new AI feature to the game without programming in c the AI methology.
Is this a fair assement of Civ4.
Second, question, I have the sdk of 1.6, has there been a release of version 1.9, or 1.7
Thanks in advance for replies
NusRa
 
I understand, that by hook or crook, programming in python, AI behavior can be forced to do somethings that resemble AI control. However, this approach has many drawbacks. Namely that within the game turn scope, the computer may, and most likely, assign a new AI direction to a unit beIcause the AI does not reconize the python AI assignment to the unit and will likely re-order the unit to do something else.
Is this also a fair assessment?
 
When it comes to BtS AI programming, that there is no effective why to add new AI xml behaviors without programming c.

If that is true, is there a means to give a AI player, pseudo AI behavior, by using the event and mission model of python and xml scripts.
In a nut shell that is the only effective means to program AI behavior.
 
Just found out the answer to the query about release of sdk for BtS, it is in the CvGameCoreDLL folder of the game install location,which means v1.7.
I've been using downloaded sdk 1.6 as a guide
Great, I'll be firing up me compiler.

Cause if there is a will, there is way.

Objective, is I am trying to make the game play more covetous of bonus reasources on the map, and the AI players more apt to think strategically about these reasources(that is reasources outside it's cultural borders). Its more of exercise in programming, then the newest and latest mod addition to the world of civ iv.
Hey, if anyone out the has, or knows of a nice overview(primer) of framework of .cpp and .h relationship to programming AI outcomes for the game, I am all ears. I know it is the holy grail of modding. A great leap forward, would definitely, put me in the position of some pro quid quo
Mtkorz36[at]gmail[dot]com
 
Assigning an AI type to a unit via python is easy enough. And in my experience, the AI doesn't switch AI types that often on its own.

To create a new UNITAI type does require reprogramming the SDK. As do adding new XML tags.
 
Tholal,
Thanks, with what you wrote.
I really didn't want to break from the original port of the game by making a new dll.
Alrhough, I am just getting started, with AI behavior/actions, i've become quite pleased with what can be done with python.
I am just not wanting to beat my head against a wall only to find out that there are limits.
Frankly, if I am to do this in python, my main issue will ultimating come down to how can CvArea, which I understand to be an algorithms to separate continents from each other, to within this continent area deterime what plots reside within cultural borders, then find a way to model a best plot location, to me it would seem that if it is city workable area this criteria would be meet. Then by looping through these twenty plots, test which one best meets a condition, as a human player would select it, I don't also see a reason not to exploit, the existing AI automation for conditions of where cities are set to achieve goals of increasing growth or production. Then just let the computer players, advance with new found reasoure advantages.

I know in any event, people who are hardcore to modding civ iv, are likely involved in own specific projects, and my own particual hell of coding is my own, this is to say what I am scripting in python doesn't make me special, nor deserves a drop what you are doing additude.
Like f'ing I perfer to do my own.
Its the re-creating the wheel process I looking to minimize, which is why I post to forum.
I am close to being happy to upload my work to community, not for the look at me, i've done something not done before effect, but to give a general case example, that i'm no newbie wasting wasting everyones time in need of not how to do it, but do it for me.
I am looking to get on the inside. Again, it is not issue of bells and whistles, but more of issue of how one approaches a problem, and ability to implement it that my example will illustrate my skill, and hopefully gain access to those that have gone before me.
Sincerely, thanks to all forum members.
 
It is very difficult to program specific AI unit behavior without getting into the DLL. Valuation for city sites and attack targets are all handled in the DLL and I dont know of any way to influence those choices via Python.
 
Back
Top Bottom