Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by NekoMaster »

A chunk of the time it takes me to code and compile GRF's is tweaking the Tractive effort coefficient values which is rather annoying.

Is there anyway in NML to set the TE by hand rather then rely on the coefficient?

For example, rather then say

Code: Select all

tractive_effort_coefficient : 0.22 // 280 kN target 
it would be nice if i could just say, put that number in directly

Code: Select all

tractive_effort : 280 kN
I mean the other numbers for a vehicles specs/performance like power, speed, and weight are set

Code: Select all

speed : 120 km/h,
power : 1550 HP,
weight : 143 tons,
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by andythenorth »

No, because TE is a calculation from the co-efficient and the vehicle weight.

Weight of the vehicle can change during gameplay (for example, an engine with cargo capacity, or a bus), this changes the calculated TE value.

If you're working on setting real-life TE values I wouldn't worry about being super accurate:
- TE figures are often 'nominal', i.e. calculated based on weight on the drivers, rather than measured on a train
- actual measured TE varied between different engines of the same class
- actual TE varies as the engine uses up fuel, water etc
- actual TE varies with rail conditions
- lots of the figures come from Wikipedia, and train fans in forums call it Liarpedia but eh :twisted:
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by PikkaBird »

NekoMaster wrote:A chunk of the time it takes me to code and compile GRF's is tweaking the Tractive effort coefficient values which is rather annoying.
If your tracking table is a spreadsheet, just add a TE coefficient column calculated from the nominal TE and weight. No tweaking required.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by michael blunck »

NekoMaster wrote: Is there anyway to just set Tractive Effort (rather then a Coefficient?)
m4nfo allows to set tractive effort in kN/kp/lbf directly:

Code: Select all

definevehicle(_BR75, "BR 75 (ex wü. T5)",
	lifecycle(1-1-1912, 1932, 1963)
[...]
	speed(75 km/h)
	power(880 PS)
	weight(71 t)
	effort(101 kN)
	price(68'750 RM) // DM == RM
	runningcost(7'563 RM)
)
andythenorth wrote: Weight of the vehicle can change during gameplay (for example, an engine with cargo capacity, or a bus), this changes the calculated TE value.

If you're working on setting real-life TE values I wouldn't worry about being super accurate:
- TE figures are often 'nominal', i.e. calculated based on weight on the drivers, rather than measured on a train
- actual measured TE varied between different engines of the same class
- actual TE varies as the engine uses up fuel, water etc
- actual TE varies with rail conditions
- lots of the figures come from Wikipedia, [...]
For locomotives, tractive effort is as well defined as is power. Even for MUs (where tractive effort isn´t really meaningful, but acceleration is the most important figure), it would be meaningful, since additional weight by load (passengers) would be negligible.

You have a point here, insofar that actual TE varies (heavily) with rail condition. But given the fact, that there´s always dry and sunny weather in TTD, this is irrelevant.

regards
Michael
Image
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by Wahazar »

For example, 2cc in nml spreadsheet contain handy calculation of TE coefficient based on vehicle weight and TE, see column O
https://docs.google.com/spreadsheets/d/ ... =259018472

BTW, I noticed, that 2cc set and some others sets have wrong steam locomotive weights - often there is locomotive weight without tender.
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by andythenorth »

michael blunck wrote:m4nfo allows to set tractive effort in kN/kp/lbf directly:
Presumably that's just calculating the coefficient from the vehicle weight and desired TE? Nice.

I agree that for most trains, the weight of any payload isn't a significant factor. It's more relevant for road vehicles, e.g. a freight truck with tare weight 20t and payload 20t ;)
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by michael blunck »

andythenorth wrote:
mb wrote: m4nfo allows to set tractive effort in kN/kp/lbf directly:
Presumably that's just calculating the coefficient from the vehicle weight and desired TE? Nice.
Yes. In conseqence using a TE callback, vehicle weight has to be given as well:

Code: Select all

def(2) veh_railtype(
	seteffort(240 kN, 15 t) if(FRNR) // set TE for rackrail track
	cbfail() else
)
Since, due to distributed source files, vehicle weight isn´t always accessible.
andythenorth wrote: I agree that for most trains, the weight of any payload isn't a significant factor. It's more relevant for road vehicles, e.g. a freight truck with tare weight 20t and payload 20t
You see, I´m a train man.

regards
Michael
Image
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by NekoMaster »

I do have the Tractive Effort listed in my Data Sheets/Spread Sheets but I still have to guess and tweak the coefficient in Code and see if that gets close enough to what i need.

Also while TE can change IRL with weight, wear, track conditions and weather, in OpenTTD TE doesnt seem to change (at least in the vehicle info window). LIke someone said its pretty much a sunny summer all the time in OpenTTD except in the sub-arctic where theres snow (which can change if you have a variable snow line GRF like OpenGFX landscape)
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Re: Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by peter1138 »

Why do you need to guess, isn't it just effort/mass/10?
He's like, some kind of OpenTTD developer.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by PikkaBird »

peter1138 wrote:isn't it just effort/mass/10?
For nfo it's TE / (weight * 9.8 ) * 255, as per the wiki. I'm not sure why the NML spec uses 10 instead of 9.8.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by michael blunck »

PikkaBird wrote:
peter1138 wrote:isn't it just effort/mass/10?
For nfo it's TE / (weight * 9.8 ) * 255, as per the wiki. I'm not sure why the NML spec uses 10 instead of 9.8.
The conventional standard value for gravitational acceleration is 9.80665 m/s². So, "10" might be just a simplification, same as "9.8" had been back in TTDPatch times.

regards
Michael
Image
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Re: Is there anyway to just set Tractive Effort (rather then a Coefficient?)

Post by peter1138 »

Hehe, well it's 10 in OpenTTD's source too. Since 2006.

Edit: It's 9.8 now.
He's like, some kind of OpenTTD developer.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google [Bot] and 33 guests