How to set RV overtaking switch rvovertakeparams

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

Post Reply
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

How to set RV overtaking switch rvovertakeparams

Post by wallyweb »

changes.log wrote:r1869 JGR: Highly Experimental and Partially Untested Switch: road vehicle overtaking behaviour modifications.
How does one set this switch?
Last edited by wallyweb on 23 Apr 2008 16:37, edited 1 time in total.
User avatar
JGR
Tycoon
Tycoon
Posts: 2558
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: r1869 Nightly Question

Post by JGR »

Run:
ttdpatch(w).exe -W ttdpatch.cfg
to regenerate the config file with missing switches added, the switch rvovertakeparams should appear at the bottom, along with parameter info (as below).
road vehicle overtaking behaviour parameters. Hexadecimal bit field: 0=enable overtaking of non-stationary vehciles with same max speed, 1,2,3=disable overtaking (collision) checks on current tile, next tile and tile after next (ignored anyway for stationary overtakees), respectively, 4=set max overtaking counter value to bits 8-15 (TTD default=35), 5=set stationary overtakee overtaking count penalty to bits 16-23 (TTD default=17), 6=overtake even if on junction tile if overtakee is stationary. Experimental switch, some combinations may produce adverse/unusual results.
or just add rvovertakeparams to the end of your config.

Bits 6 and 3 should probably be left alone or used with caution.
Some example values:
off/on/0, same as before
1, vehicles can overtake slower moving vehicles of the same maximum speed even if not stationary
2, more aggressive overtaking
6, even more
E, *even* more (dodgy)
40, allow overtaking stationary vehicles on junction tiles
(00)10, disable overtaking
20, do not touch :)
xx10, controls (roughly) how long vehicles spend on wrong side of road when overtaking

these can be combined:
ie.
(00)FF7F - Italian style driving
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: How to set RV overtaking switch rvovertakeparams

Post by wallyweb »

Thanks JGR. I've changed the thread's title to something more appropriate.

ttdpc listed the switch between `plantmanytrees' and `tempsnowline'. 8)
Now I must go and play with this for a while. Looks like it could be fun. :D
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: How to set RV overtaking switch rvovertakeparams

Post by AndersI »

wallyweb wrote:ttdpc listed the switch between `plantmanytrees' and `tempsnowline'. 8)
That means JGR hasn't put the switch in the right CATEGORY, or there is a bug in TTDPC. I haven't downloaded the nightly and checked myself yet. Maybe in the weekend...

BTW, if you know the name of the switch you can use the Search function of TTDPC to find it in the tree. You could also guess that 'overtake' is in the switch name and enter only that in the Search box. TTDPC finds any occurrence of 'overtake' wherever it is positioned in the switch name.
User avatar
JGR
Tycoon
Tycoon
Posts: 2558
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: How to set RV overtaking switch rvovertakeparams

Post by JGR »

That, (along with my bad grammar and spelling in the config file text) has now been corrected as of r1873.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: How to set RV overtaking switch rvovertakeparams

Post by wallyweb »

AndersI wrote:BTW, if you know the name of the switch you can use the Search function of TTDPC to find it in the tree.
I forgot about that. :oops: What can I say? I'm an old guy who forgets a lot. :wink:

While I'm at it, and before I forget to ask, JGR, TTDPatch doesn't think (00)FF7F is a good parameter. That said, from your description, I would think that 1,2,3,4,5, 6, E and 40 are valid entries. It also seems that these are summable. So, how do I put these together to get (00)FF7F?
User avatar
JGR
Tycoon
Tycoon
Posts: 2558
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: How to set RV overtaking switch rvovertakeparams

Post by JGR »

I perhaps was a bit unclear
(00)FF7F means FF7F or 00FF7F (the 00 bit is somewhat redundant but that is the "parameter" value which is set by bit 6: 20)
Note that the switch expect a value in hexadecimal (otherwise working out bits in decimal is a right pain)
The possible summable values are:
1,2,4,8,10,20,40 for enable overtaking of same max speed RVs, disable tile checks 1, 2 & 3, set max RV overtaking counter, set initial stationary overtakee overtaking counter and enable overtaking stationary vehicles on junction tiles, respectively.
this produces a range of values for the lowest byte of 00-7F
including 10 means that the second byte XX-- is taken as the value for the max overtaking counter value
including 20 means that the third byte XX---- is taken as the value for the initial stationary overtakee overtaking counter

In retrospect it is not a very intuitive parameter system, but it seemed like a good idea (and was easy to code) at the time...

You should probably limit yourself to not using more than the lowest byte and not setting bit 6: 20 unless you understand what they do or feel adventurous.

I frankly was not anticipating much user interest in this switch, and did it somewhat quickly, partially as a experiment, to make my road vehicle system work better...
So it's ended up more in a "dev-friendly" format unfortunately.
If nobody can understand it, I can change the switch format around, but I'm not doing that right now, as I've (real :o) work to do...

JGR
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: How to set RV overtaking switch rvovertakeparams

Post by wallyweb »

JGR wrote:I frankly was not anticipating much user interest in this switch, and did it somewhat quickly, partially as a experiment, to make my road vehicle system work better...
So it's ended up more in a "dev-friendly" format unfortunately.
If nobody can understand it, I can change the switch format around, but I'm not doing that right now, as I've (real :o) work to do...
Thanks. It's working now. :D
As for your (real :o) work, only if you can keep your hans off the little demo I cobbled up and stuffed into the attached zip. 8)
The included newgrf configuration file lists the required grf files.
Attachments
RV_overtaking.zip
The attached zip
(85.2 KiB) Downloaded 153 times
Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: No registered users and 19 guests