Page 1 of 1
1307.3 Canary's Cage Civilian Air Lua script oddity
Posted: Thu Feb 16, 2023 3:21 pm
by mstoneci
Looking at Canary's Cage I am seeing odd behavior in the ferry missions of the civilian aircraft. When the CivilianAirTraffic script runs, it randomly assigns aircraft to airports and ferry missions. It also randomly assigns home bases. When the aircraft launch on their assigned ferry missions, instead of traveling to their mission airfields, they actually travel to their home airfields. Not sure if this is a new behavior in the mission parameters since the 1307 update or an error in the script.
I have used the CivilianAirTraffic as a template in scenarios that I use for myself and I see the same behavior, that's how I first noticed it. I have attached a version of Canary's Cage about 5 minutes into running. Look at the Civilian side and look at the airborne air traffic. Thanks.
Re: 1307.3 Canary's Cage Civilian Air Lua script oddity
Posted: Thu Feb 16, 2023 4:44 pm
by kahta
I just loaded this scenario and I would say that it does appear to be a bug.
Re: 1307.3 Canary's Cage Civilian Air Lua script oddity
Posted: Thu Feb 16, 2023 10:11 pm
by michaelm75au
The 'assigned base' should be the home of the ferry mission. That is how it always worked from memory; that is how it knows where it needs to go.
That said, I don't know why it keeps randomly changing the destination once it lands. Unless there is some script running to do this???
Re: 1307.3 Canary's Cage Civilian Air Lua script oddity
Posted: Fri Feb 17, 2023 12:52 am
by michaelm75au
This is caused by the 'random' behavior.
That is causing the changing of the destinations on execution of the misson; the code is set to find a random base within range and use that as the destination for the execution of the mission.
If you want to keep specific ferry routes, it would need to be 'one-way' or 'cycle'.
"Random' is really doing some of what the script is doing.
Re: 1307.3 Canary's Cage Civilian Air Lua script oddity
Posted: Fri Feb 17, 2023 2:33 pm
by mstoneci
Michael,
I went through the CivilianAirTraffic script and found the section regarding the mission parameters. I changed the behavior from 'random' to 'one-way' and that has cleared the problem. I'm going to go through my Lua directory and for each scenario that uses CivilianAirTraffic and make the same change.
Thanks for pointing me in the right direction.
Re: 1307.3 Canary's Cage Civilian Air Lua script oddity
Posted: Fri Feb 17, 2023 3:21 pm
by Kushan04
mstoneci wrote: Fri Feb 17, 2023 2:33 pm
Michael,
I went through the CivilianAirTraffic script and found the section regarding the mission parameters. I changed the behavior from 'random' to 'one-way' and that has cleared the problem. I'm going to go through my Lua directory and for each scenario that uses CivilianAirTraffic and make the same change.
Thanks for pointing me in the right direction.
That's not going to work for a lot of the scenarios. Most of them do not actually read the external script.
I've added this to my to do for a future patch.
Re: 1307.3 Canary's Cage Civilian Air Lua script oddity
Posted: Sat Feb 18, 2023 1:04 am
by michaelm75au
Reading the manual, it seems to be contradictory somewhat.
For ferry behavior, it shows the following which tends to support how it is working.
c. Random: The mission will randomly trigger a cycle.
But in another section, it implies that it randomizes between 'one-way' and 'cycle'
Ferry Behavior: This allows the mission designer to choose
between round-trip cycles or ordinary one-way trips. If “One
way” is selected, the unit will stay at the destination base after
it arrives there. If “Cycle” is selected, the unit will arrive at the
destination base, ready, leave the destination base once its ready
time has elapsed, move back to its original base, then ready, then
move back to the destination base. “Random” randomizes what
type of ferry behavior the unit will use
.
Not sure how useful if random acted as the later explanation; as soon as it hit 'one-way', the mission would stop.
Re: 1307.3 Canary's Cage Civilian Air Lua script oddity
Posted: Sat Feb 18, 2023 2:44 am
by michaelm75au
Confirmed that random does mean 'random' destinations.
Re: 1307.3 Canary's Cage Civilian Air Lua script oddity
Posted: Sun Apr 16, 2023 3:45 pm
by Dimitris
Is this WAD or confirmed issue ?