User avatar
Hobbes
Posts: 4378
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

ChgLocalInterest question

Sun May 17, 2009 3:39 pm

Hi folks, I have an objective region that I would like AI controlled Indians to attack around 50% of the time. At the moment they always seem to attack the region as soon as they are able.

Is there a number I could put into the AI.ChgLocalInterest to make the chance of attack more variable? I suppose I'm wondering if an objective just causes the game to add an automatic AI.ChgLocalInterest. If so I wonder how much interest an objective gives the AI if this is the case? 200?

I could always fire an event with a % probability to change local interest but I would be interested to find out more about how the AI works in this area. If I fire an event to change local interest would the game just ignore this for an objective or strategic region?

Any thoughts?
Thanks, Chris

P.S. I assume you can make areas of ocean or lake of interest to the AI without having an impact on AI land units?

User avatar
Pocus
Posts: 25418
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Tue May 19, 2009 9:56 am

ChgLocalInterest alters the value, but it won't give you a fixed probability to have the region fixed as a goal, as the goal we are talking about (attack this region) is competing with others... and as you don't know how the others goals will be appraised, you can't really know the end chance that your initial one will be picked. clear as mud I know :)

Objective or strat city status boost local interest, clearly. You can (in error logging mode) check in the Logs\AI folder the file AI Dump.txt which will give you the end interest of a region (plus others things). This can allow you to see what's going on for a particular region, when you add or not an objective there.

if you change the local interest, it will have an impact, that the region is an objective/strategic location or not...

Yes you can change the interest of lakes and such but I'm unsure it will have an effect as the command was geared toward land units... I would need to check.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Hobbes
Posts: 4378
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Tue May 19, 2009 12:34 pm

Pocus wrote:ChgLocalInterest alters the value, but it won't give you a fixed probability to have the region fixed as a goal, as the goal we are talking about (attack this region) is competing with others... and as you don't know how the others goals will be appraised, you can't really know the end chance that your initial one will be picked. clear as mud I know :)

Objective or strat city status boost local interest, clearly. You can (in error logging mode) check in the Logs\AI folder the file AI Dump.txt which will give you the end interest of a region (plus others things). This can allow you to see what's going on for a particular region, when you add or not an objective there.

if you change the local interest, it will have an impact, that the region is an objective/strategic location or not...

Yes you can change the interest of lakes and such but I'm unsure it will have an effect as the command was geared toward land units... I would need to check.


That's very helpful - thanks Philippe! :thumbsup:

Chris

User avatar
Hobbes
Posts: 4378
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Sat May 23, 2009 10:56 pm

"Yes you can change the interest of lakes and such but I'm unsure it will have an effect as the command was geared toward land units... I would need to check."

I just tested this by making lake st Clair (adjacent to Detroit) a region of interest. It would be nice if the Indians could concentrate their canoes here as they could interdict British supply into the fort at Detroit.

The Indian canoes tend to zoom all around the great lakes usually but with this set they appear to stay more in this area (but not easy to say for sure). However with this setting I have seen Pontiac attempt a couple of amphibious invasions against Detroit which is a little worrying :) I think I will avoid setting lake regions as areas of interest for the moment.

Athena generally is playing a pretty good game I think from my testing so far - but who really wants to play anything other than PBEM ;) .
Cheers, Chris

User avatar
Hobbes
Posts: 4378
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Fri Aug 05, 2011 9:14 pm

Hi folks, 28 months later and I finally realise that I should be using SetLocalInterest rather than ChgLocalInterest! :eek:

The odd thing is that Pontiac worked fine with this misconception - even though I have been adding to the AI interest in regions that I want to reduce by using ChgLocalInterest rather than SetLocalInterest.

Just to clarify - all regions have a basic interest of 100? The lowest I can set I assume is zero (although I set to 1 in case zero causes a problem - I assume no point in setting a negative interest).

What is the maximum interest worth setting? 500? I've looked at the wiki entry but I'm still not sure.

Thanks, Chris
P.S. I do think it worth having an interest setting that would make the AI actively avoid a region (even for movement?) unless a large enemy force (> x) was present in the region (i.e. don't bother with a region if there is just a small garrison - up to the scenario designer to use this well).

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 2 guests