1307.3 Canary's Cage Civilian Air Lua script oddity

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
mstoneci
Posts: 14
Joined: Fri Mar 22, 2002 8:57 pm
Location: Bloomington, Indiana

1307.3 Canary's Cage Civilian Air Lua script oddity

Post 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.
Attachments
Canary's Cage CivAir Oddity.zip
(662.26 KiB) Downloaded 1 time
kahta
Posts: 557
Joined: Sat Sep 21, 2019 6:42 pm
Location: Arkansas

Re: 1307.3 Canary's Cage Civilian Air Lua script oddity

Post by kahta »

I just loaded this scenario and I would say that it does appear to be a bug.
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: 1307.3 Canary's Cage Civilian Air Lua script oddity

Post 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???
Michael
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: 1307.3 Canary's Cage Civilian Air Lua script oddity

Post 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.
Michael
mstoneci
Posts: 14
Joined: Fri Mar 22, 2002 8:57 pm
Location: Bloomington, Indiana

Re: 1307.3 Canary's Cage Civilian Air Lua script oddity

Post 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.
Kushan04
Posts: 1152
Joined: Tue Jun 28, 2005 9:27 pm
Location: USA
Contact:

Re: 1307.3 Canary's Cage Civilian Air Lua script oddity

Post 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.
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: 1307.3 Canary's Cage Civilian Air Lua script oddity

Post 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.
Michael
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: 1307.3 Canary's Cage Civilian Air Lua script oddity

Post by michaelm75au »

Confirmed that random does mean 'random' destinations.
Michael
Dimitris
Posts: 15322
Joined: Sun Jul 31, 2005 10:29 am
Contact:

Re: 1307.3 Canary's Cage Civilian Air Lua script oddity

Post by Dimitris »

Is this WAD or confirmed issue ?
Post Reply

Return to “Tech Support”