View Details... and Product Info

ffccnn

New member
It has been a while since my big frustration after installing TS2010. But with a lot of patience and eagerness to learn the game, I am quite satisfied with the game and with what I have accomplished so far in my first 4 months in the world of Trainz. I have also learn how to cope with the many defects the game has and hope someday Auran would decide to fix them.

But this is about View Details....

I am quoting a comment in Auran's script file train.gs, ~line 4728:
...a Browser window listing information about the train including who the driver character is and the loads of all vehicles.

Somehow they got this not quite as intended. Or maybe I am doing something wrong. When I Ctrl-right-click on a train I only see the details of the vehicle I clicked on.

So I decided to implement a new rule as a Driver Command. Why? because I want to see all vehicles in my entire consist at once; furthermore, I want to see how the report changes after each vehicle is loaded; I want to see the total TOW in the train being updated after each load; I want to set the priority, change lights on/off and other details.

I think I got it right. I will try to upload it to DLS.
See the picture
 
Fantastic

That is great stuff.

Is this compatible with 09?
I have both but use 09 to create (tis a lappy) and 10 is on the desktop.

Also, what is involved in writing these scripts?
Once downloaded, is the source code visible?
 
While you are doing that, it would be nice to be able to "see" the commodities that a particular car is capable of loading (This before loading them). But any improvements to the game are most welcome!
 
Hi goochy:
I developed this driver command on TS2010. I guess it would work ok on 09. I may try it in 09 later.

About writing scripts, I would say, patience, a lot of it, the documentation is scarce, very few tutorials, of course, programming experience is a great help.

When writing the code I discovered that one way to "compile" the code (BTW, no compiler is available with 09 nor 10) is to invoke the "View Errors & Warnings" options in CM and it will tell you if there are errors, where and which ones. Of course, the pain is to test your code, you need to launch Trainz and go to DRIVER mode to see your new creation (and your runtime errors as well :D ).

Yes, the code will be available in DLS once I figure out how to upload it (and if it is accepted, anyways).

Hi llebrez,
A good idea to have that "commoditiies" functionality in DRIVER but don't you think it would make the web page too messy? with 30 rolling stocks in your train is going to be too much.

I rather write another command to see that, or better yet, I got the idea while typing. The current command will display two sub-menu options, one option would be for the current list of products loaded in the train and the other option would be the commodities list.

By the way, I have two more pictures to show. The next one you can see several trains and their respective product list. Also you see, my command being selected when you right-click the driver picture (no more two-hands-twisting to do Ctrl + right-click as the current View Details... option does). You can also select my command from the bottom schedule bar by left-clicking anywhere on that bar, again, no more Ctrl-rightclick.

The other picture, is what you get with the current View Details.... option by Auran.

Edit: Oops, the menu is on the 2nd picture.



 
Last edited:
The gs compiler is accessible from trainzutil.exe. Open a command window and goto the "C:\Program Files\Auran\TS2010\Bin" folder and type "TrainzUtil | More" and ENTER. A list of options for the program will be displayed. Step down to the compiler option. This also works for TS2009. You should be able to proceed from there.

Charles
 
thanks a lot Cohearn, no idea it was just at the tip of my fingers. This is what makes this forum so great!
 
view details

ffccnn could you post your files i would like to try to do this for 06

danny5
 
Last edited:
ffccnn could you post your files i would like to try to do this for 06

danny5
Danny5,

Apparently it is already available in the DLS, please verify,
I got this from Auran:

TitleTrainProductInfo
<KUID:478639:1058>
Last Updated: 12th Feb 2010
File Size: 19.12 kb
Downloaded: 41
TS2009
 
view details

Is there a special place to down load 2010 stuff? I checked CMP under title,kuid # ,author ID, not listed in my TRS2006 CMP.
Danny5
I am running 2006 that why i would like to see the files to see if i could get it to work in 2006. E-mail or PM them to me.
 
Ok found it on DLS,downloaded it,would not show up in surveyor. tried changing build # still didn't work. Could not get any of my driver commands to show up.(with stack dump massage)Deleated TrainProductInfo everything back to normly.
Can this be done for TRS2006 ?
Thanks Danny5
 
The script uses one function not available with TRS2006 (SetWindowTitle).
It might work, if you erase every usage of this function in the script file.

Peter
 
Thank Peter, I'll see if i can do that.
After looking and not really knowing what i should do i will leave it up to someone that knows how.
(hopping someone will do this for us TRS2006 users)
Danny5
 
Last edited:
After modifying the command for TRS2004 and TRS2006, the command crashed my TRS2006 when editing the DriverCommandRule in surveyor.
The modified command didn't show any errors with TRS2004 and TS2009. Using a different KUID the command didn't show any errors TRS2006.

Here is what I did to get it working with TRS2006.

In CMP I opened the asset for editing in the explorer.
Copied the folder (TrainProductInfo) to a temporary area (Desktop), and deleted the asset in CMP.
All changes are now made to the files in the temporary folder.

Open the file config.txt with an editor (notepad).

Change the line
Code:
kuid    <kuid:478639:1058>
to
Code:
kuid    <kuid2:478639:1058:1>
Change the line
Code:
trainz-build    2.9
to
Code:
trainz-build    2.4
Delete the lines
Code:
thumbnails
  {
    0
    {
      image                               "thumbnail.jpg"
      width                               240
      height                              180
    }
  }
Add the lines (at the end of the file)
Code:
icon-texture        "trainproductinfo.texture"
asset-filename    "TrainProductInfo"
Save the file (as an unformated simple text file).

Now open the file trainproductinfo.gs with an editor (notepad).

Delete the line
Code:
browser.SetWindowTitle(stringTable.GetString("browser_title"));
To change the textcolor from white to black, change every occurence of
color=#FFFFFF to color=#000000 .

Replace
Code:
   strTable.GetString("vehicle_train_headlight")
by
Code:
   "Headlight: "
Save the file (as an unformated simple text file, don't forget the .gs extension).

Now import the temporary folder into CMP (and commit).

Peter
 
p-dehnert, I've tried what you told me to do but i must be doing something wrong. I keep getting a blank pop up window when i click on driver commands in edit session.
ffccnn, Will you give p-dehnert permission to upload this to the DLS for all of us here in TRS2006 to use ? (that is if you would p-dehnert?)
Thanks Danny5
 
Hello guys,
I am back to the internet with my new shiny Win7, I am still hunting down some hardware drivers, so no Trainz so far until my pc is ready.

For Danny5 in particular, I would say that I can't modify ProductTrainInfo for TS06 since I am not planning to get that version. I accept your proposal to upload a modified version for TS06 with these two changes: (1) use a kuid <kuid:478639:2000> which I am reserving for that instance and (2) the name would be ProductTrainInfo06 to make it distint from the 09 and 10 versions.

I hope that Win7 be as friendly as possible to get back to my trains soon.
 
There is a 3rd version of this driver command (v2 fixed a bug, v3 displays the number of cars in the consist).

TrainProductInfo
Created By:
ffccnn
Status:
Available soon, currently unlisted
Uploaded:
25th Dec 2012 (AEST)
Game Version:
TS2009

KUID2:
478639:1058:3
Type:
Driver Command
 
Back
Top