Page 1 of 1

Guard script question.

Posted: Tue Mar 26, 2024 5:30 pm
by Hellfirejet
I have been working on my Home Before The Leaves Fall mod version 4, I have a big problem with the Guard script. I have Garrison units positioned to defend the Eastern Front border, I want them to stay where they are and not attack anything, but they ignore what I presume option 7 in the Guard script is instructing them to do? If anyone has the answer to this issue it would be much appreciated. :D

{
#NAME= Germany Garrison - Eastern Front
#POPUP=
#FLAG= 1
#TYPE= 2
#COUNTRY_ID= 45
#TRIGGER= 100
#LEVEL= 0
; Set global variable condition to always trigger (dummy value)
#GV= 1[1,100]
; Set link value to always trigger (dummy value)
#LINK= 0[0]
#LENGTH= 1
#HOLD= 7
#ADD_HQ= 0
; Eastern Front
#GOAL_POSITION= 177,70
#GOAL_POSITION= 179,77
#GOAL_POSITION= 180,72
#GOAL_POSITION= 180,75
#GOAL_POSITION= 180,79
#GOAL_POSITION= 182,73
#GOAL_POSITION= 182,80
#GOAL_POSITION= 183,69
#GOAL_POSITION= 183,71
#GOAL_POSITION= 183,73
#GOAL_POSITION= 183,79
#GOAL_POSITION= 184,74
#GOAL_POSITION= 185,70
#GOAL_POSITION= 187,68
#GOAL_POSITION= 187,71
#GOAL_POSITION= 188,66
#GOAL_POSITION= 188,68
#GOAL_POSITION= 190,67
#GOAL_POSITION= 190,71
#GOAL_POSITION= 190,72
#GOAL_POSITION= 192,69
#DATE= 1914/08/01
#STEAL= 0
; Set friendly positions:
; 1st Line - Berlin
#FRIENDLY_POSITION= 173,74
; Set variable conditions:
; 1st Line - Germany politically Axis and not surrendered
#VARIABLE_CONDITION= 45 [1] [100] [0]
; Set tactical conditions:
; 1st Line - Konigsberg not tactically threatened (dummy condition)
#TACTICAL_CONDITION= 187,68 [3]
; Unit in Berlin
#ACTIVATE_POSITION= 173,74 [0,0] [1,1] [1]
; Dummy condition
#CANCEL_POSITION= 0,0 [0,0] [1,1] [0]
}

Re: Guard script question.

Posted: Wed Mar 27, 2024 9:34 am
by BillRunacre
Are they being stolen by other scripts, e.g. OFFENSIVE ones?

Re: Guard script question.

Posted: Wed Mar 27, 2024 11:19 am
by Hellfirejet
Very good question Bill I will investigate the Offensive scripts must admit never thought of looking there cheers! :)

Update: Still looking for answer to Guard script issue, as a temporary fix I have made Garrison units Imobile?

Re: Guard script question.

Posted: Thu Mar 28, 2024 10:43 am
by BillRunacre
You may already have tried this, but when they do leave the Guard positions, you can press the tilde key on your keyboard to see what plan (if any) an AI controlled unit is following. Hopefully it will disclose the answer.

Re: Guard script question.

Posted: Thu Mar 28, 2024 1:27 pm
by Hellfirejet
Hi Bill,
I just discovered how to fix the Guard script so that it works as I want it to. I just needed to add a Garrison unit in Berlin.

; Unit in Berlin
#ACTIVATE_POSITION= 173,74 [0,0] [1,1] [1]

Re: Guard script question.

Posted: Tue Apr 02, 2024 7:46 pm
by BillRunacre
Well done!