Page 1 of 8

Distant-join-stations (in trunk)

Posted: 15 Mar 2007 15:02
by Frostregen
This is the "Adjacent & Distant Join" Patch from Mini-IN,
ported to trunk, and ripped out "adjacent stations".
(Ok... it is nearly a whole rewrite)

Maybe this has a greater chance of moving into trunk,
as it does not change any game mechanics (like adjacent stations did).

Short introduction of usage:
CTRL not pressed: Same station-placement behavior like always.
CTRL pressed:
-no station around(station-spread radius): no popup
-touching other station: no popup
-touching more than 1 station: no popup (will fail to build anyway)
-1 or more stations around, not touching any station: display popup

Bug reports and coding/style hints are welcome.

Credits to Wolf01 for the idea.

bye,
Frostregen

Look for the latest posts in this thread for the most recent version,
as i do not update this patch anymore.

Good idea

Posted: 15 Mar 2007 19:05
by maquinista
I think that this is very useful. I have waited this patch.

Posted: 15 Mar 2007 21:41
by Bot_40
Does it pop up every time you build a station? I think it should only pop up when ctrl is pressed.

Posted: 16 Mar 2007 10:47
by Frostregen
Try using it in a real game.
I don't think it is disturbing.

If the stations would automatically join before (=touching borders), they will automatically join now too.
It pops up, if the station is further away than 1 tile, and within range of "patches->station_spread".

I don't think a special key is needed to activate this functionality.
(Maybe this will be a patch setting, tho)

Posted: 16 Mar 2007 11:11
by charlymorton
Wouldn't it be better if it popped up when there is another station within the catchment area of the new station?

Let's say I have a medium sized town where I want to build an extensive bus network, and the station spread was set to a relative high number e.g. 30, then this box would pop up for every single bus stop I build in this town, even if I build the bus stops at opposite ends of the town.

Posted: 16 Mar 2007 14:38
by Bot_40
It's just that the majority of the time I'd still want to build separate stations, so it's just one extra click. And it could be removed by changing it to ctrl+click.

Also, the devs don't tend to like the standard behaviour to be changed much, as could be seen with the custom face patch fiasco. I'd be surprised if they wanted to include it in the trunk without it being changed to ctrl-click. Just my 2 pence.

Posted: 16 Mar 2007 17:05
by Rubidium
Bot_40 wrote:as could be seen with the custom face patch fiasco
The problem with that ithe savegame wouldn't be compatible anymore; when loading an old savegame you would get another 'random' face, whereas it just should have converted the old face format to the new format.
This is the single most important issue remaining for the patch to be merged. All other issues were already resolved.

And on-topic, I think that the more advanced features like distant joining shouldn't be turned on by default, thus when you click CTRL the window should show up. On the other hand I'm not sure whether you want to join stations over such a large distance.

Secondly from the comment Frostregen made about the distance being the station spread; the whole new station should stay within that station spread; don't know whether it checks for that though; I have not tested it though.

About FindStationsNearby, take a look at CircularTileSearch.

Posted: 16 Mar 2007 21:10
by Frostregen
Ok ok, ctrl+click ;)

"CircularTileSearch" sounds good, i'll take a look.
EDIT: Does not work, since FindStationsNearby "circles" around the newly placed station-area, which is mostly not just 1 tile+quadratic.

Posted: 17 Mar 2007 12:04
by fabca2
Rubidium wrote:The problem with that ithe savegame wouldn't be compatible anymore
I understant, but it not like version is 1.0
I mean, it's not mal to break compatibility, and it's always best to do it on version 0.5 than 1.0

Can you imagine in year 2011 (at version 1.3 ?) someone ask "wtf, why this is like that?!", someone answer "yes, it was to keep compatibility between 0.5 and 0.6 four year ago"....

Posted: 17 Mar 2007 12:40
by prissi
If you are using windows, you are in no position to say so. I have programs, that still run using Win 3.11 interface (although a 32 Bit compiler). Same for nearly all WindowNT for Intel programs.

If you really annoy everybody by breaking compatibility, it must be a very good reason. Just a new face is certainly not.

Posted: 17 Mar 2007 16:16
by Archonix
Ahh, well that opens a whole other kettle of fish. Sometimes you need to break compatibility in order to introduce features or you run the risk of ending up with reams of checking code that, as with the code in windows, introduces the potential for a great many bugs.

Posted: 17 Mar 2007 20:09
by Rubidium
Archonix wrote:Ahh, well that opens a whole other kettle of fish. Sometimes you need to break compatibility in order to introduce features or you run the risk of ending up with reams of checking code that, as with the code in windows, introduces the potential for a great many bugs.
I disagree with you. Savegame compatability isn't a limiting factor for new features. We can rewrite the whole savegame format if we like, we only need to make sure that the old savegames are read properly. There is no need to write thousands of exceptions within the core code for this because all the old savegames are automatically conveerted to the current format.

Posted: 21 Mar 2007 16:58
by MJS
If anyone has a version that compiles this with a recent trunk nightly (which would include NewHouses), I think many people would be grateful.

Posted: 21 Mar 2007 17:12
by Sug
The patch above worked perfectly on mine (r9388)

Posted: 21 Mar 2007 19:25
by MJS
Ah. Sorry, my mistake - used the wrong tense. I meant to ask whether anyone had a ready-made version that has been compiled - there's quite a lot of people that don't know yet how to compile...

Posted: 21 Mar 2007 22:29
by fabca2
prissi wrote:If you really annoy everybody by breaking compatibility, it must be a very good reason. Just a new face is certainly not.
it was a general remark, I didn't speak about "new face".

Distant join station, looks a little bit more interresting to my eyes...

Posted: 27 Mar 2007 21:42
by Xkeeper
It's like station walking except for lazy people.

Posted: 28 Mar 2007 16:29
by Wolf01
Xkeeper wrote:It's like station walking except for lazy people.
but walking (with a station eheh) across a city is not that simple thing ;)

Posted: 30 Apr 2007 20:35
by ColdIce
I can`t make this to work! I`ve downloaded OTTD-win32-MiniIN-r8928-MiniIN.zip and when I`m playing arround it doesn`t pop-up any window! Please help me! Thank you

Posted: 30 Apr 2007 20:43
by Wolf01
try keeping pressed CTRL when placing a station, when you release the mouse button, instead of place the station it should ask you to which station you want to attach the new piece