Multiple car spawner lists
#1
Posted 31 May 2016 - 04:35 AM
Providing the ability to manage multiple car spawner lists should be reasonably simple. That could be done with two files added in the Openrails subfolder of the concerned route folder: in one file (let's call it carspawnerlists.dat) there are car spawner lists that are additional to the carspawn.dat file present in the route folder; in the other one (let's call it carspawners.dat) there are the correspondences between the car spawners (identified as world file and UiD) and the selected car spawner list (identified by a number).
No modification to existing files is therefore needed. An OR-specific RE could automatically generate the second file.
Are there comments about this?
#2
Posted 31 May 2016 - 05:41 AM
#3
Posted 31 May 2016 - 06:04 AM
#4
Posted 31 May 2016 - 06:11 AM
#5
Posted 31 May 2016 - 07:32 AM
Presumably the default would still be used where an alternative is not expressly specified in the OR subfolder?...
#6
Posted 03 June 2016 - 12:54 PM
A beta release is available. To test it, update x.3551 with the files included in this .zip

Number of downloads: 726
To use it, two files have to be created in an Openrails subfolder of the related route.
I have created a stupid test example for USA1 route, for two of the four carspawners that pass over the tracks with a viaduct just after the station on Philadelphia.
The first file is a file named extcarspawn.dat that contains all additional car spawner lists (additional because the one included in carspawner.dat is still valid and used). Here the file I used:

Number of downloads: 619
In this case I used only a new shape (postbus.s) with respect to the ones of the standard carspawn.dat. Of course to see it you need to have that shape, or to replace it with another shape you insert in the shapes folder (together with .sd file, and with needed texture files in the textures folder).
The second file is a file named carspawnerstolists.dat. I used following sample file:

Number of downloads: 631
An entry in this file must be created for every car spawner where it is desired to use a car spawner list different from the one of carspawn.dat.
The structure is self-explanatory: the car spawner is identified with world file and UiD (they may derived using track viewer and uncompressing the related .w file), and the CarSpawnerList parameter identifies the index of the car spawner list (zero is the car spawner list of the standard carspawner.dat, so that the indexes of the lists included in extcarspawn.dat start from one).
By the way these .exe files include also this http://www.elvastowe...rations-window/ .
#8
Posted 03 June 2016 - 01:53 PM
#9
Posted 03 June 2016 - 03:50 PM
Why? As I mentioned in post #9 of topic "ORTS WishList 2014-05":
Quote
In combination with hidden railroad crossings it will be a great chance to let the trian interact with certain vehicles.
During building my last route I refrained to involve a Zeppelin aircraft as an animation, because the creation of the animation was too elaborate for me. If I had the option of an individual car spawner this time I would have let "fly" the Zeppelin simply as a car on a hidden road vector.
(Sure, it can also being realized by make the Zeppelin aircraft a driveable locomotive on hidden tracks. But then it only(!) would have been seen in activities, not in explore mode.)
Various individual car spawners would give a huge opportunity to make the environment look lively and more diversified by moving "things" of different kind. Relatively little effort, great effect!
Since the first days of MSTS I missed very hard the possibility to define lists of cars per car spawner while set in a route. What a wasted chance by Kuju!


With a selective list of vehicles that should used at this certain car spawner
#10
Posted 03 June 2016 - 04:14 PM
A small idea, instead of having two files ("extcarspawn.dat" and "carspawnerstolists.dat"), what about to sum it up in one "carspawnerstolists.dat" containing the lists direkt (and individual) like this:
2
CarSpawner(
WFile ( "w-011008+014318.w" )
UiD ( 534 )
CarSpawnerList (
CarSpawnerItem( "car1.s" 4 )
CarSpawnerItem( "postbus.s" 4 )
)
)
CarSpawner(
WFile ( "w-011008+014318.w" )
UiD ( 532 )
CarSpawnerList (
CarSpawnerItem( "policePHIL.S" 6 )
CarSpawnerItem( "truck1.s" 13 )
CarSpawnerItem( "postbus.s" 6 )
)
)
This way you only have to edit one file to set the individual car spawners completly and it will not needed to keep in mind the list index of the "extcarspawn.dat?
#11
Posted 03 June 2016 - 04:32 PM
#12
Posted 03 June 2016 - 04:34 PM
Any chance of enabling some variation of car and car volume by time of day? Something like this:
CarSpawnerList( ListsPresent (2) List ( Name ( " String A" ) 3 Timing ( StartTime ( HH ) EndTime ( HH ) Items ( 2 CarSpawnerItem( "car1.s" 4 ) CarSpawnerItem( "postbus.s" 4 ) ) ) Timing ( StartTime ( HH ) EndTime ( HH ) Items ( 3 CarSpawnerItem( "car1.s" 6 ) CarSpawnerItem( "truck1.s" 13 ) CarSpawnerItem( "postbus.s" 5 ) ) ) Timing ( StartTime ( HH ) EndTime ( HH ) Items ( 1 CarSpawnerItem( "car1.s" 3 ) ) ) ) List ( Name ( " String B" ) 3 Timing ( StartTime ( HH ) EndTime ( HH ) Items ( 3 CarSpawnerItem( "policePHIL.s" 2 ) CarSpawnerItem( "truck1.s" 13 ) CarSpawnerItem( "postbus.s" 4 ) ) ) Timing ( StartTime ( HH ) EndTime ( HH ) Items ( 3 CarSpawnerItem( "policePHIL.s" 2 ) CarSpawnerItem( "car1.s" 9 ) CarSpawnerItem( "postbus.s" 6 ) ) ) Timing ( StartTime ( HH ) EndTime ( HH ) Items ( 2 CarSpawnerItem( "car1.s" 4 ) CarSpawnerItem( "postbus.s" 4 ) ) ) ) )
#13
Posted 03 June 2016 - 04:39 PM
Csantucci, on 31 May 2016 - 04:35 AM, said:
Why make it more complex than it needs to be? Train.exe is never going to see them if they are assigned new names so why hide them? Come up with useful file names and stick 'em the route's root folder where they belong.
Five years from now when train.exe doesn't run on Win13 nobody is going to understand why there are all these Openrails subfolders all over the place.
#14
Posted 03 June 2016 - 06:55 PM
But maybe the existing directory structure of a route can be co-used actually by OR. Therefore, I would put the OR car spawner files directly into the w-folder of the route, but named them with a prefix like "OR" or similar. For example, as "OR-w-011008+014318.w". In such files the additional OR informations can be written, just an individualized car spawner list for example.
Or you use an OR-owned folder (Csantucci named it "Openrails"), where the MSTS folder structure is shadowed and even double existing for OR using only. So there should be a w-folder too.
The containing of such "OR-w-011008+014318.w" file could be this:
OR-SIMISA@@@@@@@@@@JINX0w0t______ Tr_Worldfile ( CarSpawner ( UiD ( 534 ) CarFrequency ( 60 ) CarAvSpeed ( 15 ) TrItemId ( 1 243 ) TrItemId ( 1 244 ) StaticFlags ( 00000100 ) Position ( -306.878 3.0166 40.4491 ) QDirection ( 0 0 0 1 ) VDbId ( 4294967295 ) CarSpawnerList ( CarSpawnerItem( "policePHIL.S" 6 ) CarSpawnerItem( "truck1.s" 13 ) CarSpawnerItem( "postbus.s" 6 ) ) CarSpawnerSaison ( Spring ) CarSpawnerSaison ( Sommer 9:00-23:00) CarSpawnerSaison ( Autumn ) CarSpawnerDayTime ( 9:00-11:30 ) CarSpawnerDayTime ( 19:00-23:00 ) CarSpawnerMSTSDefault ( no ) ) )
Maybe some data of the original MSTS car spawner are given again and then an individualized list of vehicles for that specific car spawner follows. Possible further data could be given like different daytimes or saisons and so on.
It is also conceivable to put more information in one line per car:
"CarSpawnerItem( "policePHIL.S" 6 Spring 10:00-22:00 Sommer 6:00-23:30 Autumn 10:00-21:00 ).
However, at first the normal MSTS w-file is read by OR (this way the normal car spawner is loaded at least) and then OR will check if there is any OR-prefixed file with additional informations about the world tile.
Only suggestions of course. You see my enthusiasm about the whole topic.
#15
Posted 03 June 2016 - 11:08 PM
Genma Saotome, on 03 June 2016 - 04:39 PM, said:
Five years from now when train.exe doesn't run on Win13 nobody is going to understand why there are all these Openrails subfolders all over the place.
I'd prefer to keep all of our files in identifying directories for clarity of purpose, even if putting them elsewhere would not adversely affect MSTS.