AI file(s) location?

Anyone know where the files containing the AI logic live?

6,168 views 6 replies
Reply #1 Top

Somewhere in the game executable. Sadly you can currently only mod a very limited amount of the AI. If that wasn't the case I'm sure someone would have developed a super AI mod that would have put the Devs to shame. What little you can do is probably somewhere in the gameplay.constants file, though I can't tell you where unless you say what you had in mind.

Reply #2 Top

Thanks GeoFan.

I was hoping to alter the logic strings (i.e., how it chooses targets, how it allocates resources, battlefield tactics choices that ships make), etc. You're right, though: if it was feasible, it probably would've been done extensively.  

Looking through gameplay.constants now; good stuff... yet it doesn't look like we can really change "how the AI thinks" from here.

If anyone knows how to mod the executable, I'd also like a space pony :inlove:  

 

Reply #3 Top

Galaxy Forge lets you choose which planets have what abilities/artifacts I believe.

-Twilight Storm

Reply #4 Top

Good reply... I didn't even see it coming.  LOL

Reply #5 Top

For others looking to mod the AI, this is what I found in gameplay.constants relating to AI:

  1. Resource priorities for the different AI "personalities", but not logic, heuristics, etc.
  2. Some diplomatic settings/triggers.
  3. Nothing related to ship AI, battlefield tactics, or strategy.

For reference, I've pasted the relevent text from the file:

 

playerAISharedDef

table-Aggressive

BuildShip 10

BuildModuleTactical 2

BuildModuleCivilian 1

BuildModuleResearch 1

UpgradeResearch 2

UpgradePlanetArtifactLevel 1

UpgradePlanetPopulation 1

UpgradePlanetInfastructure 1

MaxBountyBidCount 5

table-Defensive

BuildShip 5

BuildModuleTactical 5

BuildModuleCivilian 1

BuildModuleResearch 1

UpgradeResearch 2

UpgradePlanetArtifactLevel 1

UpgradePlanetPopulation 1

UpgradePlanetInfastructure 3

MaxBountyBidCount 5

table-Research

BuildShip 5

BuildModuleTactical 2

BuildModuleCivilian 2

BuildModuleResearch 2

UpgradeResearch 5

UpgradePlanetArtifactLevel 2

UpgradePlanetPopulation 1

UpgradePlanetInfastructure 2

MaxBountyBidCount 10

table-Economic

BuildShip 5

BuildModuleTactical 2

BuildModuleCivilian 5

BuildModuleResearch 1

UpgradeResearch 2

UpgradePlanetArtifactLevel 2

UpgradePlanetPopulation 5

UpgradePlanetInfastructure 2

MaxBountyBidCount 15

playerDiplomacyAIDef

offerOrAcceptTreatyHappinessThreshold:Trade 0.25

offerOrAcceptTreatyHappinessThreshold:ExternalVision 0.80

offerOrAcceptTreatyHappinessThreshold:InternalVision 0.95

offerOrAcceptTreatyHappinessThreshold:CeaseFire .50

offerOrAcceptTreatyHappinessThreshold:PeaceTreaty .90

breakTreatyHappinessThreshold:Trade 0.10

breakTreatyHappinessThreshold:ExternalVision 0.50

breakTreatyHappinessThreshold:InternalVision 0.75

breakTreatyHappinessThreshold:CeaseFire .25

breakTreatyHappinessThreshold:PeaceTreaty .75

timeBetweenTreatyOffers 300

timeBetweenQuests 180

Reply #6 Top

Quoting tymestar, reply 2
Thanks GeoFan.
I was hoping to alter the logic strings (i.e., how it chooses targets, how it allocates resources, battlefield tactics choices that ships make), etc. You're right, though: if it was feasible, it probably would've been done extensively.  

Looking through gameplay.constants now; good stuff... yet it doesn't look like we can really change "how the AI thinks" from here.

If anyone knows how to mod the executable, I'd also like a space pony 
 
End of tymestar's quote

Yeah, that kind of thing really isn't possible to you. You can somewhat alter its build order through the statcounttype in each ship's entity file. However, if the AI actually bases its build order on what you've build, it would likely just make matters worse.

Sadly I doubt we'll get to be able to mod the exe for a while, though I'm hoping someone or the Devs will do it once the final version of diplomacy is released. An option to remove the 2GB limit would also be an awesome final present for modders.