I am having the need to adjust a lot of .wag and .eng files that have been heavily tweaked to give a somewhat real feel for the trains in MSTS, but have some issues with the advanced model in Openrails:
- a single SW1500 doesn't stop from 10MPH in less than 2-300 yards at full brake application (I've seen real heavier mainline locos stop in less than three car lenghts from the same speed)
- lots of wagons have their brake systems not recognized in OR at all, sometimes just the reservoir, therefore they have no braking capability
I'm talking about several hundreds of files to correct.
So I built some .inc files and started populating the trainsets with openrails folders; in those .inc files I have just brake parameters, with increased application and release rates and fixed braking forces (200KN for the locos, 70KN for the wagons).
All is working as intended, but then something came to me: why do we need to name a file the same as the .eng original file, and then have to set an include statement referencing that same original .eng file.....
1) original file SD40-UPS4589.ENG
2) in Openrails folder, another file named SD40-UPS4589.ENG
3) in the file within Openrails folder, an include referencing a file called SD40-UPS4589.ENG
So I thought: if the Openrails file could have something like an "include(self)" statement, that looks for a filename called the same as itself one level above...would be faster to correct a lot of rolling stocks without having to write down this string two times for every piece.
For a wagon whose filename is WVOGrain.wag, in Openrails there's a file called WVOGrain.wag with this content:
include ( "..\\WVOGrain.wag" ) Wagon ( include ( "..\\..\\Common.inc\\Wagons\\Std_Wag_Brakes.inc" ) )
If the first command was "include(self)", that same .wag can be used everywhere with a simple name change, without the need to open and modify it as well.
Obviously that would only work if it's used in an openrails folder inside the train original folder, anywhere else it would give an error because it won't find a filename to reference.
I hope to have given a good explanation of my idea, and I know that it's not so common to find situations like mine where the number of pieces to change/correct is in the tens of hundreds ballpark, if not thousands.
P.S. - The parameter (self) is just something I popped out of my mind, can be anything, origname, samename, same...
Luca