News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

public_service toolbar: Wrong city road (tested only in pak128)

Started by Isaac Eiland-Hall, July 31, 2010, 02:19:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Isaac Eiland-Hall

In pak128, I changed cityroad in simuconf, which did work - cities used that road type.

But when choosing city road from the toolbar as public_service, it uses the original city road.

Can anyone else confirm this? Especially for a different pak?

caspercom

Currently testing for pak64 and pak128, hang on a second.


EDIT 1: confirmed in pak64, changed the standard city road in \simutrans\pak\config\simuconf.tab to gavel_road, map editing tools still shows the standard city road.

EDIT 2: confirmed in pak128 as well, using the same change as in pak64.


Seems like this option should be edited using menuconf.tab instead of simuconf.tab. Maybe worth trying? Or is it impossible to do it that way?

Dwachs

This does not work properly, thats true. The cityroad tool does not take into account time line yet.
Parsley, sage, rosemary, and maggikraut.

caspercom

Quote from: Dwachs on July 31, 2010, 03:01:32 PM
The cityroad tool does not take into account time line yet.

You mean the setting in simuconf.tab? Or is there a change in the cityroad when playing with the timeline? I never use the timeline, so please, enlighten me. ;)

Dwachs

Quote from: Caspercom on July 31, 2010, 03:05:39 PM
You mean the setting in simuconf.tab?
I mean the setting in simuconf.tab.

The city-road tool is configured in menuconf.tab. Its parameter is 'city_road' or whatever, and it uses this road all the time.

What would you (and all others) suggest? How should an entry in menuconf.tab look like to be used as proper cityroad?
Parsley, sage, rosemary, and maggikraut.

Zeno

I would suggest to configure this option either with a fixed road type (e.g. "gravel_road") and the game would use that type for all city roads, no matter the timeline. Additionally, a value of "timeline" could be also accepted when 1) a proper city road timeline is available and 2) the game supports this feature. As alternative to a city road timeline could be to use best road available up to 50 km/h.

caspercom

Quote from: Zeno on July 31, 2010, 03:21:21 PM
with a fixed road type (e.g. "gravel_road") and the game would use that type for all city roads, no matter the timeline.
That's pretty much the situation now. There's an entry in menuconf.tab wich can be changed into any road you want and that road will then be used as the option in map editing.
toolbar[10][5]=general_tool[14],25,,city_road
That's the one. You can change city_road to anything else to change the function of the button in the map editing toolbar. Now to figure out how to find the proper icon as well, as it needs to be changed manually (the "25" is a city road icon included in the main paksets.).

Quote from: Zeno on July 31, 2010, 03:21:21 PM
Additionally, a value of "timeline" could be also accepted when 1) a proper city road timeline is available and 2) the game supports this feature. As alternative to a city road timeline could be to use best road available up to 50 km/h.
That's a pretty good idea. Making a timeline of city roads and implementing change of the standard cityroad into simutrans. Just an idea, but It'd be great if the old cityroads would be automatically upgraded as well.


My own idea was, to improve the current situation: Make the cityroad value in simuconf.tab a variable and insert this variable into menuconf.tab. This would mean you only had to change simuconf.tab if you wanted a different standard cityroad. (I don't know if this is possible tough...)

Isaac Eiland-Hall

While we're on the topic - this became noticeable to me after a relatively recent (and nice) change regarding the cityroad tool: Laying roads now checks for sidewalks.

What I find interesting:

1. If you lay down cityroad on top of non-cityroad, and either a) the cityroad is faster or 2) you force via control, then sidewalk is added underneath. (really really nice IMHO)

2. If you lay down non-cityroad on top of cityroad per the above, sidewalk is *removed*, also cool.

3. Possibly unintended, but is still fine: If you lay down the same type of road as cityroad, but from the regular road toolbar, it will not remove the sidewalk. Again, not a problem, though. :)

Is it possible some logic could be added to the code that checks for the sidewalk addition or removal that changes the type of road then to match the cityroad type?

Dwachs

Quote
Is it possible some logic could be added to the code that checks for the sidewalk addition or removal that changes the type of road then to match the cityroad type?
I do not understand, what you are asking for. You want to change road type under which circumstances?
Parsley, sage, rosemary, and maggikraut.

Isaac Eiland-Hall

Well, not "asking for" as much as suggesting an idea. :)

The impression I got from above conversation (perhaps I misunderstood) is that it might be difficult to change the cityroad toolbar tool so that it works with a changed cityroad. If that's true, I was thinking that perhaps the code that detects sidewalks could also detect which type of cityroad was in simuconf, and adjust the road accordingly.

In re-reading the thread, perhaps I somehow misunderstood, because now that I reread it, it's sounding more like the cityroad tool might support timeline, and that might solve the issue. So my idea may be superfluous; and if so, please ignore. :)

Dwachs

In the nighlies, city-road timeline support also works for building city-roads.

There is a new general_tool[36] that can be used to define the tool 'build cityroad', no default-parameter required.

The old way of specifying city-roads was

...=general_tool[14],*,*,city_road

This entry in menuconf.tab is still valid, but will be internally changed to the new tool. Ie defining
general_tool[14],*,*,city_road
and
general_tool[36],*,*
is equivalent.
Parsley, sage, rosemary, and maggikraut.

prissi

This fails with pak-sets, where their city_road is not called "city_road" or uses the city road explicitely in their menu (I think pa96 does this). Thus I would suggest to keep tool 14 as it was and require the pak set to use tool 36 if it really want to built the current city road.

Dwachs

Parsley, sage, rosemary, and maggikraut.

prissi

It will fail insofar, that the timelined city road will be built instead an explicite requested one. It will not crash.

The same would occur, if the "city_road" has an icon and thus is found by the waybuilder. If, at a certain stage, a different road is selected by get_city road(), "city_road" cannot be built anymore, even though it has Icon and cursor ...

Dwachs

Quote from: prissi on August 10, 2010, 08:40:27 AM
It will fail insofar, that the timelined city road will be built instead an explicite requested one. It will not crash.
Yes, but a warning is issued if the tool is changed upon loading menuconf.tab
Quote
The same would occur, if the "city_road" has an icon and thus is found by the waybuilder.
Such a tool will never be replaced by the city road tool
Quote
If, at a certain stage, a different road is selected by get_city road(), "city_road" cannot be built anymore, even though it has Icon and cursor ...
I cannot follow here.

Edit: tested now with pak96 (set two different city roads), no bugs.
Parsley, sage, rosemary, and maggikraut.