Add physics to Trains, and support for more Wagon options
Posted: Fri Jul 24, 2015 8:18 am
It's my impression that currently, there's very little physics involved in how Trains are handled. All locomotives have the same pulling power, and all wagons weigh the same.
Even if there are no plans to add aditional wagon types to the vanilla game, beyond the one wagon type that exists (the cargo wagon), modders might very well want to add more wagons (I already know of the Tanker Wagon, for moving fluids), and so Locomotives should be rated for pulling power, and Wagons for weight, and arithmetic (or, if necessary, mathematics) used to calculate how quickly a given Locomotive can pull a combination of Wagon weights, and how much energy it costs.
Even better, Wagons containing cargo (such as Wagons containing items, or a Tanker Wagon containing a fluid) should have more or less weight based on how full they are. Exact calculations would probably be CPU-heavy, so a simplified solution of empty_weight for under 25% full (# of slots, or in a Tanker under 25% of capacity), light_weight for between 25% and 50% full, med_weight for between 50% and 75% full, and heavy_weight for over 75% full.
It'd also be good to see support for half-length Wagons, since some modders might want to add Gun-Carriage Wagons, and those should probably be smaller than the existing Wagons. Just adding a half-size option is enough, I don't think 3/4 size is necessary, and 1 1/2 size might create funky glithces.
Even if there are no plans to add aditional wagon types to the vanilla game, beyond the one wagon type that exists (the cargo wagon), modders might very well want to add more wagons (I already know of the Tanker Wagon, for moving fluids), and so Locomotives should be rated for pulling power, and Wagons for weight, and arithmetic (or, if necessary, mathematics) used to calculate how quickly a given Locomotive can pull a combination of Wagon weights, and how much energy it costs.
Even better, Wagons containing cargo (such as Wagons containing items, or a Tanker Wagon containing a fluid) should have more or less weight based on how full they are. Exact calculations would probably be CPU-heavy, so a simplified solution of empty_weight for under 25% full (# of slots, or in a Tanker under 25% of capacity), light_weight for between 25% and 50% full, med_weight for between 50% and 75% full, and heavy_weight for over 75% full.
It'd also be good to see support for half-length Wagons, since some modders might want to add Gun-Carriage Wagons, and those should probably be smaller than the existing Wagons. Just adding a half-size option is enough, I don't think 3/4 size is necessary, and 1 1/2 size might create funky glithces.