Community Forum

add/change Differentials with Wheel Changes?

Forum Overview >> Scripting

Created19.03.2018 15:43

Fredrick Fox (moogle4u) 19.03.2018 15:43
Gents(and ladies),

I have to believe there is a way to do this, but most likely outside of my knowledge of scripting. I see in the LUADOC's on GDN entries for adding, changing, loading, removing, etc... differentials, so that leads me to believe that what I want to accomplish is, accomplish-able!

We will use a hypothetical tipper truck for this example:

The tipper truck has 3 axles- 1 steer, 2 drive in standard configuration:

0>0|0 - Steer Axle, Left Tire
0>0|1 - Steer Axle, Right Tire
0>0|4 - Drive Axle 1 / Mid Axle, Left Tire
0>0|5 - Drive Axle 1 / Mid Axle, Right Tire
0>0|2 - Drive Axle 2 / Rear Axle, Left Tire
0>0|3 - Drive Axle 2 / Rear Axle, Right Tire

<!-- <differential torqueRatio="0.5" maxSpeedRatio="1.5" wheelIndex1="0" wheelIndex2="1" /> -->
<differential torqueRatio="0.5" maxSpeedRatio="1.3" wheelIndex1="2" wheelIndex2="3"/>
<differential torqueRatio="0.5" maxSpeedRatio="1.3" wheelIndex1="4" wheelIndex2="5"/>
<differential torqueRatio="0.5" maxSpeedRatio="1.1" differentialIndex1="0" differentialIndex2="1"/>
<!-- <differential torqueRatio="0.5" maxSpeedRatio="1.1" differentialIndex1="2" differentialIndex2="3"/> -->

This is the standard working wheel and differential setup. It operates as a normal 6x4 truck with "$data/vehicles/wheels/lizard/315_80R22_5.xml" tires, or on-road tires. The steer axle has no power to it, the mid or front drive axle(drive axle 1) is the primary drive axle and when the interlock is engaged the rear drive axle(drive axle 2) has power sent to it allowing both axles of the tandem to power the vehicle. I vary the maxSpeedRatio depending on the wheelbase and expected turning radius of the truck, sometimes you need a little more overrun to allow for easier turning, sometimes you need it tighter for increased traction on uneven terrain, or some balance there-of.


When you select the "broad" or "wide" tire option, eg. $data/vehicles/wheels/trelleborg/TwinRadial_500_60R22_5.xml & TwinRadial_600_50R22_5.xml, I am wanting it to also change the differentials to make it a 6x6 instead of 6x4.

Either by adding/changing the commented out differential entries:

<differential torqueRatio="0.5" maxSpeedRatio="1.5" wheelIndex1="0" wheelIndex2="1" />
<differential torqueRatio="0.5" maxSpeedRatio="1.1" differentialIndex1="2" differentialIndex2="3"/>

This would add back in the front drive axle, powering the steer axle to change it from a 6x4 to a 6x6 when the off-road tires are selected.


Anyone have ideas or know how to do this?

It's more for a level of realism, as we know, everything is not AWD, and as we add in more and more "realism" mods like MR and Gearbox and 4real and Seasons etc... I like to tweak my vehicles to make them drive/respond/react with a level of realism as well.

I quite literally spend hours in VehicleDebugRendering with XML's open on my second monitor adjusting vehicle parameters of the vehicles I've developed as well as Giants default ones getting the suspension, loading, weight, braking, balance/center of mass both laden/towing and unladen as balanced as possible between "realistic" and "enjoyable"- because too realistic can take away from some of the enjoyment.


Fred Fox
JKAgCo Modding

Bilbo Beutlin (BBeutlin) 20.03.2018 02:08
Yes - you can have various differential configurations.
See for reference in script documentation the spec "Motorized", espec. function "loadDifferentials"

As concrete example see the "data\vehicles\steerable\caseIH\caseIH230Series.xml" --> espec. the attribute <wheels> .. differentialIndex=..

Fredrick Fox (moogle4u) 25.03.2018 01:04
Perfect! Thank you so much!

Note: Log in to post. Create a new account here.