• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

unmerged(96046)

Second Lieutenant
Apr 2, 2008
150
0
Some questions I have, answer the ones you know:

1. Can you mod the AI in any other way besides the .ai files?

2. I want a country to be more aggressive towards certain countries than others, but you can only put potential targets on a "hit list" in the .ai file, without any particular order. Any solution?

3. Can you mod the AI to only explore, but not colonize?

4. Can you mod the AI to only colonize a single province, and nothing else? For example, in vanilla, I want Aztecs to colonize Tampico, but nothing else.

5. Will the AI colonize at all if it has used up all of its colonizing locations, but has an expansion value over 0?

6. I see in some mods, like AGCEEP, that a country has multiple .ai files, how does the .ai know when to switch between them?

7. Can you change type of goods produced in a province via an event?

8. What does the "ferocity" setting in the .ai file mean exactly.

9. This does not regard modding, but where can I find a list that says which province belongs to which region/area? I know the info is in the province.csv, but it is a little cumbersome to read that list.

EDIT: One more: 10. There are those global events, but can I add my own events that will affect every country in the world?

Many thanks.
 
Last edited:
mmrnmhrm said:
Some questions I have, answer the ones you know:

1. Can you mod the AI in any other way besides the .ai files?
Not that I know of.

2. I want a country to be more aggressive towards certain countries than others, but you can only put potential targets on a "hit list" in the .ai file, without any particular order. Any solution?
Not that I know of.

3. Can you mod the AI to only explore, but not colonize?
Only by changing things in province.csv, as far as I know.

4. Can you mod the AI to only colonize a single province, and nothing else? For example, in vanilla, I want Aztecs to colonize Tampico, but nothing else.
For that special case, you can make an AI that's set to colonize (and they only know one uncolonized province, right?), then trigger an event once it's colonized that switches them back to their default AI.

5. Will the AI colonize at all if it has used up all of its colonizing locations, but has an expansion value over 0?
I don't know.

6. I see in some mods, like AGCEEP, that a country has multiple .ai files, how does the .ai know when to switch between them?
Events. There's a file in the AI folder called AGCEEP_AI_Events.eue; that's where all their AI-switching events are.

7. Can you change type of goods produced in a province via an event?
No, unfortunately.

8. What does the "ferocity" setting in the .ai file mean exactly.
Ferocity = yes means that the AI will never make peace. You'd have to make an event that switches to a non-ferocity AI file a certain time later.

9. This does not regard modding, but where can I find a list that says which province belongs to which region/area? I know the info is in the province.csv, but it is a little cumbersome to read that list.
I'm not sure. There might be maps like that somewhere, but all I could find was these.

EDIT: One more: 10. There are those global events, but can I add my own events that will affect every country in the world?
No non-random event can fire more than once, so I guess that would be a no. If no country or province is listed in the event, it will just fire for the player.

Many thanks.
Also see IDLF's AI Bible; it's very useful. :)
 
mmrnmhrm said:
2. I want a country to be more aggressive towards certain countries than others, but you can only put potential targets on a "hit list" in the .ai file, without any particular order. Any solution?

You might add just the certain countries to hit list, then switch to standard AI after they are taken. But this would work only if the country (or its alliance) is much stronger than the target (or targets alliance).

3. Can you mod the AI to only explore, but not colonize?

Set expansion to 0, but list some area/regions the AI should explore and give it an explorer. It's not tested afaik so I don't know if it works. It might.

5. Will the AI colonize at all if it has used up all of its colonizing locations, but has an expansion value over 0?

I guess it would colonize all cities under 5k population.
 
Last edited:
Thank you for your replies, especially the link to IDLF's Bible. A very interesting read :)

Another useful resource I found is Havard's EU Editing Pages, though it has to do more with editing events and scenarios: http://home.broadpark.no/~havmoe/EU/
He has a list of regions and areas, and which provinces belong to them.

It turns out that it is impossible to make Aztecs colonize only Tampico. Tampico belongs to the "Sonora" region, but so do other uncolonized provinces that Aztecs know of. If Aztecs are ordered to colonize Sonora, they prefer provinces Coahuila and Mazatlan.

Perhaps province.csv might be modified to move Tampico to the "Azteca" region, but it may be that this feature is hardcoded. Does anyone know whether modifying regions/areas works?
 
It shouldn't be a problem, as far as I know.
 
yes, it works to some degree.
In your case it should, but after colonizing desired province AI will go after any free prov.

Some heavy scripting would be required to let the AI know it just colonized such province and switch to another AI with expansion 0, then add about 900 pops to that colony through event so it becomes the colonial city.
Imho it's much simplier to just add that province to Aztecs in scenario file.:)
 
szmik said:
Some heavy scripting would be required to let the AI know it just colonized such province and switch to another AI with expansion 0, then add about 900 pops to that colony through event so it becomes the colonial city.

Two events equals heavy scripting? :confused:

In fact, you could do it all in one.

Code:
event = {
	id = 
	trigger = { 
		ai = yes 
		owned = { province = xxx data = -1 } #Tampico
	}
	random = no
	country = AZT
	name = "AI_EVENT"
	desc = "Stop colonizing"

	date = { day = 1 month = january year = 1419 }
	offset = 1
	deathdate = { day = 1 month = january year = 1820 }
	action_a = {
		name = "Change to Non colonizing AI"
		command = { type = ai which = xxx.ai } #Non-colonizing AI
		command = { type = population which = xxx value = 900 } #Tampico
	}
}

Actually, you wouldn't want to do this unless you made sure that the AI was set only to form colonies. Otherwise, you'd be trying to add 900 to a trading post.

Also, the only reason to really do this, is if you want the Aztecs to only take the province later on, so presumably you'd start them off non-colonial and then have a change to the colonizing AI before this event.