Transports Script

Please post here for questions and discussion about modding for Strategic Command.
Post Reply
User avatar
rmelvin
Posts: 252
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Transports Script

Post by rmelvin »

There appear to be a problem with Transport Scripts moving artillery or is there a trick in Transport of artillery. All other unit types do work.

; England
{
#NAME= England - Southampton -> Calais
#POPUP=
#FLAG= 1
#TYPE= 2
#LEVEL= 0
#GV= 1[1,100]
#LINK= 0[0]
#TRIGGER= 60
#COUNTRY_ID= 112
#SIZE= 3,6
#BUILD_LENGTH= 3
#LENGTH= 6
#RANGE= 12
#NAVAL_CRUISE= 0
#GOAL_POSITION= 271,108
#DATE= 1950/05/02
#STEAL= 0
#ALIGNMENT_POSITION= 270,109 [2]
#FRIENDLY_POSITION= 258,105
#VARIABLE_CONDITION= 112 [2] [100] [0]
#TACTICAL_CONDITION= 258,105 [0]
#ACTIVATE_POSITION= 258,105 [0,0] [0,0] [1]
#CANCEL_POSITION= 257,107 [6,6] [1,1] [1]
#CANCEL_POSITION= 271,108 [6,6] [1,1] [1]
}
User avatar
Lothos
Posts: 1334
Joined: Tue May 23, 2006 8:22 pm

Re: Transports Script

Post by Lothos »

You can't control what the transport AI chooses to load up.

Garrison units are NEVER loaded

Support units (like artillery) are added in based on other factors that have never been revealed by the devs.

HQs are aslo added random based on other factors that have never been revealed.
User avatar
rmelvin
Posts: 252
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Re: Transports Script

Post by rmelvin »

Thanks.

The reason I use size and build length is size greater than two and length greater than one, I got Hq's and Militia's but the others do not get transported.

This is one of the reasons to add Unit_ID to transport script.
User avatar
Lothos
Posts: 1334
Joined: Tue May 23, 2006 8:22 pm

Re: Transports Script

Post by Lothos »

rmelvin wrote: Tue May 26, 2026 11:26 pm Thanks.

The reason I use size and build length is size greater than two and length greater than one, I got Hq's and Militia's but the others do not get transported.

This is one of the reasons to add Unit_ID to transport script.
Size does not guarantee you will get an HQ, it is random based on an algorithm that has never been provided out.

Also Transport file has a chance of getting HQs, Transport Minor is just land units and no HQs.
User avatar
rmelvin
Posts: 252
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Re: Transports Script

Post by rmelvin »

When Transport Build Length was set 2 and Length was set to 0 no Headquarters were transported.
Now with Transport Build Length set 3 and Length set to 1 Headquarters are transported also Militia's.
Those are my results and they are working.
User avatar
rmelvin
Posts: 252
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Re: Transports Script

Post by rmelvin »

If I was debugging this, I would look for a parameter or variable setting/error.

Reason is it look like Headquarters unit is getting to Transport when no core unit remain to fill level.
and the level has remaining slots. where the other non-core unit are still add-on, which is not working.
Maybe change the other non-core units to Headquarters parameters or variable setting. :idea:
El_Condoro
Posts: 621
Joined: Sat Aug 03, 2019 4:35 am

Re: Transports Script

Post by El_Condoro »

From the file instructions:
; #SIZE - This value must be satisfied or the event will not occur. For example, if the game engine cannot find enough
; enough units to satisfy the #SIZE requirement the event will not be added to the active plan list.
; Note: #SIZE values refer to the number of units assigned to a plan except for non-core units including:
; HQ, Anti-Air, Artillery, Rail Gun, Coastal Gun, Rockets, Armoured Train, Anti-Tank, Airships, Fighters,
; Tactical Bombers, Medium Bombers, Strategic Bombers, Maritime Bombers, Kamikazes
; These non-core units are added to the plan (closest available unit without a plan) after all other land units.
; Therefore, a plan set to #SIZE= 5 would infact end up being a plan with a size equal to 6 after the game engine
; includes an HQ and so on. Essentially, in order to have the plan satisfy the #SIZE requirement keep in mind the
; original count does not include available HQ, Rockets, Air Fleet and Bombers as these are added in after the
; #SIZE value is satisfied.

So, with transport and amphibious scripts (not minor ones), if #SIZE= 3, the AI will look for 3 core units within #RANGE of #COASTAL_POSITION and then add a HQ to the plan, if one is in #RANGE. If there are not 3 core units, it won't start the plan. There are 2 other factors that can easily be missed: the amount of MPPs available and the number of amphibious transports available. If either of those are not met, it won't start the plan.

I think if there are 3 core units but no HQ, the plan will still fire. In other words, a suicide landing will occur, so a HQ should be in range for the invasion to stand any chance. I have requested of the devs for these plans to not fire unless a HQ is available, but I don't think it will happen any time soon.
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”