Jump to content

(WIP) Custom flight model mod version 7 + source code


Recommended Posts

Hi Sérvalpilot.

I have made some new tests with your FM .

My fist installation was wrong so I didn't notice the big changes of the plane flight reactions..

Really promising !!!

For the Rafale  there's some tweaks to do for the avionics.

I lost the throttle axes and the slats .

The trims are too "fast"

Some lights in the cockpit are not functional with the new FM.

Indeed, I think there's some good future prospects for the Rafale and other mods with this FM

Thank you very much for the job 😉

Regards

 

  • Like 2
Link to comment
Share on other sites

  • Sérvalpilot changed the title to (WIP) Custom flight model (FM) mod version 4 + source code
  • 2 weeks later...
  • Sérvalpilot changed the title to (WIP) Custom flight model mod version 5 (now with autopilot!) + source code
On 5/25/2021 at 3:24 PM, freebirddz said:

Any progress ?

Good to have something like : CFM ( Community Flight Model Standards )

 

Best Wishes

 

Hey there,

There is now autopilot!

You can now use level hold, altitude hold, and altitude and roll hold modes.

Damage effects are also there, but still needs work.

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

The Major question and mater is how to full fill the AERODATA tables, how to get those numbers, the aerodynamic implementation is good, need more work but good !

different aircraft with different shapes, different Lift/drag coefficient. need to make that easy by some way 🙂

 

Great work, keep going.

  • Like 1

MOD Logo - 100.png

Link to comment
Share on other sites

6 hours ago, freebirddz said:

The Major question and mater is how to full fill the AERODATA tables, how to get those numbers, the aerodynamic implementation is good, need more work but good !

different aircraft with different shapes, different Lift/drag coefficient. need to make that easy by some way 🙂

 

Great work, keep going.

 

You can get the source code here: https://github.com/IGServal/Basic-custom-flight-model-for-DCS-World .

The variables you are looking for are in the aerodynamics folder.

Link to comment
Share on other sites

  • Sérvalpilot changed the title to (WIP) Custom flight model mod version 6 + source code
  • Sérvalpilot changed the title to (WIP) Custom flight model mod version 7 + source code
  • 4 weeks later...

Hi Serval,

I have been searching for a way to fix the current MiG-31 mod by Robert (.LUA attached), but have not as yet been able to. Basically, the plane handles awfully: it cannot climb to 80,000 feet like it can in real life, cannot reach Mach 2.8, like it can in real life, and so forth. It stalls out after 45,000 feet--the typical defects in the AI flight model.

I have attached the .LUA to this message. Can you explain how to fix it? This .LUA normally goes in the Bazar > planes folder. It seems to be one of those mods that relies on the files that are already present in that folder.

What can I do? I really want to fly this thing and have fun, but right now, it does not fly like a MiG-31 would!

Your advice appreciated.

MiG-31.lua

Link to comment
Share on other sites

@2IAE-CrashBG Thanks for your feedback! That has been added to my to-do list.

@sublimeswell I've tested the mod with the MiG-31, although it handles quite differently from other aircraft. I think the problem here is that it's dependent on locked files that can't be easily edited. Fortunately, I have some ideas on how to make it work, including making a version of this flight model specifically for the MiG-31. 
For now, here's some files that made it work with my flight model, just drag and drop into the MiG-31 mod's installation directory.
MiG-31.zip

Thanks for the feedback!


Edited by Sérvalpilot
  • Like 2
Link to comment
Share on other sites

On 11/3/2021 at 11:34 PM, Sérvalpilot said:

Hi everyone!

Version 7 is out, and with it, much better stall recovery and post-stall behaviour!

As always, feedback and feature requests are appreciated.

Have fun!

 

Do you plan to update the source code on github with the latest version?

Link to comment
Share on other sites

On 12/6/2021 at 2:22 AM, Sérvalpilot said:

@2IAE-CrashBG Thanks for your feedback! That has been added to my to-do list.

@sublimeswell I've tested the mod with the MiG-31, although it handles quite differently from other aircraft. I think the problem here is that it's dependent on locked files that can't be easily edited. Fortunately, I have some ideas on how to make it work, including making a version of this flight model specifically for the MiG-31. 
For now, here's some files that made it work with my flight model, just drag and drop into the MiG-31 mod's installation directory.
MiG-31.zip

Thanks for the feedback!

 

Thank you SO MUCH! I really appreciate it. I agree with you: the original mod is indeed dependent upon locked .lua files (in the Bazar > planes directory). We need to un-do that somehow and make it like other mods, which do not need files there. If you figure out how to do it, let me know. In the meantime, I look forward to flying this thing with your new model!

Link to comment
Share on other sites

On 12/6/2021 at 2:22 AM, Sérvalpilot said:

@2IAE-CrashBG Thanks for your feedback! That has been added to my to-do list.

@sublimeswell I've tested the mod with the MiG-31, although it handles quite differently from other aircraft. I think the problem here is that it's dependent on locked files that can't be easily edited. Fortunately, I have some ideas on how to make it work, including making a version of this flight model specifically for the MiG-31. 
For now, here's some files that made it work with my flight model, just drag and drop into the MiG-31 mod's installation directory.
MiG-31.zip

Thanks for the feedback!

 

Serval -- Update -- I am unable to spawn in as a "client." Any idea how to fix it? It's for the MiG-31 that we mentioned earlier. It just won't put me into the cockpit at all.

Link to comment
Share on other sites

Hey!

Source code has been updated.

I have some problems with the MiG-31 mod. It handles in a very weird way compared to the other mods I've tried; but the biggest problem is that landing gear doesn't work. Trying to land always results in an explosion, even with invincibility on. I can't figure out how to fix that.

Luckily for everyone, Eagle Dynamics seems to be reworking the AI flight model! Hopefully this "general flight model" is good enough to not need my mod any more.

For those of you with installation problems, here's a part of the readme:


Step 1: Go to the directory for the mod you want to integrate this FM with in your /saved games/DCS/mods/aircraft folder.

Step 2: Paste the contents of the .RAR archive in there.

Step 3: Open the "entry.lua" in the mod's folder and add the following line of code below the "info" line: 
binaries = { 'CustomFM', },

Step 4: Further in the file where there's lines written "dofile...", add these lines of code:

local cfg_path = current_mod_path .."/FM/config.lua"
dofile(cfg_path)
FM[1]         = self_ID
FM[2]         = 'CustomFM'
FM.config_path     = cfg_path
FM.old         = 4

Step 5: Go to the line, usually near the end that reads "make_flyable..." and add "FM" instead of {nil, old = 4} to the line like shown below

Before:
make_flyable('[modded aircraft name]',current_mod_path..'[usually /cocpit/scripts]', {nil, old = 4}, current_mod_path..'/comm.lua')

After:
make_flyable('[modded aircraft name]',current_mod_path..'[usually /cocpit/scripts]', FM, current_mod_path..'/comm.lua')

Step 6: Save the .lua file, boot up DCS, and enjoy a smooth flight!

 

If that doesn't work, let me know.

Link to comment
Share on other sites

  • 5 weeks later...
On 12/11/2021 at 7:08 PM, Sérvalpilot said:

Luckily for everyone, Eagle Dynamics seems to be reworking the AI flight model! Hopefully this "general flight model" is good enough to not need my mod any more.

Thanks for sharing the code and keep going! For all we know, it may come out in 2023: "Implementation is expected during 2022."

Link to comment
Share on other sites

  • 2 weeks later...
On 12/11/2021 at 7:08 PM, Sérvalpilot said:

I have some problems with the MiG-31 mod. It handles in a very weird way compared to the other mods I've tried; but the biggest problem is that landing gear doesn't work.

Could there be something wrong with the default collision model? There's no arg. 1, for example

On 12/11/2021 at 12:35 AM, sublimeswell said:

I am unable to spawn in as a "client." Any idea how to fix it? It's for the MiG-31 that we mentioned earlier. It just won't put me into the cockpit at all.

What has worked for me was defining a new plane, with a well known name/display name. But it still requires more work.

Mig_31M =  {
	Name = 'MiG-31',
	DisplayName	= _('MiG-31'),

But then, it's MP incompatible and can't land (see above).

Link to comment
Share on other sites

On 1/18/2022 at 12:44 AM, necr said:

Could there be something wrong with the default collision model? There's no arg. 1, for example

What has worked for me was defining a new plane, with a well known name/display name. But it still requires more work.

Mig_31M =  {
	Name = 'MiG-31',
	DisplayName	= _('MiG-31'),

But then, it's MP incompatible and can't land (see above).

I noticed those issues too during testing. The MiG-31 is weird, and I haven't figured out how to fix it. Sorry! ¯\_(ツ)_/¯

 

On 1/19/2022 at 5:23 PM, sushy73 said:

hello Servalpilot.

When I try to use the EFM with the Rafale, I lose the throttle axis .Do you have a solution please?

Thanks

 

Axis throttle control works fine for me. You could try clearing all axis bindings and then remapping them manually.

Link to comment
Share on other sites

  • 4 weeks later...
On 12/11/2021 at 7:08 PM, Sérvalpilot said:

 

I have some problems with the MiG-31 mod. It handles in a very weird way compared to the other mods I've tried; but the biggest problem is that landing gear doesn't work. Trying to land always results in an explosion, even with invincibility on. I can't figure out how to fix that.

 

Hi Servalpilot,

the reason regarding the problem with landing gear you describe most likely lies in the absence of collision-segment objects. These must be present within the collision model of an aircraft and named properly e.g. FRONT_WHEEL|LEFT_WHEEL|RIGHT_WHEEL. Btw, the pivot points of those must go all way down to where the landing gears are supposed to touch the ground. I had the same problem a couple of days ago with my model until I figured out the cause for these explosions. Basically the absence of a properly build collision model results in all sorts of unexpected behavior. With the cold/hot starts this just results in the aircraft falling through the ground.

I hope this will help to solve your problem.         


Edited by qman787
  • Thanks 1
Link to comment
Share on other sites

btw, thanks a lot for sharing the source code of your EFM, this is indeed very helpful for the community.

Yesterday, I've made a short test of your EFM with minor code analysis. Pretty impressive, however there are some points I'd like to clarify with you (if I may):

  1. void ed_fm_set_draw_args(EdDrawArgument* drawargs, size_t size) relies heavily on the model specific animation arguments and may potentially lead to a memory violation if the size of drawargs array does not match the maximum required by the function implementation. I refer to the latest commit 91a5939f I see on the master branch. On this commit the index goes all way up to 1128 and there is no check if that does not accede the size of an array provided by DCS.
  2. There's something weird about the flap animation, seems to be reversed or something. I couldn't figure out what this is.
  3. The rolling behavior of an aircraft seems a bit unnatural. I didn't check the code, but it looks like the MOI about X axis is not accounted for. Please correct me if I see it wrong. Basically whenever we bank aircraft it acquires a rotational momentum about its longitudinal axis (in case of DCS's convention it is the X axis). When the stick is returned to a neutral position the acquired rotational momentum will continue to rotate aircraft until it vanishes aerodynamically or it is compensated by the flight-control system that applies an opposite momentum by commanding a required aileron/flaperon input. If this is on your TO-DO list I'd be happy to help you to implement that, however this isn't an easy task. 
  4. The implementation of ed_fm_suspension_feedback seems to be missing. I'm not entirely sure, but I think we will fail to provide correct ground behavior and gear animation without this function. I believe the suspension mechanics is provided by DCS itself, but I'm not sure.      

overall your EFM looks very promising to me. Of course, and I hope everyone understands, that in order to achieve somewhat correct behavior of an aircraft the EFM is to be highly adapted to a specifics of an aircraft. There's simply no way to provide generic EFM to be suitable for all planes. So, in that case I'd recommend to all who might be interested in any further development of this EFM to actually branch out of main/master of https://github.com/IGServal/Basic-custom-flight-model-for-DCS-World/tree/main and NOT to fork from it. That way we will be able to merge the code and keep track of improvements and bugs.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...