Jump to content
Sign in to follow this  
panther42

[WIP] AI Carrier Flight Operations

Recommended Posts

This is a WIP... AI Carrier Flight Operations - launching and

recovery of aircraft on USS Nimitz Aircraft Carrier.

I am looking for a person or persons with scripting knowledge who would be willing to help out

on this project. Most is complete, but needs finishing touches, suggestions, and clean up.

Also looking for testers, as I am always looking for new ideas/bug finding.

Scripts adapted for Carrier Flight Operations launching and recovery of aircraft by panther42.

Uses modified parts of script by JDog with use of Mandoble's mando_takeoff2.sqf and mando_land.sqf(also both modified).

Mando Heliroute is also used, but only sidechat messages have been changed at this point.

JDog has given permission to use his scripts, but I have not been able to contact Mandoble.

For use with JDog's Nimitz aircraft carrier. Can be modified to work with other carriers.

These scripts will move, position and align aircraft on catapult prior to takeoff.

Aircraft will be launched via catapult, after which, AI takes over control of aircraft.

Launch and recovery VTOL aircraft.

Aircraft can also be recovered on the Nimitz carrier. Landing script and arrestor wires are implemented.

List of objectives:

Create GUI which shows the following: (I have no clue about creating a GUI...)
1. Aircraft in the air around the carrier - script is complete, need to implement in dialog
A. This could be a drop down list or other means of showing aircraft
B. I was checking out SPON Radar, which is a cool concept, but never completed.  I got it 
   to work in ArmA2, yet buggy.
C. MMA has custom_hud_waypoints which shows aircraft and mando_ILS positions...
D. Goal here is to select plane, select landing destination and land.
2. Status of available catapults for launch - script is complete, need to implement in dialog
A. Again, this could be some sort of drop down list or other means of showing available catapults
   B. Goal is to be able to select a plane, select an available catapult, and launch.

Figure out why Meatball's F-18 does not want to cooperate:
1. Acts like a wild stallion when roped trying to launch it...
A. Flaps going up and down, rear end slides to the port(left) side of the carrier.
B. When launching, slides port side bad enough will crash and fall off the side of the carrier 95% of the time.
C. When veiwed from distance, front wheel is off the ground?
2. If it does launch, recovery is 50/50.
A. Will sometimes stop then shoot off the port side of carrier.
B. Arrestor cable will sometimes bring front end way off the ground.
C. Front wheel overly sensitive to damage?  Sometimes blows up when wheel touches down.

IkaR's F-14 Tomcat rear end also slides to the port side, though not as bad as F-18
1. Can script arrestor hook up/down using "crochet", but cannot catch "crochet" or "hook" with 
arrestor wire.  Catches plane 2 to 3 meters above the fuselage.  Memory point problem?
2. When viewed out the control house tower window on Nimitz, F-14 is invisible.  Only see pilots. 
Is like Wonder Woman's jet...

Notes:

Myke's F-16 and Harrier seem to be only planes which do not "slide"	while moving
Successfull launches:                    
1. IkaR's F-14                            
2. BIS Harrier                             
3. Myke's F-16                           
4. Southy's F-15C/E                   
5. 5% Meatball's F-18                
6. Scar & nes4day F-22               
7. BIS A-10				 
8. BIS F-35                                
9. testing others... 

Successful recovery:
1. IkaR's F-14
2. BIS Harrier
3. Myke's F-16
4. Southy's F-15C/E
5. 50/50 Meatball's F-18
6. Scar & nes4day F-22 blows up every time @ td
7. BIS A-10
8. BIS F-35 only vertical
9. C130J

WARNING: THE SOUND IN THE VIDEOS BELOW IS TERRIBLE - PLEASE TURN DOWN YOUR VOLUME

These videos are the first I have made. Unfortunately, my system needs a serious upgrade. While recording, my FPS goes to crap. The actions in real time are more fluid and the sound in these videos is very bad. Take off is quicker while not recording, and landing distance is shorter also. Seems like my drop in FPS really affects the scripts...

gnIrPq-Hkc4

zuCjXKqI2-E

YoJhvQayH6s

bCF1bqwt4w8

I have more videos, but it takes forever to upload these to Youtube. Will post more when I have time.

Updated version which includes helicopter/VTOL coordination(I hope)

Update 20130810 to include these fixes:

Fix to repair point check. I was removing fuel then checking if less than .5 - corrected check(all planes were stopping...)

Changed all variables in case other mods were using same generic "names" - now all are preceeded by CFO_ "CFO_radio", "CFO_vertical", etc

Changed request for landing(planes) to check if more than one plane landing on Nimitz, and wait until second plane is in final approach

Corrected check for helicopter/VTOL landing.

Changed LandedStopped eventHandler to remove the EH index before the most recently added if the count was > 0. I was originally removing the most current if > 0.

Removed Rube library folder. Functions I am using are in the fn folder already

Removed "leftover" USN_FP from mission - Thanks Due1337

Update 20130811:

Corrected take off check - wrong index was used when 2 planes were on approach

Changed LandedStopped EH - found out planes parking on Nimitz were leaving towards Kamenyy refuel/repair point...

Helicopter radio variable check corrected. Was incorrectly set with three parameters(like setVariable)

Removed deck6 and deck7 from available parking spots for planes - these are for helicopter/VTOL at this time

Removed use of BIS_fnc_selectRandom (see issues here: BIS_fnc_selectRandom not so random?- using function from RUBE library instead

p42_CFO_test

Edited by panther42

Share this post


Link to post
Share on other sites

Realy great stuff here panther, Arma2 misses a lot of potential atmosphere in missions.

Airports on maps have similar simple "automatic" systems but are frustratingly hard to work with. Potentially weeks of work just to make it look normal and active.

The mission maker has to do all the precise work specific to each single mission.

We need more similar modules/ FSM whatever to encourage "natural" behavoiurs. A bit like the random civilian modules they take away the artificial feel of many maps.

This is the next step, combining many of the best functions/ mods/ scripts.

AI airtrafic control is the next hurdle.

kheiro - equally impressive work. Can't wait to blow it up.

Share this post


Link to post
Share on other sites

I have made AirTrafficControlRabbit script that restricts aircraft from entering the runway on landbased runways, if they are in use (landing or takeoff)

Totally agree about natural behaviours. MSO does go some way towards this, but I'm not sure how this works on carriers!

Share this post


Link to post
Share on other sites

you should make it so that the planes will accelerate before landing so that if they miss the rope they won't die. I've been waiting forever for something like this. With it I'll make a mission with Gnat's Frigates and Kunetzov and this and have a massive naval battle.

Share this post


Link to post
Share on other sites

Nice work there panther42 it looks great,

I wish you made this about 6 months ago, it would have saved me a lot of pain : P

I did some similar things in my Carrier Operations -Duala campaign and had a few problems which I should mention.

If you use the "playMove" command, then be aware that tides seem to effect to posASL of Nimitz. This can have implications on the playback of your recorded moves in different months of the year (because the tides are different). Your wheels on an aircraft can be half buried in the carrier deck on move playback for example. I found when launching off a catapult, the AI aircraft really shudder and shake, and a player controlled aircraft can on some conditions all most stop dead when the catapult lets go.

I only found the issue late in my campaign development because I used the first mission as a template with the intention of just copying the mission, editing it as required then changing the dates to suit my campaign timeframe.

Anyway I am not sure if its going to be a problem for you, I hope not but I thought I better mention it : )

Thanks

Rough Knight.

Edited by Rough Knight

Share this post


Link to post
Share on other sites

Awesome! Looking forward to this! I hope you can keep it so simple yet efficient in scripting load so that I can use it later with my OPFORPLANNER suite and just place a carrier on map with planes onboard so that AI will be able to do the shuffling about on its own, launch and recover as needed!

I suppose there is no "LAND" Eventhandler that you can intercept for redirecting landing planes automatically to the CVN?

Good Luck with this project!

Share this post


Link to post
Share on other sites

Awesome work mate, but i think there might be something wrong with the sound on the videos, if you can try upload as mp4 to you tube, i found this helps when it gets compressed.

Regards

Bp

Share this post


Link to post
Share on other sites

Hi again Panther :p

As you know im not great with scripting lol, but i can hlp with testing for sure if you still need someone. I can run FRAPS at 1080p solid 30 fps on my rig too if u need someone to grab some more footage. Just let me know. This is defiantly an addon i want to see available so i'd be happy to hlp however i can.

Kydo

Share this post


Link to post
Share on other sites

Just an update for those interested.

I keep getting sidetracked with new and different ideas... Although all the takeoff and landing scripts work fine, I am trying to find easier ways for the user to implement.

Here are some screen shots of the Nimitz Spawner for placing vehicles on the deck of JDog's USS Nimitz. This is based off of Mondkalb's LHD Vehicle Spawner, and permission has been given to update his work.

Pic #1 of empty deck, positions for spawn are shown:

nimitzspawner.jpg

By panther42 at 2012-05-21

Pic #2 of some aircraft placed on the deck:

nimitzspawner1.jpg

By panther42 at 2012-05-21]

This spawner works where ever the Nimitz is placed in the editor. Dialog config has been changed to work with different aspect ratios.(I hope)

I would like to get some ideas on deck placement, and directional positioning...ie "it needs more spawn points." "this position should face this way" etc.

Aircraft which should be included in the list of available for spawn?

Edited by panther42

Share this post


Link to post
Share on other sites

This would be amazing to get into Arma 2 i been trying to use mandoble runway for this too and i have failed in every way, i hope that this will be out soon, and maybe for your last question of where there planes are, maybe you can make a spawner for the lower deck and have an automatic aircraft tug spawn down there, where a player (or if you wanna be really advance an AI to move the aircraft to the top deck if asked for) this will give you atleats like 15-20 (probably more) planes on this ship, also i would suggest the f-14, f-15, f-16, f-18, (maybe c-130 that will just land on the ship to drop people off from the main land airport, then will take back off and go the mainland until a player or an AI is inside of it), maybe the f-22 (usually is used on carriers now), harrier, A-6 (VTE mod), etc.

Also great work on the videos, its everything that i been asking for around in forums and been trying to accomplish my self but failed.... cant wait

Share this post


Link to post
Share on other sites

The F-22 is a land based only fighter.

I personally would want only Navy aircraft (F-14, F/A-18, SH-60 Seahawk, MH-60S, etc.). Maybe this can be user definable to limit only specific types. I just see something wrong with F-16 being on a carrier. Same with the F-15.

I saw one addon maker hopefully coming out with a Sea Viking which could possibly have some transport value if they put in enough cargo slots. I keep hoping someone would come out with a Hawkeye and the transportation variant. Maybe one day.

Share this post


Link to post
Share on other sites

Panther, is that possible that besides AI ambiance and spawner GUI you add something like "parking" GUI with this module. Like for instance once you land you have a acces to GUI where similar to vehicle spawner you can see all availible free spots and can move your aircraft there. That would make sense in carrier operations where AI and players operate together. Even without this great work and if you need help with GUI design let me know I'll behappy to help.

BTW regarding possible deck layouts, maybe you can add one simple one where you have only FA18 and MH60 and couple of tow trucks spawned.

nimitz_deck_layout_zpsee27c428.jpg

Edited by John_Spartan

Share this post


Link to post
Share on other sites

still working on this one... had lost interest, but John Spartan kinda gave me a bit of nudge to move forward.

Here is testing version I'm working on. If anyone has input, bug reports, or better code optimization, let me know.

Once again, thanks to JDog for the USS Nimitz. Some of his code I've changed outside of the pbo to work with CFO. Also, the towing tractor he integrated doesn't work well for some aircraft. I'd have to add values to the current one to make it work right, but then it wouldn't be the original released version...

Mandoble for mando_takoff, mando_land, and mando_heliroute. I could never get ahold of him, so I've heavily edited to work with CFO.

xeno for the repair script

rube for some of his functions

Hoz for the nearestAirport/closestTown functions

John Spartan for his F/A 18

Meatball for his F/A 18

yurapetrov for his seahawks

Evil_Echo for his tensor math function found here: Evil_Echo tensor rotation

and the knowledge shared by users of the forums...

This test version is just that. There are several features not integrated yet. Maybe it's more of a template at this time??

Some pointers:

There are several planes/helicopters, and line flight officers(cat1 and cat2, 3 and 4 don't work so well with small area) set up on the Nimitz. I will integrate the ability to change the types/names/amount in future version(partly in code, just not implemented)

Takeoff from the Nimitz is done by trigger or script at this time. I will implement automatic control.

Landing on Nimitz is done via wp condition, trigger, or you can use automatic landing script(will chose where to land based on VTOL value. MV 22 is always vertical). For auto landing control, set: p42Nim setVariable ["landem",true,true] in trigger or other means. Currently I just use debug console. Auto landing control will gather all planes within 8000 meters of the Nimitz, and direct them to available airports.

If you get sick of the sidechat messages, change the aircraft's "radio" variable to false: Hawk1 setVariable ["radio",false,true]

Helicopter and VTOL landing is not quite coordinated yet. You may get some landing on each other. Working on this one...

If an aircraft takes damage while landing on the Nimitz, a deck emergency will be declared, and any outbound aircraft will be stopped. Inbound aircraft will be routed to the next available airport. May still need some work.

If on the Nimitz, you have between 2 and 4 minutes to clear the debris... hint towing tractor

Flights(planes) directed to the main airfield on Utes (Kamenyy), will be checked for low fuel or damage. If appropriate, they will be directed to refuel/rearm/repair point. After complete, will continue with taxi and takeoff proceedure.

Landing on Nimitz:

null = [planehere]execVm"scripts\mando_land_CFO.sqf"

Takeoff from Nimitz:

null = [planehere, "deck2", 1,3,1]execVM"scripts\mando_takeoff_CFO.sqf"

// Arguments:
plane (not really necessary to be a plane)
start position on Nimitz deck: "deck1"(elev1), "deck2"(elev2), "deck3"(elev2), "deck4"(elev3), "deck5"(elev3), "deck6"(elev4), "deck7"(near elev4 and JBD 4), "fuel1"(fuelpoint by elev1), or "fuel2"(fuelpoint by elev1)- (more could be added)
Number of crew members inside the plane before starting take off procedure
Number of seconds to wait idle after all crew is inside
Type of launch - Aircraft type:
	1 - fast mover. traditional horizontal launch
	2 - C130J horizontal launch - slower accel, lower speed to release
	3 - MV-22 and AV-8B vertical launch
	4 - F-35B vertical launch (faster top end)
	5 - MV-22 horizontal launch - rotors up
	Testing below...
	6 - just a fun test with MV-22 to animate rotors forward for horizontal launch...doesn't work to good due to length of blades :)

This test mission requires John Spartan's F/A 18, Meatball's F/A 18 and yurapetrov's seahawk addons.

File: see first post Please do not mirror at this time

In the mission, you have three playable soldiers. Switch around to see what's going on. You'll start out on the Nimitz. Watch the LFO's if cat1 or cat2 are used. I've implemented JDog's animation from the USS Nimitz

I'm sure I'm forgetting something, if so, just ask...

Again, please let me know if you find bugs(its a test version) or have code optimization help.

panther42

Edited by panther42

Share this post


Link to post
Share on other sites

Awesome work man ! ;)

Share this post


Link to post
Share on other sites

Updates available in first post

Edited by panther42

Share this post


Link to post
Share on other sites

Due1337, USN_FP may be a "leftover" from testing different planes. Just delete the line from the mission.sqm

I'm certain it was from this one:

F-14D Super Tomcat

Edited by panther42

Share this post


Link to post
Share on other sites

Yeah looks like a leftover from the F14 Pilots. By the way pretty nice work.

Share this post


Link to post
Share on other sites

Panther you are my HERO!

Just tested your mission. I had something similar but not in such scale and complexity. Mate if you can pack this as a MODULE and to set up just sync with carrier and planes with few in it parameters it would be priceless.

From what I tested it seamlessly creates AI AIR traffic ambiance. Perfect for SP. Mission designers should use this for Carrier Ops as a base.

Also maybe instead of "side chat" radio messages its worth of thinking about some real voices recorded and used as air traffic control. That cant be that hard, and if you want send me a list of phrases/scripts and I'll get my squad to do some voice acting.

Brilliant. Don't you dare to abandon this project [RL off curse is a priority].

John

Share this post


Link to post
Share on other sites

Thanks, John_Spartan.

I will have to get with you on the voice stuff, as I've never messed around with it.

Updated version now online in first post

@ Ei8ght, I will have to look into the Operation Frenchpoint Mod. Looks like some very nice models...

Edited by panther42

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×