[patch] Polyline track building tool

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Polyline track building tool

Post by adf88 »

Building while paused gives you advantage. Even if we call it a cheat, we can't say that every advantage is a cheat. I'm 100% sure that making game interface more efficient doesn't have anything to do with cheating.
:] don't worry, be happy and checkout my patches
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Polyline track building tool

Post by adf88 »

Patch updated
r23663 and 1.1.4

// EDIT
Fixed a bug (placing tunnel in multiplayer caused a crash)
r23677 and 1.1.4
:] don't worry, be happy and checkout my patches
elmaniolo
Engineer
Engineer
Posts: 1
Joined: 18 Apr 2012 07:51

Re: [patch] Polyline track building tool

Post by elmaniolo »

Hi,
I'm sort of addicted to this patch. It doesn't work with new openttd 1.1.2. Would you be so kind and re-write it for new version? Thanks in advance.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Polyline track building tool

Post by adf88 »

Perhaps you are asking about 1.2.X? Try polyline_track_tool_v6_ottd_r23677.diff
:] don't worry, be happy and checkout my patches
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Polyline track building tool

Post by adf88 »

New version (7) is ready. See the first page to download.
:] don't worry, be happy and checkout my patches
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [patch] Polyline track building tool

Post by Honza_ »

Hi, thanks for the new version of this pure awesomeness. The additional blue coloured line is helpful.

Do you know, that when building bridges with ctrl (so the last type of bridge is build instantly), the polyline does not save the end of the bridge, but continues from the point before building the bridge? Normal bridge building works fine, but this might use some improvement :-)
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Polyline track building tool

Post by adf88 »

New version (v8) released. I fixed some issues with glitching graphics and the one with bridges reported by Honza_.

Download from the first page.
:] don't worry, be happy and checkout my patches
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [patch] Polyline track building tool

Post by Honza_ »

What a quick fix. Thank you very much
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [patch] Polyline track building tool

Post by Honza_ »

hi, I discovered another bug I think is related to polyline. When placing dock, station coverage is not displayed when it should be. With other station types, it is ok.
Could you please check it?
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Polyline track building tool

Post by adf88 »

Which patch and which OTTD did you try?

//EDIT
Never mind, I got it. This bug is certainly my fault :cry: .

//EDIT 2
Fixed in version 8b.
:] don't worry, be happy and checkout my patches
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [patch] Polyline track building tool

Post by Honza_ »

hi,
works like a charm. Thanks for update.
I have also some ideas from using your polyline patch.
1. doubleclick is fine, but mostly I use ti accidently and cancel my route. Could you maybe consider making some enable/disable switch for it
2. when I build bridge, I have to drag it. How about make it also poly line style, so when I press 'B' I just mark first tile and after that I can drag it without holding button and mark only end point.

Anyway, I like this polyline very much. It is so friendly for people with mouse hand wrist problem :-)
Any trunk ambitions?
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Polyline track building tool

Post by adf88 »

New version released (8c). I finally found and fixed the nasty bug that was present earlier. Users probably noticed that sometimes only the last piece of track was placed instead of whole line.
Honza_ wrote:doubleclick is fine, but mostly I use ti accidently and cancel my route.?
Try new version and give a feedback. Probably the bug I described before was causing troubles.
adf88 wrote:when I build bridge, I have to drag it. How about make it also poly line style
bridges, tunnels, roads, canals... I'm thinking of them ;)
:] don't worry, be happy and checkout my patches
User avatar
Vaulter
Traffic Manager
Traffic Manager
Posts: 185
Joined: 21 Dec 2004 05:35
Skype: andrey-zaharov
Location: St. Petersburg, Russia
Contact:

Re: [patch] Polyline track building tool

Post by Vaulter »

Heavy conficting in DrawTileSelection with clipboard patch. Previous version was better in this.
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: [patch] Polyline track building tool

Post by Lord Aro »

Why exactly does this concern you? Patches aren't supposed to work with each other...
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: [patch] Polyline track building tool

Post by WWTBAM »

Lord Aro wrote:Why exactly does this concern you? Patches aren't supposed to work with each other...
Perhaps because adf88 is the maintainer of both patches :?:
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Polyline track building tool

Post by adf88 »

Vaulter wrote:Heavy conficting in DrawTileSelection with clipboard patch.
It was always difficult to merge them, that's why I made a mini patch pack with these two patches.
Vaulter wrote:Previous version was better in this.
Previous version differs only by 2 lines :) Maybe you were applying them in reverse order?

Anyway, I'll publish updated mini patch pack soon.
:] don't worry, be happy and checkout my patches
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Polyline track building tool

Post by adf88 »

Done.
:] don't worry, be happy and checkout my patches
_dp_
Transport Coordinator
Transport Coordinator
Posts: 276
Joined: 18 Dec 2013 12:32

Re: [patch] Polyline track building tool

Post by _dp_ »

Hi! I like this patch very much but it feels somewhat incomplete, so I have some suggestions.
1. Remove double-click reset. It is really annoying when building fast. Also it is counter-intuitive with that new blue highlight (it should build both segments). And there is no need for finishing line thing, coz it's not always clear when to finish it.
2. But it is alway clear when to start a new line, so there should be some way to do it. IMO just adding separate hotkey for that is fine, I would use it like A - polyrail, CTRL+A - new polyrail line. Autorail in this case is not needed at all.
3. Allow building over already built tracks instead of throwing an error (it is not really building, just switching starting point)
4. When encountered a tunnel/bridge move starting point to other end of bridge. So it would be possible to build bridge first and then build line before and after it with just 2 clicks. (1 click is even better but, I guees, that's not very possible)
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Polyline track building tool

Post by adf88 »

Ad. 1 and 2) Actually it's the hardest task to me to design a consistent, easy to use and comfortable set of rules. Autorail must stay under the A key, it cannot be changed. Otherwise people would shout "where the hell autorail gone!!!". I'm opened on suggestions. Have on mind that some people don't use hotkeys at all (especially on tablets). I was considering following solutions:
  • Current. I think it's quite straight, simple and coherent. When I want to start a new polyline, I press A (autorail), build the first segment and then press Ctrl+A to build following segments. The first segment is specific because you must pick booth ends of it - like in autorail. Thus activating the autorail tool to build the first segment of a polyline is quite logical. This is straightforward: A - place a segmant, CTRL+A - connect a segment.
  • The double click is problematic, I know. From one hand it allows you to easily finish a polyline (e.g. if you don't use hotkeys) but from the other hand it can be triggered accidentally. I'm not sure what to do. Leave? Remove? Make it customizable (new setting)?
  • New setting - what rail tool to use - classic autorail style or polyrail style. Classic autorail style would be by default. With polyrail style, hotkeys would work like you suggested: A - start a new polyline, Ctrl+A - connect another segment. I'm opposed to this idea because it doesn't differ much from current solution and it would "hide" the new feature (polyline) behind settings.
  • New hotkey. :S I don't like this idea. Too many hotkeys. People wouldn't know about it anyway. Besides, which key would it be?
Ad. 3) Yeah, you're right. Adding to my TODO list.

Ad. 4) Sounds interesting ... but the tool can't be too smart. It cannot make arbitrary decisions. Players would mostly like it, but not always. Instead of moving the node, a new node could be added so you can choose one or another end of the bridge. I'll think on this.
:] don't worry, be happy and checkout my patches
_dp_
Transport Coordinator
Transport Coordinator
Posts: 276
Joined: 18 Dec 2013 12:32

Re: [patch] Polyline track building tool

Post by _dp_ »

Hi,
I made 1 and 2 myself and, well, 2 definitely needs more thought, mb it will be beteer with 3. But 1 is simply great so at least do a way to disable it.
As for 4... sounds ok to me since in that particular case it will be exactly same. But, you know, sometimes it can be even more annoying when tool can't make an obvious decision. Actually I'm still not sure if I like having multiple starting points at all or not. Sometimes it seems handy but sometimes definitely not. Like when I place segment with autorail and then can't remove it with polyrail (in one click). It just jumps from one end to other.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 7 guests