//this is a comment, comments are done simiailr as in php, and many other languages. /* This a a comment too */ OpenRailsStock //Opening of file { General //Start of General part { Name( "openrails Stock file idea" ); //The Display name of the train Discription( "Idea for future Or stock files" ); //The Discription of the train Driveable(); //Defines the train as driveable by the player Wagon(); //Defines the train as Wagon. Every consist should atleast contain a Driveable train, or else it will not appear in the train selection list. AIOnly(); //Only Usable in AI trains, not sure if it's needed anyway FuelCapacity(1000); //In Liters } //End Of general block, Please think of more things. Units //Start of Unit part, similair to the old .eng and .wag { Unit(0) //Start of a unit block, All units get an Id (starting from 0) { IncludeUnit("Unit_front.Unt") //Units can be included as external .Unt (.Unit) file. This file is located in the Units Directory. (possibility of including old .eng files???) } Unit(1) { //This an example of an interanl unit (file). Shape( "Car2.s" ); FreightAnim( "Car2_FA.s" ); Mass( 84000); //In Kilogram NumWheels(4); //Number of wheels WheelRadius ( 1.250 ); //In meters CabView ( "RearUnit.cab" ); //Some Future Or cab file format, or msts .cvf Sound ( "Sound.sms" ); /* Optionally, things like Powers, Traction, smoke etc can be added. This is Similair as the old msts .eng but improved for more realisms (eg. Extra parameters) If not provided the Unit is seen as unpowered (So it's a wagon) As i don't have good knoledge what should be included in this part I leave it blank*/ //Lighting Setup on unit, Most likely Only First and last will use this, But it allows cool features when combined to the scripting. //Eg. Flassing ligths above a door when a player closes it. Ligth(0) //Start a light block, A ID is entered so scripts can recognize it. { Duration ( 0.0 ); //Similair to MSTS for now, maybe improve/change it??? LightColour ( "ffffe467" ); //(I have not enough knowledge to know what each of the lines do) Position ( 0.0, 2.325, 8.415 ); //So feel free to give tips what should be used. Azimuth ( 0, 0, 0 ); Transition ( 0 ); Radius ( 0.45 ); } Ligth(1) { //Is an external ligth file handy???? (EG. Units with same ligth definitions) IncludeLight ("DoorWarning.lgt); } } //End of Unit(1) /*Continue so on, depending of amount of units. A Unit is a (Semi-)Permanent coupled part of the train. It's usable for Multiple units, Articulated Locos and Articulated cars. It's not possible to seperate the Units in Game, and they are included as one part in de consist file.*/ } //End of Unit block Scripts //Start of script part { /*Scripts can be added in 2 ways, directly into this ORS file, or using an external .scr (.script) file. The .scr files should be located in a sub directory of the Train Folder called SCRIPTS, just like the cabview and sound directory's on current MSTS files. I will make a file which demonstrate more script functions and explains there arguments. (Demonstrated as .scr file)*/ IncludeScript ("Engine.scr"); //Script included as external file. //Below an example of an internal script (I think this should be possible?) Script( " $compressor = FALSE; //Declaration of a variable if ( Playerbutton == BUTTON_P || PlayerAction == RaisePanto && PANTOGRAPH == down) //When players wants to raise the panto and panto is down { if ( $compressor == FALSE) { SendClientMessage ( "You must start the compressor before raising the pantograph"); //Send a message to the player } else if ( $compressor == TRUE) { RaisePanto(); //If the compressor is "ON" then Say OR to raise the Panto. SendClientMessage ( "Panto Raised"); } } if (Playerbutton == BUTTON_C && $compressor == FALSE) { $compressor = TRUE; //Sets the compressor variable to TRUE which resembles "ON" PlaySound ("Compressor.wav"); //Starts a Sound, which should be located in the SOUNDS directory, also possible to start .sms files, for more complicated sounds SendClientMessage ( "Compressor Started"); //Send a message to the player } if (Playerbutton == BUTTON_C && $compressor == TRUE) { $compressor = FALSE; //Sets the compressor variable to FALSE which resembles "OFF" StopSound ("Compressor.wav"); //Stops a playing Sound SendClientMessage ( "Compressor Stopped"); //Send a message to the player if (PANTOGRAPH == up) //When panto is up when compressor is turned of then: { LowerPanto(); //Lower the panto SendClientMessage ( "Due to losing air pressure the panto has lowered!"); //Send message to player. } } " ); } } //End of file