Jump to content

Scripting Front Stability


Recommended Posts

OK folks, now that the basic AI script framework has been set down, it's time to fine tune it so that the AI only goes on the offensive or the defensive at the proper time.

This script I wrote up for Germany sealions. Many of the other scripts are similar in appearence. The gist of the long crap at the end is that it indicates that the Eastern front is stable; basically that all captured cities thus far are still held by Axis, and that they are not tactically threatened by land forces, AND that there are no allied troops in France, Germany, Spain, or Italy.

If anyone else has some scripting tricks that simulate front stability, please let me know! smile.gif

; Germany prepares to attack England:

{

#NAME= Germany Sealion - Random, Post Barbarossa - Gorky Reached

#POPUP=

#FLAG= 1

#TYPE= 1

#COUNTRY_ID= 5

#TRIGGER= 3

#LEVEL= 0

#PLAN_ID= 2

#SIZE= 8

#LENGTH= 1

; London

#GOAL_POSITION= 64,15

#DATE= 1942/01/01

#STEAL= 0

; 1st Line - Copenhagen

; 2nd Line - Gorky

#FRIENDLY_POSITION= 81,12

#FRIENDLY_POSITION= 119,8

#FRIENDLY_POSITION= 81,12

#FRIENDLY_POSITION= 112,10

#FRIENDLY_POSITION= 84,16

#FRIENDLY_POSITION= 95,15

#FRIENDLY_POSITION= 94,12

#FRIENDLY_POSITION= 96,10

#FRIENDLY_POSITION= 102,14

#FRIENDLY_POSITION= 105,15

#FRIENDLY_POSITION= 107,19

#FRIENDLY_POSITION= 107,12

#FRIENDLY_POSITION= 114,15

#FRIENDLY_POSITION= 101,21

#FRIENDLY_POSITION= 93,20

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

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

#TACTICAL_CONDITION= 84,16 [1]

#TACTICAL_CONDITION= 95,15 [1]

#TACTICAL_CONDITION= 94,12 [1]

#TACTICAL_CONDITION= 96,10 [1]

#TACTICAL_CONDITION= 102,14 [1]

#TACTICAL_CONDITION= 105,15 [1]

#TACTICAL_CONDITION= 107,19 [1]

#TACTICAL_CONDITION= 114,15 [1]

#TACTICAL_CONDITION= 112,10 [1]

#TACTICAL_CONDITION= 119,8 [1]

; Copenhagen not tactically threatened

#TACTICAL_CONDITION= 81,12 [3]

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

; Canceled if Axis units already in England

; Cancels if Allied units in France, Spain, Germany, or Italy

#CANCEL_POSITION= 62,14 [3,3] [1,1] [1]

#CANCEL_POSITION= 66,20 [7,7] [1,1] [2]

#CANCEL_POSITION= 57,25 [5,5] [1,1] [2]

#CANCEL_POSITION= 84,16 [6,6] [1,1] [2]

#CANCEL_POSITION= 82,24 [9,9] [1,1] [2]

}

Link to comment
Share on other sites

Heres an exploitation script of Italy re-taking a conquered Tunis:

{

#NAME= Italy Launches Surprise Amphib Attack on Tunis

#POPUP=

#FLAG= 1

#TYPE= 2

#COUNTRY_ID= 6

#TRIGGER= 10

#LEVEL= 0

#PLAN_ID= 2

#SIZE= 1

#LENGTH= 1

; Tunis

#GOAL_POSITION= 77,31

#DATE= 1941/01/01

#STEAL= 0

; Rome

; Palermo

; Bari

; Torino

; Venice

#FRIENDLY_POSITION= 83,24

#FRIENDLY_POSITION= 84,28

#FRIENDLY_POSITION= 89,25

#FRIENDLY_POSITION= 77,21

#FRIENDLY_POSITION= 82,21

; Italy politically aligned with Axis and not surrendered

; England politically aligned with Allies and not surrendered

; Tunisia politically aligned with Axis and surrendered

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

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

#VARIABLE_CONDITION= 42 [1] [100] [1]

; Palermo not tactically threatened

; Taranto not tactically threatened

; Venice not tactically threatened

; Bari not tactically threatened

#TACTICAL_CONDITION= 85,27 [0]

#TACTICAL_CONDITION= 90,26 [0]

#TACTICAL_CONDITION= 83,21 [0]

#TACTICAL_CONDITION= 77,22 [0]

#TACTICAL_CONDITION= 84,28 [0]

#TACTICAL_CONDITION= 89,25 [0]

#TACTICAL_CONDITION= 82,21 [0]

#TACTICAL_CONDITION= 77,21 [0]

; Activated if no Allied unit in Tunis

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

; Canceled if Allied unit in Tunis

; Canceled if more than 1 Allied unit is near Tunis

; Canceled if more than 3 Allied units in region

; Canceled if Allied naval units nearby

#CANCEL_POSITION= 77,31 [0,0] [1,1] [2]

#CANCEL_POSITION= 77,31 [3,3] [2,2] [2]

#CANCEL_POSITION= 77,31 [10,10] [4,4] [2]

#CANCEL_POSITION= 79,29 [5,5] [1,1] [2]

}

Link to comment
Share on other sites

And for the defensive side, here is an Italian reaction to D-Day:

{

#NAME= Italy Assumes a Rome Defense Posture

#POPUP=

#FLAG= 1

#TYPE= 2

#COUNTRY_ID= 6

#TRIGGER= 100

#LEVEL= 0

#PLAN_ID= 0

#SIZE= 0

#LENGTH= 1

#GOAL_POSITION= 82,24

#GOAL_POSITION= 84,25

#GOAL_POSITION= 84,24

#GOAL_POSITION= 85,24

#DATE= 1939/09/03

#STEAL= 3

#FRIENDLY_POSITION= 83,24

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

#TACTICAL_CONDITION= 84,16 [3]

; Activated when Allied units in Italy, or in sea near Italy

#ACTIVATE_POSITION= 83,24 [7,7] [1,1] [2]

#ACTIVATE_POSITION= 84,28 [2,2] [1,1] [2]

#ACTIVATE_POSITION= 81,25 [2,2] [1,1] [2]

; Cancels when no Allied unit left

#CANCEL_POSITION= 84,28 [2,2] [0,0] [2]

}

{

#NAME= Italy Assumes a Southern Defense Posture

#POPUP=

#FLAG= 1

#TYPE= 2

#COUNTRY_ID= 6

#TRIGGER= 100

#LEVEL= 0

#PLAN_ID= 0

#SIZE= 0

#LENGTH= 1

#GOAL_POSITION= 88,27

#GOAL_POSITION= 86,25

#GOAL_POSITION= 88,25

#GOAL_POSITION= 87,25

#GOAL_POSITION= 85,28

#DATE= 1939/09/03

#STEAL= 3

#FRIENDLY_POSITION= 83,24

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

#TACTICAL_CONDITION= 84,16 [3]

; Activated when Allied units in Southern Italy, or in sea near Italy

#ACTIVATE_POSITION= 89,25 [2,2] [1,1] [2]

#ACTIVATE_POSITION= 84,28 [2,2] [1,1] [2]

#ACTIVATE_POSITION= 91,27 [3,3] [3,3] [2]

#ACTIVATE_POSITION= 80,28 [4,4] [4,4] [2]

; Cancels when no Allied unit left

#CANCEL_POSITION= 84,28 [2,2] [0,0] [2]

}

{

#NAME= Italy Assumes a Secondary Northern Defense Posture (Vichy France activated and Axis Occupied)

#POPUP=

#FLAG= 1

#TYPE= 2

#COUNTRY_ID= 6

#TRIGGER= 100

#LEVEL= 0

#PLAN_ID= 0

#SIZE= 0

#LENGTH= 1

#GOAL_POSITION= 73,22

#GOAL_POSITION= 71,22

#GOAL_POSITION= 72,22

#GOAL_POSITION= 73,21

#GOAL_POSITION= 74,21

#DATE= 1942/01/03

#STEAL= 3

#FRIENDLY_POSITION= 83,24

#FRIENDLY_POSITION= 77,21

#FRIENDLY_POSITION= 70,23

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

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

#TACTICAL_CONDITION= 77,21 [1]

; Activated when Allied units in France

#ACTIVATE_POSITION= 70,21 [6,6] [2,2] [2]

; Cancels when no Allied unit left

; Cancels if Allied units inside defensive line

#CANCEL_POSITION= 70,21 [6,6] [0,0] [2]

#CANCEL_POSITION= 73,22 [1,1] [1,1] [2]

#CANCEL_POSITION= 75,21 [1,1] [1,1] [2]

}

{

#NAME= Italy Assumes a Primary Northern Defense Posture (Vichy France activated)

#POPUP=

#FLAG= 1

#TYPE= 2

#COUNTRY_ID= 6

#TRIGGER= 100

#LEVEL= 0

#PLAN_ID= 0

#SIZE= 0

#LENGTH= 1

#GOAL_POSITION= 76,21

#GOAL_POSITION= 77,21

#GOAL_POSITION= 78,21

#GOAL_POSITION= 78,22

#GOAL_POSITION= 79,21

#DATE= 1942/01/03

#STEAL= 3

#FRIENDLY_POSITION= 83,24

#FRIENDLY_POSITION= 77,21

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

#TACTICAL_CONDITION= 84,16 [3]

; Activated when Allied units in Vichy France

#ACTIVATE_POSITION= 72,22 [2,2] [1,1] [2]

; Cancels when no Allied unit left

; Cancels if Allied units inside defensive line

#CANCEL_POSITION= 72,22 [3,3] [0,0] [2]

#CANCEL_POSITION= 81,22 [3,3] [0,0] [2]

}

{

#NAME= Italy Assumes a Northern Defense Posture (Vichy France neutral)

#POPUP=

#FLAG= 1

#TYPE= 2

#COUNTRY_ID= 6

#TRIGGER= 100

#LEVEL= 0

#PLAN_ID= 0

#SIZE= 0

#LENGTH= 1

#GOAL_POSITION= 77,21

#GOAL_POSITION= 76,21

#DATE= 1942/01/03

#STEAL= 3

#FRIENDLY_POSITION= 83,24

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

#TACTICAL_CONDITION= 84,16 [3]

; Activated when Allied units in France

#ACTIVATE_POSITION= 70,21 [6,6] [2,2] [2]

; Cancels when no Allied unit left

#CANCEL_POSITION= 70,21 [6,6] [0,0] [2]

}

{

#NAME= Italy Assumes an Internal Northern Defense Posture

#POPUP=

#FLAG= 1

#TYPE= 2

#COUNTRY_ID= 6

#TRIGGER= 100

#LEVEL= 0

#PLAN_ID= 0

#SIZE= 0

#LENGTH= 1

#GOAL_POSITION= 79,22

#GOAL_POSITION= 80,23

#GOAL_POSITION= 81,22

#GOAL_POSITION= 82,23

#GOAL_POSITION= 83,23

#DATE= 1942/01/03

#STEAL= 3

#FRIENDLY_POSITION= 83,24

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

#TACTICAL_CONDITION= 84,16 [3]

; Activated when Allied units in Northern Italy

#ACTIVATE_POSITION= 81,22 [3,3] [1,1] [2]

; Cancels when no Allied unit left

#CANCEL_POSITION= 81,22 [4,4] [0,0] [2]

}

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...