Per-Region AIPARAMS files

Have a question about how to mod something? Or have an issue with one of our mod tools? Post here.

Moderators: Balthagor, Moderators

User avatar
George Geczy
General
Posts: 2688
Joined: Jun 04 2002
Location: BattleGoat Studios
Contact:

Re: Per-Region AIPARAMS files

Post by George Geczy »

number47 wrote: May 21 2018 Is it possible to make country build more tanks and infantry and less (or almost none) artillery and AA units by modding the AIparams file? And if yes, how would I do it? :D
Yes, but only for all AI's, not country specific unfortunately. Although you *can* set them differently for defense/mixed/offence priorities.

The AIParams file has the &&BUILDSEQUENCE element, which sets what classes the AI will build - it will cycle through the list of 16 (separate lists for land/sea/air). So if you did 0,0,0,2 etc you'd get three infantry and one tank.

https://supremeruler.gamepedia.com/AI_Params_file

-- George.
User avatar
number47
General
Posts: 2655
Joined: Sep 15 2011
Human: Yes
Location: X:913 Y:185

Re: Per-Region AIPARAMS files

Post by number47 »

Thanks George!
"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr
User avatar
number47
General
Posts: 2655
Joined: Sep 15 2011
Human: Yes
Location: X:913 Y:185

Re: Per-Region AIPARAMS files

Post by number47 »

George, just to clarify:

&&BUILDSEQUENCE - works only globaly

&&UNITWEIGHTING - works only globaly

&&MISSILEWEIGHTING - works only globaly

&&AIREQRESPONSE - can be region specific

Is this correct?
"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr
User avatar
George Geczy
General
Posts: 2688
Joined: Jun 04 2002
Location: BattleGoat Studios
Contact:

Re: Per-Region AIPARAMS files

Post by George Geczy »

number47 wrote: May 24 2018 George, just to clarify:
&&BUILDSEQUENCE - works only globaly
&&UNITWEIGHTING - works only globaly
&&MISSILEWEIGHTING - works only globaly
&&AIREQRESPONSE - can be region specific
Is this correct?
Hmmm, I'm pretty sure that AIREQRESPONSE is also global - all AI and even the human minister AI will work off that list. I don't think that could be made different for each region.

-- George.
User avatar
number47
General
Posts: 2655
Joined: Sep 15 2011
Human: Yes
Location: X:913 Y:185

Re: Per-Region AIPARAMS files

Post by number47 »

But wait...what's your first post in this thread about then???
---- How to specify AIPARAMS for different regions

First of all, every game MUST have those sections for default regions - which means the region number is 0 or blank. Any region without its own custom section will use the default section.

To add new custom sections per region, just do it the same way as the default sections but add the region number at the end of the && line, for example:
&&AIREQRESPONSE 1188

That specifies region 1188, SR1936 Germany
This part made me think it is possible to make region specific instruction...and the thread IS called Per-region AIParams files HUH

Was this just never implemented or I completely misunderstood this thread?
"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr
User avatar
George Geczy
General
Posts: 2688
Joined: Jun 04 2002
Location: BattleGoat Studios
Contact:

Re: Per-Region AIPARAMS files

Post by George Geczy »

number47 wrote: May 24 2018 But wait...what's your first post in this thread about then???
---- How to specify AIPARAMS for different regions

First of all, every game MUST have those sections for default regions - which means the region number is 0 or blank. Any region without its own custom section will use the default section.

To add new custom sections per region, just do it the same way as the default sections but add the region number at the end of the && line, for example:
&&AIREQRESPONSE 1188

That specifies region 1188, SR1936 Germany
This part made me think it is possible to make region specific instruction...and the thread IS called Per-region AIParams files HUH

Was this just never implemented or I completely misunderstood this thread?
Ooops [_]O

I think my developer docs are out of date.

And silly me for not reading the rest of the thread first [_]O

I seem to be encountering a lot of things that I had previously implemented and forgot about.

Yes, just checked the code, AIREQRESPONSE is per-region.

More specifically, there is a global default (when there is no region # after AIREQRESPONSE, that one is stored as the default one - used by any region that does not have its own defined). The global default is mandatory, and then each region can have its own that is different and will over-ride the global one.

Gawd, I don't even remember implementing that. But it was a good idea!

-- George.
User avatar
George Geczy
General
Posts: 2688
Joined: Jun 04 2002
Location: BattleGoat Studios
Contact:

Re: Per-Region AIPARAMS files

Post by George Geczy »

And to correct myself even more - As of the update in 2014 ALL of the items ARE region specific.

&&BUILDSEQUENCE - &&UNITWEIGHTING - &&MISSILEWEIGHTING - &&AIREQRESPONSE - all can be region specific

Without a region number, it is the global setting - with a region number, it is specific to that region and overrides the global setting.

Blah, I will try to update the gamepedia wiki on this tomorrow.

-- George.
User avatar
number47
General
Posts: 2655
Joined: Sep 15 2011
Human: Yes
Location: X:913 Y:185

Re: Per-Region AIPARAMS files

Post by number47 »

Thanks for clarifying! :lol:
"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr
User avatar
George Geczy
General
Posts: 2688
Joined: Jun 04 2002
Location: BattleGoat Studios
Contact:

Re: Per-Region AIPARAMS files

Post by George Geczy »

I've updated the Gamepedia wiki page to reflect the per-region information for the AIParams file.

Thanks for pointing it out.

-- George.
Post Reply

Return to “Modding Issues & Support”