naselus naselus

Strategic AI modding discussion thread

Strategic AI modding discussion thread

Not a thread for talking about how terribad the AI is, but a thread for discussing the contents of AI-related files and how we can mod them. I also want to keep tactical battle behaviour out of this thread - it's not really the same thing, since the player cannot really take advantage of it to the same extent.

 

Thus far, we appear to have determined that the AI is directly affected by the settings in the following files (I'll update this as we find more):

 

AIStrategydefs.xml - this largely determines the AI's spending and shipbuilding priorities, along with impacting on the tech choices.

Factiondefs.xml - This has some bearing on the AI's tech choices

Governordefs.xml - This determines what the AI builds on planets.

Galciv3AIDefs.xml - This sets difficulty bonuses, and controls AI diplo and combat behaviour.

*techdefs.xml - these have AI category weighting on the techs to help determine which technologies they like.

 

It will also only build ships that are defined in Shipblueprintdefs.xml, which for our purposes counts as the 'shipyard AI' (though the player also has access to these blueprint types).

 

If you find any more, report them here and I'll add them to the list; if you find how an AI settings works or what it does, post it and I'll add it to the posts below (only for AIStratdefs, Factiondefs and Galciv3AIDefs - the other two are pretty much just build queues). let's discuss how to make it work better.

 

EDIT: I dug up this thread: http://forums.littletinyfrogs.com/462863/GalCiv_III_AI_moddingscratch_pad where Brad explains how AI tech choices work, which might come in handy.

45,855 views 54 replies
Reply #51 Top

Have had to ditch the strategic resource stuff. While the AI was actually handling it pretty well, it appears that they can ignore strategic resource costs when upgrading. Also, it caused their blueprints to out-tech themselves, which just forced the AI to stop building. I suspect we'd need something more akin to the AI ship designing in GC2 to get round that. I'm keeping the durantium cost on hulls, though, since the AI can't upgrade hull sizes and will always be able to produce the smallest ships even if it runs out.

 

I'm gonna start writing up some mid-game AI scripts over the weekend, probably covering turns 100-200; then I'll move the end-game strats to around turn 200 and see what happens.

Reply #52 Top

Quoting naselus, reply 50

https://www.dropbox.com/s/u0oyvn1nejy5uy4/iabwip.rar?dl=0

 

This is the whole lot that I'm currently using. AI strategies are in the non-standard files, all of which are called '*strat.xml'.

 
End of naselus's quote

 

Thanks mate.

 

Just finishing moving here (it was a bitch to get the deposit back) and with a bit of luck I'll be back to contributing next week!

Reply #53 Top

Quoting TurielD, reply 52

Just finishing moving here (it was a bitch to get the deposit back) and with a bit of luck I'll be back to contributing next week!

End of TurielD's quote

 

Believe me, I know the feeling :) I'll probably be publishing the proper version of the mod tonight, with the resource stuff removed and a few other tweaks.

Reply #54 Top

Found this in the schema (schema/enums/AIshiptypes.xsd):

 

Code
  1. <xs:simpleType name="AIShipAssignmentTypes">
  2. <xs:restriction base="xs:string">
  3. <xs:enumeration value="GatherAtRallyPoint"/>
  4. <xs:enumeration value="DecideDestination"/>
  5. <xs:enumeration value="WaitForFleet"/>
  6. <xs:enumeration value="UpgradingShip"/>
  7. <xs:enumeration value="MoveTowardDest"/>
  8. </xs:restriction>
  9. </xs:simpleType>

 

I'm wondering if this represents pretty much the whole of the AI's possible options for a given unit. And, more importantly, I'm wondering if there's some way we can use this in the xml to get the AI to build up fleets more aggressively...