Jump to content

AI pulling troops for offensives


Recommended Posts

If I have 2 garrison scripts running and the AI decides to attack on its own does it pull from larger garrison scripts 1st over small ones? Or does it pull the closest?

I am having trouble with the Russians garrisoning Murmansk. I have a 5 tile set for all of the finnish border. But they all seem to always break it every game.

I was thinking of making 1 garrison for murmansk itself and 1 for the other 4 border units.

Link to comment
Share on other sites

Big Al,

Sounds like something might be off in your scripts as the AI won't actually pull units from a Garrison position for offensives, i.e. either generic offensive planning by the AI or for those that you have scripted yourself.

Perhaps your Garrison plans are not kicking in or they are being canceled due to one of your conditions?

If it is a question of the units being assigned to an Offensive plan before they are in the Garrison position then this could be an issue as the Garrison plan only officially kicks in as active once the unit is in position. Otherwise un-assigned units are directed towards the Garrison position.

If this is the case then you can always set your offensive plans to initiate on condition of the desired units being in their Garrison positions first. In this case it might make it easier to use smaller Garrison plans, one per position etc., depending upon what you are trying to achieve.

Hope this helps,

Hubert

Link to comment
Share on other sites

Like this script holds the egypt corp at Alexandria but he never stays there. he gets pulled for offensive duty and my offenses are set to 1 (pull from other offs only).

Is it this #TACTICAL_CONDITION= 229,52 [0] ?? whats the range on this?

{

#NAME= UK Garrison - Egypt (Alexandria/Cairo)

#POPUP=

#FLAG= 1

#TYPE= 2

#COUNTRY_ID= 17

#TRIGGER= 100

#GV= 1[1,100]

#LINK= 0[0]

#LEVEL= 0

#LENGTH= 1

; Alexandria

#GOAL_POSITION= 226,50

#DATE= 1939/01/01

; Set friendly positions:

; 1st Line - Cairo

#FRIENDLY_POSITION= 229,52

; Set variable conditions:

; 1st Line - UK politically aligned with Allies and not surrendered

#VARIABLE_CONDITION= 1 [2] [100] [0]

#TACTICAL_CONDITION= 229,52 [0]

; Set dummy activate position (no units at position 0,0)

#ACTIVATE_POSITION= 0,0 [0,0] [0,0] [2]

#CANCEL_POSITION= 0,0 [0,0] [0,0] [0]

}

Link to comment
Share on other sites

The tactical condition range info should be contained in the script header notes, i.e.:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; TACTICAL ID REFERENCE VALUES

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; ANY= 0

; LAND= 1

; AIR= 2

; NAVAL= 3

;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

But off hand and one thing that immediately caught my attention is your cancel position... essentially it is always true and therefore always canceling your event. What you need is the following:

; Set dummy cancel position (single neutral unit at position 0,0). This is not possible as no

; unit can occupy tile 0,0 so event will not be cancelled due to #CONDITION_POSITION

#CANCEL_POSITION= 0,0 [0,0] [1,1] [0]

I would also suggest making use of the F2 - Debuglogs option as well as the 'Tab' and '~' keys as this will give you information on current plans held by the AI as well as specific plans held by each individual unit.

Hope this helps,

Hubert

Link to comment
Share on other sites

I do use the keys.

So question

; #TACTICAL_CONDITION= Tactical map position (resource) that currently MUST NOT be threatened for event to

; occur, i.e. plan owner should have tactical advantage over this position

; Format: x,y [tactical_flag]

Exactly what does it mean threatened? I will assume that for air it means the range is strike range. For land I assume it means adjacent. For naval ??

What does it mean tactical advantage? Like I got more units within X range? I have more fighters than he has bombers? Does it count strength? Is it an internal function that is calucated by the AI?

Link to comment
Share on other sites

If you use the Tab key it will list the cities and other resources that are threatened by land, sea and air etc. Generally it just means does your opponent have the tactical advantage over this area?

This is calculated internally based on the general strength and range of enemy versus friendly units. For example if your opponent has 3 fighters in range of a city and you have one defending fighter in range then usually the advantage goes to your opponent... but the normal quantifiers are also in effect, i.e. strength, readiness, morale etc. are all taken into account and so on.

For example

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...