Elvas Tower: Discussing include files (was variable mass() ) - Elvas Tower

Jump to content

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

Discussing include files (was variable mass() ) Rate Topic: -----

#11 User is offline   longiron 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 3,179
  • Joined: 25-July 08
  • Gender:Male
  • Location:Manasquan, NJ
  • Simulator:Open Rails, MSTS editors
  • Country:

Posted 03 March 2016 - 07:15 PM

Again, I'm hoping that we can agree on a supported OR standard - what's in and what's out; what's allowed and what's not. There's work being done on steam SFX that goes beyond MSTS, which could have application in this area. There's lots of potential, we should have the OR team discuss, review and publish a standard, rather than having it develop haphazardly.

chris

#12 User is offline   Genma Saotome 

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

Posted 03 March 2016 - 07:32 PM

View PostLindsayts, on 03 March 2016 - 06:05 PM, said:

For what its worth I completely support Dave here, it appears as far as I can see the main problem at the moment with include files is that so few are working consitently on them. As far as I am aware its mainly been Dave and I. I regard them as absolutely indespensable. It makes the ENG/WAG file easier to under stand and MUCH easier when dealing with multiple items of rolling stock of the same class. Naming is something of a problem, this though will likely sort it self out over time. A problem here is on somethings the number of different systems that do almost the same thing, brakes are a good example. I use 4 different set of braking include files, just for Victorain (Australia) rolling stock.


The issue of many variants occurred to me too... that's why I added a country folder to my \Common _Fleet_Stds. US brakes go under \US and Australian brakes under \Australia. Etc., etc.


View PostLindsayts, on 03 March 2016 - 06:05 PM, said:

Also I might point out that some developers think the ENG/WAg files are there copyright and strongly buck when you modify them, I have sort oppinions on the legal status of this sort of thing and I am consistently told the ENG/WAG files are already coptrighted and any modifaction is a direvative work and therefore cannot be copyrighted again. Its a REAL pain though getting into this sort of an argument.

Lindsay


<gag><spit>
Some people need to get a life.

I cannot speak for other countries but here in the U.S. copyright is predicated on demonstrating creativity. I cannot help but notice that the vast majority of what's in .engs and .wags is parameter names that came from KUJU. I see no creativity there. What's left is almost entirely numbers. I see no creativity there either but I'm willing to listen to a counter argument on that. Of particular note are two very important Supreme Court cases: First one -- An ordinary compiled list, such as the phone book, lacks creativity and cannot be copyrighted. IT IS JUST A LIST OF DATA. Those .eng and .wag files certainly look like a list to me. Second: A system of play cannot be copyrighted. What this means is how a game is played cannot be copyrighted. The words that describe the rules can be copyrighted but anyone can write their own text that results in the same game play for their own product and that's ok. I'll argue those numbers represent a significant portion of how the game is played.

You take that all together and IMO its pretty hard to argue copyright applies. That said, I've always spoken of this matter where moral considerations trump all: If some guy has said he doesn't want his complied list of Kuju names and numbers he copied from somewhere else messed with, we should respect that and not distribute revisions of his stuff. Even when its stupid.

#13 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 04 March 2016 - 12:03 AM

View Postconductorchris, on 03 March 2016 - 06:37 PM, said:

Well, it seems to me that for include files in rolling stock to become common practice it is modelers and reskinners who need to embrace this. I am listening. However the problem is, if I release something with include files, it won't work in MSTS and there are still a lot of MSTS users (although I am mystified as to why). What would make it easier is if there could be a batch of include files to work with. If sounds like you've already done a lot of that work, Dave.
Christopher


The way I look at it is is an OR ENG file using includes is just an MSTS eng that is split. In the end what the parsers sees is the same thing. Remember when one is using includes one ONLY has to do any individual system once.

Here is my list of includes, I have as yet not done a standard naming scheme, but these files will cover at least 90% of my rollings stock.
I am putting these up for discusion, they should NOT be regarded as any kind of final work or any kind of standard.




Brake_Westinghouse_AirBrake.inc
Brake_Westinghouse_EngineBrakeContrl.inc
Brake_Westinghouse_EngineBrakeContrl_Setup.inc
Brake_Westinghouse_TRainBrakeContrl_setup.inc
Brake_Westinghouse_engine_TwinPipe.inc
Brake_Westinghouse_engine_single_pipe.inc
Brake_Westinghouse_single_pipe_wagon.inc
Brake_Westinghouse_twin_pipe_wagon.inc
Brake_controler_Westinghouse_Graduated.inc
Brake_train_single_pipe_Control.inc
Control_Blower.inc
Control_Dampers.inc
Control_Fire_door.inc
Control_Heating_tap.inc
Dynamic_brake_control.inc
EMD_noncpu_8_notch_throttle.inc
Not required
Steam_Regulator_no-step.inc
Steam_cuttoff_05-steps.inc






There are also includes for an individual class of loco, for example the Victorian railways H220 class steamer
At the moment I have these in with the loco's ENG file.


H220_Effects.inc
H220_EngineControllers_misc.inc
H220_Lights.inc
H220_Misc.inc
H220_Motive.inc
H220_Wagon.inc





Finally an example ENG file with using includes...........
Again it is for H220, To make another version of the same class only two line shave to be altered and one can GARUNTEE each item of rolling stock of the sane class will stay the same.
Also every differnt item of rolling stock using the same system (brakes , engine control etc) will behave exactly the same.

Note: MaxBrakeForce may appear to be out of place but its individual to the class of loco.



Comment ( required by new parser )

Wagon   ( TA_AU_VR_H220_FA_P

Comment ( The wagonshape parameter MUST be in the main eng file )

        WagonShape ( TA_AU_VR_H220.s )

        include ( H220_Wagon.inc )

        include ( ..\\eng_inc\\Brake_Westinghouse_single_pipe_wagon.inc )

Comment ( ============= Brake Force======= )

        MaxBrakeForce( 142.254kN )

      Comment ( =========== Lighting =========== )

        include ( H220_Lights.inc )

        FreightAnim ( Harry_FA.s 0.01 0.01 )

        Sound ( "H220eng.sms" )

        )


Engine ( TA_AU_VR_H220_FA_P

        include ( H220_Effects.inc )

        Wagon ( TA_AU_VR_H220_FA_P )

        Name ( " TA VR H-220 4-8-4 Auto Fireman" )


        include ( Brake_Westinghouse_Compressor_Main_resv.inc )
        include ( ..\\eng_inc\\Brake_Westinghouse_AirBrake.inc )
        include ( ..\\eng_inc\\Brake_Westinghouse_EngineBrakeContrl_Setup.inc )
        include ( ..\\eng_inc\\Brake_Westinghouse_TRainBrakeContrl_setup.inc )


        CabView ( "AU_H220.cvf" )

        HeadOut (  -1.6 3.2 -7.2 )

           EngineControllers (
            comment( Engine controls )

                include ( ..\\eng_inc\\Steam_cuttoff_05-steps.inc )
                include ( ..\\eng_inc\\Steam_Regulator_no-step.inc )
                include ( ..\\eng_inc\\Brake_train_single_pipe_control.inc )
                include ( ..\\eng_inc\\Brake_Westinghouse_EngineBrakeContrl.inc )
                include ( ..\\eng_inc\\Control_Fire_door.inc )
                include ( ..\\eng_inc\\Control_Blower.inc )
                include ( ..\\eng_inc\\Control_Dampers.inc )
                include ( ..\\eng_inc\\Control_Heating_tap.inc )

                include ( H220_EngineControllers_misc.inc )

                )

        include ( H220_motive.inc )


 comment(fire temp, fire mass, water mass, boiler pressure,
  water level, tender_water_mass, tender_coal_mass,
  smoke_quantity, fire_condition, coal quality )

Comment ( EngineVariables( 990 1167 6468 224 1 14000 1 1 1 0.85 ) )

Sound ( "H220cab.sms" )

Name ( " TA VR H-220 4-8-4 Auto Fireman" )

  Description (

 "VR H class H220 4-8-4 Steam loco\n"+
  "Configured for MSTS Automatic fireman\n"+
 "____________________________\n\n"+
 "3d Model:\n"+
      "   Russell Beer\n"+
 "____________________________\n\n"+
      "Textures:\n"+
      "   Russell Beer\n"+
 "____________________________\n\n"+
      "Physics:  Ian Bowles & Ian Roberts\n"+
 "____________________________\n\n"+
 "Copyright © 2007 Team-ALCO\n"+
 "All Rights Reserved.\n"+
 "____________________________\n\n"+

"VR H class H220 4-8-4 three cylinder locomotive\n"+
"Brakes: Air, operates at 70 psi\n\n"+
"Power Source: 220psi Mechanically Fired, coal burning boiler\n\n"+
"Wheel Configuration: 8 - 5' 7" (1.70m) diameter driving wheels in a\n"+
"4-8-4 configuration\n\n"+
"Max Service Speed for Passenger service 70 mph ( 113 km/h )\n\n"+
"Height: 14.11 ft (4.30 m)\n\n"+
"Width: 9.46 ft (2.88 m)\n\n"+
"Length (locomotive): 51.18 ft (15.60 m)\n\n"+
"Tractive Effort at 85% Boiler Pressure: 54187 lbf (241.03kN)\n\n"+
"Coal Capacity: 9 Long Tons (9.14 metric tons)\n\n"+
"Water capacity: 14000Imp Gallons (64635liters)\n\n"+
"Couplings: Automatic\n\n"+
 "Brakes: Westinghouse A6-ET AirBrakes. \n\n"
 )
        )







#14 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 04 March 2016 - 12:11 AM

One of the problems in an include naming scheme is for the names to be meaning full and descriptive without becoming a handfull, An example of this is Westinghouse brakes there being multiple different specs all using the same main name.

I would be interested is Chris's (and Dave's) thoughts on this. I believe it would be a major step forward to get this sorted.

Lindsay

#15 User is offline   Hamza97 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 606
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 04 March 2016 - 12:49 AM

Quote

Again, I'm hoping that we can agree on a supported OR standard - what's in and what's out; what's allowed and what's not. There's work being done on steam SFX that goes beyond MSTS, which could have application in this area. There's lots of potential, we should have the OR team discuss, review and publish a standard, rather than having it develop haphazardly.


I will second that.. . There is DIRE need of standard for many OR parmaters. Take .inc for e.g. AFAIK, only Dave and Linda are using this. Some other members may using different techniques.

Ditto for any new OR parameters, some parameters are required to be there in separate OpenRails Subfolder, some parameters are required to be there in original .eng file only. ORTSDieselEngine would be a good example of former, ORTSTractionCurves for latter.

Once a standard is established, many will be encouraged to follow that way.... :)

#16 User is offline   Genma Saotome 

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

Posted 04 March 2016 - 02:37 PM

I'm applying my professional skills as a (now retired) career data modeler to this issue. A data modeler identifies the natural organization of data... what goes together, how different sets of data (objects if you want) relate to each other.

What that means in this case is actually pretty simple: I look for data that are all related to the same purpose (and Lindsay is correct in noting that our .wags and .engs have already grouped much of the data into clusters of sequential rows): Coupler data is set aside in its own include file. No need to mingle it with, say, friction. Brake equipment is another obvious cluster, tho when you look a bit closer a few fall by the wayside -- some depend on the value of Mass() for their value. That means the rule is the data in any include file must stand on its own, it's values cannot depend on data found in another include file.

.wags are pretty simple. The data clusters around these concepts:
  • Whatever the mesh defines, such as size().
    Spoiler

  • Everything that depends on the value of Mass().
    Spoiler

  • Couplers.
    Spoiler

  • Brake gear.
    Spoiler


Using those logically categorized clusters one can reduce an average steam era / early diesel era US freight .wag from 55-60 lines to 11, a couple of which are blank.

Because there are variants of each (e.g., Type D and Type E couplers) there will be a number of include files for each type of cluster. ALL freight cars will use the same types of clustering for their specific include files.

I know nothing of freight cars outside of North America but per my professional background plus the analysis I've done on N.A. cars I am of the opinion that the clusters I've described above are very likely correct for most situations in most eras.
-----------

.engs are much more complex. In addition to the 4 listed above the very obvious clusters include:
  • The instructions usually found at the bottom of the .eng file.
    Spoiler

  • The various lights a locomotive caries.
    Spoiler

  • Data about the power it produces and engines that produce it.
    Spoiler


Only slightly more difficult to cluster are the data related to specific tasks or equipment found on the locomotive:
  • Everything about Monitors.
    Spoiler

  • The physical levers and various controls used by the Engineer that are found in the cab.
    Spoiler

  • Anything that enables the correct pressure in the train line.
    Spoiler

  • What the brake controls really do.
    Spoiler


Using those logically categorized clusters one can reduce an average steam era / early diesel era US locomotive .eng from 800+ lines to around 60, a couple of which are blank.

Again, expressing my professional opinion, the data naturally groups into these clusters. Of course there is room for refinement; Perhaps the data about notched brake handle movement really belongs with the performance data of the brake system in stead of where I have it now, with the notched throttle data. But i think overall further changes are a the margins of the task. What does remain as entirely subjective are the names I've given the include files... and to a lesser degree where I've stored them. I can cover both of those maters later if anyone wants to review and discuss what I'm fiddling around with.

I think if you were to take any .wag or .eng from any country or era you'd find it's lines of data would move quite comfortably into the clusters I've identified. The actual parameter names and values could be quite different but I believe the natural group of that data should conform as I've described above.

Last point: Why these clusters and not fewer? Or More? The answer is everything in each cluster is obviously related to all of the other data and none is dependent upon data from another cluster. The analogy is atoms and not compounds or particles.

#17 User is offline   Genma Saotome 

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

Posted 04 March 2016 - 02:46 PM

Just a f.y.i., if you want to use the show/hide feature I used in the post above all you need to do is manually type the word spoiler inside of these two characters [], then the "peekaboo" text, followed by /spoiler again inside of these two characters [].

It helps with long code lists.

For what I did above, I did spoiler, color=black, code followed by the lines taken from a .eng or .wag and finished with \code, \color, and \spoiler -- each command inside its own []pair.

My use of the color command might be optional... it seems to matter for me but I'm not sure it matters for everyone. Perhaps it has something to do w/ my text editor.

#18 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 04 March 2016 - 03:08 PM

For me, intense use of 'include' is not good idea. It dramatically slows loading speed due to more files and much more complex parser.
Millions of files and complicated loading is not a way to good game engine.
I know that 'includes' helps in creating content, but content is created once and used many times. So better focus on the second thing.

#19 User is offline   Jovet 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 2,251
  • Joined: 14-January 08
  • Gender:Male
  • Location:Omaha, Nebraska.
  • Simulator:MSTS/Open Rails
  • Country:

Posted 04 March 2016 - 04:23 PM

View PostGoku, on 04 March 2016 - 03:08 PM, said:

For me, intense use of 'include' is not good idea. It dramatically slows loading speed due to more files and much more complex parser.
Millions of files and complicated loading is not a way to good game engine.
I know that 'includes' helps in creating content, but content is created once and used many times. So better focus on the second thing.

I must disagree. I think it's a great idea. I wish I had heard of it sooner!

The main reason being that managing hundreds or thousands of separate files is a daunting task. If one wants to tweak or change, say, braking parameters on on set or even all wagons/cars, that is a lot of work. But if the parameters are modular, then only one file needs changed and all of the wagons/cars are instantly changed. It's also significantly simpler to manage similarly-related but diverging parameters, such as Dave outlined.

A good game engine doesn't need to load millions of files. It only needs to load the ones that are appropriate. The delay in loading a few extra files is negligible on today's systems, and certainly is a non-issue compared to the loading of, say, a world file and its components. Additionaly, I would think very few people are going to have millions of Include files in their installations. It would kind-of defeat the purpose.

#20 User is offline   Genma Saotome 

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

Posted 04 March 2016 - 06:13 PM

View Postjovet, on 04 March 2016 - 04:23 PM, said:

A good game engine doesn't need to load millions of files. It only needs to load the ones that are appropriate.


I expect if the number of include files is perceived as a problem the Loader software could keep track of the files it has read in that cycle and avoid reading something more than once. Given the vast amount of duplication present its arguable that performance could be improved from the use of inckude files, not degraded.

But there is a valid point in Guku's criticism: The include file idea can be applied to excess. Any model which is a one-of (which, due to uncertain heritage of so many models is likely a lot of models) should not have their .eng or .wag changed to use any include files that are not almost uniformly applied are good -- stuff like couplers and brake equipment -- but the others... weight or mesh related data there would be no benefit in having those. They're work to set up and the marginal gain for one .wag file is slim to none. So in that situation more is not better.

One more thought on that if I may; I've long believed all .wags and .engs should be the empty version with the value of the lading held elsewhere, .con file or one of the activity files. Doing so would produce the circumstances whereby all loaded .wag files could be deleted. Want to use a model? Read one .wag file always.

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