Elvas Tower: OK - Where's the "Include" Guru ? - Elvas Tower

Jump to content

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

OK - Where's the "Include" Guru ? Rate Topic: -----

#1 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 15 November 2019 - 07:26 PM

Hi Folks,

OK - started to get the hang of this and works as advertised - I see the advantages - EXCEPT for one exception... I cannot get my "BRAKES_WAGON" part of the file in an "include file" - if I place it before the "LIGHTS" section - it breaks the lights - if I place it where it is now - it breaks the sounds... They're just the first symptoms - as I try to ignore them - then the controller stops working and ORTS locks up... All the other includes work just fine... I've quadruple checked syntax and brackets... The code works absolutely fine in the ENG file - only - when placed in an "include" does it mangle everything...

Steam Locomotive ENG File:
SIMISA@@@@@@@@@@JINX0D0t______

Comment ( ########## WAGON SECTION ########## )
Wagon ( LHR280_Cons91_CL
	Type ( Engine ) 
	WagonShape ( LHR280_Cons91.S ) 
	Size ( 3.26m 4.81m 13.35m )   
	Mass ( 154.85t )
	WheelRadius ( 0.4572m )
	NumWheels (1)
	
Comment ( ##### INCLUDE FILES [WAGON] ##### )	
	include ( ".\\INCLUDE\\LHR280LOC_COUPLERS.inc" )
	include ( ".\\INCLUDE\\LHR280LOC_FRICTION.inc" )
	include ( ".\\INCLUDE\\LHR280LOC_LIGHTS_CL.inc" )
	include ( ".\\INCLUDE\\LHR280LOC_BRAKES_WAGON.inc" )

Comment ( ##### MISC WAGON ##### )
	Sound ( "Mik-h-eng.sms" ) 
	FreightAnim ( crew.s 1 1 ) 
)

Comment ( ########## ENGINE SECTION ########## )
Engine ( LHR280_Cons91_CL
	Wagon ( LHR280_Cons91_CL ) 
	Type ( Steam )  
	ORTSSteamLocomotiveType ( Simple )
	ORTSDriveWheelWeight ( 283800lb  )
	IsTenderRequired ( 1 ) 
	WheelRadius ( 0.775m )
	NumWheels ( 4 ) 

Comment ( ##### INCLUDE FILES [ENGINE] ##### )
	include ( ".\\INCLUDE\\LHR280LOC_POWER.inc" )
	include ( ".\\INCLUDE\\LHR280LOC_BRAKES_ENGINE.inc" )
	include ( ".\\INCLUDE\\LHR280LOC_EFFECTS.inc" )
	include ( ".\\INCLUDE\\LHR280LOC_CONTROLS.inc" )
	
Comment ( ##### MISC ENGINE ##### )
	Sound ( "Mik-h-cab.sms" ) 
	Name ( "SCO LHR280 #91 Loco - Class" ) 
	CabView ( sps_700.cvf ) 
	HeadOut ( 1.95 3.5 -6.2 )
	Description ( "The six monster Lehigh and Hudson River 90 class 2-8-0 Consolidations came in 1925 and 1927. Very similar to the Reading's I-10's, they were among the largest Consolidation types ever built - with a tractive effort nearly as great as the USRA's heavy Santa Fe.\n"+
        " \n" ) 
	EngineOperatingProcedures ( "The operating procedures for the engine.\n"+
        " \n" )
)


My Include File (first line blank like all include files):
Comment ( ##### BRAKES WAGON ##### )
	BrakeEquipmentType ( "Triple_valve, Auxilary_reservoir, Emergency_brake_reservoir, Handbrake" ) 
	BrakeSystemType ( "Air_single_pipe" ) 
	MaxBrakeForce ( 516.63kN )
	MaxHandbrakeForce ( 137.77kN ) 
	TripleValveRatio ( 2.5 ) 
	MaxApplicationRate ( 50 ) 
	MaxReleaseRate ( 50 ) 
	MaxAuxilaryChargingRate ( 20 ) 
	EmergencyResChargingRate ( 20 ) 
	EmergencyResCapacity ( "4.963*(ft^3)" )
	EmergencyBrakeResMaxPressure ( 90 )
	BrakeCylinderPressureForMaxBrakeBrakeForce ( 50 )
	ORTSDirectAdmissionValve ( 0 ) 
	ORTSAuxilaryResCapacity ( "4.963*(ft^3)" )
	ORTSNumberBrakeCylinders ( 1 )
	ORTSBrakeCylinderSize ( 18in )
	ORTSBrakeShoeFriction ( 0.0 0.5 8.0 0.288 16.1 0.241 24.1 0.211 32.2 0.187 40.2 0.173 48.3 0.161 56.3 0.150 64.4 0.142 72.2 0.139 80.5 0.134 88.5 0.129 96.6 0.125 104.6 0.123 112.7 0.121 )


What's different with this one ?

Regards,
Scott

#2 User is offline   Genma Saotome 

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

Posted 15 November 2019 - 08:44 PM

IMO we need an option to slip into a .con file that dumps every parameter (name and value) for the specified line item. I suspect that's the only way that will provide the right information to write up a bug report.


An early example of what I'm doing -- leading asterisks indicate comments at end:
SIMISA@@@@@@@@@@JINX0D0t______

Wagon ( H10-44_MILW_1308_in1947

comment ( Primarily aimed at Milwaukee Road units, can be reskinned into other roads if the details match... )
comment ( Original H10-44 Model by Allen Norton )
comment ( Reskin Kit by Richard A. Percy )
comment ( Reskin to 1308 by Dave Nelson )

WagonShape ( H10-44_MILW_1308_in1947.s )
FreightAnim ( H10-44_MILW_761-770_in1947_FA.s 1 1 1 )

*Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H10-44\\FM_H10-44_Fixed_Specs.inc" )
*Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H10-44\\FM_H10-44_Weight.inc" )
**Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H10-44\\FM_H10-44_Couplers.inc" )
**Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H10-44\\FM_H10-44_Locomotive_Brake.inc" )
Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H10-44\\FM_H10-44_Lights.inc" )

Sound ( "TMeng_1.sms" )

)

Engine ( H10-44_MILW_1308_in1947

***Effects (
DieselSpecialEffects (
Exhaust1(
-0.254 4.9 2.79
0 1 0
.1

)

Exhaust2(
0.254 4.9 2.79
0 1 0
.1

)

)

)


Wagon ( H10-44_MILW_764_early )

Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H10-44\\FM_H10-44_Engine_Specs.inc" )
Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H10-44\\FM_H10-44_Locomotive_Control.inc" )
**Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H10-44\\FM_H10-44_Monitors.inc" )
**Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H10-44\\FM_H10-44_Air_Compressor.inc" )
**Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H10-44FM_H10-44_Westinghouse_XYZ_Brakestand.inc" )

comment ( Thanks to Harold Clitheroe for permission to use his TM Cab as the basis for this cab )
comment ( The cab used in this series of FM switchers I have modified from Harold Clitheroe's TM Cab and the quality - or lack of - is no reflection on Harold's original work... )

CabView ( FMH12_1.cvf )

comment ( If All-Weather-Windows are fitted, then the headout view is best not used as it is compromised due to the FOV used by MSTS )
Headout ( 1.75 3.4 -5.37 )

***DieselSmokeEffectInitialMagnitude( 0.8 )
***DieselSmokeEffectMaxMagnitude( 1.6 )
***DieselSmokeEffectInitialSmokeRate( 0.5 )
***DieselSmokeEffectMaxSmokeRate( 2.9 )

EngineVariables ( 750 )

***Sound ( "TMcab_1.sms" )
Name ( "MILW H10-44 1308 in 1947" )

Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\FM_H10-44\\FM_H10-44_Text.inc" )
)


Notes on the above file:
* These two should be merged into one file that describes the general physical specs of the locomotive; All equipment subsystems go into their own .inc file.
** These two files do not need to be specific to this class of locomotives so the pointer will be redirected to Include ( "..\\Common.Inc\\Fleet" where suitable replacements exist.
*** This kind of line is left in the .eng file to facilitate .eng specific effects.



Final comment... I strongly recommend you follow the ideas behind \common.cab and use \common.inc as the shared directory tree for include files. It has two subdirectories -- \fleet and \models. The first one holds "generic" .inc files you can reuse on many cars and locomotives, stuff like Type E couplers which were on every North American freight car built after the mid 1930's. The other one, models, can be used when someone has created models skinned for multiple railroads and you want all of the folders that are based on that product to share certain .inc files. Tim Muir's USRA boxcars are one example. I strongly suggest a directory name that has the modelers name and car type (e.g., "\Tim Muir USRA SS Boxcar". That way when someone else releases their own models of the same car their .inc files will go under their name and not clobber thatever you have for Tim's models.

#3 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 16 November 2019 - 07:28 AM

Hi Dave,

Thanks for the detailed response and crash course on include files... I think this will prove useful...

I localized the issue to the “ORTSBrakeShoeFriction” line - expect it’s too long for however ORTS is processing include files - reported same in bug forum...

Regards,
Scott

#4 User is offline   cr-stagg 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 909
  • Joined: 16-May 05
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 16 November 2019 - 08:29 AM

Scott,

Could the problem be in the
EmergencyResCapacity ( "4.963*(ft^3)" )
and/or
ORTSAuxilaryResCapacity ( "4.963*(ft^3)" )
Lines?

Looking through thousands of MSTS eng/wag files I always find EmergencyResCapacity lines written as
EmergencyResCapacity ( 4.963 )
NOT
EmergencyResCapacity ( "4.963*(ft^3)" )

MSTS Tech Document shows EmergencyResCapacity example as a number not as a number and unit of measure. Document specifies it as being cubic feet.

#5 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 16 November 2019 - 10:46 AM

View Postcr-stagg, on 16 November 2019 - 08:29 AM, said:

Scott,

Could the problem be in the
EmergencyResCapacity ( "4.963*(ft^3)" )
and/or
ORTSAuxilaryResCapacity ( "4.963*(ft^3)" )
Lines?

Looking through thousands of MSTS eng/wag files I always find EmergencyResCapacity lines written as
EmergencyResCapacity ( 4.963 )
NOT
EmergencyResCapacity ( "4.963*(ft^3)" )

MSTS Tech Document shows EmergencyResCapacity example as a number not as a number and unit of measure. Document specifies it as being cubic feet.


Hi Charles,

Thanks for responding as well - I’ll test that but I don’t think so - I originally had it listed like this “EmergencyResCapacity ( 1.792ft^3 )” which I got from Peter’s “Coals to Newcastle” site - then - like you I suspected maybe the format was wrong - so I found it listed in one of my ENG files like I posted above - so I tried that - no change... Given the catastrophic nature of the failure - I strongly suspect the “ORTSBrakeShoeFriction“ string is too long and being clipped - leaving an open parens - lol - which is something that will quickly mangle the rest of the file... That’s what my further testing seems to indicate - as that’s the value causing the failure...

Regards,
Scott

#6 User is offline   R H Steele 

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

Posted 16 November 2019 - 02:38 PM

Quote

EmergencyResCapacity ( 1.792ft^3 )

The underlined is a correct use of the proper UoM for this parameter and will not invoke errors in the OR log.
This, as Charles suggests, is not correct, I don't know what warning the log will show, but it is not correct usage for an include file.
( "4.963*(ft^3)" )
Scott, as Dave suggests you should give serious consideration to using a Common.inc folder and subfolders for Fleet and Locomotives and folders within each of those for brakes, couplers and further sub folders depending upon your layout.
I have been placing the inc files in the same position as the default sections are found in the Basic (MSTS) files.General Wag information
Coupler inc file ( "..\\..\\Common.inc\\Fleet\\Couplers\\Blah_Blah_Coupler.inc" )

Friction inc file - if any - ( "..\\..\\Common.inc\\Fleet\\Couplers\\Blah_Blah_Friction.inc" )
Brake inc file ( "..\\..\\Common.inc\\Fleet\\Brakes\\Blah_Blah_Brakes.inc" )Wagon misc inc file ( if any )
Lights
The point here is to make usage of the Common.inc folder as accepted and standardized as the Common.cab and Common.snd folders were ( and are ) for MSTS.

#7 User is offline   cr-stagg 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 909
  • Joined: 16-May 05
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 16 November 2019 - 02:40 PM

View Postscottb613, on 16 November 2019 - 10:46 AM, said:

Hi Charles,

Thanks for responding as well - I’ll test that but I don’t think so - I originally had it listed like this “EmergencyResCapacity ( 1.792ft^3 )” which I got from Peter’s “Coals to Newcastle” site - then - like you I suspected maybe the format was wrong - so I found it listed in one of my ENG files like I posted above - so I tried that - no change... Given the catastrophic nature of the failure - I strongly suspect the “ORTSBrakeShoeFriction“ string is too long and being clipped - leaving an open parens - lol - which is something that will quickly mangle the rest of the file... That’s what my further testing seems to indicate - as that’s the value causing the failure...

Regards,
Scott


Maybe. BUT you have added a mathematical operator "*" between the number and the Unit of Measure. The program may be lost looking for the number it expected after the math operator.

#8 User is offline   Genma Saotome 

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

Posted 16 November 2019 - 03:38 PM

There is something funky going on with the “ORTSBrakeShoeFriction” line... I moved it from the last parameter value to the first and one of hte problems I've been having with brakes was solved. ABSOLUTELY no idea why.

#9 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 16 November 2019 - 03:59 PM

View PostGenma Saotome, on 16 November 2019 - 03:38 PM, said:

There is something funky going on with the “ORTSBrakeShoeFriction” line... I moved it from the last parameter value to the first and one of hte problems I've been having with brakes was solved. ABSOLUTELY no idea why.


Hi Folks,

Thanks so much for the help and interest - hmm - odd - I didn't try changing its order in the file - maybe that works ? I can try that too...

Yeah - for now I'm just trying to make it easier to work on my locomotive - changing one file sure beats changing nine - eighteen if you include the tenders - once I'm convinced it's all good data - I can look at adopting the standard with data that might prove useful in other projects...

:sign_thanks:

Regards,
Scott

#10 User is offline   Genma Saotome 

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

Posted 16 November 2019 - 04:03 PM

Scott, this is my latest include file for freight car brakes. Either I need to rename it to include something about the cast iron brakes... or leave the name alone and put the brake friction data into it's own .inc file.

Comment ( "Single_Pipe_AB_Brakes.INC" )
Comment
Comment ( "Version History" )
Comment ( "1.0 Dave Nelson 2019-05-22 new" )
Comment ( "1.1 Dave Nelson 2019-11-16 put brakeshoefriction first" )
Comment

Comment ( " Cast Iron Brakeshoes" )
ORTSBrakeShoeFriction (
0.0 0.5
8.0 0.288
16.1 0.241
24.1 0.211
32.2 0.187
40.2 0.173
48.3 0.161
56.3 0.150
64.4 0.142
72.2 0.139
80.5 0.134
88.5 0.129
96.6 0.125
104.6 0.123
112.7 0.121

)

BrakeEquipmentType( "Handbrake, Triple_valve, Auxilary_reservoir, Emergency_brake_reservoir, Retainer_4_Position" )
BrakeSystemType( "Air_single_pipe" )
BrakeCylinderPressureForMaxBrakeBrakeForce( 70 )
BrakePipeVolume( 0.191ft^3 )
EmergencyBrakeResMaxPressure( 90 )
EmergencyResCapacity( 2.604 )
EmergencyResChargingRate( 20 )
EmergencyResVolumeMultiplier( 1.461 )
MaxApplicationRate( 50 )
MaxAuxilaryChargingRate( 20 )
MaxReleaseRate( 20 )
TripleValveRatio( 2.5 )


Comment ( "Obsolete parameter list" )
Comment ( "NumberOfHandbrakeLeverSteps( 100 )" )
Comment ( "EmergencyBrakeResMaxPressure( 90 )" )
==========================================================

I have found both the version history and obsolete parameter list to be useful information.

Upon further review I will be moving BrakePipeVolume( 0.191ft^3 ) out of this file as the value properly varies by the length of the specific car or locomotive and as such does not belong in a \fleet" file.

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