Shahdoh Posted June 19, 2016 Posted June 19, 2016 (edited) With more and more WWII fighters on the way, and the modding community providing some excellent bombers to utilize, I thought I would share how I have put large formations of bombers (so far up to 24) together where they will stay in formation for the entire flight even with turning waypoints. Now sometimes, the AI will drift out of position, but with this method, they will eventually get back into formation as long as their lead is still alive. Of course, sometimes during their maneuvering, they will hit another in the formation. and I will try to explain how to avoid those situations, but even under the best efforts, formation accidents can still happen. These accidents did occur in real life as well so, depending on how often this happens with your formations, whether you choose to accept it or try to fix it. To start off, if you are doing a WWII bomber formation, you want them to hold formation even under attack. To do so, you will need to turn off their reactions to threats and have no task as such: You can leave them on, but they will want to break formation and dog fight with the enemy. See this post for the scripting I use to get around that: http://forums.eagle.ru/showthread.php?t=168153 I also suggest starting the formation in the air, trying to get all the AI into the air and into formation afterwards adds a TON of work to an already tedious process. Also a helpful tip is to set all your waypoints (with airspeeds and alts) for the lead before you start setting up your wingmen. I also recommend using CTRL C to copy it, click the cursor on the new location and then CTRL V to past a copy of the a/c in the new spot and all the speed/alt/waypoint and advanced waypoint options will be in place for you. So, we have our lead aircraft, now for the wingmen. You want to place the next aircraft close to the formation distance you have planned, but give them JUST a bit of wiggle room on the loose side. Here I am setting up a simple V formation with 2 wingmen, spacing as such: 100 feet back from lead, 225 feet off to the side and 25 feet below. These distances might seem a bit far, but the AI gets really nervous when put to close to another, Size of a/c in use has a lot to do with how close you can get them without them fidgeting all around. You can play around with these distances to get the desired formation and in how stable they will hold it. To do so, you use the Advanced Waypoint action: Perform Task: Follow on the wingman, then with that selected, you click on the lead a/c and you will see a yellow line connecting the 2. Once that is done, you set the X/Y/Z coordinates to set your distances; X = the forward / back distance from the lead (positive for forward, negative for back) Y = vertical difference from the lead (Positive is above, negative is below) Z = distance off to the side of lead (Positive is to the right, negative is to the left) Copy the first wingman and paste it into place for the 2nd. Change its name and you will see the follow is already set. Now, open up the Advanced waypoint option and change the X/Y/Z according to your prefered formation. For this, I only needed to change the Z value to a positive(I did the left one first, which had a negative value). And boom, I have a V formation of bombers ready to go. For additional a/c and larger formations, I recommend you keep them in elements, then have those separate element leads follow the main lead with the element wingmen following there element lead as such: Here, element leader is following the main formation lead: And here the element wingman is following the element lead: This does a couple things. First off, you will not have to calculate the distances of every a/c to the lead, only the element leaders, all your element wingman can maintain their same distances to their element lead. 2nd, if that lead becomes destroyed, then all a/c will be on their own and the formation will fall apart. This will hold it together better under adversity. Waypoints: Many things will affect how well the formation will stay together. How close they are, airspeeds and waypoint turn angles. You will want to keep the waypoint turn angles shallow or it will easily throw the AI out of position. I try to use turns of only 30-45 degrees at most. You will also want to set the waypoints of every a/c in the formation so the waypoint positions match the formation they are in. In my experience, the tighter they are to the actual positioning, the less fidgeting from the wingman (at least 1 of the many factors). I also try to setup the positioning as if it was halfway through the turn: Yes, this can be very tedious so I recommend keeping your waypoints as few and simple as possible, just enough to get the effect of in and out for your mission. Airspeed as mentioned before is also very important. Set it to fast and the wingman can not keep up with the lead. They need a margin of extra speed to maintain formation. Also, set it to slow and they will continually fly past the lead, especially if they are on the inside of a turn. They will do their best to maneuver and get back to position eventually, but the more they maneuver, the more likely they may hit another a/c in the formation. So, now you got them all flying around in a beautiful formation, what happens when the lead gets taken out? They will revert to their waypoints which will be the first one(if you started the formation right away) which is actually waypoint 0. To prevent this, you will need to setup another Advanced waypoint action: Perform Command: Switch Waypoint This needs to be applied to every wingman in the formation and will need to have multiples based on how well you want it to follow your waypoints if its leader is missing. Back to the less waypoints is better view. I usually try to setup Waypoint 1 as a straight in shot to the bombing location. Doing this I can then get away with just 2 switch waypoints per wingman. 1st one is to get them to the target, 2nd to get them home if their lead is destroyed after the target is bombed. To set this up, you will need to know the time to waypoints for each of the waypoints you will be switching to. At the very first waypoint of the wingman, add the Switch Waypoint and then click on: Condition and then check the: TIME MORE box and enter a value of the bombers start time and set the waypoint to Waypoint 1. This will keep the wingman from turning around and trying to start the waypoint route from 0. Then set the 2nd Switch Waypoint to go to the next desired waypoint and the time condition based off the waypoint time of the previous switch waypoint destination. Example, if time to Waypoint 1 was at 12:33:45 I would set my 2nd switch waypoint to point to waypoint 2 (or maybe even the last, just to get it home) and the condition time would be 12:33:50 (I like to pad the time 5-15 seconds to make sure it reached it). Is your head hurting yet? I know mine is trying to explain it all. But it is a great thing to see your formation fly to target, take fire from the enemy, turn and return back while maintaining the formation you set up for them. Good luck! Edited July 9, 2016 by Shahdoh 2
FlightControl Posted June 19, 2016 Posted June 19, 2016 With more and more WWII fighters on the way, and the modding community providing some excellent bombers to utilize, I thought I would share how I have put large formations of bombers (so far up to 24) together where they will stay in formation for the entire flight even with turning waypoints. Now sometimes, the AI will drift out of position, but with this method, they will eventually get back into formation as long as their lead is still alive. Of course, sometimes during their maneuvering, they will hit another in the formation. and I will try to explain how to avoid those situations, but even under the best efforts, formation accidents can still happen. These accidents did occur in real life as well so, depending on how often this happens with your formations, whether you choose to accept it or try to fix it. To start off, if you are doing a WWII bomber formation, you want them to hold formation even under attack. To do so, you will need to turn off their reactions to threats and have no task as such: You can leave them on, but they will want to break formation and dog fight with the enemy. See this post for the scripting I use to get around that: http://forums.eagle.ru/showthread.php?t=168153 I also suggest starting the formation in the air, trying to get all the AI into the air and into formation afterwards adds a TON of work to an already tedious process. Also a helpful tip is to set all your waypoints (with airspeeds and alts) for the lead before you start setting up your wingmen. I also recommend using CTRL C to copy it, click the cursor on the new location and then CTRL V to past a copy of the a/c in the new spot and all the speed/alt/waypoint and advanced waypoint options will be in place for you. So, we have our lead aircraft, now for the wingmen. You want to place the next aircraft close to the formation distance you have planned, but give them JUST a bit of wiggle room on the loose side. Here I am setting up a simple V formation with 2 wingmen, spacing as such: 100 feet back from lead, 225 feet off to the side and 25 feet below. These distances might seem a bit far, but the AI gets really nervous when put to close to another, Size of a/c in use has a lot to do with how close you can get them without them fidgeting all around. You can play around with these distances to get the desired formation and in how stable they will hold it. To do so, you use the Advanced Waypoint action: Perform Task: Follow on the wingman, then with that selected, you click on the lead a/c and you will see a yellow line connecting the 2. Once that is done, you set the X/Y/Z coordinates to set your distances; X = the forward / back distance from the lead (positive for forward, negative for back) Y = vertical difference from the lead (Positive is above, negative is below) Z = distance off to the side of lead (Positive is to the right, negative is to the left) Copy the first wingman and paste it into place for the 2nd. Change its name and you will see the follow is already set. Now, open up the Advanced waypoint option and change the X/Y/Z according to your prefered formation. For this, I only needed to change the Z value to a positive(I did the left one first, which had a negative value). And boom, I have a V formation of bombers ready to go. For additional a/c and larger formations, I recommend you keep them in elements, then have those separate element leads follow the main lead with the element wingmen following there element lead as such: Here, element leader is following the main formation lead: And here the element wingman is following the element lead: This does a couple things. First off, you will not have to calculate the distances of every a/c to the lead, only the element leaders, all your element wingman can maintain their same distances to their element lead. 2nd, if that lead becomes destroyed, then all a/c will be on their own and the formation will fall apart. This will hold it together better under adversity. Waypoints: Many things will affect how well the formation will stay together. How close they are, airspeeds and waypoint turn angles. You will want to keep the waypoint turn angles shallow or it will easily throw the AI out of position. I try to use turns of only 30-45 degrees at most. You will also want to set the waypoints of every a/c in the formation so the waypoint positions match the formation they are in. In my experience, the tighter they are to the actual positioning, the less fidgeting from the wingman (at least 1 of the many factors). I also try to setup the positioning as if it was halfway through the turn: Yes, this can be very tedious so I recommend keeping your waypoints as few and simple as possible, just enough to get the effect of in and out for your mission. Airspeed as mentioned before is also very important. Set it to fast and the wingman can not keep up with the lead. They need a margin of extra speed to maintain formation. Also, set it to slow and they will continually fly past the lead, especially if they are on the inside of a turn. They will do their best to maneuver and get back to position eventually, but the more they maneuver, the more likely they may hit another a/c in the formation. So, now you got them all flying around in a beautiful formation, what happens when the lead gets taken out? They will revert to their waypoints which will be the first one(if you started the formation right away) which is actually waypoint 0. To prevent this, you will need to setup another Advanced waypoint action: Perform Command: Switch Waypoint This needs to be applied to every wingman in the formation and will need to have multiples based on how well you want it to follow your waypoints if its leader is missing. Back to the less waypoints is better view. I usually try to setup Waypoint 1 as a straight in shot to the bombing location. Doing this I can then get away with just 2 switch waypoints per wingman. 1st one is to get them to the target, 2nd to get them home if their lead is destroyed after the target is bombed. To set this up, you will need to know the time to waypoints for each of the waypoints you will be switching to. At the very first waypoint of the wingman, add the Switch Waypoint and then click on: Condition and then check the: TIME MORE box and enter a value of the bombers start time and set the waypoint to Waypoint 1. This will keep the wingman from turning around and trying to start the waypoint route from 0. Then set the 2nd Switch Waypoint to go to the next desired waypoint and the time condition based off the waypoint time of the previous switch waypoint destination. Example, if time to Waypoint 1 was at 12:33:45 I would set my 2nd switch waypoint to point to waypoint 2 (or maybe even the last, just to get it home) and the condition time would be 12:33:50 (I like to pad the time 5-15 seconds to make sure it reached it). Is your head hurting yet? I know mine is trying to explain it all. But it is a great thing to see your formation fly to target, take fire from the enemy, turn and return back while maintaining the formation you set up for them. Good luck! Great post! If you want i can make a script (class)for that in moose. Looks very similar to the logic for escorting that is required here. If we have such script, the interface to setup large formations could be easier without manual setup work...We could call the class FORMATIONMGR? Sent from mTalk on Windows 10 mobile [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
Shahdoh Posted June 19, 2016 Author Posted June 19, 2016 Sounds interesting, anything to help reduce the tedious nature of it would be great.
FlightControl Posted June 19, 2016 Posted June 19, 2016 Sounds interesting, anything to help reduce the tedious nature of it would be great. If you want, you can help develop it. We'll share code and insights. We are working on a couple of projects using the moose framework in a similar manner, and it works very well. Sent from mTalk on Windows 10 mobile [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
Shahdoh Posted June 19, 2016 Author Posted June 19, 2016 I have no idea where to even start for code like that.
FlightControl Posted June 19, 2016 Posted June 19, 2016 I have no idea where to even start for code like that. I can help you with that and you'll learn. People always have choices [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
Shahdoh Posted June 19, 2016 Author Posted June 19, 2016 And then I will continue to do it manually. Sorry, you are the one that suggested code could be written to do this. If I had the knowledge or capability or time to, I would have done it already.
adrianstealth Posted June 19, 2016 Posted June 19, 2016 i use the P-51 never seen another ww2 plane, how do i activate them?
FlightControl Posted June 20, 2016 Posted June 20, 2016 And then I will continue to do it manually. Sorry, you are the one that suggested code could be written to do this. If I had the knowledge or capability or time to, I would have done it already. Wait and see... Sent from mTalk on Windows 10 mobile [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
FlightControl Posted June 21, 2016 Posted June 21, 2016 (edited) Find this little concept. It is still a bit rough ... It needs some further optimization of the vector calculation logic (there is a problem when planes get too near to the leader, they start swivering...). Anyway, this is what I had in mind ... And before i forget to mention, the position of the planes is currently randomized, so, for a good formation building, formation "builder" functions would be constructed as part of the class ... You'll see planes crashing and that is because they are too close to each other. The AI freaks out ... But i guess in real life when they were flying so close next to each other, it would be very difficult for pilots, no to keep order and don't crash ... You would need to use the MOOSE framework, and code it like this: local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow Group"):FilterStart() FollowGroupSet:Flush() local LeaderUnit = UNIT:FindByName( "Leader" ) local LargeFormation = FOLLOW:New( LeaderUnit, FollowGroupSet, "Large Formation", "Briefing" )--:TestSmokeDirectionVector(true) a formation builder call could look like this: LargeFormation:Echelon() the idea would be that after this call, all the planes would go in echelon formation ... What are the military formation types used in these large formation flying during WWII??? Do they have a name and how would they form the formation?Moose_Test_FOLLOW.miz Edited June 21, 2016 by FlightControl [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
Shahdoh Posted June 21, 2016 Author Posted June 21, 2016 I know you have a lot to tidy up with the code, but currently seeing all the individual a/c flying a bit too "loose". Maybe set closer and to specific distances that would change. This is the bases for most US WWII bomber formations though there were a good number of variations to it: https://en.wikipedia.org/wiki/Combat_box Need to be sure in the script, that if the lead is taken out, they revert to another lead or fly out on their own waypoints which need to mirror the lead a/c. The formation should not change, but just continue on with the loss of the lead.
FlightControl Posted June 22, 2016 Posted June 22, 2016 I know you have a lot to tidy up with the code, but currently seeing all the individual a/c flying a bit too "loose". Maybe set closer and to specific distances that would change. . At the moment, the positions are randomized in a box. However, the fear that i have is, that when the formation is too close, the ai freaks out... Well see. Maybe there is fine tuning. ... I'll see if i can come up with some decent formation function to position the aircraft... Need to be sure in the script, that if the lead is taken out, they revert to another lead or fly out on their own waypoints which need to mirror the lead a/c. The formation should not change, but just continue on with the loss of the lead. Of course. Q:Were there multiple 'leads' in a formation? Anyway, when the lead gets killed there are several options I guess, which you mentioned... Finally I want ESCORT to be derived FORMATION, so that ESCORT adds also the interactivity to the flight using the radio menu.. This thing will grow... Sent from mTalk on Windows 10 mobile [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
Recommended Posts