Improved road vehicle acceleration (unrealistic but fun)

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Improved road vehicle acceleration (unrealistic but fun)

Post by andythenorth »

It doesn't matter that road vehicles don't accelerate 100% realistically. Simply not important for gameplay.

It does matter that an expensive 500hp, 30t, 35mph truck goes up a 10 tile slope at the same speed as a low-cost 50hp, 30t, 35mph truck. Very important for gameplay.

The current acceleration model is limited:
If you get why this is a problem you won't need it explained further. :)

My suggestion is that improved RV physics would be useful, and more fun than the current RV physics. I would also like a pony please.

Unless you are either (a) a developer of road vehicle newgrfs or (b) a developer of OpenTTD patches, you are politely requested to not join this discussion :shock:

cheers,

Andy
Hirundo
Transport Coordinator
Transport Coordinator
Posts: 298
Joined: 27 Jan 2008 13:02

Re: Improved road vehicle acceleration (unrealistic but fun)

Post by Hirundo »

Some questions to be answered:

If some of the physics properties (13, 14, 18, 19) are not specified, what should be the default value? The vehicle would need to be able to attain the top speed in a normal fashion, even when loaded, and be able to climb up hills.

How to handle articulated parts? Can they have their own values for these properties, or does only the first 'wagon' count?

What to do with curves?
Create your own NewGRF? Check out this tutorial!
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Improved road vehicle acceleration (unrealistic but fun)

Post by DaleStan »

Are there circumstances were "Do it the way TTDPatch does" fails to be an acceptable answer to all those questions?
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Hirundo
Transport Coordinator
Transport Coordinator
Posts: 298
Joined: 27 Jan 2008 13:02

Re: Improved road vehicle acceleration (unrealistic but fun)

Post by Hirundo »

DaleStan wrote:Are there circumstances were "Do it the way TTDPatch does" fails to be an acceptable answer to all those questions?
That would depend on how TTDPatch does this. I could find documentation regarding curves (limit to 75% of max) and defaults for prop 18/19 were listed in the NewGRF specs. This seems quite acceptable to me.

Regarding prop 13/14 and articulation I was unable to find any relevant documentation. Could you point me to it?
Create your own NewGRF? Check out this tutorial!
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Improved road vehicle acceleration (unrealistic but fun)

Post by DaleStan »

At least partly, this is not documented because GRF authors should never rely on the defaults; some earlier GRF might have changed them.

*rummage*rummage*
The documentation is located at patches/rvpower.asm:20-30, and all places that reference the two variables defined there.

... also, it's located here:
The seven buses are set individually, to weights of (decimal) 9,12,15,25, 9,15,25 and powers of 42,60,70,100, 42,60,90. The trucks are initialized by generation -- all trucks in each of the three generations are identical. Their weights are 12, 22, 45, and powers are 38, 48, 69.

Failure to set one of these properties means that you get whatever value the vehicle that you are replacing had. (Unless, of course, some earlier GRF changed it.)

In NFO, this comes to (assuming I got the hex conversions correct)

Code: Select all

// Buses:
-1 * 0 00 01 02 07 00 13 09 0C 0F 19 09 0F 19 14 2A 3C 46 64 3C 64 5A

// Trucks:
-1 * 0 0D 00 \D= FF 00 \d7
-1 * 0 10 FF
-1 * 0 06 00 04 01 FF
-1 * 0 00 01 02 03 07 13 0C 16 2D 14 26 30 45
-1 * 0 0D 00 \D+ FF 00 \d3
-1 * 0 07 00 01 \7< 57 FF
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Improved road vehicle acceleration (unrealistic but fun)

Post by andythenorth »

For various good reasons I'm looking at road vehicle realistic acceleration properties 13, 14 and 15.

It's entirely possible I'm being dumb, but I can't see any explanation of what each of these properties is/does. I'd assume it's HP, weight, and something else, but who wants people going around just assuming things ;)

Anyone enlighten me?

cheers,

Andy
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Improved road vehicle acceleration (unrealistic but fun)

Post by Rubidium »

The properties table at the top of that page (just below the table of content) tells you what 13, 14 and 15 mean.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Improved road vehicle acceleration (unrealistic but fun)

Post by andythenorth »

I have a road vehicle with a weight of 74t (a large off-highway truck).

Prop 14 (weight in 1/4 tons) is a byte, which gives me a maximum value of FF or \b255, for a maximum weight of 63.75t. http://wiki.ttdpatch.net/tiki-index.php ... adVehicles

In this case 63.75t is close enough that it doesn't much matter for gameplay, but if supporting larger weights is a trivial change, it would be useful to have.

cheers,

Andy
Post Reply

Return to “OpenTTD Suggestions”

Who is online

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