Jump to content

PARKING SPOT SELECTION FOR AI FLIGHT


CHUCK2069

Recommended Posts

HELLO DCS FANS

 

WOULD IT BE GREAT THTA WE CAN SELECT THE PARKING SPOT ON THE CARRIER FOR FLIGHT NOT ON RUNWAY FOR AI FLIGHT AS WE DO ON A GROUND AIRPORT?

IF I MISS IT DO NOT HESITATE TO TELL ME HOW WE CAN DO THAT

FLY SAFE

STEPHANE

 

  • Like 1
Link to comment
Share on other sites

  • ED Team

Parking on the carrier has to be done by the carrier, its very complex with routes and AI on the deck. 

If you want to spawn in a particular place you can use statics to block parking areas however you need to remember to keep routes clear for taxi. 

thanks

smallCATPILOT.PNG.04bbece1b27ff1b2c193b174ec410fc0.PNG

Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status

Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, HP Reverb G2

Link to comment
Share on other sites

  • 3 weeks later...

When placing AI aircraft on a Supercarrier, the spots where the AI aircraft are parked are determined relative to the order in which they are spawned. Also, the starting order of taxiing and which CAT the AI aircraft will head to is determined for each spot.

For reference, I've attached a diagram showing them that I made a year ago when creating a mission.

Therefore, we can freely decide which aircraft to park in which spot by controlling the order in which the aircraft are spawn.
However, player aircraft must spawn as follows:

  1. Before the mission starts, park AI aircrafts at all spots (i.e. spawn them dynamically in a function executed when the LUA script is loaded with the MISSION START trigger or use "Add airplane group" in the mission editor to place them on the carrier--in this case, the AI aircraft parking spot cannot be specified),
  2. After the mission starts (the model time is 0 or later), destroy the AI aircraft at the spot where you want the player aircraft to park,
  3. Spawn a player aircraft,
  4. Optionally, after the player aircraft is spawned (when an event handler such as S_EVENT_PLAYER_ENTER_UNIT is called), destroy AI aircraft at spots you don't want parked. Note that If you destroy AI aircraft at other spots before the player aircraft is completely parked, the player aircraft may not spawn at the spot you wanted.

If you want to spawn AI aircraft after the mission starts: please wait 1 second between spawning to ensure spawning order; if the AI aircraft do not park in the desired spot, please increase the waiting time.

spot on supercarrier.png


Edited by Fuujin
addition
Link to comment
Share on other sites

On 3/16/2023 at 11:03 AM, Fuujin said:

When placing AI aircraft on a Supercarrier, the spots where the AI aircraft are parked are determined relative to the order in which they are spawned. Also, the starting order of taxiing and which CAT the AI aircraft will head to is determined for each spot.

For reference, I've attached a diagram showing them that I made a year ago when creating a mission.

Therefore, we can freely decide which aircraft to park in which spot by controlling the order in which the aircraft are spawn.
However, player aircraft must spawn as follows:

  1. Before the mission starts, park AI aircrafts at all spots (i.e. spawn them dynamically in a function executed when the LUA script is loaded with the MISSION START trigger or use "Add airplane group" in the mission editor to place them on the carrier--in this case, the AI aircraft parking spot cannot be specified),
  2. After the mission starts (the model time is 0 or later), destroy the AI aircraft at the spot where you want the player aircraft to park,
  3. Spawn a player aircraft,
  4. Optionally, after the player aircraft is spawned (when an event handler such as S_EVENT_PLAYER_ENTER_UNIT is called), destroy AI aircraft at spots you don't want parked. Note that If you destroy AI aircraft at other spots before the player aircraft is completely parked, the player aircraft may not spawn at the spot you wanted.

If you want to spawn AI aircraft after the mission starts: please wait 1 second between spawning to ensure spawning order; if the AI aircraft do not park in the desired spot, please increase the waiting time.

spot on supercarrier.png

 

@Fuujin, your method is very similar to what I've been using in creating SC-based missions, but seems more refined. For example, it never occurred to me that there was an order for taxi start. (I've been spawning all the aircraft except the player's as "uncontrolled" and starting them individually to get the desired launch order.) It also never occurred to me to "destroy" AI aircraft to create a parking spot gap for a player aircraft, which is a neat idea.

Which LUA are you referring to when you say, "spawn them dynamically in a function executed when the LUA script is loaded with the MISSION START trigger"?

How are you "destroying" the AI on deck?

Very Respectfully,

Kurt "Yoda" Kalbfleisch

London

"In my private manual I firmly believed the only time there was too much fuel aboard any aircraft was if it was fire." --Ernest K. Gann

 

Link to comment
Share on other sites

  • 2 weeks later...

Sorry for the late reply.
Because I basically haven't done anything with DCS since last year. (I am waiting for DCS maturity and DCS: Afghan map release)

On 3/22/2023 at 7:58 PM, Yoda967 said:

Which LUA are you referring to when you say, "spawn them dynamically in a function executed when the LUA script is loaded with the MISSION START trigger"?

A Lua script that you write and load with the DO SCRIPT FILE action of the MISSION START trigger.

 

On 3/22/2023 at 7:58 PM, Yoda967 said:

How are you "destroying" the AI on deck?

Conceptually:

  1. Give unique names to all AI aircraft groups parked on the carrier.
  2. AI aircraft to be deleted must be 1 unit per group.
  3. Plan the relationship between group names and spots.
  4. Place the base player aircraft and the base AI aircraft, one for each type, on the carrier.
  5. Spawn a new group by coalition.addGroup etc using the group data copied from the base aircraft.
  6. Destroy the AI aircraft parked in the spot you want to vacate with the Group.destroy method.
  7. AI aircraft destruction and player aircraft spawning are written in functions that are called by specifying 0 for the execution time of mist.scheduleFunction.

I've tried making and uploading a sample mission file on the current latest open beta as well as what I describe here. However, when spawning on a carrier deck, coalition.addGroup outputs the following error and the script stops.

2023-03-30 11:51:56.734 ERROR Trigger (Main): can't execute trigger, err: "l10n/DEFAULT/spotting.lua"

Even now, in mission I made a year ago, all AI aircraft and player aircraft spawn normally and park at spots I planed.

I don't know what the difference is between the mission file I made a year ago and the mission file I made today.
Because I don't have much time to look into it (as I said at the beginning, I am now away from working on DCS).

I will attach that mission file.
This mission file was interrupted in the middle of production, uses user skins and user modules, and presents skin display and audio output issues with the latest DCS. Additionally, the LUA scripts I have written are huge and written for me personally. So it seems difficult for someone to understand this.
However, I would like someone to investigate it and create a function that allows anyone to park at the desired spot with the latest DCS. And I hope someone will make a campaign that perfectly recreates OEF instead of me😁.

Perfect reproduction of OEF must implement at least the following:

  • In OEF, two carriers were deployed for daytime and nighttime operations, and the nighttime aircraft carrier's pilots only have missions from night to the next morning. Except for the first day of the war, the CVN-70 with a squadron of F-14Ds was responsible during the day. So it would be a campaign involving night missions as a pilot of CVN-65 or CVN-74 with squadrons of F-14As, or CVN-71 with a squadron of F-14Bs.
  • Aerial refueling procedures should adopt ATP-56(A) (i.e. hold on the right side of the tanker before refueling and on the left side after refueling).
  • Usually launches in 4 ship divisions from a carrier, split into 2 ship sections on the tanker track and take turns entering the designated killbox after Vul time elapses. The section consists of one F-14 and one F/A-18.
  • After taking off once, landing will be 8 hours later. Because once the planned mission is completed, a new mission(which the pilot does not know in advance) will be added from AWACS before returning to base.
  • As the campaign progresses, ATO will be ignored and AWACS will randomly ordered another mission.
  • There are many missions that pilots who like destruction don't want. For example, return home without doing anything. Of course, there are also CAPs for the carrier battle group. Also, pilots cannot choose the mission they want.
  • The FAC on the ground was inexperienced and did not provide enough information (i.e. there is no 9 line, instead vague or misleading instructions).
  • The carrier circles the designated waters of the North Arabian Sea and repeats launch and recovery through cyclic operations. Therefore, recovery is awaited while the carrier is heading downwind or during launch operations.
  • Aircraft are only permitted to navigate through aerial corridors called driveways.
  • Attack aircraft can only operate within designated kill boxes. Also, if the attack aircraft ahead of you are still in the killbox, you will have to wait until they leave.
  • Aerial refueling must be done on a 30,000ft tanker track. In addition, multiple missions are progressing in parallel, so there are multiple tanker tracks, and each tanker is always accompanied by multiple aircraft. Therefore, tankers are systematically replaced.
  • Pilots who do not comply with various procedures must be disqualified(even if they destroy many enemies). So, each procedure must be reproduced as accurately as possible(as well as the carrier departure/recovery procedures, boarding 45 min before launch, engine start 30 min before launch, taxiing start 15 min before launch; check-in/check-out procedures at AWACS, ground FAC and FAC(A); Aerial refueling procedure etc.).

etc.

Sorry for talking about something unrelated to this thread😅

OEF F-14A VF-41 2001-09-11.miz

Link to comment
Share on other sites

Thanks, @Fuujin! I'll take a look at your mission when I get home this afternoon.

Very Respectfully,

Kurt "Yoda" Kalbfleisch

London

"In my private manual I firmly believed the only time there was too much fuel aboard any aircraft was if it was fire." --Ernest K. Gann

 

Link to comment
Share on other sites

  • 7 months later...

If anyone is still looking for a way to park a player aircraft at any spot.
I had some time to play with DCS, so I looked into how to do it.


DCS always places the player aircraft in one of the six pad spots.

If you want to place it in another spot, you need to do it using the following steps in your LUA script.

1. First, destroy the player aircraft.
2. Spawn AI aircrafts in all spots (or place them by the mission editor).
3. Immediately after the start of the mission, destroy the AI aircraft at the spot where you want to spawn the player aircraft.
4. Clone player aircraft.

I have created sample mission files for F/A-18C & F-14A/B and have attached them.

These mission files places 16 AI aircraft groups with group names Aerial-1 to Aerial-16 in spots 1 to 16 in the mission editor.
Group numbers correspond to spawn order.

You can park at any spot by changing the group name 'Aerial-16' written in the 9th line of parking.lua in the mission file.

Note: For the F-14, the 15th spot could not be parked because the aircraft was too large. (Additional note) It is possible if nothing is parked in the 16th position.

do
	function init()

		-- Destroy Player Aircraft.
		Group.getByName('Player'):destroy()

		mist.scheduleFunction(function()
			-- Destroy AI Aircraft at spot want to spawn player aircraft.
			Group.getByName('Aerial-16'):destroy()
			-- Spawn Player Aircraft.
			mist.cloneGroup('Player')
		end, {}, 0)
	end
	init()
end

view?usp=drive_link

parking_FA-18C_hornet.miz parking_F-14A-135-GR.miz parking_F-14B.miz


Edited by Fuujin
Additional note
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...