Casablanca

Please post here for questions and discussion about modding for Strategic Command.
Post Reply
dhucul2011
Posts: 425
Joined: Wed Sep 12, 2007 7:32 pm

Casablanca

Post by dhucul2011 »

If I want the USA to attack Casablanca at the same time as Oran and Algiers, would this Offensive script work?

{
#NAME= USA Build Up Offensive - Casablanca
#POPUP=
#FLAG= 1
#TYPE= 2
#COUNTRY_ID= 115
#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]
#SIZE= 3,5
#BUILD_LENGTH= 1
#LENGTH= 5
#RANGE= 15
; Casablanca
#GOAL_POSITION= 131,119
#DATE= 1942/01/01
#STEAL= 3
; Set friendly positions:
; 1st Line - Mellila
#FRIENDLY_POSITION= 141,116
; Set variable conditions:
; 1st Line - USA politically aligned with Allies and not surrendered
#VARIABLE_CONDITION= 115 [2] [100] [0]
; Set tactical conditions:
; 1st Line - Washington D.C. not tactically threatened (dummy condition)
#TACTICAL_CONDITION= 4,108 [3]
; Set dummy activate position (no units at position 0,0)
#ACTIVATE_POSITION= 0,0 [0,0] [0,0] [0]
; Set cancel position:
; 1st Line - 2 or more Axis units within range of Casablanca
#CANCEL_POSITION= 131,119 [3,3] [2,2] [1]
}
User avatar
BillRunacre
Posts: 6513
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: Casablanca

Post by BillRunacre »

I'm not sure it will, as there is no trigger to activate it.

Also, setting it as TYPE= 2 means the engine will be rechecking its conditions every turn, best to set it as TYPE= 1.

Then set up a test game and see what happens...
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
rmelvin
Posts: 207
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Re: Casablanca

Post by rmelvin »

; 1st Line - 2 or more Axis units within range of Casablanca
#CANCEL_POSITION= 131,119 [3,3] [2,2] [1]
Why [3,3] over [0,3]? :?:
El_Condoro
Posts: 597
Joined: Sat Aug 03, 2019 4:35 am

Re: Casablanca

Post by El_Condoro »

What I do when I want multiple AI scripts to fire at the same time is to use #LINK= x[1] in each one. The linked DE can be set to fire however you like and then the AI scripts will all fire at the same time as long as #BUILD_LENGTH and other conditions are met.

The difference between [0,3] and [3,3] is that the latter is consistent.
For example, in your
#CANCEL_POSITION= 131,119 [3,3] [2,2] [1]
the scipt will end when there are at least 2 Allied units within 3 hexes of 131,119.
If you have [0,3] the range becomes random each turn between 0 and 3 hexes. One turn it might be 131,119 itself (range = 0), another turn, within 2 hexes, and another within 3 hexes, as is desired. If you want the range to be consistent, which usual, make it [3,3]
ORB & CROWN Fantasy Warfare Mod for Strategic Command
Download for War in Europe or World at War - YouTube - Discord
rmelvin
Posts: 207
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Re: Casablanca

Post by rmelvin »

Thanks, just as I thought I was finish :shock: . I got to go through each script, but better to find these things now. Really thanks you for your help. :D
dhucul2011
Posts: 425
Joined: Wed Sep 12, 2007 7:32 pm

Re: Casablanca

Post by dhucul2011 »

This is basically just a copy of the Oran OFFENSIVE script for Torch. That script didn't have a LINK. Is there an AMPHIBIOUS script required as well?

The only change is the GOAL and then the CANCEL lines.

I just want the USA to land at Casablanca at the same time as Oran and Algiers as right now they don't and its not historical.

Also, a gamey move by an Italian player can save his navy and position it all between Gibralter and Algiers and savage the troop transports knowing that they are coming in late 1942.

This would make it harder.
El_Condoro
Posts: 597
Joined: Sat Aug 03, 2019 4:35 am

Re: Casablanca

Post by El_Condoro »

There are a number of amphibious scripts used for Torch.
ORB & CROWN Fantasy Warfare Mod for Strategic Command
Download for War in Europe or World at War - YouTube - Discord
Post Reply

Return to “Scenario Design and Modding”