Script changing wheel rotation speed

NSW_620_Class

New member
So I've made a bunch of posts here about the animdist tag not working a while ago, and only recently have I actually found out what the issue is. Apparently there seems to be some kind of scripting issue which causes this. There are a number of assets which are affected by this but for an example let's take <kuid2:73150:101413:2>.

With the .gs script file still in the asset, as it is when installed from the DLS, the wheels rotate far too quickly for them to be realistic, and, no matter what value the animdist tag is set at, this rotation speed shall remain constant.

If you edit the asset and delete the .gs script file, the main bogie (the one containing the driving wheels) disappears altogether.

Is there any way I can edit the .gs file so as to have the main bogie's wheels turn at the correct speed?

Thank you so much for any help!
 
If it isn't encrypted then technically you can. Whether you can understand enough on how the script works is a different question.

Cheerio John
 
Hello johnwhelan, thanks for the quick reply.

The script isn't encrypted - I can read in it in fairly plain English. I want the understanding on how the script works though, so I can fix this and other assets.

Thanks
 
Hello johnwhelan, thanks for the quick reply.

The script isn't encrypted - I can read in it in fairly plain English. I want the understanding on how the script works though, so I can fix this and other assets.

Thanks


If you're lucky it's been written by someone who knows what they are doing. If not it will be more interesting. Have a dig in the wiki and see if you can tease it out. notepad++ is a good editor for scripting.

Good Luck

Cheerio John
 
Hi NSW --

I've just installed the locomotive. The error I found was in the front bogey. I removed the direct-drive tag. All seems well -- both the main drivers rotational speed and the chuff-chuff sounds.

Phil
 
Thank you so much Philskene! This is the first progress I've made on this problem in several months! However, for me (should mention, using TANE SP4), the "chuff chuff" sounds are too fast, matching the original speed of the drivers. However, the drivers themselves are in sync with the ground and the animdist value.

Thanks again for your help so far, I hope we can get to the bottom of this much smaller issue.
 
I don't have T:ANE on my PC so I can't test it. But in TRS19 it does give four chuffs per revolution of the driving wheels, which is as it should be. The chuffing is tied to the bogey with the direct-drive tag and coincides with the animation distance.

I didn't install the tender. It is possible that the bogey on this has been given a direct-drive tag (which of course it should not). As a test, try the locomotive without the tender.

Phil
 
Hello Philskene, thanks again. No difference without tender - I think it's something like twelve chuffs per wheel rotation, but it's hard to tell because it stops chuffing so fast!
 
Hello johnwhelan, thanks for the quick reply.

The script isn't encrypted - I can read in it in fairly plain English. I want the understanding on how the script works though, so I can fix this and other assets.

Thanks
The script referenced in the loco's config file is just a stub that calls in a library script that's the main script for the loco. It's a version of Andi06's superscript. Unfortunately the library script is encrypted so not possible to read or edit it. While Andi06's script can replace bogeys based on a setup dialog, this loco doesn't give you that option in the setup dialog so I don't see how it would affect the bogeys.

I agree with Phil though the main problem is both the front bogey and the drive wheel bogey have direct-drive 1 tags. Either delete the one in the front bogey's config or change it to direct-drive 0 and you'll get 4 cuffs per rev. In TRS19 I get 6+ cuffs per rev in DCC mode and 4 in CAB mode and I'd have bet I'd hear 6.4 in both because 4 x 4.4/2.73 = 6.44 (with the front bogey's animdist = 2.73 and the drive bogey's = 4.4). So maybe something different happened in the past few years. I changed the direct-drive tag to 0 in the front bogey's config and replaced the loco on the track and got 4 cuff per rev in both dcc and cab modes.

I next deleted the script and class tags from the loco's config, replaced the loco on the track and got the same results - 4 cuffs per rev in driver. I'll note that the individual cuffs are replace by the looping wav files at about 5-6 mph.

This was in TRS19 SP1 build 100240. I have several versions of TANE including SP4 that I can try later to see if there's any difference.

[EDIT] I tested the loco in Tane SP4 yesterday and got the same results as I saw in TRS19 SP1.

Bob Pearson
 
Last edited:
One final suggestion.

I've sometimes found that sounds seem to "stick" even though the config.txt file has been edited -- the sounds remain unchanged even though the entry for them has been altered. Try deleting the locomotive from the track and then place it back again.

If this don't work I'm not sure what to suggest.

Phil
 
Hello lads, sorry to tell you nothing I've found has helped. I've had a similar issue with <kuid2:73150:100345:3>, where after correcting by removing the direct-drive tag, the sound began to play at one chuff per 1.75 wheel revolutions (yes, I counted them!) and after correcting the trailing bogie in a similar manner no sound played at all.

Is there some way I can reprogram the sound sets to force them to do one chuff per four revolutions (in line with the bogie's animdist tag)?

Thank you both so much for your help so far!
 
The Z26 indicated in the above post has some additional problems. Only the rear bogey <kuid:73150:100366> NSWGR Z26_class_trailing_bogie needs to have the direct-drive tag changed to direct-drive 0. The other 2 are correct.

The animdist tag on the main and rear bogeys is 12.5 and is not correct since they rotate way to slowly and appear to slide along the rail. Some research indicated the drive wheels for the Z26 are 4 ft in diameter (4/3.28084 =1.2192 m) and should have an animdist tag value of 3.83 m. So change the current value of 12.5 to 3.83. The rear bogey animdist has the same problem.

After making those changes, I too didn't hear 4 cuffs per rev. But at least the drive wheels looked like they were rotating at the right speed.

This is an older loco by Trainz standards that still uses TRS04 era enginespec and enginesound assets. In this case it looks like the old epsec in the new Trainz isn't working like it used too.

I swapped out the enginesound for the one in the C30T that I know is a TS09+ version. But still no joy.

I swapped out the enginespec for the one in the C30T that I know is a TS09+ version and it worked - I heard 4 cuffs per rev. While the enginesound, <kuid2:126323:53050:2> Steam Engine Sound - 2 cylinder, is ok for this loco the espec should be replaced with a new version (TS09+) that is designed for it or at least more appropriate for it based on loco specifications.

So if the old configs did work in the past N3V have messed it up now.

Bob Pearson
 
Back
Top