Elvas Tower: What about loading coal in a coal train? - 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.
  • 13 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

What about loading coal in a coal train? Rate Topic: -----

#11 User is offline   JohnnyS 

  • Conductor
  • Group: Status: Active Member
  • Posts: 287
  • Joined: 05-May 11
  • Gender:Male
  • Simulator:OR/MSTS
  • Country:

Posted 06 September 2015 - 12:40 PM

View PostCsantucci, on 06 September 2015 - 12:10 PM, said:

I have created a blueprint. My intention is to manage following type of block
ORTSFreightAnims(
	ORTSFreightAnim(
	FreightAnimType(string = Continuous, static, discrete)
	ContinuousFreightAnimType(string = grain, coal, gravel, sand)
	Shape(shapefile)
	MaxHeight(metres)
	MinHeight(metres)
	DoesWorkWithStandardCoalPickups (1 or absent/0)
	WagonCapacity()
        InitialState ( full, empty)
	...
	)
)

which can be inserted within a .wag file or within the wagon section of an .eng file.
The syntax allows for multiple freightanims within a single trainset, and for various types of FreightAnim:
- continuous (used for commodities whose level within a wagon can be raised or lowered)
- static (used to add parts to a trainset (numbers etc.)
- discrete (used for discrete objects, like a container). Animation for discrete freightanims (e.g. loading/unloading containers) is not planned at the moment.
Above the parameters for the continuous type of FreightAnim are listed.
The four subtypes for the continuous freight anim type correspond to the four types of commodity that MSTS already defines.
DoesWorkWithStandardCoalPickups allows the freight anim to work also with standard coal pickups; this, to easily enjoy and check the function without needing to edit the route to add specific pickups.
Parsing of this block is done within a specific file within ORTS.Formats.OR.


I have a couple of intermodal cars in development that would require something along the lines of your proposed blueprint to operate in the sim. If you need them for testing at some point please let me know.

#12 User is offline   ianmacmillan 

  • Fireman
  • Group: Status: Active Member
  • Posts: 162
  • Joined: 22-March 13
  • Gender:Male
  • Location:Scotland
  • Simulator:MSTS
  • Country:

Posted 06 September 2015 - 01:31 PM

I gave up trying to make freight animations animate.

You are welcome to use my FA loads to experiment with.

br_wagonpack1.zip on trainsim.

Contains several different loads in the Common.Loads folder
Also disappearing loads using the door animation.

#13 User is offline   Traindude 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 661
  • Joined: 17-November 13
  • Gender:Male
  • Location:Seattle, WA
  • Simulator:Open Rails
  • Country:

Posted 06 September 2015 - 03:38 PM

On the subject of the "Freight-Sand" setting--freight cars aren't the only cars that carry sand. Locomotives need their sandboxes replinished every so often as the sand supply (for traction) diminishes. I am wondering if this idea can replace the "infinite sand" default. Can it? Would it be practical?

#14 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 08 September 2015 - 07:49 AM

Thanks to you all for hints and proposals. I'll try now to (slowly) implement something.

#15 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 17 September 2015 - 12:49 AM

I unfortunately had to momentarily give up using asullenger's Bethgon for this purpose. Their shape hierarchy is such that the animating their freight gets OR stuck (infinite loop). This is not a problem of my changes, because I modified the Bethgon to be a tender, and it again gets OR stuck, also in preceding versions of OR.
Line 75 of MSTSWagonViewer.cs
                    // Force allowing animation:
                    if (FreightShape.SharedShape.LodControls.Length > 0 && FreightShape.SharedShape.LodControls[0].DistanceLevels.Length > 0 && FreightShape.SharedShape.LodControls[0].DistanceLevels[0].SubObjects.Length > 0 && FreightShape.SharedShape.LodControls[0].DistanceLevels[0].SubObjects[0].ShapePrimitives.Length > 0 && FreightShape.SharedShape.LodControls[0].DistanceLevels[0].SubObjects[0].ShapePrimitives[0].Hierarchy.Length > 0)
                        FreightShape.SharedShape.LodControls[0].DistanceLevels[0].SubObjects[0].ShapePrimitives[0].Hierarchy[0] = 1;

does not seem to be the solution for all types of car shape hierarchies.

I will try with Ian McMillan cars. By the way I am using the Settle & Carlisle route as test route.

#16 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 17 September 2015 - 02:31 AM

OK, with Ian's cars I got it working. If you want to try a beta version on the EUROPE1 route proceed as follows:
1) Make a separate install of OR x.3259
2) Download and install Ian's cars from file br_wagonpack1.zip on trainsim.
3) Overwrite 4 OR files from the ones you unzip from here:
6/11/15 Attachment deleted because function now available in standard OR version
4) Unzip and unpack following activity:
Attached File  Testtender_newcar.zip (1.44K)
Number of downloads: 537
5) Go at directory TRAINS\TRAINSET\UK_mineral and create an OPENRAILS subfolder
6) Unzip in such subfolder this file:
Attached File  BR_16T_Min_D105_4_Coal1.zip (472bytes)
Number of downloads: 521

Now start the activity. Activate the F5 HUD and go to the CONSIST INFORMATION HUD.
You will notice that the two freight cars are empty and that they weigh 7.75 tons. The loco tender is half empty.
Now start the train. After some hundreds of meters you reach the coal tower. Refill first the loco tender as usual. The coal level will rise. Then move the first freight wagon under the coal tower. Press and keep pressed key T. In the HUD you will notice that the weight of the car rises, and on the screen you will notice the coal level increase. When the wagon weight has reached 22.5 tons, you can move the second freight wagon under the tower and proceed analogously.

20/9/2015: New OR executables

#17 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 17 September 2015 - 06:13 AM

Here an update on how things have to be configured.
Let's consider wagon BR_16T_Min_D105_4_Coal1.wag.
An include file has to be inserted in an OpenRails subfolder within the wagon's folder (in this case, UK_mineral).

I have generated this include file, that I use here as an example to explain things:
include ( ../BR_16T_Min_D105_4_Coal1.wag )

Wagon (
ORTSFreightAnims
(
	MSTSFreightAnimEnabled (0)
	WagonEmptyWeight(7.75t)
	FreightAnimContinuous
	(
	IntakePoint ( 0.0 3.0 FreightCoal )
	Shape(..\\common.Loads\\RCH_1923\\RCH1923_7&8P_Coal1.s)
	MaxHeight(0.1)
	MinHeight(-0.7)
	FreightWeightWhenFull(15.75t)
	FullAtStart(0)
	)	
	FreightAnimContinuous
	(
	IntakePoint ( 0.0 3.0 FuelCoal )
	Shape(..\\common.Loads\\RCH_1923\\RCH1923_7&8P_Coal1.s)
	MaxHeight(0.1)
	MinHeight(-0.7)
	FreightWeightWhenFull(15.75t)
	FullAtStart(0)
	)
)
)


Pls. notice that before the "include" line a void line must be present.
As can be seen, an ORTSFreightAnims block has to be generated.
MSTSFreightAnimEnabled (0) , when equal to 0 means that existing MSTS freight animations within this wagon are disabled; when equal 1 it means that they are enabled. As I have used a wagon here that already had a static freight animation, I have disabled them.
WagonEmptyWeight(7.75t) , if present, provides the empty weight of the wagon. If not present, the Mass() parameter within the .eng file is considered.
After these two general parameters, the freight animations are defined. There are three types of freight animations: continuous, static and discrete, each one with a different parameter list.
The continuous freight animations refer to solid or liquid loads that can expand themselves within the wagon, like coal, or gravel, or diesel fuel and so on. A wagon can accept more than one type of load, and in this case a FreightAnimContinuous block is provided for every type of load.
Following parameters are accepted within a FreightAnimContinuous block:
IntakePoint ( 0.0 3.0 FreightCoal ) : this uses the standards already used for the MSTS freight animations. The types of freight available are the ones available within MSTS, that is FreightGravel, FreightCoal, FreightSand, FreightGrain, FuelCoal, FuelDiesel and FuelWater. Notice that by inserting a FuelCoal IntakePoint, standard coal towers can be used to load wagons, without changes needed within the route files.
Shape(..\\common.Loads\\RCH_1923\\RCH1923_7&8P_Coal1.s) : (sorry for the smilie) this line is not mandatory: if using a tank wagon with FuelDiesel the shape obviously isn't needed.
MaxHeight(0.1) : this is the maximum level the shape reaches. It works like the first numeric parameter within the tender coal animations (but without the trick used to display crews)
MinHeight(-0.7) : this is the minimum level the shape reaches.
FreightWeightWhenFull(15.75t) : this indicates the maximum load weight. This is summed to the WagonEmptyWeight to compute the total weight of the wagon (therefore the weight of the wagon varies depending from the amount of load).
FullAtStart(0) : if 0, this type of load is not present in the wagon at simulation start; if 1, it is present; only the first 1 within the various FreightAnimContinuous blocks is considered.
In the example shown, two FreightAnimContinuous blocks are present.

Static freight animations (meaning parts that remain always present during the run) have following block syntax:
FreightAnimStatic
	(
	SubType(Default)
	Shape(xxshape.s)
	Offset(XOffset, YOffset, ZOffset)
	)	

SubType isn't used yet.
Shape is mandatory here.
XOffset, YOffset and ZOffset are the offsets of the shape with respect to its zero position, and are useful to place with precision the shape.
More than one static freight animation can be defined (also together with continuos freight animations), and they should work also for locomotives.

Discrete freight animations are defined as below (to be finalized and debugged)
FreightAnimDiscrete
	(
	Shape(xxshape.s)
	Offset(XOffset, YOffset, ZOffset)
	LoadWeight (10t)
	LoadedAtStart (1)
	)	


Meaning of the parameters is obvious.
First implementation of the discrete freight animation isn't yet complete.
Discrete and continuous freight animations can't be present in the same wagon.

#18 User is offline   asullenger 

  • Hostler
  • Group: Status: First Class
  • Posts: 86
  • Joined: 11-January 14
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 17 September 2015 - 04:56 PM

What do I need to change for it to work for you??

#19 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 18 September 2015 - 12:58 AM

Anthony,
unfortunately that's not yet clear to me and I'm not a shape structure expert. I just tested another gondola car (within pack BNSFPAK7) and had the same problem. I fear that the above code lines (which haven't been written by me) aren't suitable for bogie cars.

Ian,
can you pls. tell me which wagons in your pack have the disappearing load with the door animation command?

#20 User is offline   ianmacmillan 

  • Fireman
  • Group: Status: Active Member
  • Posts: 162
  • Joined: 22-March 13
  • Gender:Male
  • Location:Scotland
  • Simulator:MSTS
  • Country:

Posted 18 September 2015 - 05:32 AM

Interesting stuff.

I'm glad that the common.loads aliasing works. The texture ace also aliases within the shape file. This saves a lot of duplication. Pity the idea never caught on in the USA.

The door animation versions are indicated by the suffix _anE for wagon which start with the load invisible and _anL for the load showing.
The door animation simply rotates to show the untextured side of the shape file when empty.
I don't think it's worth considering for OR as the mass can't be changed in MSTS and the load has to be part of the main shape.

The BBC wagons in the UK_Special_Open folder are bogie wagons (bogie bolster C) and should behave similar to US wagons for testing.

On UK wagons the load cappacity is painted on the left hand side above the number. The unloaded weight (tare) is on the right.
Add both together for the loaded Mass.

My wagons are built in TSM. I'll be happy to provide the source files if required.

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