Elvas Tower: Suggestion: new "include" parameter - Elvas Tower

Jump to content

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

Suggestion: new "include" parameter Rate Topic: -----

#16 User is offline   Genma Saotome 

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

Posted 04 November 2022 - 05:32 PM

View Postlucstef, on 04 November 2022 - 02:19 PM, said:

Genma, I must admit I can't understand this last post.
Aren't the resulting files in Openrails folders just MSTS structured .wag and .eng files with added ORTS parameters?


As you continue to develop .inc files for various functions you'll be adding the Include statement to the file you have in your Open Rails folder. As you continue down that path you'll probably wind up with a file that looks a lot like what I posted in post #7. Then you add a name and sound and you have a complete .wag which you can elevate to the regular folder, replacing the .wag that was there and emptying the open rails folder in the process.


View Postlucstef, on 04 November 2022 - 02:19 PM, said:

One thing I didn't mention: I wanted to keep the original files (all 4000+ of them!) untouched to be used by MSTS if needed, although I'm on the way to abandon it entirely if not for the activity editor.
AS a plus, I can tweak the parameters if I find them too hard or easy, and that would reflect on all the rolling stock at once.

Ok. I had a similar though tho it wasn't about being able to go back to MSTS but to go back to the original .wag or .eng file. I moved a copy of all of the folders in \trainset into a new folder I called Library and for the most part left them as-is. Eventially I made a second library, one for MSTS an the other for pure OR. You see, I didn't want to use the Open Rails folder... I felt it was a kludge solution that was likely going to leave me with a lot of redundant files and I was very focused on eliminating redundancy. You have so many files I rather doubt you will wind up doing much like what I did but perhaps some of the things I'm writing about might give you something to think about any maybe try. For example my comment about you ending up with a pure OR .wag file in you Open Rails folder. Just keep doing what you've been doing... that file will start to look more and more like the example I posted. When it does AND you find yourself only using OR, what good is the original .wag?

Anyway, this is all meant as food for thought and you already have plenty on your plate. Keep at it!

#17 User is offline   Weter 

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

Posted 04 November 2022 - 09:14 PM

Hello, Luca.
Thanks for explanation.
(Long time I didn't touched that - so have fragmental amnesia)
Well, I've seen as well somewhere in Manual, that given by Your example include method will replace whole blocks of original file: that means, doing that way, one can prepare the whole block, rather specific lines.

#18 User is offline   lucstef 

  • Apprentice
  • Group: Posts: Active Member
  • Posts: 29
  • Joined: 22-August 14
  • Simulator:OR-MSTS
  • Country:

Posted 05 November 2022 - 01:27 AM

View PostWeter, on 04 November 2022 - 09:14 PM, said:

Hello, Luca.
Thanks for explanation.


I'm happy to be of help :)


View PostGenma Saotome, on 04 November 2022 - 05:32 PM, said:

As you continue to develop .inc files for various functions you'll be adding the Include statement to the file you have in your Open Rails folder.


Yes Dave (Genma), I see your point, but this time I only had one section to correct, everything else was good already, and I still can't understand why can't the original brake parameters be recognized by OR, maybe the too low values.
I understand it may be a cheating method as well, with switchers powered by an AC6000 engine... :D

The trainset was already backed up, so I have a base for MSTS and maybe all this work was for nothing; still, I'm sure I had much less work that way than opening every single wag and eng and replacing the bad parts (copy, scroll, select and paste...eyes and hands are not what they used to be :) ).

I'm going to rebuild the MSTS installation for backup purpose, I'll move differently with incremental backups now, one pure MSTS, another tweaked for ORTS etc. working on the original files...
All this in the name of knowledge, I like to experiment with different roads.

Aaaaahh, the joy of virtual railroads and the happiness to install an activity without the need to hunt for missing rolling stock... :D too bad there are none active right now :(



Luca

#19 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,454
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 05 November 2022 - 03:28 AM

Luca,
I also felt the inconvenience that you describe in the first post. So, I checked the OR code and noticed that, merely adding two lines of code, your desire can be fulfilled. i attach here a patch for ORNYMG 133: inserting the 2 patch files in ORNYMG, following feature is present: if the include line is as follows:
include ( ../##SameName## )

OR will replace ##SameName## with the name of the file where tthe line is present.
Attached File  Orts_Parsers.Msts.zip (63.46K)
Number of downloads: 139

Luca, if you can check the patch and if it works, I'll include it in next ORNYMG version and generate also a PR for the official OR versions.

#20 User is offline   lucstef 

  • Apprentice
  • Group: Posts: Active Member
  • Posts: 29
  • Joined: 22-August 14
  • Simulator:OR-MSTS
  • Country:

Posted 05 November 2022 - 10:20 AM

Thanks Carlo, it appears to work.
In the F5 advanced HUD I can see the values from my own .inc files, both for engines and wagons, and the train does what I expect i.e. a 6000HP engine (just for fun on a SW1500) gives the expected pull and the brakeforce raises to my values.

If you trust my 10 minutes test...it's a go :)
Thanks again.


Luca

#21 User is offline   lucstef 

  • Apprentice
  • Group: Posts: Active Member
  • Posts: 29
  • Joined: 22-August 14
  • Simulator:OR-MSTS
  • Country:

Posted 05 November 2022 - 02:50 PM

Some more testing done, nothing to report.
Or better yes, one more thing: it works in .trk files too, but I guess you were expecting that :)


Luca

#22 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,454
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 06 November 2022 - 02:30 AM

That's good.
I have now created a PR for the official OR, and the modification should be available in about half an hour in the Unstable release. It will available in next ORNYMG release too.

#23 User is offline   James Ross 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 5,514
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 10 November 2022 - 10:45 AM

View PostCsantucci, on 05 November 2022 - 03:28 AM, said:

I also felt the inconvenience that you describe in the first post. So, I checked the OR code and noticed that, merely adding two lines of code, your desire can be fulfilled. i attach here a patch for ORNYMG 133: inserting the 2 patch files in ORNYMG, following feature is present: if the include line is as follows:
include ( ../##SameName## )


Thanks for implementing this feature, Carlo!

However, I am concerned with the character "#" chosen to delimit it, since that is also the start of a comment in Simis text files, and the example given may get parsed wrong in the future (e.g. fixing a MSTS comment parsing bug might break this feature)

Some alternatives that are less likely to have issues:

>>SameName<<
[[SameName]]

Otherwise, looks good :)

#24 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,454
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 12 November 2022 - 03:25 AM

Thanks, James.
I replaced the characters in the PR. Now
include ( ../>>SameName<< )

is used.

#25 User is offline   lucstef 

  • Apprentice
  • Group: Posts: Active Member
  • Posts: 29
  • Joined: 22-August 14
  • Simulator:OR-MSTS
  • Country:

Posted 12 November 2022 - 03:55 AM

Just to clear any misunderstanding:
the old ##SameName## is now >>SameName<< (capitalizations included)??

(Ok not in the patch you attached before, we will see it in the new ORNYMG version and hopefully in the incoming OR 1.5, right?)


P.S. - I hate, HATE when a big name as Logitech makes an almost perfect gaming mech keyboard like the G915 and there's no italian layout, so I have to change the system language and hunt for the right keys to type < and >..........


Luca

#26 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,454
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 12 November 2022 - 07:00 AM

Answer to your first question is yes.
You will see this in next ORNYMG version, you see it already in Unstable Release U2022.11.12-1121, it's unlikely that you will see it in incoming stable OR1.5, although I have nothing against it.

#27 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,454
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 12 November 2022 - 10:23 AM

Unfortunately
include ( ../>>SameName<< )

crashes OR in Path.GetFileName().
I have tested
include ( ../[[SameName]] )

and it works.
So I'll change again the code.

#28 User is offline   lucstef 

  • Apprentice
  • Group: Posts: Active Member
  • Posts: 29
  • Joined: 22-August 14
  • Simulator:OR-MSTS
  • Country:

Posted 20 November 2022 - 04:11 AM

EDIT:

Nevermind, sleepy brain mixing up, I was using the wrong install path..... :sorry:



Hi Carlo.

What's the syntax now on ver.134?
##SameName## doesn't work, neither does >>SameName<< nor [[SameName]], what am I missing?

Thanks.


Luca

  • 2 Pages +
  • 1
  • 2
  • 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