Change wagons capacity according train max speed?

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1354
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Change wagons capacity according train max speed?

Post by MagicBuzz »

Hello,

I'm still working on my French trainset and now I'm focusing on the wagons.

I see capacity of French wagons is different according to the speed of the train:
By example, a covered "Etat 1" wagons can load:
Petite Vitesse (low speed < 80 km/h) = 20 t
Grande Vitesse (high speed = 80 km/h) = 10 t

Is there something I can use to determine the max speed of the entire train to set a different capacity?

Or should I create two different wagons, one limited to 50 km/h and the other one at 80 km/h ?
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Change wagons capacity according train max speed?

Post by michael blunck »

Cargo capacity can be modified by using a callback (property). But generally a better solution would be to use different wagons.

regards
Michael
Image
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Change wagons capacity according train max speed?

Post by Transportman »

In NML, you can change most properties in the graphics block to point to a switch that depends on cargo_subtype (in case you treat them as liveries) or other variables of either the wagon itself or the front engine to get the behaviour you describe (by having switches for cargo_capacity and speed), but as Michael indicates having separate vehicles is usually the better option for users. If you combine them in one vehicle, you somehow need to convey that information to players, requiring them to read text somewhere (either in some separate readme or in the purchase menu) and make a mess of purchase menu sorting, so keep it simple and use separate vehicles for vehicles with different properties.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 6 guests