Need help for modding the AI

Hello,

Does anyone know what lines must be modified to increase the amount of money/resources an unfair AI is getting? I'm trying to give the AI a slight increase in resources, hoping that it will make him more competitive.

Thanks in advance.

3,496 views 7 replies
Reply #1 Top

I don't believe those can be changed. Maybe in the future. IC is progressively making more things data driven and moddable, and I imagine something like this would be an easy one.

Reply #2 Top

isnt there a multiplyer for it in the gmapley.constants file based on the difficulty you set? i take a look and see if i can find what your looking for.

Reply #3 Top

Not that I remember. There are weight values for the AI personalities, but unless they snuck in the resource bonuses somewhere, that shouldn't be there.

Reply #4 Top

ok i checked some files but it seems i was wrong, any how if you want to increase the rate of income it'll have to be for everyone not just the ai.

or look for these lines in your gameplay.constant 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

the higher the numder after each line the more important (atleast i think so since agressive shipbuild is set to 10 which spawns more ships). and if you want them to run away les often go into the gameplay.constant file in ENTRENCHMENT (since there is no line in vanilla that i saw) and set "aiRetreatThreshold" to .xx (.25 being 25% decrease to lower retreat chance)

Reply #5 Top

Thanks for the quick replies, guys.

I'm gonna try toying with "gameplay.constant" file, as this method might be a good approach for what I want to obtain. As far as I can tell, those lines represent the priority of each category, but the main problem will be the resources available to the AI - which I think they are insufficient for a rapid and strong development.

Another thought that I have regarding this is that maybe the AI is not programed to develop that quickly in the first time, so I might be trying in vain.

Reply #6 Top

here try this and see how it works for you:

table-Aggressive
   BuildShip 10
   BuildModuleTactical 2
   BuildModuleCivilian 6
   BuildModuleResearch 5
   UpgradeResearch 6
   UpgradePlanetArtifactLevel 1
   UpgradePlanetPopulation 5
   UpgradePlanetInfastructure 3
   MaxBountyBidCount 3

i dont know how much good that will do but it might help (i dont know if by increasing the civie build count if it will just spam those antenna things or trade/refinerys)

Reply #7 Top

Ability to access the AI code directly would rock my world! AI modding is my specialty and my current mod (soon to be announced) is already experiencing some issues with AI trying to do things that are no longer possible.