Page 1 of 1
Convert airfields and ports multi-unit to singe-unit(saving loadout and missions))
Posted: Wed Dec 29, 2021 7:07 pm
by DmitriyBlade
Nothing found on google
Anyone have LUA script
which converts
each airbase and port facility to single unit?
(saving units and their missions accordingly)
RE: Convert airfields and ports multi-unit to singe-unit(saving loadout and missions))
Posted: Sat Jan 01, 2022 9:15 pm
by LettuceTurnipTheBeet
Here is a somewhat naive script that kinda does what you asked for. However, a multi-component airfield AFAIK may have any number of runways and other elements which can not always be accurately represented by the selection of single-unit variants in the DB. Therefore, this script simply adds a generic 2600m airstrip anywhere. If you want more accurate representations you can write some extra code that extracts the length of a given runway to select a comparable single-unit equivalent from the DB instead. The script also doesn't take into account any aircraft that might be flying during conversion, but I think in most cases the game will take care of that and select a suitable new base for them.
RE: Convert airfields and ports multi-unit to singe-unit(saving loadout and missions))
Posted: Mon Jan 03, 2022 4:55 pm
by LettuceTurnipTheBeet
[UPDATE] Fixed an issue where it couldn't handle missing loadouts.