Make AI Garrison idle Military units.

Modding, Map Editor, IES Scripting and Other Questions
Post Reply
PaulStretch
Posts: 112
Joined: 27 Jun 2021, 16:10
Has thanked: 45 times
Been thanked: 13 times

Make AI Garrison idle Military units.

Post by PaulStretch »

I'm curious if there is a way to encourage the AI to garrison idle military units in fortresses. My assumptions is that garrisoning idle units improves game performance.

User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Make AI Garrison idle Military units.

Post by Dr.MonaLisa »

I doubt any AI behaviour modification (except changing what they should produce/build) is possible. It's probably all hardcoded :/
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
PaulStretch
Posts: 112
Joined: 27 Jun 2021, 16:10
Has thanked: 45 times
Been thanked: 13 times

Re: Make AI Garrison idle Military units.

Post by PaulStretch »

Any ideas how units affect performance the most? I did a test skirmish with where 2 players each had at least 2000 citizens. Even though most of them were Idle, the game lagged heavily. You might think it's the amount of models, but the thing is when you pause the game, there is no lag even with that many units present. Perhaps it's just idle animations?
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Make AI Garrison idle Military units.

Post by Dr.MonaLisa »

I think it's mostly the AI players that are lagging in Singleplayer. The game also recalculates every unit position several times per "tick" (something like 10 times per second or more, I don't remember). The more units are in game, the more processor is used. Since EE2 only runs on a single CPU core, it slows down the game and causes FPS drop, while GPU (graphics card) is not even fully used :(
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
These users thanked the author Dr.MonaLisa for the post:
PaulStretch
PaulStretch
Posts: 112
Joined: 27 Jun 2021, 16:10
Has thanked: 45 times
Been thanked: 13 times

Re: Make AI Garrison idle Military units.

Post by PaulStretch »

Getting the feeling you already tried fixing this?
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Make AI Garrison idle Military units.

Post by Dr.MonaLisa »

Yes, I was looking at the performance issues many times, for a very long time. It's impossible to do anything more, without the source code of the game. And even with the source code it would be super hard and time consuming to rewrite the game to work on multiple cores. Even rich companies don't do that.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Post Reply

Return to “Questions”