scottb613, on 01 June 2019 - 01:07 PM, said:
Scott, the use of the Include statement allows us to break up .wag amd .eng files into multiple commonly shared blocks. What remains in the .eng or .wag are just those parameters that could be edited to produce something unique. For example. almost all of my OR-only .wags look like this:
Wagon ( XM_SPS_10164_Animal_Feed_LD
WagonShape ( SP&S_Box_10164.s )
FreightAnim ( USRA_50t_parts.s 1 1 1 )
Include ( "..\\Common.Inc\\Models\\Tim_Muir\\USRA_DS_Boxcar\\XM_USRA_DS_Empty_Car.inc" )
Include ( "..\\Common.Inc\\Models\\Tim_Muir\\USRA_DS_Boxcar\\XM_USRA_DS_Animal_Feed_Ld.inc" )
Include ( "..\\Common.inc\\Fleet\\DHNelson\\Std_Type_D_Coupler_Generic_Draft_Gear.inc" )
Include ( "..\\Common.inc\\Fleet\\DHNelson\\Single_Pipe_AB_Brakes.inc" )
Sound ( "genfreightwag2.sms" )
Name ( "XM 40' SPS USRA_DS 10164 Animal_Feed Ld 1919-55" )
)
And here is the .wag for a completely different car:
Wagon ( TM_UTLX_55210_Copra_Oil
WagonShape ( UTLX_6K_55210.s )
Include ( "UTLX_Type_V_Empty_Car.inc" )
Include ( "UTLX_Type_V_Linseed_Oil_6k_gal.inc" )
Include ( "..\\Common.inc\\Fleet\\DHNelson\\Std_Type_E_Coupler_Generic_Draft_Gear.inc" )
Include ( "..\\Common.inc\\Fleet\\DHNelson\\Single_Pipe_KC_Brakes.inc" )
Sound ( "GenFreightWag1.sms" )
Name ( "TM 6k UTLX Type V 55210 Copra Oil " )
)
It can now be all very standardized.
And in this case the FreightAnim() line might be able to be moved to the Empty_Car.inc file.
What you see there are four Include statements, two with paths to a folder that holds all of .inc files for this specific model from Tim Muir and two to a folder that contains fleet-wide data values defined by myself. The inclusion of peoples names is an attempt to ensure any subsequent from those named persons do not overwrite your own work or that of others.
The point of this is simple -- there is data about this class of cars that is common to all instances of that car in your roster:
- Parameters about the empty car
- Parameters about the lading as well as those affected by the lading weight into the second .inc You omit this line for an empty car.
And then there is data that is common to most of your roster/total fleet:
- Parameters about the brake system
- Parameters about the couplers
Examine it a bit closer and you'll see that now it is trivial to set up a new .wag for different coupler types or ladings.
As you can see there is not much here that is left for car by car customization. If you want to learn more about this, send me a PM and can clarify as needed.