Elvas Tower: TSRE Not Finding Include Files - Elvas Tower

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

TSRE Not Finding Include Files Misinterpretation of include ( ) statements. Rate Topic: -----

#1 User is offline   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 311
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 14 June 2020 - 09:49 PM

Hey folks,

I've been working on a complete overhaul of all my content, making copious use of include files and such. However, I have found that the consist editor in TSRE V0.698.1 has a significant problem interpreting include statements which is causing many parameters inside said include files (in my case, this means things like the size, mass, coupler type, etc.) to go missing in the editor:
Attached File  tsre issue.JPG (22.49K)
Number of downloads: 1
If I look at the log, it's full of claims that every single include file I'm using does not exist, aside from the one include file which is being referenced by the engine file. It's completely lost the include files which are referenced by that include file!
[i] "e:/or content/miniroutes/allcommon/trains/trainset/mrl_emd_sd70ace/openrails/mrl_sd70ace_4300.eng"
[i] converting to UTF16
[i] "e:/or content/miniroutes/allcommon/trains/trainset/mrl_emd_sd70ace/openrails/presets/mrl_sd70ace_4300_psc.inc"
[i] converting to UTF16
[i] "e:/or content/miniroutes/allcommon/trains/trainset/mrl_emd_sd70ace/mrl_sd70ace_psc.inc" not exist
[i] "e:/or content/miniroutes/allcommon/trains/trainset/mrl_emd_sd70ace/../../../common.psc/couplers/gradee_coupler_18cm_psc.inc" not exist
[i] "e:/or content/miniroutes/allcommon/trains/trainset/mrl_emd_sd70ace/../../../common.psc/locomotives/wagon_settings/sd70ace_214t_wagon_settings_psc.inc" not exist

All these .inc files do exist, but TSRE is looking in the wrong folders; TSRE is not interpreting the folder navigation syntax in the same way that Open Rails interprets it. In Open Rails, an include file must reference other include files relative to its actual location on the disc, but in TSRE, an include file must use include statements relative to the location of the engine/wagon file which is using the include file. This inconsistency of interpretation is a major issue, which is making TSRE incompatible with my setup, even though Open Rails is compatible.

I have observed some configurations of files where this isn't an issue at all because all include statements are inside the .eng or .wag file, in which case Open Rails and TSRE will interpret the statement the same way. However, my setup has include statements inside of include files, which immediately causes TSRE to fail, while not causing any issue for Open Rails itself.



To explain how this affects my case of MRL #4300, MRL_SD70ACe_4300_psc.inc is in a subfolder of the OpenRails folder called "Presets" (which, as per the name, contains preset configurations of rail vehicles.) Thus, it's actual location is TRAINS\trainset\MRL_EMD_SD70ACe\OpenRails\Presets. However, it appears that TSRE is acting like it is located in TRAINS\trainset\MRL_EMD_SD70ACe\OpenRails, IE: the same folder where the engine file, MRL_SD70ACe_4300.eng, is located.

This causes problems when the interpreter gets to an include statement inside MRL_SD70ACe_4300_psc.inc. For example,
include ( "..\\..\\..\\Common.psc\\Locomotives\\Wagon_Settings\\SD70ACe_214t_Wagon_Settings_psc.inc" )

This is the file where the mass, adhesion, brakes, and more, are stored. It is actually located in the folder TRAINS\trainset\Common.psc\Locomotives\Wagon_Settings. However, because TSRE thinks MRL_SD70ACe_4300_psc.inc is one folder higher up than it actually is, TSRE believes SD70ACe_214t_Wagon_Settings_psc.inc should be located in TRAINS\Common.psc\Locomotives\Wagon_Settings.

I can demonstrate TSRE's mistake by editing MRL_SD70ACe_4300_psc.inc to only look two folders up, rather than three. (among other edits) This will make it look for the files as if it were in the same folder as the engine file is, even though it is not.
include ( "..\\..\\Common.psc\\Locomotives\\Wagon_Settings\\SD70ACe_214t_Wagon_Settings_psc.inc" )

Suddenly, TSRE will be able to find the files it was looking for, and more of the stats show up.
Attached File  tsre issue kinda fixed.JPG (24.18K)
Number of downloads: 1

There's the expected weight (that's 214 us tons, but TSRE still shows "t" rather than "t-us"), size, and couplers.
Now, there's still no mention of the power, speed, nor tractive effort, but that's just because I'd need to edit some other files which I would rather not do at the moment.

Also, this "solution" doesn't work at all in the sim itself, due to the fact that Open Rails interprets these files differently than TSRE.
Attached File  open rails issue.JPG (25.26K)
Number of downloads: 1

Thus, in my situation, I simply cannot use TSRE's consist editor effectively due to this one major flaw. I really appreciate what the TSRE consist editor lets you do, but it really should have file interpretation that works exactly the same as Open Rails.

For now, I'll have to reformat my files to match something that will work for both OpenRails and TSRE, which is not fun when there are over 100 files to work out.

#2 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,307
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 24 December 2020 - 10:16 PM

I suspect your problem is the use of this string:

e:/or content/miniroutes/allcommon/trains/trainset/mrl_emd_sd70ace/



Here is an example of my own use of .inc files:

Wagon ( XM_MP_45231_MT
WagonShape ( MoPac_USRA_XM_45231.s )
FreightAnim ( USRA_50t_parts.s 1 1 1 )
Include ( "..\\Common.Inc\\Models\\Tim_Muir\\USRA_DS_Boxcar\\XM_USRA_DS_Empty_Car.inc" )
Include ( "..\\Common.inc\\Fleet\\DHNelson\\Std_Type_E_Coupler_Generic_Draft_Gear.inc" )
Adheasion ( 0.2 0.4 2 0 )
Include ( "..\\Common.inc\\Fleet\\DHNelson\\Single_Pipe_AB_Brakes.inc" )
Sound ( "genfreightwag2.sms" )
Name ( "XM 40' MP USRA DS 45231 MTY 1919-55" )
)

The path is relative to the location of the .wag file.


FWIW, the use of \common.inc is the same as \common.cab and \common.snd -- a directory tree easily accessed by any .wag or .eng file. Everything under \fleet is about equipment that is used by many, many cars and locomotives. Stuff like couplers. I stick a name in the re so I can keep like named .inc files produced by different people separate.

Similarly \models contains those .inf files that are quite specific to one model, typically a model that has many folder in \trainset. Stuff like standard boxcars, standard locomotives. And again the name is there to identify who made the model as what is right for person A's model might not be right for person B's model of the same thing.

#3 User is offline   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 311
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 08 March 2021 - 08:53 PM

Well looks like the curse of this thread is to get a reply every few months, haha.

View PostGenma Saotome, on 24 December 2020 - 10:16 PM, said:

I suspect your problem is the use of this string:

e:/or content/miniroutes/allcommon/trains/trainset/mrl_emd_sd70ace/


I never used that string anywhere, that is just the location where TSRE is attempting to locate certain include files (some of which are not in this folder at all!), meanwhile Open Rails locates these files "correctly" (or perhaps differently).
Doesn't really matter anymore though, as I've changed almost everything about my setup since last year, and part of my changes included modifying my file structure to avoid situations where Open Rails and TSRE could interpret things differently (which basically means having shorter chains of include files, and having more include files two folders deep and fewer ones three folders deep.)

The problem still exists even in the experimental 0.699 version though, as I can find situations where Open Rails loads a file but TSRE cannot find it because they look in two different places; in OR, the path of an include statement is relative to whichever file contains the include statement (even if that is itself an .inc file and not a .wag or .eng) while TSRE treats the path as a path relative to the original .eng or .wag file. TSRE should interpret this the OR way, as a path relative to whichever file called the statement, and it's silly that it still doesn't do that.

#4 User is offline   darwins 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,222
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 15 July 2021 - 10:12 PM

Lo and behold 6 months later another issue with include files emerges http://www.elvastower.com/forums/public/style_emoticons/default/sign_rockon.gif
It seems that the consist editor does not see the locomotive type (steam, diesel, electric) if the loco uses include files.

So for example I want to use a steam loco DR_BR_4MT_76005-D03 and I select "Steam" then the loco is not on the list:

https://i.imgur.com/zJQynvL.jpg

I can find the loco if I choose ALL rather than steam and search for the loco:

https://imgur.com/q0QDCZk.jpg

I thought this may happen because Type ( Steam ) is in an include file, the main file looks like this:

https://imgur.com/UuYfcZy.jpg

So I tried adding Type ( Steam ) to the engine section:

https://imgur.com/NzhP62w.jpg

...or even at the top of the wagon section:

https://imgur.com/fWsIcSJ.jpg

but none of these was able to make the loco show up as a Steam loco in the consist editor.


#5 User is offline   cr-stagg 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 909
  • Joined: 16-May 05
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 17 July 2021 - 05:55 AM

Please post the ENG file and the Includes

#6 User is offline   darwins 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,222
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 17 July 2021 - 10:26 PM

Examples attached...

Attached File(s)



#7 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,806
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 17 July 2021 - 10:56 PM

Off top: whether ET board software accepts *.eng-files as an attachments?

#8 User is offline   darwins 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,222
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 17 July 2021 - 11:36 PM

It seems to accept *.eng but it does not accept *.inc

#9 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,806
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 17 July 2021 - 11:58 PM

If so, than it seems to be adjustable by administrative staff, whether file-types will be acceptable for attachment to posts ;)

#10 User is offline   cr-stagg 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 909
  • Joined: 16-May 05
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 18 July 2021 - 11:08 AM

View Postdarwins, on 17 July 2021 - 10:26 PM, said:

Examples attached...


There is nothing wrong with TSRE, the problem was your structure of the files.

The Type ( Steam ) line for Diesel, Steam, Electric has to be in the Engine Section of an ENG file. When you placed it in the DR_BR_4MT_76005-DO3.eng file, you placed it in the Wagon Section of the ENG file. Move it to the Engine Section before the Include and it will display.

As to the DR_BR_4MT_76005.eng file in which you had the Type line in the Include file, there the problem it was after the ORTSSteamLocomotiveType ( Simple ) line. Move in front of that line and that Engine appears in the TSRE list filtered for Steam.

ALSO I noticed other problems with these files. When selected TSRE displays MaxSpeed: 0 MPH, MaxForce: 0kN, MaxPower: 0kW. Looked at the ENG and INC files and found no lines for those parameters.

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users