Thanx dude! I have been a fan of this game and enjoyed playing it for a long time now. I have to say though , the quality of the game and the so called “entertainment factor” as one would put it in German have massively improved with this mod. Thank you sooo much for the time and effort you put into it!
I still have a question:). I split the Lufthansa mod from andycishere in two separate mods, medium vs. Long haul planes. The long haul mod gives me about 50% domestic and 50% international flights (I am using the schengen on option and realistic international flights and my airport is in Germany ).
Is there a way to force the airline to offer only international flights? I suppose I could simply ad "arrayForbiddenCountryCodes":in the json file in order to avoid flights to all the schengen countries, but I am afraid that this would lead instead to 50% of offered flights being inner German. Flying from Leipzig to Berlin (a distance of 200km) with an A380🥴
In any case your work is much appreciated.
I’ll give you some more info on how flights are generated: do with it what you will:
Each airline generates its own routes.
The first thing selected by the airline is which airport in the world the route will fly from. (It will always fly to you, wherever you are…). This is weighted by airport size: more flights come from bigger airports … at the moment there’s no preference for nationality, only a pass/fail.
Once the route is selected, the airline looks at all the planes in its fleet and assigns them a “suitability” score. This is based on a few things:
The number of each plane the airline has. ( if I have 100 737-800s and 5 737 Max-8s I’ll expect to see a lot more -800s even though the performance is similar
The size of the plane vs the size of the airport (no 8-pax flights to London Heathrow, No wide-bodies to a dirt strip in nowhere)
The length of the route vs the range of the plane (long-range planes are being wasted if used for short range stuff. The penalty is exponential - super long haul planes really want long routes)
I use the scores as weights for a random aircraft selection. Typically the best planes will have ~1000-10000 points (think of them as lottery entries if that’s helpful), the “I guess you could operate like that” planes get ~100, and the “thats dumb” planes get 1-2. So the odds are very good that a sensible plane will be selected…
… on the assumption that your fleet has a sensible plane for the predetermined airport, which might be next door. An all-wide-body fleet may not, hence your results… There are some cases where the contract will just fail to generate, like if no plane is small enough to land on the runway. But I try to allow as much as I can to avoid situations where someones favorite airline won’t give them any contracts…
On that note, I specifically avoided making “forbidden countries” block the player airport, so that if a player put their airport in an often-forbidden country the choice of politics would be up to what mods they wanted installed (if the country you live in can’t service flights to the country you grew up in, and ACEO is where you want to imagine a better world, I won’t stop you). This does present a workaround where you could forbid Lufthansa (widebodies) from operating in… Germany… and still get flights from them at your player airport in Germany; they would just never be flights to other German airports. Hopefully. If I implemented that right.
One of the things I’ve been working on recently is actually very much in the same spirit as what you are doing. I want to allow airlines: as the player sees them - to be amalgamations of different back-end-airlines; specifically so that the rule sets you can apply can be applied only to a specific part of an airline. This would also allow you to subscribe to parts of airlines, eg old and new liveries, and play with both under one contract.
This is a part of a few related concepts
Airline Edits (lightweight; add tweaks features to an existing airline without putting in a new airline or redistributing theirs. I’ll probably host a pack that adds the basic tweaks features to some major airline mods that are working but abandoned.)
Airline Brandsharing (serve flights from different airlines under one brand, mostly to allow airlines to share stands with their affiliates/other divisions of the same company/Any larger organization that contains both airlines (alliance lounges anyone?) Directional: a business can allow others to use its brand (in its json/mod) but must be allowed to use others)
Airline Siblings (Airlines operate independently but take notice of how you treat the other one for whatever reason. Eg Maple and Maple Express. Directional, so it needn’t be a symmetric relationship)
Airline Parents/Amalgamations (what we were talking about: to the player appears as one airline, but on the back end contains multiple with separate rule sets/fleets/whatever). Ends up functioning a lot like a merger… Airline merger game event anyone? )
I’m working out the details still… I want the system to be very permissive and open to creative uses… without duplicating features and becoming confusion spaghetti. And apparently as a programmer I have an unhealthy craving to make every structure recursive…
What is an airline?
A set of airlines.
But what are those airlines?
Which are sets of airlines?
Of course! Or not!
Well it could just be an airline, containing no airlines, but still an airline. Exactly like all the sets of airlines are airlines.
I can’t tell the difference between an airline and a set of airlines and I am annoyed.
Correct. But I am happy. Modding will never actually give me the fully recursive airlines of my dreams, but the point is: I want the game to be able to ask for something from an airline without caring about any of its relationships or how many airlines are merged to make or any of that. I want merged airlines to behave as a single airline without me having to smash them together and then write handlers for separating the behavior that still needs to be separate.
I read some day ago that the CTD that happens when opening the flight planner. Is because the generated flights offered within the flight planner is saved between plays. So when playing it will load information that is not valid and that causes the crash? Is this correct or am I totally lost?