If I may, I would like to request an SDK feature, part of the now-defunct
Air Forces Module (
download link). What I would like to see in AND is the "Rebase Range", and a similar feature "Airlift Range". As things are now, Early Fighters have a tiny combat radius, but somehow can rebase all the way across the map, and the instant you build an early airport, you can airlift any unit to any valid city on the map! Quite odd, if you ask me.
To remedy this and add a range cap to rebasing and airlifting is an easy task. I did it myself back in September 2009, when A New Dawn wasn't yet called A New Dawn, but since then the source files have gone through many revisions... Anyway, as the Air Forces Module did, I added to the GlobalDefines "REBASE_RANGE_MODIFIER" (default 2) and "REBASE_MINIMUM_RANGE" (default 6), as well as a "MAX_AIRLIFT_RANGE" (default 20). Then, in CvUnit.cpp, in the function
CvUnit::canMoveInto, for case DOMAIN_AIR:, I added two lines, one an if statement checking if the plot is within range or otherwise, and then a return false within the if statement. (The Air Forces module linked above includes sources that demonstrate this, although the code is outdated).
Next, still within CvUnit.cpp, this time under
CvUnit::canAirliftAt, I similarly added two more lines, the first an if statement checking if the target plot is beyond the MAX_AIRLIFT_RANGE, and then return false if so.
This worked just as desired in-game, but I felt it was somewhat lacking. What if your planes have been upgraded for in-flight refueling? Then you can airlift anywhere and rebase anywhere! So I encapsulated each of my additions in an additional if statement checking if the player had not yet researched a technology, and only if they had not yet researched it would the range cap be in effect (in my case I chose Supersonic Flight as the range cap remover, as it unlocks the Refuel in Air promotion). Although I did not do so at the time, another GlobalDefine could be used to reference this technology ("TECH_REMOVES_AIRLIFT_RANGE" or some such), or even a check for air units if they have been promoted to Refuel in Air or not.
So, yeah, excuse my wall of text, but I tried to describe my requested additions as well as I could. I have also attached my outdated CvUnit.cpp file, although I'm sure my code is not as good as yours is

. (Search for "Supercheese" to find the areas in question).