Page 1 of 2

Some errors in _transport and _event scripts?

Posted: Tue Feb 18, 2020 6:38 am
by PanzerMike
Some of the scripts in _transports.txt puzzle me:

//USA Transfer units to Antwerp
$Transport
if_Date=6/1/1943
if_Country=3
//Allies control the 3 Western ports in France
//Panzermike: this comment makes no sense, should be "Allies control Antwerpen" I think since hex 143,57 is Antwerp?
xyControl=143,57,Allies
if_Alliance=Allies
lifespan=continuous
actionCountry=3
range=30
landAssets=1
airAssets=1
hqAsset
xyArea=143,57
xyArea=7,21
$End

//UK Transfer units to Rotterdam
$Transport
if_Date=6/1/1943
if_Country=3
if_Alliance=Allies
// Panzermike: it says the Allies must control 143,57 (which is Antwerp). Should this not be 143,58 (Rotterdam)?
xyControl=143,57,Allies
lifespan=continuous
actionCountry=1
range=30
landAssets=3
hqAsset
xyArea=143,58
xyArea=134,57
$End

//UK Transfer units to Amsterdamn
$Transport
if_Date=6/1/1943
if_Country=3
if_Alliance=Allies
xyControl=143,57,Allies
// Panzermike: it says the Allies must control 143,57 (which is Antwerp). Should this not be 144,60 (Amsterdam)?
lifespan=continuous
actionCountry=1
range=30
landAssets=3
hqAsset
xyArea=144,60
xyArea=134,57
$End

Some of the Atlantic Wall events from the _events.txt are also not quite right I think.
As far as I know the Coastal Defense unit adds 20% defense to an attack FROM a beach hex. The Coastal Defense should thus not be ON a beach hex, but NEXT to it. Also, If there is NO adjacent beach hex, the Coastal Defense does nothing.
So here they are:

//Atlantic Wall
$GiveResource
if_Date=1/1/1943
lifespan=tillTrigger
actionCountry=6
//West France (plains hex)
xyArea=131,51,22
//Normandy (beach) - This is a beach hex!
xyArea=133,48,22
//Lille (plains)
xyArea=140,56,22
//Netherlands (ocean) - This is an ocean hex!
xyArea=141,61,22
AIOnlyEvent=Axis
$End


//Atlantic Wall
$GiveResource
if_Date=6/1/1943
lifespan=tillTrigger
actionCountry=6
//West France (land sea plains) - There is no adjacent beach hex, so what is the purpose?
xyArea=134,46,22
//Lille (land sea plains) - There is no adjacent beach, so what is the purpose?
xyArea=141,57,22
//Netherlands (ocean) - This is an ocean hex! Also this one is already in the Atlantic Wall event for 1/1/1943
xyArea=141,61,22
AIOnlyEvent=Axis
$End


//Atlantic Wall
$GiveResource
if_Date=1/1/1944
lifespan=tillTrigger
actionCountry=6
//West France (land sea woods) - There is no adjacent beach hex, so what is the purpose?
xyArea=134,41,22
//Normandy (beach) - This is a beach hex!
xyArea=135,53,22
//Lille (land plains) - There is no adjacent beach, so what is the purpose?
xyArea=142,57,22
//Netherlands
xyArea=147,62,22
AIOnlyEvent=Axis
$End

RE: Some errors in _transport and _event scripts?

Posted: Tue Feb 18, 2020 2:52 pm
by AlvaroSousa
Thanks

RE: Some errors in _transport and _event scripts?

Posted: Tue Feb 18, 2020 2:57 pm
by PanzerMike
They are errors right?

RE: Some errors in _transport and _event scripts?

Posted: Tue Feb 18, 2020 3:26 pm
by AlvaroSousa
Looking right now as I want to get a beta out today.

RE: Some errors in _transport and _event scripts?

Posted: Tue Feb 18, 2020 4:01 pm
by AlvaroSousa
Yup. The map changed, some rules, and I fat fingered some of them since I did these. So now it's better and a tougher AI defense wall.

Thanks for spotting these.

RE: Some errors in _transport and _event scripts?

Posted: Tue Feb 18, 2020 4:23 pm
by PanzerMike
Good! Am I also correct in the fact that placing a coastal defense in hex without adjacent beach hexes is futile and a waste of resources?

Ow, and as always, please record the changes to the vanilla scripts and units. Otherwise it is hard to keep a mod in synch...

RE: Some errors in _transport and _event scripts?

Posted: Tue Feb 18, 2020 5:33 pm
by AlvaroSousa
I just changed the above that you mentioned. I has to be in the scripts and reloaded per scenario

RE: Some errors in _transport and _event scripts?

Posted: Tue Feb 18, 2020 6:03 pm
by PanzerMike
Ok, so I make a PanzerMike.scn (which is a copy of the 1939 vanilla scn) and a PanzerMike directory. I copy the script txt files to the PanzerMike directory. I open the Editor with the PanzerMike.scn file and load the script files via the menu. I save the PanzerMike.scn and all is well. Correct?

RE: Some errors in _transport and _event scripts?

Posted: Wed Feb 19, 2020 2:58 pm
by AlvaroSousa
Yes you can take the scripts from the original and move them under your folder for your scenario and upload them.

But if you changed the base map tiles it will affects the scripts. So you might have to edit a little.

Also if you changed borders.

If you changed rivers you need to look at the A.I. tactical defensive orders in the Editor. A.I. Strat menu item

RE: Some errors in _transport and _event scripts?

Posted: Wed Feb 19, 2020 3:09 pm
by PanzerMike
Will do that. Just getting to know the Editor a little. It is very flexible, but could be more user friendly. Slaving away at my mod to make bestest map ever :-)

RE: Some errors in _transport and _event scripts?

Posted: Wed Feb 19, 2020 3:12 pm
by PanzerMike
And just to be sure. If a coastal defense hex with a garrison unit in it, is attacked from an adjacent NON beach hex, the Coastal defense does NOT add 20 percent defense bonus. Correct?

RE: Some errors in _transport and _event scripts?

Posted: Thu Feb 20, 2020 6:42 am
by PanzerMike
//Atlantic Wall
$GiveResource
if_Date=3/1/1943
lifespan=tillTrigger
actionCountry=6
// Nantes, good location (adjacent beach present)
xyArea=134,49
// Biscarrosse, good location (adjacent beach present)
xyArea=135,42
// Rochefort, bad location (there is NO adjacent beach hex only a land/sea hex)
xyArea=135,46
// St Lo, good location (adjacent beach present)
xyArea=135,52
AIOnlyEvent=Axis
$End

//Atlantic Wall
//Panzermike: These are all the same locations as the 3/1/1943 event! Is this intentional?
$GiveResource
if_Date=7/1/1943
lifespan=tillTrigger
actionCountry=6
xyArea=134,49
xyArea=135,42
xyArea=135,46
xyArea=135,52
AIOnlyEvent=Axis
$End

//Atlantic Wall
$GiveResource
if_Date=1/1/1944
lifespan=tillTrigger
actionCountry=6
// Brugge, bad location (there is NO adjacent beach hex, only a land/sea hex)
xyArea=142,57
// Breda, good location (adjacent beach present)
xyArea=144,59
// Esbjerg (Denmark), good location (adjacent beach present)
xyArea=152,69
// Lem (Denmark), good location (adjacent beach present)
xyArea=152,70
// Thisted, good location (adjacent beach present)
xyArea=152,71
AIOnlyEvent=Axis
$End

Alvaro, please read my above comments on the Atlantic Wall event.

From the manual:
Image

I will repeat my question: do Coastal Defenses provide their bonus against attacks from BEACH hexes ONLY or ALSO against attacks from a LAND/SEA hex???

RE: Some errors in _transport and _event scripts?

Posted: Thu Feb 20, 2020 1:18 pm
by AlvaroSousa
Any unit that attacks from a hex that is not a full land tile. So a Hex that is partial land is considered coastal. I will update the manual. If I remember I was going back and forth about calling it a coastal hex or a beach hex and missed wording it correctly.

RE: Some errors in _transport and _event scripts?

Posted: Thu Feb 20, 2020 1:22 pm
by PanzerMike
I see. But is a unit landing on a coastal (non beach) hex also more vulnerable to air attack like on a beach?

RE: Some errors in _transport and _event scripts?

Posted: Thu Feb 20, 2020 1:31 pm
by AlvaroSousa
I forgot about the AA. I thought I did it.

What I did is this. If a unit is forced to retreat due to combat the AA gets destroyed.
Any land unit can move the AA now. You will see the button next to rail.

But if you leave Moscow open with 6 AA and the enemy just rolls on in then yea they get it.

RE: Some errors in _transport and _event scripts?

Posted: Thu Feb 20, 2020 1:44 pm
by AlvaroSousa
ORIGINAL: PanzerMike

I see. But is a unit landing on a coastal (non beach) hex also more vulnerable to air attack like on a beach?

A tile where navies can move into land can't except with landing craft is a beach hex. This is affected by coastal forts

A land tile that ships and land units can move into is also affected by the coastal fortification.

A land tile in which no naval units can move into but a land unit can is not affected by coast forts. If you notice you can only place coastal forts on tiles that board a beach or land/sea tile. Coastal forts are also rugged terrain for purposes of retreating.

RE: Some errors in _transport and _event scripts?

Posted: Thu Feb 20, 2020 2:10 pm
by PanzerMike
So for all effects a beach hex (which the Editor with a mouse over designates as a beach) is equivalent to a land/sea hex (which the Editor calls a land/sea hex, but could be considered a large beach, hehehe).

RE: Some errors in _transport and _event scripts?

Posted: Thu Feb 20, 2020 2:11 pm
by AlvaroSousa
BTW in WarPlan 2 I will do away with these hexes to avoid confusion and invaders will be able to land right on top of the defender. It will make my life MUCH easier for coding.

RE: Some errors in _transport and _event scripts?

Posted: Thu Feb 20, 2020 2:12 pm
by AlvaroSousa
I redid the Atlantic Wall for the A.I. completely.

RE: Some errors in _transport and _event scripts?

Posted: Thu Feb 20, 2020 2:14 pm
by PanzerMike
Yes, that would be a good idea. The whole concept of a beach is confusing. Just make a hex "coastal" and introduce a toggle invadable by sea yes/no.