Jump to content

Script Questions - Transport Plans


Recommended Posts

I am attempting to vary the Allied Opening Game with five simple plans:

-----------------------------------------

1. BEK (To France 50%, To Cairo 30%, Stays in England 20%)

1.1 If BEK goes to France, evacuate to UK after France surrenders and guard Manchester.

2. Tunis Corps to France 70%

3. Beirut Corps to France 50%

4. Send Canadian Corps to UK (50%) or Egypt(50%).

-----------------------------------------

1. When the BEF goes to Cairo it goes through the Mediterranean, and most of the time Italy has joined the war by the time it is nearing Crete. Is there any way to tell the BEF to take the Naval Loop to Cairo?

;

; UK sends BEF to Cairo:

; If triggered this strengthens the UK defense of Egypt

{

#NAME= UK Sea Transport - Cairo (BEF)

#POPUP=

#FLAG= 1

#TYPE= 0

#COUNTRY_ID= 1

; 30% to be triggered

#TRIGGER= 30

; Plan will take effect at start of next turn, i.e. reorganization towards #GOAL_POSITION and

; immediate switch to the Offensive.

; This is needed in order to force primary focus on #GOAL_POSITION

#LEVEL= 0

#PLAN_ID= 3

#SIZE= 1

#LENGTH= 0

; Cairo Port

#GOAL_POSITION= 113,34

#DATE= 1939/09/03

#STEAL= 0

; Set friendly positions:

; 1st Line - Manchester

#FRIENDLY_POSITION= 61,13

; Set variable conditions:

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

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

; Set tactical conditions:

; 1st Line - Paris not tactically threatened (dummy condition)

#TACTICAL_CONDITION= 69,18 [1]

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

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

; 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]

}

2. Plan identity is determined by #COUNTRY_ID, #PLAN_ID, and #GOAL_POSITION. A country can only have a single plan based on this criteria and will be assigned the first valid plan regardless of duplicate.

It appears that if I want a French Corps to move from Beirut to Marseilles (port) and a French Corps to Move from Tunis to Marseilles (port) in the same turn this can't be done as both plans have the same Country ID, Plan ID and Goal Position, therefore I have to delay one plan a turn or give one plan a different goal position? Am I correct?

[ April 29, 2006, 10:23 PM: Message edited by: Edwin P. ]

Link to comment
Share on other sites

Ah, another good question. I have a feeling we can't script units to go to Egypt through the Naval Loop. The only other solution, although not a great one, is to remove the unit from England and create it later in the mid-east to simulate the transfer.

As for #2 I believe you're correct. Can't remember what it says in the .txt file (at work again!), but it either picks the first one or randomly picks one of the two. Not sure what happens if you delay it if they have the same goal position, if one unit arrives at the position what does the other unit do if it can't get to it?

Link to comment
Share on other sites

1. True, we can't script units to go to Egypt or evacuate from Egypy using the naval loop. Perhaps HC will address this in the patch. :rolleyes:

2. As for #2 tonight I will try, checking for moving the unit from Tunis on Turn 1 and checking for moving from Beirut on Turn 2, using type 0 for both events (i.e. a single check on different dates).

3. I have tried to program Turkish annexation of Syria; 5% of the time, but it appears that you can't have a minor nation annex land from a major nation, even if that major nation has surrendered and a new nation (Vichy Syria) has been created.

A summary of what I am attempting to do:

1. BEK

---1.1.0 Goes to France 50%

------1.1.1 BEK Evacuates Brest after Paris Surrenders

---1.2.0 Goes to Egypt 30% - Stronger Allied defense of Egypt

---1.3.0 Remains in UK 20% - Stronger counter vs. Sea Lion

2.0.0 French Corps in Tunis

---2.1 Tunis Corps goes to France 50%

---2.2 Tunis Corps invades Bari 20%, after Italy joins Axis to take ungarrisoned city.

3.0.0 French Corps in Beirut

---3.1 French Corps in Beirut goes to France 50%

4.0.0 UK Mideast Strategy

---4.0.1 UK sends Corps to Egypt

4.1.0 UK Iraq Offensive after Axis DOW Russia

---4.1.0 If Egypt is Allied Controlled UK Conquers Iraq and sends additional corps to Egypt (only sends corps if it can use Naval loop as a waypoint)

------4.2.0 UK attacks Iran if Turkish war readiness is less than 70% pro-axis.

---------4.3.0 UK Conquers Vichy Syria

---------4.4.0 UK Conquers Tobruk then moves onto conquer rest of North Africa > Libya > Tunisia > Algeria

[ April 30, 2006, 01:43 PM: Message edited by: Edwin P. ]

Link to comment
Share on other sites

Great news. Just what my script needs, and now I can have the Allies evacuate Egpypt (sometimes), instead of facing certain loss.

Question - if a sea tile is a desination, how will the SEA_TRANSPORT plan know where to go after it arrives at the other end of the loop?

Link to comment
Share on other sites

Sweet!! Great to hear Hubert.

Edwin: You may have to make another script to check for when they arrive in Egypt.

Hubert: Any plans on allowing any land coordinate a valid location for an Amphib_Plan? When trying to get the US to invade North Africa, for example, I want them all to land at Casablanca and then head east from there. Right now a couple units choose to land at Casablanca and another lands directly next to Algiers. Essentially, if I give an Amphib_Plan an Goal of an empty tile, it should be considered a success if it's reached by at least 1 unit. I've been considering adding a city resource next to the Casablanca port to overcome this so I can direct the entire Amphib plan to Casablanca.

Link to comment
Share on other sites

Edwin, right now it will head for the nearest port as it will essentially come out of the loop unassigned so evacuating Egypt may not work as well as sending troops to Egypt. I might consider further enhancements but this will have to wait until the second patch.

Timskorn, not at the moment but this could be considered for a future patch.

Link to comment
Share on other sites

Actually I just made a quick change and it works better with allowing Transports to move to a sea tile. Essentially I will allow more than one #GOAL_POSITION to be listed for BUILD_UP_SEA_TRANSPORT plans with the top (first) position still needing to reference a destination port. Secondary #GOAL_POSITIONs can be used to list WAYPOINTS and this essentially allows you to send units to a Naval Loop position if desired.

By doing this I will preserve the unit plan should it proceed under a Naval Loop so it will know where to continue to after it comes out of the loop.

Link to comment
Share on other sites

This is great, as it also allows Allies Transportsd to avoid a German blockade of the Atlantic by heading straight North and then East and then South to the UK, instead of sending 3 to 4 transports into a waiting string of Axis subs and ships sitting in the Atlantic.

This happened in a recent game vs. the AI. The first transport ran into a sub, then the second traveled about 3 tiles south and ran into a second sub and then the third tried, A few titles to the north. All ran into subs and were sunk the following turn. This happened, again and again.

I will use a script based on Halifax to check for Human controlled units (3 or more) in range and if so then use the alternate routes - either north or south.

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