May 19, 201510 yr Notes for investigating air to air refueling. Automatic refueling is instigated from CheckStaff. CheckStaff is called in a few places, the key one being CheckGroupStaff. CheckGroupStaff is Harpoon Effect #20, in ExportDLL parlance, HCEffect20. In other words, if one wants to replace the built-in auto-refueling behavior, HCEffect20 must be handled in an ExportDLL instead of in the stock GE. General Process: 1. Effect21/HCEffect21/CheckGroupFuel decides a refuel is merited and creates a AirRefuelEvent that will be processed in 30 seconds. 2. AirRefuelEvent is processed after those 30 seconds, game decides how much fuel to give to each recipient plane. Each refuel event can only involve a single tanker unit even if there are more in the group. Here it is decided how much fuel to give to each recipient. Remember that there can be multiple aircraft of the same loadout with the same type in an air unit (so a single air unit may have up to 255 aircraft). If the group is travelling at Cruise the actual refuel of the first recipient will start in 30 seconds, otherwise queue up a speed change. 3. Fuel is given to the first recipient. Delay until next recipient is 180 seconds * number of planes in the air unit. 4. Fuel is given to next recipient. Delay until next recipient is 180 seconds * number of planes in the air unit. 5. Repeat until no more recipients. 6. Tanker may RTB or stay with group More to come...
May 19, 201510 yr Notes for investigating air to air refueling. Automatic refueling is instigated from CheckStaff. CheckStaff is called in a few places, the key one being CheckGroupStaff. CheckGroupStaff is Harpoon Effect #20, in ExportDLL parlance, HCEffect20. In other words, if one wants to replace the built-in auto-refueling behavior, HCEffect20 must be handled in an ExportDLL instead of in the stock GE. More to come... So is Effect #20 only dealing with refuelling or, once turned off from GE, will other matters have to be dealt with externally too?
May 19, 201510 yr Author So is Effect #20 only dealing with refuelling or, once turned off from GE, will other matters have to be dealt with externally too? Of course not . Effect20 does a number of other things but I didn't have time to document them last night. My gut reaction is to move the refueling check into its own HCEffect. We have around 20 available slots. In any event I'll document everything that Effect20 does then we can discuss the optimal approach.
May 22, 201510 yr making some good progress at least so far as finding what can easily be done. So far I've been able to manipulate in a refuel: the fuel transfer amounts, which units receive fuel and the order; refuel other tankers and refuel multiple times from the one tanker (see attached jpg and note the refuelling episodes about an hour apart from the same tanker unit to two strike units. I have to decide on some calculations for updating available fuel after each transfer, how to get the whole thing started, how to prevent 'cheating' and an interface.
May 22, 201510 yr Allowing a tanker to provide fuel on multiple occasions to multiple aircraft (whether unit or group), and moving past the old "one time use" scheme is by far the most important hurdle, imho.
May 27, 201510 yr Author Fueling operations have been moved into new HCEffect21 aka CheckGroupFuel for 2015.005. More later this week with a hope to make 2015.005 available before the weekend is through.
May 27, 201510 yr This change will undoubtedly be handy in the future but at present I'm getting along using the standard auto refuelling but switching actual refuelling on and off as required at strategic points of a group refuel cycle. I've just uploaded a rough tool (modified Tony's lazGUI dll) to show how I intend to proceed initially. I think it will take me a while to get the current mental arithmetic and filtering into code, plus write a new interface, so I thought I'd put this up for people to play with and perhaps come up with inspiration on desirable features.
May 28, 201510 yr Author Fueling operations have been moved into new HCEffect21 aka CheckGroupFuel for 2015.005. More later this week with a hope to make 2015.005 available before the weekend is through. This new HC Effect now also includes decrementing the amount of fuel on planes so if the ExportDLL writer wants to adjust fuel burn rates for Red vs. Blue or Burner vs. Military, it will be possible. Or in my case I turned off AvGas usage entirely for my test.
May 30, 201510 yr Author The below is as of GE version 2015.006 We have the refueling event structure: typedef struct AirRefuelEvent { - char targetGroup[4]; /* group being refueled */ + uchar fuelingUnit; /* unit with the gas */ + uchar now_refueling; /* have we started refueling? */ + long fuel_range; /* how much fuel */ - ushort which_plane_type; /* what kind of plane is tanker*/ - uchar planestofuel_ids[16]; /* how many left to do? */ - ushort fuel_per_plane[16]; /* how much fuel */ + uchar side; /* which side */ + uchar num_tankers; /* how many tankers in unit */ } AirRefuelEvent, * AirRefuelEventPtr; The elements starting with a + are set by the requestor of a refuel event. The elements starting with a - are interestingly enough not set by the requestor. Some of them are set when the initial refuel event is processed. Set during processing of original refuel event: a. planestofuel_ids[16]; b. fuel_per_plane[16]; (may be calculated wrong in 2015.006 and older, testing fix) Never used: c. which_plane_type; d. targetGroup[4]; Obvious questions: e. Oh why can only 16 of a possible 255 plane clumps be part of a refueling operation
May 30, 201510 yr I don't think I'd like a group comprising more than 16 units, but that's not a good reason not to be able to. The array length is predefined though so maybe it was a decision due to that consideration.
June 3, 201510 yr Author Why shouldn't tankers refuel other tankers? I have a feeling it isn't allowed in the code to reduce complexity but since we're in there digging around, is there a better reason?
June 3, 201510 yr I only wonder what the real situation is? I'd guess you can refuel say an F/A 18E that is flying in tanker load out? I can refuel a tanker from the modified lazgui.dll and it causes no problems. It does I suppose start to get a bit tricky regards having enough fuel for the tankers to get back to base in some situations.
June 4, 201510 yr Author I imagine part of the decision had to do with concern that refueling a tanker takes away valuable fuel from non-tanker AC.
June 4, 201510 yr If we are going to be able to have tankers refuel tankers then there should be something in the code to stop the tanker providing the fuel to stop refueling when it reaches bingo fuel. Air Groups should be allowed to tank more than one time during an strike. Alpha strikes usually would refuel on the way in and on the way out from a target. How many times does a B-2 have to refuel to bomb targets half way around the world from the US.
June 6, 201510 yr Author Example refueling logging in 2015.007. One long range tanker refueling two air units... 104941 staff.c:215 - creating refueling event Group=0x873fb8 (ABAS Endurance = 573781 num_tanker=1, platstart=1 platnow=1 104971 combat5.c:1220 - Processing Refuel Event for Group=ABA 104971 combat5.c:1231 - tanker unit=AB002, numtankers=1 104971 combat5.c:1239 - Tanker fuel=4500nm 104971 combat5.c:1363 - in the not refueling path 104971 combat5.c:1418 - Will try to give each plane in unit=AB000 503nm of fuel when event is processed planestofuel_ids[0] 104971 combat5.c:1418 - Will try to give each plane in unit=AB001 503nm of fuel when event is processed planestofuel_ids[1] 104971 combat5.c:1506 - returning to wait 30 seconds for refueling to complete 105001 combat5.c:1220 - Processing Refuel Event for Group=ABA 105001 combat5.c:1231 - tanker unit=AB002, numtankers=1 105001 combat5.c:1239 - Tanker fuel=4500nm 105001 combat5.c:1243 - in the now refueling path 105001 combat5.c:1279 - about to start refueling unit_id=AB000 105001 combat5.c:1302 - first calculation fuel to add=15294s of Cruise fuel, plane has 12768s, loadout originally had 27653s 105001 combat5.c:1303 - first calculation fuel to add=520nm of Cruise fuel, plane has 434nm, loadout originally had 941nm 105001 combat5.c:1314 - 2765 seconds (94 nm) of Cruise fuel added to DropTanks 105001 combat5.c:1358 - returning to wait 180s for refuel completion 105181 combat5.c:1220 - Processing Refuel Event for Group=ABA 105181 combat5.c:1231 - tanker unit=AB002, numtankers=1 105181 combat5.c:1239 - Tanker fuel=4500nm 105181 combat5.c:1243 - in the now refueling path 105181 combat5.c:1279 - about to start refueling unit_id=AB001 105181 combat5.c:1302 - first calculation fuel to add=15294s of Cruise fuel, plane has 12048s, loadout originally had 27653s 105181 combat5.c:1303 - first calculation fuel to add=520nm of Cruise fuel, plane has 409nm, loadout originally had 941nm 105181 combat5.c:1314 - 2765 seconds (94 nm) of Cruise fuel added to DropTanks 105181 combat5.c:1358 - returning to wait 360s for refuel completion 105541 combat5.c:1220 - Processing Refuel Event for Group=ABA 105541 combat5.c:1231 - tanker unit=AB002, numtankers=1 105541 combat5.c:1239 - Tanker fuel=4500nm 105541 combat5.c:1243 - in the now refueling path 105541 combat5.c:1248 - No units left to refuel 105541 combat5.c:1267 - tanker is returning to base Yes, there are still fudge factors that let the tanker give too much fuel.
Create an account or sign in to comment