Weak AI economic side

My question is if its possible to change for example number of tradeports ai builds per planet,

they have tendention to build more research buildings then required (above 8) and usually build tops 1 trade port per planet... in most mods there are planets that allow WAY MORE logistic slots then default game, but ai doesnt use them well... any idea if this is hardcoded or is it possible to anyhow make them build more ports / use planets better ??

3,716 views 11 replies
Reply #1 Top

Hardcoded.

 

I have never checked, but if the buildings have roletypes you could possibly give the trade ports extra roletypes and the AI might build them more often. This is a tactic I employ with ships to diversify AI fleets.

Reply #2 Top

Quoting IskatuMesk, reply 1

Hardcoded.

 

I have never checked, but if the buildings have roletypes you could possibly give the trade ports extra roletypes and the AI might build them more often. This is a tactic I employ with ships to diversify AI fleets.
End of IskatuMesk's quote

 

damn well this seems to be higher level then i can handle :D could you maybe point/guide me a little more in this? ,btw thanx for answer

Reply #3 Top

Well, like I said, I haven't looked at buildings before. But it looks like they have similar structure to ships.

planetModuleRoleType "WEAPONDEFENSE"

 

This is what you'd want to be changing. However, I don't think you can give buildings multiple roletypes. You'd find something the AI builds often (e.g. research centers) and give the same roletype to the building you want them to build more often. Chances are, though, the game will crash if they lack some critical stuff e.g. if you just entirely removed the trade center roletype, assuming you have one. In the best case scenario they'd have both. This can be done with ships, but buildings might be significantly more annoying.

 

Unfortunately, the way the Ai actually handles building everything is entirely hardcoded. It's not really an AI at all, to be honest.

Reply #4 Top

Quoting IskatuMesk, reply 3

Well, like I said, I haven't looked at buildings before. But it looks like they have similar structure to ships.

planetModuleRoleType "WEAPONDEFENSE"

 

This is what you'd want to be changing. However, I don't think you can give buildings multiple roletypes. You'd find something the AI builds often (e.g. research centers) and give the same roletype to the building you want them to build more often. Chances are, though, the game will crash if they lack some critical stuff e.g. if you just entirely removed the trade center roletype, assuming you have one. In the best case scenario they'd have both. This can be done with ships, but buildings might be significantly more annoying.

 

Unfortunately, the way the Ai actually handles building everything is entirely hardcoded. It's not really an AI at all, to be honest.
End of IskatuMesk's quote

 

well i tried to set planetModuleRoleType to SPACEMINE, and increased BuildMines to 10 in gameplay.constants , game is not crashing, tho it seems it has no effect (i changed it at all ai types for tests...) are u sure that planetModuleRoleType is what makes ai choose what he builds? thanx for answer again

Reply #5 Top

owkay this is gonna be tough, tried alot different values, with spacemines its not working :/ i might try it with type of lab as u adviced... or typical def building... anyway if anyone has any hints their still rlly appreciated :)

Reply #6 Top

Both the roletype and stat count type effect the way the AI builds ships but, like I said, I have no idea how it works with buildings.

Reply #7 Top

Quoting IskatuMesk, reply 6

Both the roletype and stat count type effect the way the AI builds ships but, like I said, I have no idea how it works with buildings.
End of IskatuMesk's quote

well when i changed roletype to space mine, result was that ai dont build tradeports anymore at all, even when buildmines was rapidly increased... the statcounttype is on mines set to "invalid" so i doubt this would help me anyhow :/ gonna test it with roletype on research lab

 

EDIT : ok tested with research lab roletype, this causes game to mini dump.... so it seems it wont work this way... anyone who solved this already? seems its harder then it looks :/

 

Reply #9 Top

The modders typically way of making the AI suck less hard is more or less what the devs do... give them cheats.  ;)  That way they can waste resources on stupid extra labs, but it will hopefully still have enough that it might build some things that are actually a threat.

BuildMines only works for a structure that then create mine entity types, it will have no effect on normal structures.

Personally I guess I haven't really bothered to count if the AI will build more than 8 labs of each, but if that is a big problem perhaps the best answer is to create an AI only tech that requires 8 civic labs that will unlock an ability that will cause labs to generate some credits on their own. That way the labs can function like trade ports (kind of) once they 8 or more of them, so AI building too many labs in less of an issue.

Reply #10 Top

Oh yeah, they build way too many labs. I see them building them by the dozens in my deathmatch map. I wonder if there's a way you can just lock out labs for them after they hit a certain number.

Reply #11 Top

well i explored many ways of solving this, and all that happened leaded to either AI not building anything, or minidump in time they should build port, either i didnt solved building more then 8 labs... seems there is too much hardcoded stuff to let us fix it :/ anyway in many mods like for example maelstrom, if u build up ur economy well, and u play on balanced map (that doesnt contain XXXXX legendary planets) you STILL make more credits then unfair AI, that have more planets then you do... still thinking up on solution, as it still nerfs the coop games... its like once u get economy advantage over AI, whole game turns into "watch n control the fight as u have nothing else to do, then wait ur army to reach other planet n repeat"... maybe i just want too much of it, but with this we usually with friends end in point where "we have enough resources and planets, and we know ai wont handle, as we have huge fleets and ai barely manage to build something", after the game statstics prooves we was right :/ (we thought that increasing difficulty will help, sadly it didnt, jsut take us longer to get the advantage)