News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Possibility to seperate the track menu in two menus.

Started by Leartin, March 22, 2015, 01:17:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Leartin

In this case, I'll tell you what I want to do, rather than how I want to do it, since there are surely multiple ways to achieve it.

In pak192.comic, we currently have a track menu and a tram menu. However, while the tram menu and tram depot are quite empty in comparison, the track menu and track depot are quite full. Besides that, we feel like it would make more sense to have light rail and light metro together with trams, and in general rails, bridges and tunnels would look quite differently whether they are on the countryside or in cities.
So we play around with the idea of creating an "ÖPNV"-menu instead of the tram menu, where ÖPNV is öffentlicher Personennahverkehr, the german term for all public vehicles transporting passengers only a short distance.

It is quite easy to change all the vehicles to be tram vehicles, which does not change a thing about them, except they follow another speedbonus and are in another depot. So that's easy.

However, it seems there is no way to seperate ways, tunnels, tracks, signals or stations. So either one includes all of them in a menu, or none.
Three ideas:
1) If everything could have a tram_track subtype, it could probably be seperated by that, even if it works exactly like normal track. However, this seems very strange and counterintuitive.
2) If objects could be defined in the menu, rather than chunks of similar objects (like all track ways), the menus might be created like this. The drawback would be that every new object we include would need it's own entry in the menuconf, and addons would not be included at all (we would create an extra submenu which includes all track items, thus including addons as well)
3) An additional sorting parameter you could use in bunches as well. This would probably be the best, since just adding the attribute "track" and "tram" respectively would be sufficient.

Any other ideas what could be done?

An_dz


Leartin

You could do that for plain ways (actually, I'm not sure you can use custom numbers, but assuming that works), but you can't do it for elevated ways (since they require system-type 1), and tunnels, bridges, signals and stations don't use system_type at all.

An_dz

Ah, but you are requesting too much then. :D

Maybe add a customway that would just serve for organisation purpose, customway would receive any number bigger than 0 and this number would be used in menuconf.tab as a third option. E.g. ways(1,0,1)

Default value would be 0 if value is omitted and on menuconf.tab if not specified as well.

Vehicles would be free to use any track no matter the value of this.

Leartin

I'll use my necromancy powers to state that I'd still like to have more freedom in menu creation.

Recently, I started stealing the p96c harbour concept, in having several ways and other objects using the same concrete floor allowing to build huge docks or logistic centers. But it does not make much sense for these concrete-enclosed streets and railways to be along other streets and railways, since they wouldn't be used in combination with other ways of the same type, but in combination with other concrete-floor objects.

This (newer) thread is about basically the same problem, even though just reduced to trams:
http://forum.simutrans.com/index.php?topic=14815.0

Sorry to bother you, it's just somewhat important to me.

prissi

Nobody stops you to create a menu where you only list the stuff you want to see.

Leartin

Prissi, it's not somebody who stops me, it's something - the code ;)
I reported it as a bug report before, but I read your last answer as if everything is in order and it's just not supposed to work, hence the change to an extension request. Either way, it does not work correctly.

I could create the menu, but every Icon would be visible all the time. If that was true for the "normal" menu, you'd surely consider that a bug, so why should it be different for custom menus?


Bug-Report: http://forum.simutrans.com/index.php?topic=13786.0

An_dz

prissi thought you were talking about adding a button to load another menubar. That's already possible. But I understood you mean to separate some ways.

What Leartin wants is to only show a subset of way X in one menu and the rest in another. Currently this is impossible because the current lines only bulk show all the ways from that type.

ways(16,0) will show all runways. Leartin wants to add some of them in one menu and the rest in another.

prissi

Do not use way(), write down the names by hand. THen you can show whatever you want to show. Or use an unused subtype (like 2) for the ways.