PatrickAWlson Posted October 4, 2021 Posted October 4, 2021 Today a formation of planes flies a waypoint sequence under the control of its leader. Good. We have events like plane critically damaged that can be used to alter normal orders. Also good. Case study: I have the formation of planes flying waypoints A, B, C, and D. On each plane I have an OnCriticalDamage event that will trigger a waypoint to the nearest friendly base for an emergency landing (timer, waypoint, and landing MCU). Some time after WP B plane #2 is critically damaged. The event triggers and its emergency landing waypoint kicks in. The WP is assigned only to the damaged plane. The rest of the formation continues on from B to C. Upon reaching C, WP D is triggered. The flight continues on to WP D. What happens to plane #2? Does it continue on to its emergency landing or does it now obey orders from the flight leader, turn around, and start limping towards D? The core question is: is there a way to extract a plane from a formation? I can't cancel the formation because it is needed for the rest of the flight.
JimTM Posted October 4, 2021 Posted October 4, 2021 (edited) I'm not sure about what happens in your scenario, but have you considered trying the AI Return to Base Decision option in the AI Object Advanced Properties instead of using the emergency waypoint? The RTB feature is documented on pg. 210 in the editor manual. Note that I have not tested this since 2016, but at the time the behaviour of formation members was unpredictable (see the "Note" section of the entry in the manual for more details). Maybe this feature has improved. Edited October 4, 2021 by JimTM
PatrickAWlson Posted October 5, 2021 Author Posted October 5, 2021 I do use the RTB option. I was hoping for a more controlled response under specific conditions.
Gambit21 Posted October 5, 2021 Posted October 5, 2021 There’s no way that I’m aware of to separate an entity from it’s formation, thus giving it it’s own logic. The other sim provides logic to get any aircraft to form up with any other aircraft - not possible in BoX unfortunately. 1
AEthelraedUnraed Posted October 5, 2021 Posted October 5, 2021 (edited) 8 hours ago, PatrickAWlson said: I do use the RTB option. I was hoping for a more controlled response under specific conditions. In this case however, it does exactly what you want: make a single plane land at the nearest friendly airfield when damaged. Were you able to trigger the RTB waypoint for only #2 at all? I thought that would propagate to the rest of the group. Edited October 5, 2021 by AEthelraedUnraed
DN308 Posted October 5, 2021 Posted October 5, 2021 I’m really interested in the answer, ‘cause I would need it also. but with another nuance. in the case of no base available (return route over the sea), is there a way to order RTB route with no landing? to be clear : a flight is coming from England over the North Sea to Holland. The end of mission will be over the sea too. Can I design a specific WP as rally point for damaged planes? Without l’andin thought.
AEthelraedUnraed Posted October 5, 2021 Posted October 5, 2021 1 minute ago, DN308 said: I’m really interested in the answer, ‘cause I would need it also. but with another nuance. in the case of no base available (return route over the sea), is there a way to order RTB route with no landing? to be clear : a flight is coming from England over the North Sea to Holland. The end of mission will be over the sea too. Can I design a specific WP as rally point for damaged planes? Without l’andin thought. An alternative solution would be to place an airfield object in the sea at the western border of the map. I don't think the AI knows it cannot land there.
DN308 Posted October 5, 2021 Posted October 5, 2021 Sure. I will try that Thanks 32 minutes ago, AEthelraedUnraed said: An alternative solution would be to place an airfield object in the sea at the western border of the map. I don't think the AI knows it cannot land there. Stupid question anyway : how the plane would knows that it is its home base to return to ?
AEthelraedUnraed Posted October 5, 2021 Posted October 5, 2021 32 minutes ago, DN308 said: Sure. I will try that Thanks Stupid question anyway : how the plane would knows that it is its home base to return to ? The Return To Base Decision will make the aircraft fly to the nearest friendly airfield object when critically damaged. If there's only one friendly airfield object (the one in the sea), that is where it'll fly to.
PatrickAWlson Posted October 5, 2021 Author Posted October 5, 2021 What I was going for, in detail is this: 1. Damaged planes and wounded pilots return to a medium priority WP and land. This allows them to defend themselves but they will prefer to go home. 2. If the plane reaches critically damaged then the WP becomes high priority and the plane will try to go home under any circumstances. I might try to achieve what I want by lowering the damage threshold value. At the moment, using the default 50, it seems that damaged planes hang in there way too long. Has anybody played with that value?
Varibraun Posted October 5, 2021 Posted October 5, 2021 5 hours ago, PatrickAWlson said: What I was going for, in detail is this: 1. Damaged planes and wounded pilots return to a medium priority WP and land. This allows them to defend themselves but they will prefer to go home. 2. If the plane reaches critically damaged then the WP becomes high priority and the plane will try to go home under any circumstances. Of course I am no help...but really appreciate you working on this, would be awesome if you figure it out! (Just saw your other post...this is why you have no energy to fly - you work too hard!).
PatrickAWlson Posted October 5, 2021 Author Posted October 5, 2021 (edited) 51 minutes ago, Varibraun said: Of course I am no help...but really appreciate you working on this, would be awesome if you figure it out! (Just saw your other post...this is why you have no energy to fly - you work too hard!). A lot of truth to that. Coding takes energy, and if I do it at home after doing it at work I'm generally not up to flying. Thing is, a lot of times I would rather code than fly (sounds weird, but true), so it's all good. When I am deep into coding (the whole date based mods thing ended up being a couple thousand lines) I just crank up something semi-mindless in the evening. Playing through Kingdom Come Deliverance again. Love that game and it doesn't require a lot of me. Anyhow, back to this ... looks like it's not going to work as I would like for the reasons outlined above. I think that I am going to make the damage threshold a configuration item, with the default being 50 just as it is by default. Then I will ask those interested to try different values and report back on results. I can do that in 20 minutes. Edited October 5, 2021 by PatrickAWlson
Gambit21 Posted October 5, 2021 Posted October 5, 2021 I've built... "on critical damage" (or bingo ammo, or timer etc) go home, unless enemy is within such and such a proximity still, then engage, unless critical damage then go home, re-check for enemy proximity etc etc. The problem is that when you get cute with the logic like that, it quickly becomes a nightmare to test and troubleshoot for what should be obvious reasons. So I tend to keep it simple. I think a good balance is something like the following, and this is about as complex as I'm willing to implement in a campaign. Say a flight of 4 109's. Condition - Leader killed, bug out (meaning high priority waypoint, high speed boogie out of dodge) Forgo the "check for enemy still in radius" Condition - half of flight killed (using counter) - bug out as above. Condition Lead bingo ammo - but out as above. Add any other condition, but I normally keep it simple. Feed into appropriate counter for bug out. This doesn't solve your "individual plane" logic issue, which there's no way around, but it yields some variable, and less robotic AI behavior. The only problem is aircraft bugging out with the player flight still engaging, making for some 'sitting duck' targets as the AI departs for their "priority HIGH" waypoint. This is where you can add in a proximity condition etc if you wish. You really can do a lot, the limitation I find is testing/bug squashing if you do something wrong. After a time, as I'm sure you can relate, I can "write" for several hours before running a test most often nail it. In the instance I make a bonehead error though...it can be a problem finding what I did wrong if I have so many variables. 4 hours ago, PatrickAWlson said: Thing is, a lot of times I would rather code than fly (sounds weird, but true), so it's all good. I can relate. I "write" 99.99% of the time. Trying to change that though...not doing so well thus far, but I'm trying. I have some amazing content to work with, so I should be able to manage it. The thing is, awesome content just makes me want to create with it. 2
Varibraun Posted October 5, 2021 Posted October 5, 2021 4 hours ago, PatrickAWlson said: Thing is, a lot of times I would rather code than fly (sounds weird, but true), so it's all good. 28 minutes ago, Gambit21 said: I can relate. I "write" 99.99% of the time. Well...you two having that "problem" has worked out really well for all the rest of us. Thank you -
PatrickAWlson Posted October 6, 2021 Author Posted October 6, 2021 @Gambit21 I have become fond of medium priority waypoints for things like this. The 1C team seems to be making the AI better around this. They fight if they have to but will avoid combat if possible.
Gambit21 Posted October 6, 2021 Posted October 6, 2021 1 minute ago, PatrickAWlson said: @Gambit21 I have become fond of medium priority waypoints for things like this. The 1C team seems to be making the AI better around this. They fight if they have to but will avoid combat if possible. Good to know - thanks.
AEthelraedUnraed Posted October 6, 2021 Posted October 6, 2021 12 hours ago, PatrickAWlson said: Playing through Kingdom Come Deliverance again. Love that game and it doesn't require a lot of me. You too? It's one of my all-time favourite games ? The combat takes a while to get used to, but is so much better than the buttonmashing swordfighting usually is. Looking forward to Kingdom Come 2. Anyhow, back on topic. 7 hours ago, PatrickAWlson said: @Gambit21 I have become fond of medium priority waypoints for things like this. The 1C team seems to be making the AI better around this. They fight if they have to but will avoid combat if possible. True, but often the AI doesn't quite fit the aircraft type. For instance the DH.4 will actively engage enemies, which I think would be appropriate for a Low priority waypoint, but not Medium. For better AI behaviour, look at the solution Gambit posted above, although this indeed quickly increases the complexity of the mission.
IckyATLAS Posted October 7, 2021 Posted October 7, 2021 On 10/6/2021 at 2:05 AM, PatrickAWlson said: @Gambit21 I have become fond of medium priority waypoints for things like this. The 1C team seems to be making the AI better around this. They fight if they have to but will avoid combat if possible. The medium priority is very clear. If not attacked continue flying. This can bring to situations where if the enemy does not attack you but it attacks say your ground troops then your flight may fly even parallel to the attacking planes by a few hundred meters totally unabated. Being able to switch on the fly the priority of the active waypoint during flight would make things more flexible that play with activating and deactivating different waypoints to reach the same behavior. Regarding flights we miss the fact that we cannot dynamically create a flight and reorganize it, but also not being able to spawn a flight, you can spawn only individual planes.
Imperator_TFD Posted October 8, 2021 Posted October 8, 2021 (edited) 12 hours ago, IckyATLAS said: The medium priority is very clear. If not attacked continue flying. This can bring to situations where if the enemy does not attack you but it attacks say your ground troops then your flight may fly even parallel to the attacking planes by a few hundred meters totally unabated. Being able to switch on the fly the priority of the active waypoint during flight would make things more flexible that play with activating and deactivating different waypoints to reach the same behavior. Regarding flights we miss the fact that we cannot dynamically create a flight and reorganize it, but also not being able to spawn a flight, you can spawn only individual planes. That last issue regarding only being able to spawn individual planes and not formations is incredibly frustrating and requires work arounds that then present their own issues. Quote I might try to achieve what I want by lowering the damage threshold value. At the moment, using the default 50, it seems that damaged planes hang in there way too long. Has anybody played with that value? If you're using the threshold value with the RTB selected the value does nothing in my experience. However using the threshold and coupling it with a OnDamaged report you can alter the level of damage at which the aircraft will trigger subsequent events. Edited October 8, 2021 by Imperator_TFD
PatrickAWlson Posted November 10, 2021 Author Posted November 10, 2021 On 10/7/2021 at 8:07 AM, IckyATLAS said: The medium priority is very clear. If not attacked continue flying. This can bring to situations where if the enemy does not attack you but it attacks say your ground troops then your flight may fly even parallel to the attacking planes by a few hundred meters totally unabated. Being able to switch on the fly the priority of the active waypoint during flight would make things more flexible that play with activating and deactivating different waypoints to reach the same behavior. Regarding flights we miss the fact that we cannot dynamically create a flight and reorganize it, but also not being able to spawn a flight, you can spawn only individual planes. For fighter missions I use low priority waypoints. For attack, recon, and bombing I use medium. I want them to ignore enemy planes as that is not their mission. I also have "go home" waypoints that are triggered for reasons like damage, low ammo, etc. These are also medium. I found a way to use whole flights instead of spawns in PWCG virtual waypoints. Every VWP repeats the same planes in an inactive state. When they are triggered the flight is activated instead of spawned. Formations work, as does association with the flight leader. All downstream VWPs are deactivated to prevent duplicates. The existence of the planes (hundreds) in an inactive state does not have a noticeable effect on performance. Before I made this change I had only one set of planes with the spawn point changing. I repeated the waypoints for every plane, offset like a formation. This made the planes appear to fly in formation, but once cohesion was lost they could never reform. The new way works much better. 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now