Jump to content

DCS Mods structure : How to create your plugin from scratch


Alex Okean
 Share

Recommended Posts

Wow Alex! so what you're telling me, is that I can setup the AFM suspsension/gear modeling right there in the lua?

 

I can't wait to give this a go in the F-16. Thanks so much, I wish you posted soemthign new everyday!

"Witness mere F-14s taking off from adjacent flight decks, gracefully canting left and right, afterburners flaming, and there’s something that sweeps you away—or at least it does me. And no amount of knowledge of the potential abuses of carrier task forces can affect the depth of that feeling. It simply speaks to another part of me. It doesn’t want recriminations or politics. It just wants to fly.”

― Carl Sagan

Link to comment
Share on other sites

  • Replies 487
  • Created
  • Last Reply

Top Posters In This Topic

So I guess I can post this here now:

 

 

Can anyone provide any description or units for any of these items in the suspension? Many of them are understandable, but without seeing the equations behind the suspension code, understanding these inputs is almost impossible.

 

{

mass = 200,

pos = {0,0,1},

moment_of_inertia = {1000,1000,1000},

 

 

damage_element = 83,

damage_omega = 30.0,

state_angle_0 = 6.131341662,

state_angle_1 = -2.995164152,

mount_pivot_x = -0.274,

mount_pivot_y = -0.118,

mount_post_radius = 0.657,

mount_length = 0.604555117,

mount_angle_1 = -3.138548523,

post_length = 1.748,

wheel_axle_offset = 0.05,

self_attitude = false,

yaw_limit = math.rad(89.0),

damper_coeff = 30.0,

 

 

amortizer_min_length = 0.0,

amortizer_max_length = 0.397,

amortizer_basic_length = 0.397,

amortizer_spring_force_factor = 1.6e+13,

amortizer_spring_force_factor_rate = 20.0,

amortizer_static_force = 80000.0,

amortizer_reduce_length = 0.377,

amortizer_direct_damper_force_factor = 45000.0,

amortizer_back_damper_force_factor = 15000.0,

 

 

wheel_radius = 0.308,

wheel_static_friction_factor = 0.65 ,

wheel_side_friction_factor = 0.65 ,

wheel_roll_friction_factor = 0.025,

wheel_glide_friction_factor = 0.28 ,

wheel_damage_force_factor = 250.0,

wheel_damage_speed = 150.0,

 

 

arg_post = 5,

arg_amortizer = 6,

arg_wheel_rotation = 77,

arg_wheel_yaw = -1,

collision_shell_name = "WHEEL_R",

},

 

 

Here is what I understand so far:

 

{

mass = 200, -- (kg) Is this the mass of the wheel and strut?

pos = {0,0,1}, -- (m) Is this the location where the tire impacts the runway or the location of the strut mount point?

moment_of_inertia = {1000,1000,1000}, -- (kg-m^2) Is this the moment of inertia of the strut and wheel in the down position? Not sure what the coordinate system here is.

 

 

damage_element = 83, -- (Damage Cells #) From Aircraft.lua

damage_omega = 30.0, -- (deg?) What is this? RUSSIAN COMMENT: порог скорости заклинивания при ударе об ограничитель вращения

state_angle_0 = 6.131341662, -- (deg?) What is this? RUSSIAN COMMENT: конструктивный угол убранной стойки к горизонтальной плоскости самолета

state_angle_1 = -2.995164152, -- (deg?) What is this? RUSSIAN COMMENT: конструктивный угол выпущенной стойки к вертикальной оси самолета

mount_pivot_x = -0.274, -- (m) Strut mount x location where it pivots in animation? RUSSIAN COMMENT: точка крепления привода к фюзеляжу в СК стойки

mount_pivot_y = -0.118, -- (m) Strut mount y location where it pivots in animation?

mount_post_radius = 0.657, -- (m) What is this? RUSSIAN COMMENT: расстояние от оси стойки до точки крепления привода к стойке

mount_length = 0.604555117, -- (m) What is the difference between this and the post_radius? RUSSIAN COMMENT: длина подкоса (привода в убранном положении)

mount_angle_1 = -3.138548523, -- (deg?) What is this? RUSSIAN COMMENT: модуль радиус-вектора точки крепления

post_length = 1.748, -- (m) Strut length? RUSSIAN COMMENT: расстояние от оси вращения стойки до оси колеса

wheel_axle_offset = 0.05, -- (m) What is this? RUSSIAN COMMENT: вынос оси колеса отн. оси стойки

self_attitude = false, -- Does this determines whether the wheel rotates freely without control? RUSSIAN COMMENT: true - свободноориентирующаяся стойка

yaw_limit = math.rad(89.0), -- (deg->rad) Max yaw rotation angle?

damper_coeff = 30.0, -- (unitless) Suspension total damper coefficient or just tire damper coeff? (higher number results in the suspension taking more punishment before rebounding

 

 

amortizer_min_length = 0.0, -- (m) Not sure why you need to define zero? RUSSIAN COMMENT: Минимальная длина пружины / минимальной длине амортизатора

amortizer_max_length = 0.397, -- (m) Uncompressed suspension length? Distance the gear hangs down on suspension with no weight on wheels. RUSSIAN COMMENT: Максимальная длина пружины / максимальной длине амортизатора

amortizer_basic_length = 0.397, -- (m) Not sure why we are defining length again? RUSSIAN COMMENT: Длина пружины в свободном состоянии / к длине амортизатора в свободном состоянии

amortizer_spring_force_factor = 1.6e+13, -- (??) What is this? RUSSIAN COMMENT: Коэффициент упругости пружины

amortizer_spring_force_factor_rate = 20.0, -- (??) What is this? RUSSIAN COMMENT: Степень

amortizer_static_force = 80000.0, -- (N?) What is this? RUSSIAN COMMENT: Статическая сила реакции амортизатора

amortizer_reduce_length = 0.377, -- (m) I think this is the total suspension compression distance. RUSSIAN COMMENT: Cвободный (ненагруженный) ход штока амортизатора

amortizer_direct_damper_force_factor = 45000.0, -- (??) What is this? RUSSIAN COMMENT: Дэмпфер прямого хода

amortizer_back_damper_force_factor = 15000.0, -- (??) What is this? RUSSIAN COMMENT: Дэмпфер обратного хода

 

 

wheel_radius = 0.308, -- (m) Tire radius

wheel_static_friction_factor = 0.65 , -- (unitless) Static friction factor.. pretty standard number RUSSIAN COMMENT: коэффициент трения колеса в состоянии покоя

wheel_side_friction_factor = 0.65 , -- (unitless) Static friction factor for the side of the tire RUSSIAN COMMENT: коэффициент бокового трения колеса при движении

wheel_roll_friction_factor = 0.025, -- (unitless) Rolling friction factor.. pretty standard number RUSSIAN COMMENT: коэффициент трения качения колеса

wheel_glide_friction_factor = 0.28 , -- (unitless) Wheel sliding friction factor RUSSIAN COMMENT: коэффициент трения скольжения колеса

wheel_damage_force_factor = 250.0, -- (??) What is this? RUSSIAN COMMENT: коэффициент прочности покрышки колеса

wheel_damage_speed = 150.0, -- (m/s) Speed at which the wheel will take damage RUSSIAN COMMENT: скорость разрушения покрышки колеса

wheel_brake_moment_max = 15000, -- (N-m) Braking moment torque RUSSIAN COMMENT: Максимальный тормозной момент

wheel_moment_of_inertia = 3.6, -- (kg-m^2) Is this the moment of inertia of the strut and wheel in the down position? Not sure what the coordinate system here is.

 

 

arg_post = 5, -- (Arg#) for gear down/up animation

arg_amortizer = 6, -- (Arg#) for suspension compression

arg_wheel_rotation = 77, -- (Arg#) for wheel rolling rotation

arg_wheel_yaw = -1, -- (Arg#) for wheel yaw rotation. I'm guessing -1 means the wheel has no yaw rotation

collision_shell_name = "WHEEL_R", -- Name of collision shell in the model

},

Link to comment
Share on other sites

and I just flashed back to College....

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to comment
Share on other sites

that explains a few things.

 

Can the suspension code be applied to a module still running SFM?

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to comment
Share on other sites

I tried to translate. Some defenition hard to translate because there is no en.Wiki page relative to ruWiki page.

{

damage_omega = 30.0, -- (deg?) speed threshold of jamming during impact of rotation limiter

state_angle_0 = 6.131341662, -- (deg?) designed angle of retracted gear with horizontal axis of plane

state_angle_1 = -2.995164152, -- (deg?) designed angle of released gear with vertical axis of plane

mount_pivot_x = -0.274, -- (m) X-coordinate of attachment to fuselage in body-axis system

mount_post_radius = 0.657, -- (m) distance from strut-axis to attachment point of piston to gear stand

mount_length = 0.604555117, -- (m) What is the difference between this and the post_radius? length of angle brace in retracted configuration

mount_angle_1 = -3.138548523, -- (deg?) length of Position (vector) from attaxhment point

post_length = 1.748, -- (m) distance from rotation-axis of strut to wheel-axis

wheel_axle_offset = 0.05, -- (m) displacement wheel axis relative to strut

self_attitude = false, -- true if gear is self-oriented (Alba or Yak-52 example)

amortizer_min_length = 0.0, -- (m) rate of (minimum spring lenght / minimum length of damper)

amortizer_max_length = 0.397, -- (m) same as previous but max length

 

amortizer_basic_length = 0.397, -- (m) rate of (spring length in free (without load) condition / damper length in free (without load) condition)

amortizer_spring_force_factor = 1.6e+13, -- (??) spring tension factor (see k Wik)

amortizer_spring_force_factor_rate = 20.0, -- (??) Степень probably not full comment

amortizer_static_force = 80000.0, -- (N?) static reaction force of damper

amortizer_reduce_length = 0.377, -- (m) total suspension compression distance in non-load condition

amortizer_direct_damper_force_factor = 45000.0, -- (??) damper of positive movement

amortizer_back_damper_force_factor = 15000.0, -- (??) damper of negative (reversed) movement

 

wheel_radius = 0.308, -- (m) Tire radius

wheel_static_friction_factor = 0.65 , -- (unitless) Static friction factor when wheel not moves

wheel_roll_friction_factor = 0.025, -- (unitless) Rolling friction factor when wheel not moves

wheel_damage_force_factor = 250.0, wheel cover (tire) strength force (not sure)

wheel_brake_moment_max = 15000, -- (N-m) Max braking moment torque

 

},

 

Now big question is how to add stopping force in EFM for each wheel?


Edited by BR=55=Sevas
  • Like 1
Link to comment
Share on other sites

I tried to translate. Some defenition hard to translate because there is no en.Wiki page relative to ruWiki page.

 

 

Now big question is how to add stopping force in EFM for each wheel?

 

you need to increase roll_friction_factor (means lower pressure in tyre also) or use brakes with increased wheel_brake_moment_max

 

 

wheel_static_friction_factor = 0.65 , -- (unitless) Static friction factor when wheel not moves - means fully braked, wheels cant roll - static - therefore same highest value for side friction

wheel_glide_friction_factor = 0.28 , glide/slide friction factor when wheel not rolls/ not rotating but sliding - means fully braked, wheels cant roll - non static/aircraft is moving - therefore 2nd highest value

wheel_roll_friction_factor = 0.025, -- (unitless) Rolling friction factor when wheel moves - rotating/rolling/turning wheels - no brake - lowest value - all ok - plane rolling on taxiway

wheel_damage_force_factor = 250.0, when tyre is exploding - extreme hard landing

wheel_brake_moment_max = 15000, -- (N-m) Max braking moment torque but it not means tires cannot roll...it means max brake strength,

so if the plane is moving and the brake stopped wheel turning/rolling then will produce the glide_friction_factor values


Edited by HungaroJET

Atop the midnight tarmac,

a metal beast awaits.

To be flown below the radar,

to bring the enemy his fate.

 

HAVE A BANDIT DAY !

 

[sIGPIC][/sIGPIC]

"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." - R. Buckminster Fuller (1895 - 1983), American Architect, Author, Designer, Inventor, and Futurist

Link to comment
Share on other sites

Wow, rock on SilentEagle, Sevas, and HungaroJet! Made my life a whole lot easier, thanks for sharing the knowledge!

"Witness mere F-14s taking off from adjacent flight decks, gracefully canting left and right, afterburners flaming, and there’s something that sweeps you away—or at least it does me. And no amount of knowledge of the potential abuses of carrier task forces can affect the depth of that feeling. It simply speaks to another part of me. It doesn’t want recriminations or politics. It just wants to fly.”

― Carl Sagan

Link to comment
Share on other sites

Wow, rock on SilentEagle, Sevas, and HungaroJet! Made my life a whole lot easier, thanks for sharing the knowledge!

 

Your welcome ;)

 

used glide_friction_factor here: full brake without ABS cause burning tires ...problem: no continous smokes @ main wheels :( (1st pic)

same problem both with A-10C and Ka-50: there are black burned tyre traces on concrete but without smoke effect when gliding/sliding

http://forum.lockon.ru/showpost.php?p=1556083&postcount=5989

Atop the midnight tarmac,

a metal beast awaits.

To be flown below the radar,

to bring the enemy his fate.

 

HAVE A BANDIT DAY !

 

[sIGPIC][/sIGPIC]

"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." - R. Buckminster Fuller (1895 - 1983), American Architect, Author, Designer, Inventor, and Futurist

Link to comment
Share on other sites

Hey guys

 

Anyway to let the model show up in mission editor??

 

I tryed the whole midday to get it in but no sucess, but the rest is working fine its showing up. As the icon, in the encyclopedic, and in the Logbook.

And got no Clue's left Help will be verry appreciated.

 

Vincent

 

PS. sorry for my bad English not my native language

My specs

Antec Dark Fleet Series DF-35 Mid Tower

ASUS Rampage IV Formula Republic of Gamers

Intel Core i7 3930K - 3.2 GHz

ASUS GTX660 TI

Kingston HyperX Genesis 16gb

SSD-Samsung 830 Series

Western Digital 2 tb

Antec KÜHLER H2O 920 - Liquid cooling

Link to comment
Share on other sites

and replace with _

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to comment
Share on other sites

Thank you guys its working now :P

My specs

Antec Dark Fleet Series DF-35 Mid Tower

ASUS Rampage IV Formula Republic of Gamers

Intel Core i7 3930K - 3.2 GHz

ASUS GTX660 TI

Kingston HyperX Genesis 16gb

SSD-Samsung 830 Series

Western Digital 2 tb

Antec KÜHLER H2O 920 - Liquid cooling

Link to comment
Share on other sites

one question. The plugin, only work with aircraft (and helos)? or can be exported to work with vehicles and ships?

More news to the front

Wishlist: ED / 3rd Party Campaings

My Rig: Intel I-5 750 2.67Ghz / Packard Bell FMP55 / 16 GB DDR3 RAM / GTX-1080 8 GB RAM / HD 1Tb/2Tb / Warthog / 2 MDF / TFPR

 

DCS: Roadmap (unofficial):https://forums.eagle.ru/showthread.php?t=116893

DCS: List of Vacant models: https://forums.eagle.ru/showthread.php?p=4076891#post4076891

21Squad DCS: World News: https://www.facebook.com/21Squad-219508958071000/

Silver_Dragon Youtube

Link to comment
Share on other sites

Guys the animations are set on the aircraft how to get them working, cuzz when we replaced this model whit an flyable AI back in the days and it was working.

but since we got them now as a separate module the don't seem to work anymore.

How to get them working guys help would be verry appreciated

 

VBBJT_Pyrex

VirtuaLBlueBoltsJetTeam

  • Like 1

My specs

Antec Dark Fleet Series DF-35 Mid Tower

ASUS Rampage IV Formula Republic of Gamers

Intel Core i7 3930K - 3.2 GHz

ASUS GTX660 TI

Kingston HyperX Genesis 16gb

SSD-Samsung 830 Series

Western Digital 2 tb

Antec KÜHLER H2O 920 - Liquid cooling

Link to comment
Share on other sites

Link to comment
Share on other sites

Don`t want to offense someone, but searching How-to forums would be very appreciated. ;) There is all answers, even more.

 

always comes to mind. :D

i7 7700K | 32GB RAM | GTX 1080Ti | Rift CV1 | TM Warthog | Win 10

 

"There will always be people with a false sense of entitlement.

You can want it, you can ask for it, but you don't automatically deserve it. "

Link to comment
Share on other sites

It's just A Jump to the Left.... And A Step to the Riiii-ii---ii-ght.......

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...