SetWheelslipTractionMultiplier(1.0); is not working in TRS19 and TRS22.


New member

I'm scripting my locomotive Asset, and I'm having problems executing this line of code:


The problem is that according to trainzwiki, a value of 1.0 for the function should not produce the wheel slipping sound.

Apparently this stopped working in the latest versions of TRS19 and TRS22.

Is there any other way of disabling the wheel slipping sound on Trainz?
I think the wiki's description is not correct on this particular method. The traction multiplier value sets the fraction of the tractive force available that is actually applied to the rail when wheelslip occurs. Note that wheelslip occurs when trainz determines that the tractive force applied to the rail exceeds the max frictional force that can be generated under the current conditions. Setting a value of 1.0 means that there is no reduction in the tractive force applied to the rail when wheelslip occurs. It does not mean that wheelslip won't occur under the current conditions.

  public native float SetWheelslipTractionMultiplier(void);

    //! Sets the wheelslip traction multiplier value of this vehicle.
    // The wheelslip traction multiplier value refers to how much the occurrence of wheelslip affects
    // this vehicle's traction.  It is a scalar value that reduces this vehicle's tractive effort when
    // experiencing wheelslip.
  // Note: During multiplayer games this function will only succeed on the server and owning clients
    // Param:  multiplier  Factor to modify the traction of this vehicle when experiencing wheelslip.
    //                     Must be in the range of [0.0 - 1.0].

There 2 other methods that apply when sanding is and is not applied:
  public native void SetSandingTractionMultiplier(float multiplier);
  public native void SetTractionMultiplier(float multiplier);

There's also a method that directly effects momentum that I don't quite understand the need for since the change in tractive force is equal to the change in momentum for constant mass at least to a proportionality constant based on units used:
  public native void SetWheelslipMomentumMultiplier(float multiplier);

You can determine if wheelslip is occurring by calling "public native float GetEngineParam(string p_paramName)" on the loco object in question using "wheelslip" for p_paramName. A return value of 1.0 indicates wheelslip is occurring.

When I run steam locos around my test track I always set the above values to 1.0 so I get a "true" indication tractive effort produced by the steam loco and not one effected by wheelslip if it's occurring. I don't think it is possible to eliminate wheelslip occurring with the tools we have available in the scripting API but I think we can eliminate or at least mitigate any effect on the physics of the train. I suspect we can't eliminate sound effects associated with it.

Bob Pearson