HTML asset for sessions tutorial

The .html file is needed. Because it is in the string-table Trainz will load and display it - if the file is empty then nothing will be displayed. The thumbnail image you have created, "marz presentations.jpg", is NOT the image you will be displaying in the web page - it is the image that the DLS will use when showing your asset for others to download and it will be used by CMP when displaying the installed assets.

Using your example, I would create the html file "marz presentations.html" with the following contents - and using an image file I have named "marz instructions 1.jpg" containing your instructions with width and height (arbitrarily selected for the example) at 600x450).

<html>
<body>
<img src="marz instructions 1.jpg" width="600" height="450" border="0">
</body>
</html>

Let me now how this goes.

Peter Ware

Hi Peter,

Everything is set except that I wasn't sure what to put in the html.doc -- I assume it was only for text, etc --- anyhow, going to experiment, and will get back to you --- thank you so much!

Ish
 
Hi Peter,

I got it to work -- thanks a bunch -- Please read your e-mail -- more detail on how I got it to work so, perhaps, could be questions that others in the future might face!

Also, if you don't mind the suggestion -- I feel that you should add to your tutorial that in creating html spelling is very important, etc

Will credit you in my marsz presentation sessions in the credit page!

Take care
Ish

PS. This thread should be a sticky!!!
 
Hi Peter,

A question if I may ...

Topic
Introductions when driver is first launch using HTML only!

what I would like to do step by step!

1. I launch driver, sessions, and the First HTML page is displayed.

2. A second later, a second HTML page is displayed.

3. Then the Session begins!

So, my friend Peter, can we have two intro pages at the beginning of a session? And if so, how would that be illustrated in the config file?!

Thank you for reading this post!!!!

Ishie
 
1. I launch driver, sessions, and the First HTML page is displayed.

No problem there, the string table in the config.txt file will show something like...

html-page-0 "firstpage.html"


2. A second later, a second HTML page is displayed.

Several issues here. What will happen to the first page - will it disappear before the second appears? How - does the user switch it off (or navigate to the second page using the arrow button in which case the string table in the config.txt file can handle that) or is it on a timer (in which case using the config.txt file will not work)?

3. Then the Session begins!

I think that the solution you want may not involve the config.txt file at all. Instead I would suggest (without having tried it) using a parent-child rule activated by the start of the session with two timed display HTML page rules - although I would suspect that it may be a bit more complex than that.

Peter Ware
 
Hi Peter,

Since this is for my Marsz layouts, and I say layouts because i have already completed a "Built it Your Own" Marsz layout among others of the similar types, including a full Marsz Presentation layout , the idea was to give a brieft background of historical facts to the user about Mars via the first intro -- I have experimental with this and it works just fine; But I didn't wanted to include the purpose or goal of the session on the first intro page, instead have a second page be displayed automatically thus having the first page disappear, so it seems that this feature might not be available to trainz, so i guess, going with your suggestion here, Peter, to have the user click on the arrow to go forward onto the next page.

Then would the string table in the config.txt file be something like...

html-page-0 "firstpage.html"
html-page-1 "secondpage.html" ???

Thanks Peter for your delightful input!!!:wave:

Ishie
 
... to have the user click on the arrow to go forward onto the next page.

Then would the string table in the config.txt file be something like...

html-page-0 "firstpage.html"
html-page-1 "secondpage.html"

That is the technique that I use in my sessions. Any delay before the session starts, i.e. before any train starts moving, can be achieved by placing a "wait for" (e.g. "wait for 5 minutes") command at the start of every drivers command list.

Peter Ware
 
Hi Peter,

So i am going to assume that what I typed up for the config (what you quoted me) is corrent ... and adding the "wait for" command will allowed the user to click on those arrows and read whatever is on the html before the session begins?

Thanks a bunch!!!
Ish
 
Yes, and just add the "Wait for ..." command as the first command in the command list of the first driver (the one the session starts with). Don't forget to add the names of the web pages in the HTML Page Display rule.
 
I swear this worked before but how do I make it so the ordered list doesn't proceed until the user has clicked the tick or closed the html window?

I want the camera set to the interior once the user has read the instructions. At the moment all that happens is the instructions come up and it goes straight into the train cab!




Uploaded with ImageShack.us

Thanks for your help!
 
... At the moment all that happens is the instructions come up and it goes straight into the train cab!

That is because there is no way the Display HTML Pages rule can tell any following rules to wait until the page has closed. The only way I can think of to do the job is to add a Wait rule after the Display HML Pages rule - but this may introduce an unsatisfactory delay for those who have previously read the contents of the page(s).
 
Peter,
I'm trying to sort out a conundrum and hope you can provide some guidance. Trying to prepare some 2009 sessions for 2012, I have a number of sessions which have a switching list that is toggled by the Driver Info button. Some of these sessions incorporate transient messages as the session progresses -- instructions to the driver. I am moving those messages from Message Panel/Print to the Auran HTML handlers. I am trying to use the Set HTML Pages option "Use string-table-entry from HTML Asset" triggered by a condition. For example:
The shunter driver is at Intermodal when the morning turn arrives in the West Yard. That generates the string table message "Geoff is in." The message pops up fine, but brings the switch list up behind it, requiring me to close both separately.
I've tried creating a separate browser with DISPLAY HTML PAGES but that just brings up a blank browser window behind the pop-up. (There's no option there regarding string-table entries.)
Is this something you've overcome?

:B~)
 
:B~)

I have always studiously avoided using string tables to contain the HTML text to be displayed. I find the .html pages so much easier to use even if you have to use lots of them. Using this method eliminates the need for string tables entirely.

Have you created a separate HTML (.html) page for each message that you want to display using the DISPLAY HTML PAGES rule? The fact that it brings up a blank browser window indicates to me that it has looked for but did not find the .html page it is meant to display.
 
:B~)

I have always studiously avoided using string tables to contain the HTML text to be displayed. I find the .html pages so much easier to use even if you have to use lots of them. Using this method eliminates the need for string tables entirely.

Have you created a separate HTML (.html) page for each message that you want to display using the DISPLAY HTML PAGES rule? The fact that it brings up a blank browser window indicates to me that it has looked for but did not find the .html page it is meant to display.

Thanks, Peter. That approach of course would work, I was just hoping to avoid more files. I have been updating TUME's Avery-Drexel route for TRZ12* and he uses the string table approach for a large number of messages. He tried the old Auran Message Pop-up and of course it did not work, but they do nicely in Set HTML Pages, just as one would want. He also uses a browser for the initial instructions, video and displays, so I expect I shall have to study his method carefully to achieve the desired results.

Bob
:B~)

* The conversion from 10 to 12 has been mostly successful though it required tracking down a lot of textures and porting them. His power cables and blackberry brambles, however, do not meet 12's demands, and the introductory video does not display although the sound track runs. I plan to test the Message Console rules in 12; I've played with them in 10 and they work there.
 
Thanks, Peter. That approach of course would work, I was just hoping to avoid more files. I have been updating TUME's Avery-Drexel route for TRZ12* and he uses the string table approach for a large number of messages. He tried the old Auran Message Pop-up and of course it did not work, but they do nicely in Set HTML Pages, just as one would want. He also uses a browser for the initial instructions, video and displays, so I expect I shall have to study his method carefully to achieve the desired results.

Bob
:B~)

I think I've got it sorted out. For one thing, I was making it too complicated. The solution is to ensure the different types of browser call are in separate processes:

Check Trackside For Condition
Set HTML Pages: Use string-table-entry from Asset as a Pop-up
[Yardmaster: Geoff is in.]

Ordered List
Display HTML Pages: designated page/asset; Prevent User Closing Browser; Use page of asset as hidden button
Set HTML Pages: set hide/close on button
[Switch list JPEG displays/hides on Info button click.]

Thanks for your patience.

:B~)
 
If you want to add anything beyond basic text to an html file, you will need to use HTML codes. These have the form &#nnn; where nnn is a two or three digit number (or a short name in a few commonly used symbols). A good table can be found here: http://www.ascii.cl/htmlcodes.htm

I followed the very good tutorial by pware and had some success, but my html window is blank on opening in Session. I think I have everything typed correctly, but I run into a problem at the point where I must select an HTML asset from a list. My asset is not in the list. Anyone suggest where I am going wrong?
 
A blank html window on starting a session indicates that Trainz is looking for a html file but cannot find it - a common cause of that can be a spelling or typing error in the name of the html file. Check the string section in the html asset config.txt file to ensure that the name you have used for the html file in config.txt matches the actual filename used in the asset folder and that you have surrounded the filename in the config.txt file with quote marks.
 
Back
Top