The International Simutrans Forum

Development => Extension Requests => Topic started by: An_dz on March 08, 2012, 05:37:50 PM

Title: More cityroad graphics at same time
Post by: An_dz on March 08, 2012, 05:37:50 PM
I'm creating a city and I want some streets with cobblestone rather the normal asphalt, for the old city area.

But I can't make it act like a cityroad, have sidewalk and max speed of 55km/h. Is there any way to do this?
Title: Re: More cityroad graphics at same time
Post by: Fabio on March 08, 2012, 06:10:57 PM
(short answer:
not really, you can include the sidewalk in the road graphics -- as I did with mine -- but the city will reclaim it back; or you could paint it as a way-object)

I'm moving this to Extension Request, as it's something I wanted to request for long time.

There should be an entry in DATs
Is_City_Road = 1

If you set it to 1 the city won't take over this road (and gets the sidewalk instead).
This could be exploited with addons, but in official paksets the maintainers will take care these special roads won't have excessive speed.
Title: Re: More cityroad graphics at same time
Post by: prissi on March 08, 2012, 08:22:13 PM
Alternatively one could use ways with owner=public_player, that could stay. But then, of course, building stops on them would be forbidden too.
Title: Re: More cityroad graphics at same time
Post by: An_dz on March 08, 2012, 08:35:53 PM
I think it's easier have them listed in the simuconf.tab as we already do to set the cityroads for different dates.
This way the game just check if that road is listed there and don't overwrite, just add sidewalks and set the max speed.

Here's how it should work:
Simuconf.tab:
city_road[0]=asphalt_road,1960
city_road[1]=cobblestone_road,1900,1960
city_road[2]=stone_road,1,1900
city_road[3]=blackasphalt_road,1960

And then add something in menuconf.tab to show all of them in the Map Editor Settings:
toolbar[11][17]=city_roads
With this way the game should behave like this:
Till 1900 it's gonna use the stone_road. From 1900 to 1960 it will use cobblestone_road, and from 1960 and beyond it will use the asphalt_road.

The blackasphalt_road won't be used when generating cities, because there's another road with a smaller number in the brackets that is used inside its date of usage. So this string is just to let the game know this road type won't be replaced and to show in the Map Editor options only from 1960 and beyond.

Edit: Also keep all cityroad options in Map Editor, even if the date have finished.
Title: Re: More cityroad graphics at same time
Post by: Isaac Eiland-Hall on March 09, 2012, 06:16:17 AM
Quote from: prissi on March 08, 2012, 08:22:13 PM
Alternatively one could use ways with owner=public_player, that could stay. But then, of course, building stops on them would be forbidden too.

Erm... Is this something set in the .dat or are you saying roads built/upgraded/downgraded by public player are left alone by the city?

I guess either way I need to experiment. This might solve freeways in cities if so. :D