TS2010 Session making competition - feedback

Chris,

TS2010 built-in ECML driving session is one I have not looked at. I'll take a look and get back with questions.

Thanks,

David
 
chris, dap

thanks for the info

cannot wait for teh documentation.
i take it that you will announce when its ready.

the session thing with the html,
well, i can't seem to bring it up.
i can look at the session, but nothing else comes up that i can open.

maybe i'm still missing a driver in my pc

thanks
ron
 
the session thing with the html,
well, i can't seem to bring it up.
i can look at the session, but nothing else comes up that i can open.

Start by going into the Routes menu, selecting the ECML route, and opening the session in Surveyor ("edit session".)

Once inside surveyor, select "Edit session" from the main menu, or click on the edit session icon in the menu bar.

You should see a screen that looks something like this one on this link: http://img228.imageshack.us/i/stokia01201007060001.jpg/

Selecting any rule in the list will allow you to move it around or edit the properties for that rule.

hope this helps,

chris
 
Where can I find a tutorial on understanding the HTML asset that is referred to in the TRS2006 Session and Rules Guide? I searched Trainzwiki and found very little including "See HTML Tutorials for examples" but there was no link and no examples.

David, here is a link to a tutorial.

https://sites.google.com/site/howtoillustrrateintrainz2010/1-creer-des-pages-html

An HTML Asset is really nothing but a container that can be accessed in game by the Display HTML rule. Like a folder, it holds the HTML files and images that are displayed by that rule. The Display HTML rule requires two parameters: the name of the HTML Asset where it looks for the HTML page which is the second asset. You can pick the name of the HTML Asset in the edit window of the Display HTML rule from a list since it is a known asset in the TAD but you have to type the name of the HTML file itself. This is all covered in the tutorial.

William
 
William, celje,

Thanks for the info. I should be able to make this work, now that I have some idea of how it goes together.

James,

Thanks for your patience. When we submit sessions for the contest, do we need to specify somewhere the intent or will all sessions submitted for the appropriate routes be considered entries?

David
 
hi all

"Start by going into the Routes menu, selecting the ECML route, and opening the session in Surveyor ("edit session".)

Once inside surveyor, select "Edit session" from the main menu, or click on the edit session icon in the menu bar.

You should see a screen that looks something like this one on this link: http://img228.imageshack.us/i/stokia01201007060001.jpg/

Selecting any rule in the list will allow you to move it around or edit the properties for that rule."

chris
i can get to where i can see what's in there, but when i click on any 1 of them, the game crashed to the desktop

any idea why that may be?
thanks for the help so far
ron
 
i can get to where i can see what's in there, but when i click on any 1 of them, the game crashed to the desktop

No idea, sorry. That's certainly not normal behaviour. Your best bet might be to get in touch with Helpdesk and ask them for technical support.

kind regards,

chris
 
SInce this thread seems to be all about creating sessions, what makes a session "read only" and how can I change it back.

I am working on a session for the Downtown Traction Co. I select it in the route menu, then click on the button in the lowr right and get a list of the sessions. My new session shows up on the list. I highlight it and click on the Edit button. I make one change. Upon trying to save it, I get the create new session option. Not what I want, so I try to save it with the old name and I get a message that says the name I am trying to save to is a read only session. How do I save my session to continue its development without having to rename it every time I work on it?

This has not happen with past session edits.
 
David, I just tried this and couldn't reproduce your problem. I'm using XP Pro SP3 32 bit. Could it be a permission issue?

William

Trainz build 44088
 
SInce this thread seems to be all about creating sessions, what makes a session "read only" and how can I change it back.
I am working on a session for the Downtown Traction Co. I select it in the route menu, then click on the button in the lowr right and get a list of the sessions. My new session shows up on the list. I highlight it and click on the Edit button. I make one change. Upon trying to save it, I get the create new session option. Not what I want, so I try to save it with the old name and I get a message that says the name I am trying to save to is a read only session. How do I save my session to continue its development without having to rename it every time I work on it?
This has not happen with past session edits.


This problem arised with build 44088.
I save new session with new name and delete the older one. Then later, when this situation repeat, I use the original name again.
Clumsy but it work.
 
I rebooted my computer and was then able to save as I should. Must be a bug in 44088.

Thanks for the help.

David
 
HTML Nightmare

Well, I have tried to create an opening window for a session and am having no luck. I worked through the "How to illustrate your cessions in Trainz 2010" tutorial and am getting a blank window.

I then looked at how Auran had done it for the Downtown Traction Company Coaling session and find that they are using one HTML asset to service a bunch of routes and sessions. So, I added a string to the string-table for my session, copied the html file for the coaling session and replaced the string reference with my string and gave the file a new name, added the Display HTML Pages rule to my session and editted it to reflect my html file and still I get a blank window.

I'm not sure this could be more complicated. I'm sure it could be much more simple.

Any suggestions?
 
I then looked at how Auran had done it for the Downtown Traction Company Coaling session and find that they are using one HTML asset to service a bunch of routes and sessions. So, I added a string to the string-table for my session, copied the html file for the coaling session and replaced the string reference with my string and gave the file a new name, added the Display HTML Pages rule to my session and editted it to reflect my html file and still I get a blank window.

You shouldn't edit the built-in HTML assets - if you want to start from this asset, clone it first, and make your changes on a cloned copy.

You won't be able to upload a modified version of the original to the DLS, but you will be able to upload a modified cloned copy that's got your KUID number on it.
 
James,

I would never try to submit a modified built-in asset. I am just trying to get this html stuff to work. I am able to get a window to open when the session begins but it is blank except for a small black square in the upper left corner of the window.

Rather than tell me what not to do, maybe you could explain how this works. What is the difference between those html assets that have a string table and those that do not.

I have checked and double checked all my files, spelling and anything else I can think of. I swear, learning and writing gs code was a walk in the park compared to trying to figure this html stuff out.

I created an html asset - here is the config.

kuid <kuid:32711:100006>
username "DTC-1-HTML"
trainz-build 3.1
category-region "US"
category-era "1940s;1950s;1960s;1970s;1980s"
kind "html-asset"
category-class "YH"
thumbnails
{
0
{
image "dtc images/dap_20101125_0001.jpg"
width 240
height 180
}
}


Here is the html file titled "dt-cmtm-groganloop.html" () substituted for <>'s. THis file resides in the "DTC-1-HTML" folder.
(html)
(body)
(CENTER)(IMG SCR = "images/image1.jpg")(/CENTER)
(/body)
(/html)

In surveyor, I have added rule Display HTML Pages with HTML file "dt-cmtm-groganloop" sourced from "DTC-1-HTML" asset. I have checked "Disable Closing of Browser Window"

image1.jpg resides in folder "images" inside the "DTC-1-HTML" folder.

image1 is 600 high x 500 high, 72 pixels/inch size black text on white background. It is easily readable in photoshop.

In Driver, I get a window with a small black square in the upper left corner. I can close and open the window using the "View Driver Help" button in the lower right corner of the Driver screen.

What have I done wrong or what have I missed?
 
Last edited:
Here is the html file titled "dt-cmtm-groganloop.html" () substituted for <>'s. THis file resides in the "DTC-1-HTML" folder.
(html)
(body)
(CENTER)(IMG SCR = "images/image1.jpg")(/CENTER)
(/body)
(/html)

Your immediate problem is that "img src=" is misspelled.


On a more general note, This might look like HTML, and we even call it that - but it isn't the kind you'll find on the web. It's got a lot of very basic things that are missing, and a whole host of custom extensions as well.

First off,
HTML:
<center>This text is centered</center>
doesn't work in Trainz. In fact, a lot of basic formatting stuff like that is missing. You'll spend a long time working out how to centre text - and that's why there are a few different ways (all involving tables) exhibited in the various different default HTML files.

image1 is 600 high x 500 high, 72 pixels/inch size black text on white background. It is easily readable in photoshop
Okay, most important point - don't put text in images. I can't stress this enough.

If you submit a session for the competition with text rendered into images, you'll get a correction request from us to fix it. Text should be text.

If you submit a session for inclusion into a Trainz product, some poor soul has to re-type all your text out, and reformat your HTML so that the text is actually text - so that when it gets sent out for translation, they have a hope of getting it all done properly.

Only use images when you need a graphic to illustrate something - and keep the text content of that illustration down to an absolute minimum, and certainly nothing that would need translation.

As to how to put text in, for the competition, it's probably fine to just type English text straight into the HTML, but if you want to be thorough, or you're intending to get sessions included with a future version of Trainz, or your native language isn't English and you want to write in German/French/Spanish/Hungarian/Russian/etc, then you'll want to set things up ready for translation. You've probably noticed the '<font language='generic'>' tag we use. This is not standard HTML - it's one of our extensions I was talking about earlier.

What this will do is treat the string between <font> and </font> tags as the name of an entry in the string table. What you'll get in-game will be the contents of this tag, for the current language.

Note: Don't combine other font changing properties with a font language tag. They won't take effect. Do that first in one font tag, then use the language version, then close both of them. That way you'll get what you want on screen.
 
James,

Thanks for the indepth input. I would like to suggest that you remove or at least edit post 124 in this thread. It references a tutorial that suggests putting all text in an image and the use of
HTML:
<center></center>
.

If you expect content standards to be met, we need tutorials or at the very least, current documentation that explains in some depth how to achive the expected standards. And comments like "It is generally assumed that the author of the HTML file assets being used with this rule knows what they are doing and strictly adheres to these requirements." as found on page 42 of your TRS2006 Sessions and Rules Guide are not acceptable. This type of comment assumes that we have a complete understanding of the nuances of your "customize HTML" and does not encourage participation in your product promotion efforts.

There are a lot of us Trainz users that would like to participate because we are dedicated to Trainz. We are not experienced programmers nor do we have much experience in creating computer simulation software, but with some kindly guidance from the Trainz staff, two goals can be achieved. You get lots of great content (more sales potential for your company) and we get lots of great content (more fun and enjoyment for this great hobby).

Don't get me wrong. At times the Trainz staff is very supportive, it just seems that you are in a big push to get more sessions and have not offered the help that we need to meet your request.

David
 
Chris,

Somewhat helpful, but a tutorial on how to create windows from the Rules side of the simulator would be helpful. For instance, how can I specify the size of the opening window for a session?

As long as we are discussing sessions and scoring . .

I am creating a switching session and would like to keep track of how many couples and uncouples are made. I noticed that TRS2010 has a way to keep track of how much you participate in various actions via the Achievement scoring system found under the Main Menu button in the upper left corner of the opening screen. I am wondering if these variable are available to use in scoring a session. I am most interested in the Switching Experience achievement.

What drives this?

How do I access the variable?

I’d like to keep track of how efficiently switching is performed for the session and am hoping that access to this variable will be of some value.

I looked on the wiki and found very little other than how to structure an Achiement asset config file. Any and all advise is appreciated.

David
 
For instance, how can I specify the size of the opening window for a session?

You don't. It's a default that comes from the rule. Later versions attempt to do some automatic sizing of the height, but the width is fixed.

I am creating a switching session and would like to keep track of how many couples and uncouples are made. I noticed that TRS2010 has a way to keep track of how much you participate in various actions via the Achievement scoring system found under the Main Menu button in the upper left corner of the opening screen. I am wondering if these variable are available to use in scoring a session.
For that, you'll have to write a rule yourself in TrainzScript, unless some kind person has already done it and uploaded it to the DLS.

While you could read the achievement variable, it's probably just as easy to listen out for the "Vehicle", "Coupled" and "Vehicle", "Decoupled" messages the session already generates and trigger a subrule when one arrives - then you can implement a session specific counter with the existing variable rules.

I am most interested in the Switching Experience achievement.

What drives this?
If you have a look at the code for 'Driver' <kuid:-16:10240>, you'll be able to see the script code that does it.

It listens for "Vehicle", "Coupled" and "Vehicle", "Decoupled" messages.

When they arrive, it makes a few checks - firstly for duplicate 'coupled' messages (they come in pairs - one for each of the two vehicles that couple), and also to check it was a human doing the work (and not an AI). Assuming these checks pass, it adds one move to the counter.

How do I access the variable?
If you want to read the actual achievement variable (beware, it's global, so it doesn't start at zero at the start of a session), then there's a function in the achievements system to do it. You'll need to get a reference to the achievements system (the Driver module already does that, look for where m_achievementsSystem is set) and when you want to read it, you can call the readVariable function - it takes a string variable name (in this case "switching-moves") and a Library variable owner (in this case, the driver module itself).

However, for this, it'd be better to listen to the messages directly.

I’d like to keep track of how efficiently switching is performed for the session and am hoping that access to this variable will be of some value.

I looked on the wiki and found very little other than how to structure an Achievement asset config file. Any and all advise is appreciated.
Ultimately, it will be simpler (and better) to write a conditional rule which listens for the same messages, uses the same filtering code, and calls it's subrules when one passes the filter. You can then use the variable modify rule as a subrule to implement a session specific counter, which can be read in the normal way. The primary issue is for the session, you'll need to know when the couple or decouple takes place. The achievements system will not tell you when a variable changes.

HTH

James
 
Back
Top