Get it here:
https://www.mediafire.com/file/9lwl7wjyjwnzmvs/%2521_00_B-17_tougher_fuel_tanks.7z/fileFrom the included readme file:
B-17 tougher fuel tanks mod, by WxTech
A little mod inspired by these two longstanding issues regarding the B-17:
- Fuel tanks light up too easily; a small number of light MG hits will set a tank to smoking, with scant few more hits causing a fire.
- Once a fuel tank fire is started, the plane is always doomed (if it flies for a sufficiently long period).
Another matter addressed is the lack of fire extinguisher capability, except when the arcade flight model is in use. This one is more questionable, and so I offer two versions of the class:
- As stock, with extinguishers available only when the 'arcade' flight model is in use.
- With the extinguishers available for all flight models. Probably used by AI only?
==========================================================
For tank toughness, I altered the base B_17.class as follows.
(1) For the tank toughness, the stock value for getEnergyPastArmor() in the hitBone method is a rather weak 0.06. For comparison, for the P-47 it's 1.8. On the premise that the B-17 would be using self-sealing tanks, and buttressed by the plane's widely recognized toughness, I've made the new value 1.8 (like that for the P-47).
(2) In the rareAction method I added code to randomly step back the damage to tanks. This occurs only when a defined boolean flag applies, and I've not determined just what this flag is. While the assigned probability for the invocation of this action is 10%, the actual chance of occurrence is much less frequent than this would suggest, due presumably to the only occasional validity of the boolean check.
This code is structured to be invoked when the tank state is >4, meaning it's on fire (states 5 and 6; those earlier are for no damage, fuel leak and smoke only.) And so if states 5 or 6 are in effect; there is a small chance that the tank state will be reduced by 2, meaning it goes back to state 3 or 4. I elected to jump two states so as to have a better chance of ending a fire. But the fire *may* start up again later; there's no guarantee it won't.
From my limited testing so far, in 1/4 to 1/2 of the cases of a tank fire that's not already an explosion, the fire will go out at some point.
The effect of these measures is a B-17 that's no longer so easy to kill with a small amount of fire.
==========================================================
Regarding fire extinguishers. In the method rareAction is code to apply incremental damage to fuel tanks while an engine fire is in progress. This damage can be applied to a single tank or to two tanks adjacent to an engine, and it proceeds inexorably, with randomness applied, until eventual destruction if the plane is in the air long enough. The net effect is for planes to be doomed to go down once an engine fire is started. Apparently the B-17 up to the F model had seveal fire extinguisher charges per engine, but these were omitted for the G model.
The game permits the use of engine fire extinguishers only when the 'arcade' flight model is in use, but not for the 'real' flight model. There is no distinction made between plane models, because this one B_17.class applies to all models.
I *think* the activation of extinguishers here applies only to AI, because I've not tested this while in the cockpit myself. I know it does work for the AI.
As mentioned, I supply two versions of the class, in their own subfolders for you to select from. One with extinguishers being available as for stock ('arcade' flight model only), the other with extinguishers always available (for the AI, anyway.) This is useful if the player prefers that boxes of B-17s not fall like flies from comparatively light fire, or be doomed after some spell because a fire once started hardly ever stops.
==========================================================
This is a first stab at the matter, and in my ignorance of the finer points of the code I am somewhat shooting in the dark. I heartily invite further refinements, or suggestions for changes!
I include the B_17.java, taken from my BAT4.0 install and altered, with my comments included. It applies for the extinguishers always available version. I *think* it should be compatible from 4.12 and up.
As always with my mods, this work is made available for use by any and all, for any purpose, without restriction.
WxTech
Jun 23, 2021