Galciv III (more likely IV) modding capability REQUEST

GalcivII & III were massively open to modders, with the xml structure in III much improved over the already great one in II, but with the AI as it is, Brad's post on ai & some of the amazing coding stuff upcoming on coursera  over the next several months (informatics, big data mining/crunching "Heterogeneous Parallel Programming", and more) I've been getting more and more curious about the possibility of ai programming in GalcivIV & how cool it might be  to mod different ai's in for different races given the capability to do so.

 

so here's me hoping that we might be able to write ai's for GalCivIV :)

4,589 views 3 replies
Reply #1 Top

I think it is a cool idea, but hardly workable.

Unless the AI code is opened (exposing all the evaluation routines) and fully documented (I highly doubt opening the source code will happen)

Still the current implementation is enough to add flavour (altering priorities). The following code fragments are from the FactionDefs file

Code: xml
  1.         <AICategoryWeight>
  2.             <Military>16</Military>
  3.             <Growth>8</Growth>
  4.             <Tech>12</Tech>
  5.             <Diplomacy>20</Diplomacy>
  6.             <Expansion>18</Expansion>
  7.             <Wealth>14</Wealth>
  8.             <Influence>10</Influence>
  9.             <Fortification>6</Fortification>
  10.         </AICategoryWeight>

Terran

Code: xml
  1. <AICategoryWeight>
  2.             <Military>20</Military>
  3.             <Growth>16</Growth>
  4.             <Tech>14</Tech>
  5.             <Diplomacy>6</Diplomacy>
  6.             <Expansion>18</Expansion>
  7.             <Wealth>10</Wealth>
  8.             <Influence>8</Influence>
  9.             <Fortification>12</Fortification>
  10. </AICategoryWeight>

Drengin

 

Still I would love to see more levers, for instance Biases (I have a bias for certain weapons)

And some exposed behaviors (If at war, likelihood to pirate trade routes, likelihood of using planet destroyers...)

Reply #2 Top

not really on the documented front.   just an example like the current 0.7x Ai 's code (or even a couple more basic ones.). Oddly enough, the rudimentary nature would work in favor of the example factor. galccivIi's XML files were not documented & no schemas but lots of modding happened.

 

the game would not need to be able to compile aai by default even, all that would be needed is a directory it looks in like mods and included (or downloadable) example source. The nature of what's being done means that directions for how to modify & compile it yourself doesn't need to be given since "you should learn some basic c++ but   he ai is q great way to leatn/practice more advanced Ai algorithm types here are some good pllaces/ways you can learn" from the community itself will do it

Reply #3 Top

I'm on phone or would edit my post. The things you grabbed fromfactiondefs are used for determination of tech treepaths, up resolution voting preferences, and a few other things. You. Can find weights in the fml files for all of that that correspond to it. For determining how to play, the Ai uses   other stuff & looks at the game not entirely unlike you and I going by Brad 's example code snippet.

the aicategorhwieghts can have more in the xmls almost certainly if you wanted to add more, alternately you could tweak the numbers on existing techs. As to your preferences note, right now we have them because beams are badly overpowered to the point of making other options irrelevant