Fixing the blw b2 assets

Rixer

New member
A number of us new people have tried to download Ben Neal's Baldwins only to find that some have faulty assets. Since I couldn't find the fix, I decided to try one on my own. This fix should work with all the b2 assets: con b2, dec b2, tw b2, . . .. All of these appear faulty in the Content Manager, and as far as I can see all refer to an invisible bogie. If the bogie is invisible, who cares what it looks like. The error message for each of these is the same: engine_black texture is missing. To fix these assets, you need to have the equivalent b0 asset, which is not faulty. For example, if you wish to fix blw con b2, you need the blw con b0 asset. Open both for editing and go to the config.txt file for each. Copy the env_metal.bmp, env_metal.texture.txt, 750bog.tga, and 750bog.texture.txt files from the b0 folder and paste them in the b2 folder. Now here's the trick (and I don't know if this is unique to trainz.mac). Make a second copy of env_metal.bmp and env_metal.texture.txt and relabel them engine_black.bmp and engine_black.texture.txt and paste these in the b2 folder. Go back to Content Manage and Submit Edits for both b0 and your new b2 asset. You should find that it is no longer faulty but comes up as modified. I've have done this with both con b2 and tw b2 and the locomotives appear to be running correctly. The only problem that I am having and I'm not sure whether this is due to my fix, is that the automatic stokers won't stop. Like the sorcerer's apprentice, it just keeps filling the fire box. Perhaps someone out there has a fix. In any case, getting these assets to work has given me a couple of beautiful ten-wheelers and a couple of consolidations.
 
There is in a lot of the b2 files missing black textures, I just copy them in explorer from one to the other, a real offender is Inyo b2. Working on the V&T cab files now - missing water glass texture, I've found one in a shay cab file, I'll see how that goes.I've got the Jupiter & UP 119 running in 2012 by dropping a black textur ito the inyo b2 file. The Reno, Genoa & Inyo are just beautiful engine, can't wait to get them running.
 
Last edited:
There is in a lot of the b2 files missing black textures, I just copy them in explorer from one to the other, a real offender is Inyo b2. Working on the V&T cab files now - missing water glass texture, I've found one in a shay cab file, I'll see how that goes.I've got the Jupiter & UP 119 running in 2012 by dropping a black textur ito the inyo b2 file. The Reno, Genoa & Inyo are just beautiful engine, can't wait to get them running.

George,
I think one of the reasons the b2 files are missing black textures is because they are invisible bogies. I think older versions of Trainz just ignored that fact and used them as they were. The newer versions, like trainz.Mac, are too picky are require all the textures to be there. I also figured out what was wrong with auto-stokers on these locomotives. The max coal weight was missing so it was set by default to 500. I changed the value to 200 in the config.txt file for the locomotive and that stopped the stokers. I'll tweak it up as I put it through its paces.
Jim
 
... The only problem that I am having and I'm not sure whether this is due to my fix, is that the automatic stokers won't stop. Like the sorcerer's apprentice, it just keeps filling the fire box. Perhaps someone out there has a fix. In any case, getting these assets to work has given me a couple of beautiful ten-wheelers and a couple of consolidations.
Ben's cab scripts use a programmed fireman that I wrote long ago. The programmed fireman in the cab script is designed to work in TRS04 and 06. For TC3 and newer the logic used is not compatible with the new steam physics. You should disable him when you set the loco out in Surveyor. On the trains flyout select the "?" tool and left click on the loco. Uncheck the "enable programmed fireman to handle the fire" box.

If your mod solved the problem fine but please note the true/false selection for "automatic fireman" also available on the dialog window is different from the fireman in the script. To fire manually you have to set the "automatic fireman" to false and uncheck the "enable programmed fireman...". But regardless if you want the N3V's "automatic fireman" to handle the fire, for TC3 and newer the "programmed fireman" in the cab script should be disabled.

Manual firing might then be limited to 1 shovel per 20 or 30 sec but there is a fix for that.If you want/need a more permanent solution to the fireman post back and I can show you how to edit the cab script.

Some of Ben's locos also control the exhaust cuff sounds in the loco script. For TC3 and newer ( I don't know about mac versions but I think they're about equivalent to TS10). In any case I suggest you set the loco to use the new steam enginesound sound assets. It will require some edits to the loco's config and possibly the script files but not a big job.

Post back if you're interested in enginesound fixes to his locos.

I'll get around to updating the fireman code one of these days.

Bob Pearson

PS there are several threads on fixing Ben's locos. Yours is somewhat similar to one I posted a few years back but only a new engine_black texture and image file need be added. The forum search function is not much help in finding some things however. Change is nice but in some ways we were better off with the old forums.
 
Last edited:
Bob,

Your fix for the auto-fireman is a lot easier than mine. As you suggested, I simply disabled it in the "loco properties". I would be interested in enginesound fixes.

Jim
 
Hi Jim,

For the loco sound use the Blue Comet sound if you have it, otherwise use billegula's TS2009 2cyl. engine sound, kuid2:81997:53009:2
Also there was one of Ben's locos that would not work with the original cab I replaced the cab with the Big Boy cab.
For the invisible bogeys, they can be replaced with the standard built in Auran invisible bogey kuid:-10:149,
Ben used invisible bogeys to give his locos four chuffs per revolution of the drive wheels in TRS2004 and with the new sounds this is not required.
In fact if you fix them and use them you will get eight chuffs per revolution.


Cheers,
Bill69
 
Last edited:
Didn't forget you Jim but I didn't get around to finishing this up till this afternoon.

Bill's answer is the short one and should work for most cases. For some if there is a soundthread in the loco's script you need to edit the script. Anyhow here's a longer one:

The new steam sound system actually works pretty good. But there are several pieces
spread out in several assets that need to be looked at to make it works properly.
The following 3 items need to be addressed with any upgrade of older steam locos to the
new steam sound system.

The examples are for his USRA Light 2-8-2:

1)The loco's config file needs to reference a new style enginesound asset.
Open for editing in explorer and edit the following tag:
change
enginesound <kuid:96914:53015>
to
enginesound <kuid2:126323:53050:1>
or any other new steam sound asset kuid that you perfer - just make sure it's installed
or you'll get a missing dependency error.

When you edit the configs you should also change the KUID container to reflect any
changes made to asset kuids referenced in the file.

Save and commit.

2)The loco's config file needs to reference a new style enginespec asset or the old
style one needs to have two tags added.

If you're referencing a new enginespec asset open for editing in explorer and edit the following tag:
change
enginespec <kuid:96914:51479>
to
enginespec <kuid:182464:70001>
or any other new steam espec asset kuid that you perfer - just make sure it's installed
or you'll get a missing dependency error.

However if you want to keep Ben's espec for some reason don't change the reference. Instead
open the asset referenced (kuid:96914:51479) for editing in explorer and edit the
config file. Find the steam container and add 2 lines - right at the top after the { is a good place:
Code:
steam
{
number-cylinders 2                       <--- add line 1
number-power-strokes 2               <--- add line 2
    
... don't change the rest of the steam container

Save and commit.

3)The loco's bogeys need to have a direct-drive tag with the appropriate value
specified in their config files.

Right click on the loco in CM and select view dependencies then view in main list. The
list will include all the bogey assets referenced in the config. Open the main drive
wheel bogey and edit the config and either edit or add a direct-drive 1 tag making sure
the value is 1.

Check all other bogeys referenced and make sure the direct-drive tag value is 0 or
there is no direct-drive tag in the config, Edit the configs as necessary.

Save and commit.


In addition, for Ben's loco's that have a custom script with a sound thread that
handles exhaust cuffs the custom script has to be edited and 1 line (or 2 for the 2-8-8-2) commented
out. Usually if the loco asset has a subfolder named sound the script will need to be
modified. AFAIK all of Ben's custom loco scripts are named steamlocomotive0905.gs. If
you edit scripts use your usual editor. You just need one that works with a straight
text file. In windows, notepad.exe will do for small jobs like this. Just make sure
when you're done and have save everything the filename hasn't been changed and it still
has a .gs extension.

open the file "steamlocomotive0905.gs" in the editor and locate the "public void Init(void)" method.
find the line:
SoundSetup();
and change to:
//SoundSetup();

Save and commit.

The line is identified in red in the following partial listing:
Code:
//
// SteamLocomotive.gs
//
//  Version 0.9.0.5
//
// by R. Pearson 07-11-05
//
// modified with poor man's steam sounds - four individual chuffs regardless of control 
method
// pitch-shifting loop sounds from standard system still used
//
// **********
// DEPENDENCIES:
//      A copy of SteamLocoCabinData.gs needs to be in the same directory with this 
script
//      for this script to work. 
// **********
// 
// SteamLocomotive class is now derrived from SteamLoco class 
// SteamLoco class is derrived from Locomotive class as a base class for steam
// locomotives using cab scripts derrived from SteamCabinwithFireman class - RRP 05-02
-06
//
//include "locomotive.gs"
include "cabin.gs"
include "common.gs"
include "SteamLocoCabinData.gs"

class SteamLocomotive isclass SteamLoco
{
    Asset meAsset;
    public bool UnloadProduct(LoadingReport report);
    public string GetDescriptionHTML(void);
    string GetPropertyName(string propertyID);
    string GetPropertyDescription(string propertyID);
    string GetPropertyType(string propertyID);
    void LinkPropertyValue(string propertyID);
    //void SetPropertyValue(string propertyID, int value);
    define float DDIA = 63.0f;                 // driver dia in inches           
    define float QTR = 0.01975f * DDIA;        // 99% of distance (m) traveled in 1 
quarter rotation            
        
        thread void SoundSetup (void) {
            int i = 0;
            float fac1 = 0.f;
            float vol = 1.0f;
            float[] fac2 = new float[4];
            fac2[0] = 0.95f;
            fac2[1] = 1.05f;
            fac2[2] = 0.85f;
            fac2[3] = 1.15f;
            string[] stroke = new string[4];
            stroke[0] = "sound/piston_stroke1.wav";
            stroke[1] = "sound/piston_stroke2.wav";
            stroke[2] = "sound/piston_stroke3.wav";
            stroke[3] = "sound/piston_stroke4.wav";
            while(1) {
                float speed = Math.Fabs(GetVelocity());
                if (speed < 0.1f) { // sorry but in TRS2004 the velocity bug means 1st 
non 0 velocity is at 0.277 m/s
                                     // we should all be using TRS2006 if we want the 
best from the new steam sounds.
     Sleep (1.0);
  
    }
                else {
                    // set exhaust volume based on regulator setting, cutoff and loco 
speed
                    // modify to suit your preferences final vol is between 0-1 and is 
product of the 3 effects
                    fac1 = 0.05 + GetEngineSetting("regulator");
                    if (fac1 < 0.25f) 
                        fac1 = 4.0f * fac1 * Math.Fmin(Math.Fabs(GetEngineSetting
("reverser"))*2.0f + 0.1f,1.0f);
                    else
                        fac1 = Math.Fmin(Math.Fabs(GetEngineSetting("reverser"))*2.0f
+0.1f,1.0f);
                    vol = fac1;
/*
                    if (speed < 5.36448f)
                        vol = fac1;
                    else if (speed < 9.36f)
                        vol = (1.33-0.0625*speed)*fac1;
                    else 
                        vol = 0.75f*fac1;
*/                    
                    if (speed < 8.9408) {
                        for (i=0; i<4; i++) {
                        World.PlaySound(meAsset,stroke[i],vol,50.f,750.f,me,"a.bog0");
                        Sleep(QTR/speed*fac2[i]);
                        speed = Math.Fabs(GetVelocity());
                       if (speed < 0.05f)
                            break;
                       }
                    }
                    else if (speed < 9.835) {
                        for (i=0; i<4; i++) {
                        World.PlaySound(meAsset,stroke
[i],vol*0.75,50.f,750.f,me,"a.bog0");
                        Sleep(QTR/speed*fac2[i]);
                        speed = Math.Fabs(GetVelocity());
                       if (speed < 0.05f)
                            break;
                       }
                    }
                    else if (speed < 10.729) {
                        for (i=0; i<4; i++) {
                        World.PlaySound(meAsset,stroke
[i],vol*0.5,50.f,750.f,me,"a.bog0");
                        Sleep(QTR/speed*fac2[i]);
                        speed = Math.Fabs(GetVelocity());
                       if (speed < 0.05f)
                            break;
                       }
                    }
                    else if (speed < 11.623) {
                        for (i=0; i<4; i++) {
                        World.PlaySound(meAsset,stroke
[i],vol*0.25,50.f,750.f,me,"a.bog0");
                        Sleep(QTR/speed*fac2[i]);
                        speed = Math.Fabs(GetVelocity());
                       if (speed < 0.05f)
                            break;
                       }
                    }
                  else{
                      Sleep (1.0);
                   }
                } // end else
            } // end while
        } //end thread SoundSetup

    public void Init(void)
    {
        inherited();
        //Interface.Log("***** " + myName + " Init in loco called *****");
        //Interface.Print(myName + " Init in loco called");
        meAsset = GetAsset();
       [COLOR=#ff0000] SoundSetup();   //<---- EDIT this line 
[/COLOR]    }
    
    public bool UnloadProduct(LoadingReport report)
    {
        bool UnloadFlag = false;
        return UnloadFlag;
    }
  // Custom surveyor setup window
  public string GetDescriptionHTML(void) {
        string htmlData = inherited();
        Str.TrimRight(htmlData, "</body></html>"); 
...

Commit any open assets and check for any errors or missing dependencies.

Bob Pearson
 
Hi Bob,

Yes, mine is the short way out of trouble with most of Ben's locos. But I also forgot to mention the engine config file. I have made up an TS12 engine config file using billegula's spreadsheet for the steam section.
I don't know if you have used it or not but I find it is a very good starting point but you may have to giggle one or two values to get it working 100%.

Cheers,
Bill
 
Bob and Bill,

Thanks for the help. I think I opened a can of worms. It is going to take me some time to absorb all this. A month ago I didn't even know what a config.txt file was.

Jim

P.S. As a side note, I've actually taken the throttle of a prototype ten-wheeler. Nothing like the real thing. And they don't stop on a dime.
 
Last edited:
Jim not really a can of worms. Once you've done a few it starts to make sense. Unfortunately the game moves on and to keep up with new features content has to get updated. Also past versions were a lot more tolerant of errors and many just went unseen. That's all changed. Time to pay the piper so to speak.

@Bill69, yes I have Bill's spreadsheet and use it occasionally. I have my own though that I set up many years ago and updated to the new steam physics after TC3 came out. It's still a wip primarily because N3V's steam implementation still has a lot of problems. Bill's spreadsheet for instance doesn't use the actual cylinder dimensions you input in the espec it sets up. He reduces the cylinder swept volume (by up to 46%) so it does less work per stroke resulting in less tractive force produce - at any speed. I've found the same thing, the locos produce too much force if you use actual values and the espec input has to be modified. And this is just basic mechanics they got wrong - the easy part of the simulation. Reducing swept vol doesn't help water consumption either just the opposite and it's not right either.

Bob Pearson
 
I've updated them, and saved it. It says: Error: Unable to load indexed mesh 'kuid 96914 504892\ury21_b2.im'
 
Back
Top