Skip to main content
Topic: [idea] Auto signal building (Read 37156 times) previous topic - next topic

[idea] Auto signal building

In OpenTTD you can drag when building signals in order to create more than one signal (http://wiki.openttd.org/wiki/index.php/Drag_signal_density). I think simutrans is worth of this feature to ;)

But how to realise it? My suggestion is the following: If you use the signal tool and dragging the cursor, several signals will be built along the route. If you release the cursor, a little dialog will pop up and you can entry, that you want a signal each 3 tiles, e.g.

What do you think about it?

Re: [idea] Auto signal building

Reply #1
This seems like a good idea :-)
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.


Re: [idea] Auto signal building

Reply #3
How do you think about the dialog to set up the 'signal density'?

Re: [idea] Auto signal building

Reply #4
I think this is a great idea, and I think a pop-up window with the signal density is probably the way to go with it.

It might also be an good idea to have the desired signal type in this pop-up window (e.g. presignal, one-way etc, and maybe also which direction one-way signals should point)

Re: [idea] Auto signal building

Reply #5
This idea is a very good one, although it is not very practicable.... If you use pak128 on a normal screen resolution (1024x768), not very much tiles will be on your screen at once. And then this tool is not very usefull, because you can't get many tiles....
But in addition to auto-mouse scrolling, this might be usefull....

Re: [idea] Auto signal building

Reply #6
Of course you could always zoom out...
  
***** PAK128 Dev Team - semi-retired*****

Re: [idea] Auto signal building

Reply #7
yes!is very useful when in opentt

Re: [idea] Auto signal building

Reply #8
what about auto scrolling in general?
has this been suggested before (I think so...^^)?
was it rejected? why?

Re: [idea] Auto signal building

Reply #9
Auto-scrolling is better than acutal system, first it would free the right mouse button so it could be used for other things. For example, selecting a tile with both train, station, signal, currently we have to click several times to have the good window. Two mouse buttons could fix that.

Re: [idea] Auto signal building

Reply #10
[offtopic]
Sigh:
Does someone actually just look into the simuconf.tab. This game is highly customizable since ages.
Code: [Select]
only_single_info = 0
will open all info windows at once.
 [/offtopic]

Re: [idea] Auto signal building

Reply #11
so what to say about autoscrolling with the mouse?


Re: [idea] Auto signal building

Reply #13
When I change to

only_single_info = 0 in my simuconf.tab and try it in the situation you describe, I get all 3 info windows: vehicle, signal and way - all with just one click, just like prissi said...
  
***** PAK128 Dev Team - semi-retired*****


Re: [idea] Auto signal building

Reply #15
And how does the program decide which you want? I know, yes, normally the order is fixed, so you know what will open, but...

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Re: [idea] Auto signal building

Reply #16
So you only want the order of the window different when they are opened with only_single_info=1, correct?

I don't think that this would require having a different function for the right mouse button or autoscrolling implemented (even though these maybe useful features as of themselves - but probably not needed for what you want)
  
***** PAK128 Dev Team - semi-retired*****

Re: [idea] Auto signal building

Reply #17
Maybe an immediate window allowing for selection of the object, based on images? My friend did that in a project and received a good mark for "innovative interface".

Seriously... there is 1) what prissi mentioned, then 2) you can close windows downwards with Escape which is faster than clicking.

And this topic is now more than 50% offtopic :D

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Re: [idea] Auto signal building

Reply #18
Now, a first version of the auto signal build patch is finished. If you drag with the signal tool, many signals will be created.

Currently, a signal is placed every 2 straight (or 4 curved) tiles, but this can be adopted (easily) in the source code. Maybe this should be adjustable via a gui?

Feel free to find bugs.

Re: [idea] Auto signal building

Reply #19
Yes, should definitely be adjustable via the GUI.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: [idea] Auto signal building

Reply #20
how does it choose the direction of the signals?

and i don't quite like dragging, i suggest something like
click -> normal signal
CTRL+click -> start; click -> end for multiple signals

Re: [idea] Auto signal building

Reply #21
With dragging you know the tile you came from => direction is know.

But I think an UI is required to select the spacing.

Re: [idea] Auto signal building

Reply #22
Can I place the GUI-cl**** directly in the wkz_roadsign_t cl****? It's better to place it in gui/, isn't it?

Re: [idea] Auto signal building

Reply #23
All gui should go into gui ...

Re: [idea] Auto signal building

Reply #24
Good.
One problem.
I cant build on elevated track or monorail track.
I tested these, and all of them didn't success.
- Normal elevated track
- Elevated track on road
- Elevated track on track

Can you support elevated track or monorail track with holding CTRL key ?

Re: [idea] Auto signal building

Reply #25
Thank you, z9999. The new version allows placing signs with ctrl (like the old behaviour). GUI isn't included yet.

Re: [idea] Auto signal building

Reply #26
Thank you, it works now.
This is not a bug report but a question, both behavior on screenshot is intended ?
- Upper track: it will stop at roadsign
- Lower track: roadsign was removed

I'm not sure how it should behave.

Re: [idea] Auto signal building

Reply #27
Currently, signals on intermediate tiles are removed. Is this ok?

Maybe we should also replace signals, when the existing sign is different?

Re: [idea] Auto signal building

Reply #28
Now with a little GUI.

"remove intermediate signals" will remove all signals on tiles, where no new signal is placed.
"replace other signals" will replace other signals on tiles, where new signals are placed (otherwise it would stop at such tiles).

Re: [idea] Auto signal building

Reply #29
Aha - GUI! Looking most promising.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: [idea] Auto signal building

Reply #30
I compiled with gcc.exe (GCC) 3.4.5, and strange thing happened.
Some text on window was disappeared.


Re: [idea] Auto signal building

Reply #31
Ups, I inserted a "return" into the drawing routine of the new world dialogue, in order to see what happens there. And I didn't remove it before posting...

Edit:
I think, I will mark the track, on which signals will be build, red. Therewith players can see the effect of the spacing.

Edit2:
I've looked in the code and I think it's difficult to mark ways red. Maybe we place a little bulldozer on each affected way? But this isn't consistent with the usage of the bulldozer in other situations. Any idea? [Implementation details: place the marks in set_values() and remove then in cleanup()]

Re: [idea] Auto signal building

Reply #32
maybe, you can mark the tiles? so a cursor fram is shown on each tile, where a signal is built? Like for instance the station coverage is shown when building new station buildings.
Parsley, sage, rosemary, and maggikraut.

Re: [idea] Auto signal building

Reply #33
Now a little "bauigel" is drawn on every tile.

(Marking doesn't work nice, since the flag grund_t::marked is removed, when touching the tile with the cursor, and grund_besch_t::marker doesn't contain the border as one image.)

Edit:
Now also CTRL+click is supported (as fabio suggested).

 

Re: [idea] Auto signal building

Reply #34
nice!
but what about the marker used for station coverage??

EDIT:
and what about using the signal cursor instead of the bulldozer?

EDIT2:
Now also CTRL+click is supported (as fabio suggested).
thank you, dragging is fine, but it is not very laptop-friendly...