Elvas Tower: Include file standards - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 6 Pages +
  • « First
  • 3
  • 4
  • 5
  • 6
  • You cannot start a new topic
  • You cannot reply to this topic

Include file standards Rate Topic: -----

#41 User is offline   Hamza97 

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

Posted 19 March 2018 - 05:02 AM

This is how my .eng file looks with modular physics include files, neat and tidy still its not complete but this system also helps in physics fine tuning process. Just change one file and all loco with that include changes as well... :sign_rockon:

SIMISA@@@@@@@@@@JINX0D0t______

Wagon ( BL_WCAM2P_21861
	Type ( Engine )
	WagonShape ( WCAM-2P_Gold_21861.s )

	include ( "../common.bgpro/Physics/WCAM2/BasicShape.inc" )
	include ( "../common.bgpro/Physics/Global/Coupler_Transition.inc" )
 	include ( "../common.bgpro/Physics/Global/Derail.inc" )
 	include ( "../common.bgpro/Physics/WCAM2/adhesion_friction.inc" )

	MaxBrakeForce ( 230kN )

	Inside (
		 PassengerCabinFile ( BL_WCAM2P.s )
		 PassengerCabinHeadPos ( -0.55 3.05 8.35 )
		 RotationLimit ( 45 90 90 )
		 StartDirection ( 0 0 0 )
	)

	include ( "../common.bgpro/Physics/Global/Standard_2P_Brakes.inc" )

	Sound ( "..\\..\\common.bgpro\\Sounds\\WCAM2\\WCAM_eng.sms" )

	include ( "../common.bgpro/Lights/WCAM2-2P.inc" )
	
	ORTSPantographs(
                         Pantograph( Delay( 5s )
                         )
                          Pantograph( Delay( 5s )
                         )
	)

Engine ( BL_WCAM2P_21861
    Wagon ( BL_WCAM2P_21861 )

    include ( "../common.bgpro/Physics/WCAM2/AC_4700HP.inc" )
    include ( "../common.bgpro/Physics/Global/Circuit_Breaker.inc" )

    include ( "../common.bgpro/Physics/Global/Standard_2P_AB.inc" )
    include ( "../common.bgpro/Physics/Global/Standard_2P_Controller.inc" )
    
    include ( "../common.bgpro/Physics/WCAM2/DB.inc" )
    include ( "../common.bgpro/Physics/WCAM2/VCD_OS.inc" )

    DoesBrakeCutPower( 0 )
    BrakeCutsPowerAtBrakeCylinderPressure( 15 )

    CabView ( CLW-Type-1.cvf )

    Sound ( wapcab.sms )

    Name ( "Valsad BL WCAM-2P 21861" )
    Description (
	"BGPro - BL WCAM-2P 21861 Balwant in sheds Orange-Blue livery"
    )
    
    include ( "../common.bgpro/Physics/Global/EOP_WCAM.inc" )
    include ( "../common.bgpro/Physics/Global/EC_Std_32_Notch_Electric.inc" )
    include ( "../common.bgpro/Physics/WCAM2/TE_curve.inc" )

)


The Global folders have .inc file which would apply globally to all locos. The WCAM2 holds file specific to WCAM-2P locos I am creating currently.

#42 User is offline   Genma Saotome 

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

Posted 19 March 2018 - 10:07 AM

Four comments:

  • Many users will be confused by the use of both unix and windows styles of slashes. Pick one and stick with it.
  • Interesting idea combining the global and model specific directories into one tree.
  • "BasicShape" seems to be what I've called "MeshDefined". If that's the case you could move Type(), InsideView and Pantographs() as the odds are good none of those values will vary from one locomotive to another and all are descriptive of what the model maker put into the mesh. FWIW "basicShape" is a good name.
  • It is not obvious to me why you have separated \Lights as a subdirectory. Discussion below.


If you look at all of the various .inc files that would usually be created they all describe equipment of one kind or another. If you break out \Lights, why not \Brakes and \Couplers as well? Or \Alert Equipment? What I'm getting at is a difficult to answer matter of how much division to put into a directory tree and the logic used to come up with your answer. Stopping with a directory that means "equipment" is one answer. Going into more detail should argue for fleshing out all the relevant specializations, so if you do \physics then one answer is to add the equivalent of everything else, which might be \Equipment and that should include the lights. If you really want to do \Lights then why not all the other kinds of equipment too? IMO that's too much specialization for no obvious gain.

#43 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,433
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 19 March 2018 - 12:07 PM

View PostGenma Saotome, on 19 March 2018 - 10:07 AM, said:

Many users will be confused by the use of both unix and windows styles of slashes. Pick one and stick with it.


Regarding Dave's observation, I refer you to this ET thread: Jovets post#6
http://www.elvastowe...542#entry220542


It is reasonably the least prone to error, and your Sound path string already uses it. I agree, adopt a standard.
Keep the format consistent, IMO, is an important advantage as it makes changes to all the files much easier. ( paraphrasing your own words)

#44 User is offline   Genma Saotome 

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

Posted 19 March 2018 - 03:26 PM

I also recommend the use of the MS style. AFAIK it has the advantage that other utilities will know exactly what it means. For example my editor, EmEditor, will open the referenced .inc file when the MS backslash is used but will not open the file with a unix forward slash. This one feature has really helped me in that I know if I can open the file in my editor the path is correct. I don't need to be looking for error messages in the OR or TSRE Con editors to find out I goofed something.

#45 User is offline   Hamza97 

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

Posted 20 March 2018 - 09:35 PM

Quote

If you look at all of the various .inc files that would usually be created they all describe equipment of one kind or another. If you break out \Lights, why not \Brakes and \Couplers as well? Or \Alert Equipment? What I'm getting at is a difficult to answer matter of how much division to put into a directory tree and the logic used to come up with your answer. Stopping with a directory that means "equipment" is one answer. Going into more detail should argue for fleshing out all the relevant specializations, so if you do \physics then one answer is to add the equivalent of everything else, which might be \Equipment and that should include the lights. If you really want to do \Lights then why not all the other kinds of equipment too? IMO that's too much specialization for no obvious gain.


The main reason to break out the light section is that this loco I have broken up in shed wise in trainset folder, for e.g. "BL WCAM-2P" & "KYN WCAM-2P", and as the physical loco shape is same only, I have broken the lights into its subfolder. Also many other loco are also arranged this way, so that if I were to modify them to with help of .inc file, it would help me to copy the existing lights.inc file, change the positions and point to it, every loco in different subfolders.

The logic behind Global and loco specific folder is such that couplers, brakes, controllers are mostly uniform across the loco fleet, atleast here on Indian Railways, so it makes sense to arrange them in such a way. And making different subfolders for different things like couplers, brakes, controllers would be IMHO too much specialization,as you said, for no obvious reason.

#46 User is offline   Genma Saotome 

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

Posted 21 March 2018 - 09:12 AM

Hamza, I'm not questioning the creation of an .inc for lights -- that makes perfect sense; I was questioning the reasoning behind your use of a \lights directory.

Use of global and model specific directories make good sense too.

#47 User is offline   Hamza97 

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

Posted 21 March 2018 - 08:38 PM

What you recommend instead of /lights directory...?? :pardon:

#48 User is offline   Lindsayts 

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

Posted 24 March 2018 - 09:02 AM

View PostHamza97, on 21 March 2018 - 08:38 PM, said:

What you recommend instead of /lights directory...?? :pardon:


The lights are part of the loco's shape, so I put such files in the specfic loco's directory, makes it easier to find items unique to that class of loco.

Lindsay

#49 User is offline   Genma Saotome 

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

Posted 24 March 2018 - 11:29 AM

View PostLindsayts, on 24 March 2018 - 09:02 AM, said:

The lights are part of the loco's shape, so I put such files in the specfic loco's directory, makes it easier to find items unique to that class of loco.

Lindsay


I would do the same if the mesh was skinned for only one railroad. If there were more than one I'd be moving files into railroad specific folders and then move the .inc files into a common. folder (I've been using \common.model\{model name plus modeler name}\Lights.inc).

That way the .inc files are moved out of the railroad folders (some of which which may be deleted from disuse) into a railroad-neutral location.

FWIW, something else I do is I'll often rename folders, ven mesh and textures, so there is more emphasis on class. This gets me to names like \RS_SFRD_Rr40 -- the type of car, the owner, the class id. And in it are all of the .wags for cars of that class. I can't do that universally but where I can with ease I do.

#50 User is offline   Genma Saotome 

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

Posted 10 April 2018 - 05:25 PM

Based on feedback & discussion I've concluded there is no need to put a country code in the path statement to the .inc file. By and large people will create miniroutes for different countries and in doing so there's no need to redundantly put that in the path.

Another item I proposed -- Mesh_Defined.inc (for everything that describes the fixed attributes of whatever is being modeled) has been a problem name-wise from the beginning. Hamza suggested "Basic_Shape" and there is merit in that suggestion so considered (again) what it is I was trying to accomplish: a place where the game parameters for the basic shape, as defined in the mesh, are held. By this I mean things like Type(), Size(), Gauge(). None of that stuff ever changes, not even w/ reskins. What I finally came up with is the phrase Fixed_Specs. I'll implement that and see how it feels.

What had been {path}\USA\{model-name}\Mesh_Defined.inc
will become {path}\{model-name}\Fixed_Specs.inc


A different matter is the need for \common.fleet and \common.model; I remain convinced of the need for both but am not so sure that both as "home folders" in \trainset is wise. What I'm kicking around is replacing those with \common.inc and within that folders \Fleet and \Model. I think a third folder, either payware or vendor could be of some use but I'm not going to give much thought to it for now.

So to wrap up, I'm migrating folders and names again with the target of:
\trainset
\common.inc
\fleet
\model

I'll see how that goes.

  • 6 Pages +
  • « First
  • 3
  • 4
  • 5
  • 6
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users