AI Modding, using more population

Hi. I just created my mod: “300 pop and more ores”. It does just what it is written, but i was wondering there is a way to edit the AI to also use the 300 population, even on hardest it tops about 170-190 total population. Is there someone who knows where i can find this parameters and how do they work?
Thank to whoever answer.

1 Like

The dev script “dev\cheatscript.lua” uses “Player_SetPopCapOverride(player, limit)”.
So it should work from a custom script also.

Im going to check, thank you. Do you have any info on how to edit this value?

It is a LUA function and you have to implement it in a LUA script.
Either in a custom script or by mod’ing an existing default AI script.

It seems more complicated than i thought… Please, could you simply show me how to change only this value? I reached scardoc in the file editor, but i can’t find that string, nor i understood how to edit those values

Like I mentioned above: I saw this function in the file “dev\cheatscript.lua”. So maybe it works in the dev console only.

Open the editor’s script documentation and search for “popcap”. You’ll find several functions with explanations.

For further infos heed the notice in script doc
“You can learn more about how to achieve this in the Creating a Script documentation for either Crafted Maps or Game Modes.”