Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: A little additional fuel tank 'functionality'  (Read 258 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5620
A little additional fuel tank 'functionality'
« on: April 18, 2024, 10:31:29 PM »

The damage code has two states for fuel tank leaks; 1 for light and 2 for heavy. In the stock implementation, the basic fuel loss rate for the heavier leak is 4X that of the lighter leak (the damage state values are squared when calculating the loss rate). However, the fuel leak effect representing the stream pouring out is the one and same for both states. Furthermore, the HUD warning of a leak starting occurs only when the leak first occurs from the undamaged state. That is, there is no differentiation, by messsage nor visual appearance, between the leak being light or heavy, nor if it has been made worse after subsequent damage.

I've changed that by creating a second fuel leak effect; the light and heavy leaks now appear different enough to gauge which is which (one could further tweak one or both of the effect to taste so as to obtain more or less difference in appearance.) And the HUD warning now states if the leak is light or heavy, and will appear if transitioning between states, as when worsening from light to heavy or when stopping (such as for self-sealing liners).

The current scheme, and retained by me, has it possible for the first leak state only to be repairable; the second state never can improve, and fuel will always be pouring out. Furthermore, the code calculates the fuel loss rate as a function of the damage state for all tanks together. The total range for fuel loss rate for 4 fuel tanks (the maximum that any plane can have), for damage states between 1 (light leak) though 6 (heavy fire) is 1 to 36 for a one-tank plane and 1 to 144 for a four-tank plane.

The new code in Aircraft.doSetTankState() has the conditions containing the text strings on the left side of the list below; the right-side messages are player editable and are what appear on screen.

The original and the additional two HUD_log.properties entries (with my preferred messages as they appear on screen):

FailedTank                      Fuel Tank Small Leak!
FailedTankHeavy                 Fuel Tank HEAVY LEAK!
FailedTankRepaired              Fuel Tank Leak STOPS!
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5620
Re: A little additional fuel tank 'functionality'
« Reply #1 on: April 18, 2024, 10:45:40 PM »

For use by the AI, I've implemented a chance of an RTB condition to be invoked whenever a heavy fuel leak is in effect. I'm still fine-tuning the algorithm, but in essence the worse the fuel tank damage in aggregate, the higher the chance of the little silicon life form deciding to bug out.  ;)

I decided to try this after observing that fighters suffering heavy leaks--including more than one if two or more tanks are involved--will nonetheless tend to remain in combat, other conditions not coming into effect to alter this. And then so very often running out of fuel and crash landing--or crashing.

In Pilot.setPriorities() I see a scheme whereby the current fuel quantity is compared against waypoint distance to determine if an RTB condition is to be set. But it does not incorporate the undesirable condition of fuel loss from damage, meaning that only when the leaking has proceeded to the point of a sufficiently low quantity crossing the calculated threshold is the RTB triggered.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Tokyo_Express_420

  • member
  • Offline Offline
  • Posts: 163
Re: A little additional fuel tank 'functionality'
« Reply #2 on: April 19, 2024, 11:53:51 AM »

Download link please

- Tokyo Express
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5620
Re: A little additional fuel tank 'functionality'
« Reply #3 on: April 19, 2024, 03:15:45 PM »

What I'm detailing here is further development of my already heavily modded B.A.T. 4.0 classes that are part 0f the massive v2.0 effects pack. I could provide my Java to anyone willing to adapt any selected portion of this to the latest game version...
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Dimlee

  • member
  • Online Online
  • Posts: 1005
Re: A little additional fuel tank 'functionality'
« Reply #4 on: April 20, 2024, 11:44:19 AM »

It would be useful to have this "heavy leak" warning. Currently, unless the external view is disabled, it's easy to ignore a serious and unrepairable fuel leak. Can be fatal when flying over the forests or the hills.
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5620
Re: A little additional fuel tank 'functionality'
« Reply #5 on: April 20, 2024, 04:00:29 PM »

Going down over the forest is no longer a guaranteed death sentence.

In Mike's overhaul of my idea to have planes be able to dip down into the forest, I made a tweak whereby if one can enter the forest at a slow enough speed there's a chance of settling down to the ground alive. Currently I have the speed range the same for all planes, which favours those with low stall speeds. If gliding down under control, an A5M can survive quite often. Perhaps I should dynamically make use of a plane's stall speed as an additional consideration. Not necessarily to equalize the chances for hot birds, but at least to extend the envelope a bit.

The new method around the forest interaction began as my reaction to the hated behavior whereby just touching it caused an instant obliterating explosion. Now it's the case thdamageat a plane sinks into the forest, slowing down and accruing damage. The deeper down, the faster the rate of slowing and damage accrual. If one has enough speed upon entering, does not plunge too deeply and reacts reasonably quickly, the plane can be brought back out and continue to fly.

I've tested out the survival aspect, and it's a strange--but happy--experience, after all these years, to have the plane drop down to the ground still largely in one piece. ;)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Dimlee

  • member
  • Online Online
  • Posts: 1005
Re: A little additional fuel tank 'functionality'
« Reply #6 on: April 24, 2024, 02:12:54 PM »

Going down over the forest is no longer a guaranteed death sentence.

In Mike's overhaul of my idea to have planes be able to dip down into the forest, I made a tweak whereby if one can enter the forest at a slow enough speed there's a chance of settling down to the ground alive. Currently I have the speed range the same for all planes, which favours those with low stall speeds. If gliding down under control, an A5M can survive quite often. Perhaps I should dynamically make use of a plane's stall speed as an additional consideration. Not necessarily to equalize the chances for hot birds, but at least to extend the envelope a bit.

The new method around the forest interaction began as my reaction to the hated behavior whereby just touching it caused an instant obliterating explosion. Now it's the case thdamageat a plane sinks into the forest, slowing down and accruing damage. The deeper down, the faster the rate of slowing and damage accrual. If one has enough speed upon entering, does not plunge too deeply and reacts reasonably quickly, the plane can be brought back out and continue to fly.

I've tested out the survival aspect, and it's a strange--but happy--experience, after all these years, to have the plane drop down to the ground still largely in one piece. ;)

Yes, I remember the separate post about that. It's a clever idea and a very good addition. And a correction to the original "bug feature" of this game.
Logged
Pages: [1]   Go Up
 

Page created in 0.073 seconds with 27 queries.