Editing Industries for TLR/DLR

ColPrice2002

Well-known member
I've been having some success using the TLR and DLR (in SP6 and beta versions).
Multi-track industries require editing to add a section for the DLR/TLR to identify which track and commodities to use.

I've run into a problem (surprise!). Many of the older multitrack industries can be edited, but will report errors and are unuseable.
If I use a more recent version, I find that often the commodities have been changed to different Kuids -
For example
Lumber Mill <Kuid:-25:630) from Auran has a number of updated versions on the DLS e.g. "Auran's Lumber Mill Basic V5" <Kuid2:95230:100510:2> by jjeff1995.
The latter can be modified for the DLR/TLR, however, it creates "Wood Chips V2" <Kuid:95230:117205> - which isn't recognised by other industries on the route as they use "Wood Chips" <kuid:-310002>.
I've modified the config.txt of the "Auran's Lumber Mill Basic V5", but the industry produces the V2 version so this doesn't solve my problem....

Any suggestions from our experts?

Cheers,

Colin
 
Thanks for the thoughts - I’ve changed the kuid table in the config file, but the industry accepts logs and still produces “wood chips V2” and lumber. The other industries on the route accept the older “wood chips” commodity and use them in their production process.

Being unskilled in the construction of industries, I’m guessing that the industries config and *.gs files pass info to the industry.gs which controls the process.

Another difficulty is that by adding the instruction for DLR (beta version) to old multi-track industries will often report errors when submitting the assets as they aren’t built to the latest guidelines.
Cheers,
Colin
 
Thanks for the thoughts - I’ve changed the kuid table in the config file, but the industry accepts logs and still produces “wood chips V2” and lumber. The other industries on the route accept the older “wood chips” commodity and use them in their production process.

Being unskilled in the construction of industries, I’m guessing that the industries config and *.gs files pass info to the industry.gs which controls the process.

Another difficulty is that by adding the instruction for DLR (beta version) to old multi-track industries will often report errors when submitting the assets as they aren’t built to the latest guidelines.
Cheers,
Colin
The version issue is a problem due to how things have changed between build 3.7 and the latest builds for assets. Have you thought of updating the script? I don't know about you, but editing scripts is out of my comfort zone and I wouldn't know where to begin though.
 
The asset "Wood Chips V2" <Kuid:95230:117205> has its log processing set up to produce the commodity asset <kuid:95230:117205> Woodchips V2 and not the Auran version. You can see it in the config.

The destination industry should have a allowed-products container set up to permit both types of wood chips. I've been working on some industry asset repairs recently but I haven't had the need to test this situation.
 
Hi Paul,
Thanks for the reply and info. As I’ve hinted, I’m trying,to set up a route with multiple industries and automatic running of consists.
So, I have a forestry, sawmill, lumber mill and pulp mill.
To add DLR compatibility I have to edit the industries’ gs files. This means I’m having to find industries that won’t fail the new validation checks (so I’m limited in assets I can use). It also means that each industry needs to have the same version of commodities.
The alternative is to learn how to create/update the industries myself - something that may be possible if I can find out how to create/modify them.

Any pointers welcome

Regards
Colin
 
...

Any pointers welcome
...
At this time I cannot provide any advice as to what exactly is required to make industries suitable for TLR. I do know about the relatively minor software update but I haven't seen it working yet so I don't see any value in saying what needs to be done. But I will probably put something in the WiKi when I get it working. Maybe N3V will do that first.

I did try to update a cloned industry to TB 5.7 with the extra code but it failed validation because of too many materials. To repair it I would have to reverse engineering the meshes so maybe I'll just make my own. It would be simpler but obviously extra work.

Getting back to the wood chips. I believe that using the allowed-products container will allow the unload of both woodchip products where they get added to the input processing queue. In other words the two types of chips get mixed together in the input queue to the conversion process. I need to test that theory unless someone else pops in and says it works or doesn't work.

Testing industries is very complex. I've made routes for testing some of Ben Dorsey's coal industries where I have trains running along a series of industries picking up coal, dropping it off elsewhere, then on to another industry pickup, etc. The routes and sessions take longer to construct than the repairs!

p.s. I don't claim to be an expert on industries but I do know how to repair them. :)
 
Dear Paul,

Again, Thanks for your thoughts.

The actual changes to the script file are quite simple - once the N3V instruction are understood...
As an example:-

Using Auran steam filling station <kuid:-25:876>

The last lines in the original are
quote:-

public void AppendDriverDestinations(string[] destNames, string[] destTracks)
{
StringTable stringTable = GetAsset().GetStringTable();

destNames[destNames.size()] = stringTable.GetString("steamFill_waterCoalPickup");
destTracks[destTracks.size()] = "out_track0";

destNames[destNames.size()] = stringTable.GetString("steamFill_coalDropoff");
destTracks[destTracks.size()] = "in_track0";
}
End Quote

The additions (for the latest Beta)
Quote
//=============================================================================
// Name: AppendDriverDestinations
// Desc: Provides a list of destination tracks within this industry, filtering
// the list for a specific product delivery or pickup. This is used by
// the driver command interface, among other things. Two arrays are
// passed in as return arguments, one for localised human-readable
// names, and the other for the industry track names. Each array must
// be the same size, and all members must be non-null and non-empty.
// No default implementation is provided for this function, so it must
// be overridden by the industry scripter.
// Parm: product - The product asset that the caller wants to load/unload.
// Parm: bIsForUnloading - Specifies whether the caller wants deliver/unload
// the product (true) or pickup/load it (false).
// Parm: destNames - An array of localised and human-readable track names. See
// StringTable.gs for details on how to support localisation.
// Parm: destTracks - An array of machine-readable track names, as specified in
// the industry asset config file.
// Retn: bool - Whether the function is implemented. This function should only
// return false if the scripter has not implemented it at all. If the
// the function is implemented to ever return any destination tracks (for
// any product), then it should always return true.
//=============================================================================
public bool AppendDriverDestinations(Asset product, bool bIsForUnloading, string[] destNames, string[] destTracks)

{
bIsForUnloading = 0;
destNames[destNames.size()] = "steamFill_waterCoalPickup";
destTracks[destTracks.size()] = "out_track0";


bIsForUnloading = 1;
destNames[destNames.size()] = "steamFill_coalDropoff";
destTracks[destTracks.size()] = "in_track0";

return true;
}
End quote followed by the last "}" of the file.

For multiple tracks it's a simple matter of adding 3 lines for each commodity and track designation.

These modification appear to work in the Trainz Plus SP6 - but not guaranteed for earlier versions - and the Beta is still a beta....

All the Best,

Colin
 
Colin,

The purpose of the revised AppendDriverDestinations() function is to determine what destination track and name is suitable for a given product and whether it is a load or unload operation. The logic will use the input parameters product and the boolean bIsForUnloading to come up with a solution that is passed back in the two string arrays. In simple English it might read like this:

Code:
if loading then

  case product is peanuts then

        add to destination track "track1"

       add to destination names "peanut loading"

  case product is cachews then

        add to destination track "track2"

        add to destination names "cachew loading"

  etc

else if unloading then

  case product is cardboard for nut packaging then

     add to destination track "track3:

     add to destination names "cardboard unloading"

   etc

end if

As I think I said earlier, I have yet to see any industry asset that uses this function so my interpretation may be wrong.
 
Back
Top