+peter01 2 Posted March 15, 2010 (edited) Had promised to write something on this about 2 years ago, so ... I'm doing this now though because having finished the FMs, which is very intensive, and now just enjoying it by flying/fighting I can see that I have overdone some AI. It takes some work to get them right, quite difficult, lots of time testing, and to do them for say 50 aircraft with testing can take a month of doing nothing but that. The best way to tweak them is to just play over time and fix individually, but I don't want to upload mods as I do them, I'd rather wait until I finished the whole lot - but that could be weeks or months really, and I tend to fly allied more too so I probably wouldn't get around to trying them all. I know some AI can drive you crazy so this is not only a guide to fixing some that you don't think are quite right (usually too good), especially common planes like Albs and Fokker Es, but mainly some info generally on AI parameters that may be useful. General ======= The AI parameters for my planes are in the individual FMs - the ***_data.inis. Make changes here. Never make changes to the default ones in the Aircraftobject.ini. My AI are pretty close to right. The difference between being just right and not right is very small in terms of parameter changes, so don't get excessive in changes. TK uses standard AI parameters for all planes including his 2-seaters/bombers, except the Camel and Dr1. Because his FMs are basically the same in terms of rudder, pitch and climb capability. Mine are not, in fact there is a huge difference in mine for those, plus throttle speeds (in the Engine Section, ThrottleRate=, mine vary from 0.3 to 0.6, TKs are all 0.5) and of course engine sizes vary more with some having 80hp engines. In addition, I spent a lot of time on the early AI, they just need to be done differently both as FMs and AI. So as a consequence there is a lot of variety in my AI parameters, basically each AI section is tailored for each specific plane. The AI parameters are a bit complex or obscure in many ways - lack of documentation, obscure parameter names, and some parameters effect formation flying and takeoff and dogfighting so changing those say for dogfighting will effect the other two, and over time through experience I learnt where to be careful and where it didn't matter too much. But it is always a compromise. So I'm just going to go through some of the main things, but if you have SPECIFIC queries or thoughts, happy to respond, but not general stuff or things that will take me some time to do - it is hard to explain. A thing to remember in understanding the AI parameters is that they often come in pairs, eg, ThrottleDeltaSpeed= ThrottleVelocity= These relate to how the AI speed up and slow down the plane. The first uses the engine FM data (size of engine, how quickly it accelerates etc in the Engine Section) just like the player, but modified by the value of the parameter. The second in this case is the speed that the AI uses its throttle control slider on its "virtual joystick", if you like. And AI parameters are there for their "virtual joystick" for rudder, pitch and roll speed too. That the AI have a "virtual joystick" helps not only in modding AI parameters of course, but understanding some of the somewhat obscure parameter names too. When modifying AI, keep in mind that you probably have set Enemy AI to Hard in your options. What this means is your squadron mates are at a disadvantage in missions/campaigns - they rely on you to put on a good show downing a few planes as I think non-Enemy AI are set to Normal not Hard. If you reduce the AI's capability to offset this you will find they are too easy for you individually as AI. Changing the AI should be based on how capable they are against you in a one on one dogfight, not squadron vs squadron. Be very careful with early plane AI changes. They were difficult to do, and easily stuffed, changes can have significant side impacts on the AI's ability to takeoff and on formation flying . So, the following covers the main things - stall speed/mach limit, sideslip, strength, rolling, speed of reactions, climbing, turning, and using a couple of examples of changes I have already made to my own game, and why - Albatros Dva is too capable and quite hyper, the Phonix D1 uses too much sideslip, rolls a bit too quickly. Starting with the easier parameters first .... [FlightControl] AI Parameters ===================== All the parameters in the [AIData] section, and most of the parameters in the [FlightControl] section ONLY affect the AI, not the player. The ones in the [FlightControl] section that only affect the AI are: StallSpeed= CruiseSpeed= ClimbSpeed= CornerSpeed= LandingSpeed= MaxG= (affects stress damage if implemented for player, also determines when you hear straining sounds) MaxSpeedSL= MachLimit= GunBoresightAngle= So you can trial changes to those for the AI. Just quickly, the more important ones ... StallSpeed= .... if you increase this the AI will not climb as high or say outclimb you, if that is the AI behavior you are trying to modify. Values here are generally in range 16-21 (in metres per second or around 40-45 mph). Keep in mind that the AI starts anti-stall actions like reducing speed or levelling out about 5-10 mph above that AI defined stall speed. MachLimit= ..... limits speed AI plane will fly. Defined as 0.1 etc in Mach and that is about 75 mph. If a plane has a higher number, say 0.150 - 0.200 or more they will dive FAR more as a defensive move and fly around generally at higher speeds - good for the BnZ'ers and later planes, not good for early planes. If you want them to stay dogfighting like TnB'ers or because they are not-so-robust early planes setting a value around 100mph or less keeps them fighting at the same altitude, slower speeds and not diving away so much, eg 0.110 - 0.140, about 80-105 mph. GunBoresightAngle= ..... is interesting and I might write more on this some other time, because you can make the AI a better shot I think in non-deflection shooting and less so in deflection shooting. At the moment it tends to favour the deflection shooting ... the safest place to be currently in the FE skies is right in front of an EA, flying straight and level! Sideslip ======== The Phonix sideslips too much when being chased (yaws dramatically sideways back and forth when being chased) ... RudderForSideslip=2.8 Changed this to ... RudderForSideslip=1.4 You can make significant changes here, halving or doubling numbers. Strength ======== Some planes are too hard or too easy to bring down. This is made more complex for a couple of reasons. Firstly the strength of various bits such as (elevators and rudders, eg Nieuports) especially are pretty well determined by the 3-D model rather than the FM (why some planes lose rudder etc easier than others), the size of the plane (the bigger, the tougher to bring down), and how damage modelling is done by the modeller. So I use the .... DefaultArmorThickness=(usually 25) (in the [AircraftData] section hence effects both the AI and you as player in that plane). to offset that. Eg, make Nieuports a little higher @ 29, Albs a little lower @ 24. Keep changes within the 24-29 range, and a difference of plus or minus 1 makes a significant difference. One complication is Borts planes. You can hit parts with bullets continuously and cause no damage, yet they have weak rudders/elevators. So it is impossible to get a good balance, unless you redo the damage modelling (difficult without a 3-D package, and still lots of work). So with these planes be careful changing this value - you just need to aim for and hit the pilot or the engine. Roll ==== An simple one. There are a number of parameters that effect this, but easily the most important is ... RollForHeadingRate=-0.05 (TK's standard value) The PhonixD1 rolled too quickly so changed it ... RollForHeadingRate=-0.05 (it was 0.07) The range you should use would be in the -0.02 to -0.07 range, usually in the the lower range, -0.03 or -0.04 is good for many planes. Ok, now getting into the more important and more complex parameters ... Speed of Reaction ================= Very important. If the AI planes seem to react too quickly, or zoom around too fast/seem too hyper, change ... ThrottleDeltaSpeed=0.080 (value in my Dva) ThrottleVelocity=-0.080 (value in my Dva) These define how quickly the AI's engine picks up speed, and how quickly the AI uses its throttle. BUT it also effects how fast the AI acts or reacts in EVERY manouvre. The Dva is too hyper so I changed it from the above values to ... ThrottleDeltaSpeed=0.070 ThrottleVelocity=-0.070 And it is a big difference. If you change them for other aircraft, do it in 10% increments, it will make a biggish difference. Too much reduction and the AI will seem to stop sometimes as if "thinking" what to do next. It considerably affects the AIs ability to attack and to jink around when you are his tail. Note: The Throttle values here are not absolute values. Values of 0.070 will be different for a 160Hp engine compared to a 100Hp engine, the latter would need a higher value to get a similar result, bigger engines can accelerate better. The first value is also modified for the AI (and player) by the ThrottleRate= in the Engine Section, which again modifies how quickly the engine accelerates, so depending on that throttle rate two different planes with 160Hp engines could accelerate differently. Climbing ======== A lot of things affect the AIs ability to climb, and they need to be in balance. These also have side effects and so it is important to not go overboard here, eg, AI's ability to takeoff and stay in formation, and that odd "porpoising" or oscillating of elevators effect. For my planes and AI, I don't think you need to mod anything but this value, because they are not that far off ... PitchForAltitude=0.00017 (value in my Dva) This value determines how quickly the AI will use elevators to increase/decrease altitude. A good way of knowing if it is excessive is on takeoff - if the AI pitch upwards on takeoff excessively, it is this number (converse if they can't take off). If they "porpoise" a lot, it is likely this number. But in dogfighting, in attack, the AI will use altitude effectively (good, generally), but will oscillate sometimes wildly when being chased - it makes the dogfight quite hyper. So this value is a balance between AI using altitude for postioning (good), oscillating when being chased (too much, bad), climbing almost vertically after takeoff (bad), staying in formation (good). Ok, for the Alb Dva it was oscillating too much when being chased so reduced it to ... PitchForAltitude=0.00010 The changes you can make to mine are to double or halve the value. Small increments won't make much difference. The range should never be outside 0.00010 to maybe 0.00087. TK uses 0.00087 for all planes, it is far to excessive for mine generally, an average value would be 0.00027 for mine. Turning ======= The following effect turning, the AI use both elevators and rudder, so sometimes it is difficult to know which to reduce. The standard ones TK uses are as follows, but do not work that well for mine, and I use some quite different variations (to simulate BnZ and for early planes) : ElevatorDeltaPitch=3.0 ElevatorPitchRate=-0.05 RudderForHeading=0.5 RudderForYawRate=-0.1 I guess a rule of thumb to reduce the AI's capability in turning is to look at the values I have for the above for that particular plane and compare to TKs default. If my Elevator numbers are close to TKs standard then reduce those numbers to reduce turning ability. EG, the Fokker E3 and Alb Dva turned too quickly so changed: For E3, from .. ElevatorDeltaPitch=3.0 ElevatorPitchRate=-0.05 to ... ElevatorDeltaPitch=2.8 ElevatorPitchRate=-0.046 For Alb Dva, from ... ElevatorDeltaPitch=3.2 ElevatorPitchRate=-0.053 to ... ElevatorDeltaPitch=3.0 ElevatorPitchRate=-0.050 10% amounts are probably all you should to do for mine. 20% may result in difficulties. OR alternatively instead of the elevators change the rudder settings if those elevator numbers are low say around 1.5 and -0.02 or lower (otherwise the AI WILL have trouble turning). eg, from say RudderForHeading=0.5 RudderForYawRate=-0.1 RudderForHeading=0.25 RudderForYawRate=-0.05 Change both rudder numbers by same percentage and by significant amounts to make a difference eg by large 25-50% increments. Of course you can do both rudder and elevator changes at the same time, and if so, keep incremental changes outlined above smaller for each. Hope this helps . Edited March 16, 2010 by peter01 Share this post Link to post Share on other sites
Bandy 3 Posted March 16, 2010 This is great Peter. Haven't had a chance to absorb any of it, but opening the black box for all of us is very cool of you. Thanks for sharing some of the knowledge you've gained. I suspect this thread is going to grow now that you've let the genie out of the bottle. Cheers! Share this post Link to post Share on other sites
Southside Bucky 1 Posted March 16, 2010 That just HAS to be stickied! :yes: Share this post Link to post Share on other sites