I'm wondering if convoys maybe give too much fuel. At the moment, they give 300 plus 300 for each refinery in the unloading city. On the other hand, I really have no idea how well you've developed, so maybe I do need all that fuel to be put into factories and refineries.
changelog
Escape into the night has been implemented, though you may want to play around with the numbers. I haven't implemented this as a reusable module, partly so I could do it quickly, and partly since I would want to link it with some other functionality (e.g. 'damaged' units) for a general release.
-- Escape into Night
-- This is the code for night fighters and bombers to escape after an attack
-- Compute the fraction of HP, the escape radius is given by the largest key value which is less
-- than that fraction of hp
-- e.g. 35% has a radius of 1, 80% has a radius of 2 in the defaultEscapeRadiusHPFraction
local defaultEscapeRadiusHPFraction = gen.makeThresholdTable({[0]=0,[0.25]=1,[0.75]=2,})
local nightEscapeUnits = {}
nightEscapeUnits[unitAliases.Stirling.id]=defaultEscapeRadiusHPFraction
nightEscapeUnits[unitAliases.Halifax.id]=defaultEscapeRadiusHPFraction
nightEscapeUnits[unitAliases.Lancaster.id]=defaultEscapeRadiusHPFraction
nightEscapeUnits[unitAliases.Beaufighter.id]=defaultEscapeRadiusHPFraction
nightEscapeUnits[unitAliases.MosquitoII.id]=defaultEscapeRadiusHPFraction
nightEscapeUnits[unitAliases.MosquitoXIII.id]=defaultEscapeRadiusHPFraction
nightEscapeUnits[unitAliases.Ju88C.id]=defaultEscapeRadiusHPFraction
nightEscapeUnits[unitAliases.Ju88G.id]=defaultEscapeRadiusHPFraction
nightEscapeUnits[unitAliases.He219.id]=defaultEscapeRadiusHPFraction
--nightEscapeUnits[unitAliases.]=defaultEscapeRadiusHPFraction
--nightEscapeUnits[unitAliases.]=defaultEscapeRadiusHPFraction
At the moment, the unit will only try to escape to a tile exactly the specified distance away. If withinRadius is set to true, then all tiles within the distance are equally likely (so if the escape radius is 2, then all tiles within 2 squares, including the starting square, have an equal chance of being selected)
At the moment, avoidStacks is set to true. This means that the plane will try to escape to an empty square first, and only stack on another friendly unit if no empty squares are available. Setting avoidStacks = false eliminates this behaviour.
Tweaked automatic unit selection. On the day maps, there is only a small penalty for being on the other day map. This way, after dropping bombs and moving the bomber, you hopefully won't be moved halfway across Europe when what you really want is to get a nearby unit at low altitude. Not sure how well this worked.