Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Sep 25, 2017 5:02 pm

All times are UTC




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Wed Dec 07, 2005 10:37 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu May 22, 2003 9:59 am
Posts: 2138
I've been experimenting with quite a complex usage of station variable 41 and it doesn't seem to be giving the results I'd expect. According to the description in this thread, TTDPatch sets up virtual "fences" around tiles. However, what I'm seeing doesn't agree with my interpretation of that.

Looking at the attached image, I have built a 5 platform x 7 tile station and then overbuilt a single tile at platform 3 tile 7 (using the numbering scheme from the image). I would expect the lines in red to represent the "fences", with platform 4 tile 1 of the right-hand image "seeing" no difference from before, as it is still the same distance from virtual fences in all four directions. However, from the way that the station is coded, it is clear that platforms 3 to 5 of the right-hand station think that they are in a three-platform station, not the five platforms I expect (and would prefer to see). I would also expect platform 5 tile 7 to think that it was in a 2x7 station but it too thinks that it is in a 3-platform station.

Is this a bug or is the scheme more complicated than I'm thinking?


Attachments:
stationvariable41.png
stationvariable41.png [ 39.67 KiB | Viewed 885 times ]

_________________
US Train Set v0.87.1 now released: viewtopic.php?t=8754
Don't forget to read the manual: http://wiki.ttdpatch.net/tiki-index.php?page=Manual
Top
   
 Post subject:
PostPosted: Wed Dec 07, 2005 11:06 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Oct 02, 2002 6:57 pm
Posts: 5552
Location: Ithaca, New York
The fences are directional, and those of the wrong direction are ignored in the counting. So, looking at tile 7 it looks like this:
Code:
|| = platform
|> = left fence
<| = right fence

|>  ||    ||  |>  || <|  ||     || <|
   1/3    2/3    1/1    2/3    3/3


Var.41 always searches for the closest left and right fences of the right orientation, so platform one counts three platforms to the left left-oriented fence, and is therefore 1/3.

_________________
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.


Top
   
 Post subject:
PostPosted: Thu Dec 08, 2005 5:08 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Oct 02, 2002 6:57 pm
Posts: 5552
Location: Ithaca, New York
Now that I thought about it a bit, it wouldn't be hard to change it such that overbuilding always constructs the fences on the other side too, so that you get
Code:
|>  ||    || <|>  || <|> ||     || <| 
   1/2    2/2    1/1    1/2    2/2

That would change how var.41 works, and it might break MB's newstations (or it might fix them, I don't know). Would that be a good idea?

_________________
Josef Drexler



TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker

No private messages please, you'll only get the answering machine there. Send email instead.


Top
   
 Post subject:
PostPosted: Thu Dec 08, 2005 6:30 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu May 22, 2003 9:59 am
Posts: 2138
Patchman wrote:
Would that be a good idea?
In a few ways it would make more sense, but I'm not sure that it would necessarily help with my situation. What size station would the top-right tile then think it was in? I see several obvious sizes - 2x7, 2x6, 3x6, 5x6 and possibly more.
On a different note, I was going to suggest that tiles "look" orthogonally to find their nearest fences - i.e. they should look in all four directions, which would give the size of the "station" and the tile's position within. I have no idea how hard this would be to do (I tried glancing in the source but it meant absolutely nothing to me) but I think it would make the most sense overall. Again, what this would do to MB's newstations I don't know.

_________________
US Train Set v0.87.1 now released: viewtopic.php?t=8754
Don't forget to read the manual: http://wiki.ttdpatch.net/tiki-index.php?page=Manual


Top
   
 Post subject:
PostPosted: Thu Dec 08, 2005 6:36 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Oct 02, 2002 6:57 pm
Posts: 5552
Location: Ithaca, New York
Oracle wrote:
In a few ways it would make more sense, but I'm not sure that it would necessarily help with my situation. What size station would the top-right tile then think it was in? I see several obvious sizes - 2x7, 2x6, 3x6, 5x6 and possibly more.

Tile 1, platform 5 would see 5x7. Tile 7, platform 5 would see 2x7 (instead of 3x7 as it is now).

Quote:
On a different note, I was going to suggest that tiles "look" orthogonally to find their nearest fences - i.e. they should look in all four directions, which would give the size of the "station" and the tile's position within.

That's what it does now. Only, the fences are perhaps not what one would expect when using overbuilding.

_________________
Josef Drexler



TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker

No private messages please, you'll only get the answering machine there. Send email instead.


Top
   
 Post subject:
PostPosted: Thu Dec 08, 2005 9:31 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu May 22, 2003 9:59 am
Posts: 2138
Hmm. Now I'm confused, I'm afraid. I originally assumed it worked like that and so posted this thread. My observations just don't seem to agree with that scheme.
Looking at the image in the first post, that station is currently coded so that the station building itself only appears on platforms 1 and 2 (counted from the left) of a station with 3 or more platforms. Therefore tile 1 platform 4 of the right-hand station in that image thinks that it is tile 1 on platform 2, not on platform 4 as I would expect. Hence I'm confused.

Sorry for continuing to trouble you...

_________________
US Train Set v0.87.1 now released: viewtopic.php?t=8754
Don't forget to read the manual: http://wiki.ttdpatch.net/tiki-index.php?page=Manual


Top
   
 Post subject:
PostPosted: Thu Dec 08, 2005 9:45 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Oct 02, 2002 6:57 pm
Posts: 5552
Location: Ithaca, New York
Now you're confused me too. If you mean tile 7 platform 4 not tile 1, then in your first post you wrote that this tile thinks it's on platform 2 in a 3x7 station. That's what I wrote above too. Only if my proposed changes are implemented would it think it's on platform 1 of a 2x7 station.

Either way, tile 1 platform 4 should always see itself on platform 4 of a 5x7 station as you write in your first post.

_________________
Josef Drexler



TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker

No private messages please, you'll only get the answering machine there. Send email instead.


Top
   
 Post subject:
PostPosted: Fri Dec 09, 2005 1:13 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu May 22, 2003 9:59 am
Posts: 2138
Sorry about this...

Patchman wrote:
Either way, tile 1 platform 4 should always see itself on platform 4 of a 5x7 station as you write in your first post.
Yes. But my problem is that I'm confident that it doesn't.
I made the attached newstat2.grf last night to test this. If you build a 5 platform x 4 tile (or smaller) "Station 1" (default station class) in the y-direction then it shows the platform number in yellow and the tile number in white, using the numbering scheme from my first post.
"Station 2" is similar except that it shows the total number of platforms (as seen by variable 41) in white (with no number for 5 or more platforms).

Therefore the image shows that, after building the single tile on platform 3 tile 4, platform 3 tile 1 now thinks that it is platform 1 tile 1 of a 3-platform station, which isn't what it should be - i.e. variable 41 seems to be behaving incorrectly.


Attachments:
newstat2.grf [64.5 KiB]
Downloaded 35 times
var41.png
var41.png [ 32.93 KiB | Viewed 742 times ]

_________________
US Train Set v0.87.1 now released: viewtopic.php?t=8754
Don't forget to read the manual: http://wiki.ttdpatch.net/tiki-index.php?page=Manual
Top
   
 Post subject:
PostPosted: Fri Dec 09, 2005 5:16 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Oct 02, 2002 6:57 pm
Posts: 5552
Location: Ithaca, New York
OK, that's a bug. I guess the counting code is not resetting itself to the starting point for each direction. Will check it out.

_________________
Josef Drexler



TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker

No private messages please, you'll only get the answering machine there. Send email instead.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.