Jump to content

Ground vehicles gear ratios.


Recommended Posts

Hi, I am building a vehicle mod for combined arms. I want to adjust the top speed and acceleration.. All I can find following days of searching is this post. https://forums.eagle.ru/showpost.php?p=2936120&postcount=472

 

I assume the code referenced is part of a parameter list as separated by commas, but I have no idea how to define or use any of this. Thanks in advance.

Windows 10 64bit, Intel i7 6700K, 32GB Corsair 2400Mhz, 970 NVMe 500Gb SSD, GeForce 2080 super, HP Reverb, VKB GF PRO, Thrustmaster Warthog throttle, Thrustmaster Pendular rudders, Windows + DCS :thumbup:

 

My youtube channel

Link to comment
Share on other sites

So I have been speaking to other forum members, who have been really helpful with PM's. They have pointed me in the right direction to work out where I need to look, so thank you to them.

 

Solving how to configure the LUA is proving harder than creating the mesh I am working on. The Blender plugin is not worth using due to it's issues, so I am now using 3dmax to create my EDM. While Blender is something I am familiar with, the lost time in altering the mesh, trying to export, then recovering from any crashes. it just takes too long.

 

I did not realise I could define my own chassis types; so I have come up with my own chassis with ridiculous figures based loosly on the ingame tigr lua chassis (gearing);

 

GT_t.CH_t.amdb9 = {

life = 1.5,

mass = 200,

length = 4.7,

width = 2.3,

max_road_velocity = 102.2222,

max_slope = 0.4,

engine_power = 12250,

gear_count = 7,

max_vert_obstacle = 0.5,

max_acceleration = 4.08497,

min_turn_radius = 8.9,

X_gear_1 = 1.750,

Y_gear_1 = 0,

Z_gear_1 = 0.092,

X_gear_2 = -1.550,

Y_gear_2 = 0,

Z_gear_2 = 0.92,

gear_type = GT_t.GEAR_TYPES.WHEELS,

r_max = 0.406,

}

 

GT = {};

GT_t.ws = 0;

set_recursive_metatable(GT, GT_t.generic_wheel_vehicle)

set_recursive_metatable(GT.chassis, GT_t.CH_t.amdb9);

 

The thing here that seems to have made all the difference is the weight value. If I set to 200 I get good acceleration, but my speed is capped at 78MPH. If I reduce even further to 40, I get really good acceleration, slippery handling, but sadly a top speed capped at 50MPH.

 

The only effect I could achieve from tinkering with the gear values, was when I altered X_gear_1 = 9, which caused the vehicle to barely move. I increased Z_gear_1, and reduced it closer to 0, this seems to have no effect on the vehicle. The problem is I can only guess what these mean, as no one has said for definite.

 

Also tried GT.turbine = true;, but this also seemed to have no effect.

 

I found these in the core LAU

 

generic = {};

generic.chassis = {}

generic.fire_on_run = false

generic.visual = {

fire_pos = {},

min_time_agony = 4,

max_time_agony = 60

}

 

generic_vehicle = {}

set_recursive_metatable(generic_vehicle, generic);

generic_vehicle.human_figure = false

generic_vehicle.mobile = true

generic_vehicle.Crew = 3;

generic_vehicle.CanopyGeometry = { azimuth = {-180.0, 180.0}, elevation = {-10.0, 70.0} };

generic_vehicle.toggle_alarm_state_interval = 2.0;

 

generic_wheel_vehicle = {}

set_recursive_metatable(generic_wheel_vehicle, generic_vehicle);

generic_wheel_vehicle.max_rotate = 3.14159

generic_wheel_vehicle.animation_arguments.wheels_rotation = 8; -- вращение колес

generic_wheel_vehicle.animation_arguments.wheels_turn_angle = 9; -- угол поворота поворотных колес

generic_wheel_vehicle.snd.move = "GndTech/TruckMove";

generic_wheel_vehicle.snd.engine = "GndTech/TruckEngine";

generic_wheel_vehicle.snd.starter = "GndTech/TruckStarter";

generic_wheel_vehicle.snd.turn = "GndTech/TruckTurn";

generic_wheel_vehicle.snd.move_pitch = {{0.0, 0.7}, {20.0, 1.8}};

generic_wheel_vehicle.snd.move_vol = {{0.0, 0.01}, {0.5, 0.5}, {8.0, 1.0}};

generic_wheel_vehicle.snd.engine_pitch = {{0.0, 0.5}, {3.0, 1.0}, {3.0, 0.5}, {12.0, 1.2}, {12.0, 0.5}, {17.0, 1.2}, {17.0, 0.5}, {30.0, 1.5}};

generic_wheel_vehicle.snd.engine_vol_v = {{0.0, 0.8}, {3.0, 1.0}, {3.0, 0.9}, {12.0, 1.4}, {12.0, 1.2}, {17.0, 1.8}, {17.0, 1.6}, {30.0, 2.0}};

generic_wheel_vehicle.snd.engine_vol_a = {};

 

I am guessing I can define sports = {}; sports_vehicle = {}; sports_wheel_vehicle = {}, and create my own sounds somehow. I dunno... this is for another day.

 

I am guessing 78 MPH is top possible speed?

Windows 10 64bit, Intel i7 6700K, 32GB Corsair 2400Mhz, 970 NVMe 500Gb SSD, GeForce 2080 super, HP Reverb, VKB GF PRO, Thrustmaster Warthog throttle, Thrustmaster Pendular rudders, Windows + DCS :thumbup:

 

My youtube channel

Link to comment
Share on other sites

FYI the car wobbling around on the road you complained about is animation args 20,21 and 22 in the model itself. So I think you must have had too much movement and perhaps not enough damping if that is possible in a 3D model animation? I don't really know anything about that side of things.

Link to comment
Share on other sites

Yes I had added subtle animations for those in the model. I have now taken the animation rotation to 0 degrees to see if it reduced the boat style handling. There is no visible change resulting from changing the animation rotation. The really bad rolling was due to my lack of understanding. The lua above does not cause this anymore... I will try and dig out the bad to see where it went wrong.

 

Progress so far https://youtu.be/E53UZX16ai8

Windows 10 64bit, Intel i7 6700K, 32GB Corsair 2400Mhz, 970 NVMe 500Gb SSD, GeForce 2080 super, HP Reverb, VKB GF PRO, Thrustmaster Warthog throttle, Thrustmaster Pendular rudders, Windows + DCS :thumbup:

 

My youtube channel

Link to comment
Share on other sites

Hmmm not seeing anything in your lua that reduces the boat motion.....any clues? Otherwise I think I will need to buy some seasick pills.

 

 

<edit>Is it the gear X,Y,Z numbers? I tried 0 for the z value and the car rolled onto it's left hand side lol. I would never have guessed that response.


Edited by Stonehouse
Link to comment
Share on other sites

Hmmm not seeing anything in your lua that reduces the boat motion.....any clues? Otherwise I think I will need to buy some seasick pills.

 

 

<edit>Is it the gear X,Y,Z numbers? I tried 0 for the z value and the car rolled onto it's left hand side lol. I would never have guessed that response.

 

Yes the boat motion is gone, but top speed seems to be a maxed at 78. I managed to get 80 on a slope :( No chance for making a Delorean

Windows 10 64bit, Intel i7 6700K, 32GB Corsair 2400Mhz, 970 NVMe 500Gb SSD, GeForce 2080 super, HP Reverb, VKB GF PRO, Thrustmaster Warthog throttle, Thrustmaster Pendular rudders, Windows + DCS :thumbup:

 

My youtube channel

Link to comment
Share on other sites

OK I think you need to explain that. How do the gear co-ords relate to particle effects? No doubting you know what you are talking about but just would like a full explanation of what you mean please. They do seem still connected to the motion of the vehicle as making the gear_1 x value too high will stop the vehicle from moving at all but I did already realise that they weren't directly connected to the gears as changing the value had no apparent direct effect on acceleration.

Link to comment
Share on other sites

The elements you highlight are not associated directly with gearbox shift ratios, they are related to particle effects.

 

I took the X gear ration to over 9.something, and the vehicle would not move, so there must be some indirect link.

 

Also do you know about the other parameters?

 

None of the parameters make sense. I assumed that top speed could be whatever value multiplied by 3.6 as I found this while digging in Eagle Dynamics\DCS World\Scripts\Database\db_units_cars.lua

 

GT.MaxSpeed = GT.chassis.max_road_velocity * 3.6; -- *3600/1000 м/с->км/ч поле из chassis для ограничения скорости унита в редакторе

 

so assumed I could get up to 200 (320 kph) by setting

 

max_road_velocity = 89,

 

in my chassis definition. 78 MPH is still max :(

Windows 10 64bit, Intel i7 6700K, 32GB Corsair 2400Mhz, 970 NVMe 500Gb SSD, GeForce 2080 super, HP Reverb, VKB GF PRO, Thrustmaster Warthog throttle, Thrustmaster Pendular rudders, Windows + DCS :thumbup:

 

My youtube channel

Link to comment
Share on other sites

I took the X gear ration to over 9.something, and the vehicle would not move, so there must be some indirect link.

 

Also do you know about the other parameters?

 

None of the parameters make sense. I assumed that top speed could be whatever value multiplied by 3.6 as I found this while digging in Eagle Dynamics\DCS World\Scripts\Database\db_units_cars.lua

 

GT.MaxSpeed = GT.chassis.max_road_velocity * 3.6; -- *3600/1000 м/с->км/ч поле из chassis для ограничения скорости унита в редакторе

 

so assumed I could get up to 200 (320 kph) by setting

 

max_road_velocity = 89,

 

in my chassis definition. 78 MPH is still max :(

 

I am absolutely positive there is no link to the gearbox at all. When you set the X values too high all that happens is that the sim throws the model around, trying to position the vehicle where you have told it a particle effect will take place.

 

GEAR is not gearbox related its telling the sim that model has WHEELS/TRACKS/HUMAN or STATIONARY elements and calls the hard coded data associated with that. I would imagine that is why you cannot achieve speeds greater than 78 mph (because it's hard coded). I only code military vehicles so the speed element is not an issue.

Callsign: NAKED

My YouTube Channel

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

I am absolutely positive there is no link to the gearbox at all. When you set the X values too high all that happens is that the sim throws the model around, trying to position the vehicle where you have told it a particle effect will take place.

 

GEAR is not gearbox related its telling the sim that model has WHEELS/TRACKS/HUMAN or STATIONARY elements and calls the hard coded data associated with that. I would imagine that is why you cannot achieve speeds greater than 78 mph (because it's hard coded). I only code military vehicles so the speed element is not an issue.

 

Thanks for your reply.

 

If it is hard coded, that is kind of a brick wall in terms of using the standard LUA for this kind of project.

 

Does this mean that the "speed of light" in DCS is only 78MPH? :D

 

I am left with three choices;

 

A) become a genius overnight and code my own CA dll somehow.

B) somehow use the MiG29 SFM and create this car as an aircraft with extremely poor lift, really heavy weight, and ground handling that mimics a car.

C) wait an indefinite period of time in the vain hope a fellow modder suddenly says, "hey change this"

 

I think I will spend a bit of time tidying up the mesh, and adding detail. Lots to learn before I feel I am ready to take on a more serious project like an unspecific aircraft ;)


Edited by DoctorStrop

Windows 10 64bit, Intel i7 6700K, 32GB Corsair 2400Mhz, 970 NVMe 500Gb SSD, GeForce 2080 super, HP Reverb, VKB GF PRO, Thrustmaster Warthog throttle, Thrustmaster Pendular rudders, Windows + DCS :thumbup:

 

My youtube channel

Link to comment
Share on other sites

That is an awesome demonstration on Youtube! Looking forward to doing this myself.

 

Thanks, I appreciate the comment :)

Windows 10 64bit, Intel i7 6700K, 32GB Corsair 2400Mhz, 970 NVMe 500Gb SSD, GeForce 2080 super, HP Reverb, VKB GF PRO, Thrustmaster Warthog throttle, Thrustmaster Pendular rudders, Windows + DCS :thumbup:

 

My youtube channel

Link to comment
Share on other sites

  • Recently Browsing   0 members

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