Patch: Town road layout

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
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Post by CMircea »

Can you sync this with one of the latest revisions, I want to test this bug on a newer version: http://bugs.openttd.org/task/736
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

Desolator wrote:Can you sync this with one of the latest revisions, I want to test this bug on a newer version: http://bugs.openttd.org/task/736
Done.

I added some behavior regarding the editor mode. Is the popup window ok, or should it not appear? You'll find it if you try to enable the no more roads option during editor mode.
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 708
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can... Almost 20 years and counting!

Post by Digitalfox »

I must say this is a nice patch :)

I hope it get's in trunk :)
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Post by CMircea »

I read somewhere in the forums that it will get in the trunk, it may need some coding style changes, not sure.

EDIT: I compiled it, and when I try to load a saved game (saved with the last version compiled by me) it shows this error:
Attachments
The error I get when trying to load the saved game.
The error I get when trying to load the saved game.
error.png (55.66 KiB) Viewed 3802 times
E.F.R.T., 19th Feb 1928.sav
The saved game.
(148.91 KiB) Downloaded 113 times
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

Desolator wrote:I read somewhere in the forums that it will get in the trunk, it may need some coding style changes, not sure.

EDIT: I compiled it, and when I try to load a saved game (saved with the last version compiled by me) it shows this error:
I can't reproduce this. But I think you saved it with the previous version of the patch and tryed to load it with the current one. So this is impossible cause of the recent savegame bump.
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Post by belugas »

Desolator wrote:... it may need some coding style changes, not sure.
Already working on that part... and the rest too.
Rest assure
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Grall3
Engineer
Engineer
Posts: 43
Joined: 17 Oct 2005 04:59

Post by Grall3 »

Hi there, i got your patch, it worked and i think it is great. But I noticed, and thought I'd tell you, that with your version of open ttd and this road patch, the "transparent buildings" tick menu doesnt work, so you cant use it. Hope this helps. Bye
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

Grall3 wrote:Hi there, i got your patch, it worked and i think it is great. But I noticed, and thought I'd tell you, that with your version of open ttd and this road patch, the "transparent buildings" tick menu doesnt work, so you cant use it. Hope this helps. Bye
Do you use a binary or the patch. Both are a bit old. Binarys a bit more. I'll update the patch again, but I think/hope it'll get in trunk in the near future.

EDIT: Patch Updated
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
TheJosh
Engineer
Engineer
Posts: 75
Joined: 17 Apr 2007 12:19
Contact:

Post by TheJosh »

Perhaps this patch could be somehow incorpriated into my 'Found a Town' patch (which should be in trunk one sometime soonish i hope)

It could be like a GUI for that patch, so that when you click 'Found a Town' (under the town directory button), it pops up with a GUI asking the town road style.
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

TheJosh wrote:Perhaps this patch could be somehow incorpriated into my 'Found a Town' patch (which should be in trunk one sometime soonish i hope)

It could be like a GUI for that patch, so that when you click 'Found a Town' (under the town directory button), it pops up with a GUI asking the town road style.
I'm already working on a town specific layout selection. But that's future. The first part of the patch should be in trunk soon. After that I'll develop and publish the rest. I was thinking of a global and partitial selection. So if the patch option says random they will grow random but if not the specific layout will be used. For default towns it'll be a cheat option to select the custom layout, for your company towns it should be selectable as you say.
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Post by belugas »

It's now in trunk, on revision r9779.
Been nice to work with you, skiddl13 :)
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
White Rabbit
Tycoon
Tycoon
Posts: 1734
Joined: 22 Jun 2005 19:15

Post by White Rabbit »

Why isn't 'no roads' available in the scenario editor?
Image
User avatar
gkirilov
Chief Executive
Chief Executive
Posts: 696
Joined: 03 May 2005 09:32
Location: Othala

Post by gkirilov »

White Rabbit wrote:Why isn't 'no roads' available in the scenario editor?
I think because it makes no sense to have them there.

BTW, one of the best patches EVER to enter the trunk.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
Image
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
knedle
Traffic Manager
Traffic Manager
Posts: 158
Joined: 13 Apr 2007 17:07

Post by knedle »

I think it make a lot of sense if you want to create a city with your own, specific road layout. You can disable roads then and expand city as much as you want.
So please, add no roads to scenario editor. :D
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

knedle wrote:I think it make a lot of sense if you want to create a city with your own, specific road layout. You can disable roads then and expand city as much as you want.
So please, add no roads to scenario editor. :D
It has been a dev request, so I disabled them.

To your own layout:
Its a lot easier to code your own layout now.
Have a look in the vribbed patch. This patch tells you how to add in general a new town layout.
Basicaly the code should be placed in GetTownRoadGridElement() in town_cmd.cpp the rest is only for naming, etc...
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Post by CMircea »

In trunk? COOL! I'll update right away!
knedle
Traffic Manager
Traffic Manager
Posts: 158
Joined: 13 Apr 2007 17:07

Post by knedle »

Hm... I think I have some idea about creating special files with different layout of roads.
This way I can create a lot of different grids and then randomize them to have each city different. :)

EDIT:
Oh, actualy it's possible to disable roads in editor, you just have to start new scenario, save it, start game with it, change options to no roads and then save it as savegame, change extension from .sav to .scn, and load to editor.
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Post by belugas »

I've already started work on something like that.
The random thing, i mean...
As for the loading of layouts, it would be possible through an un-written spech of grf.
Nothing else.
And no support is actually available.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

Referring the random road layouts. I made a small 10 min hack. 8) I'm not sure if the design is the right one (set and reset t->road_layout). Value isn't saved yet. I'll do that if the basic design is better. So only for alpha testing!!! ;)

EDIT:
Updated.
Now it's fully usable
Attachments
screenshot.png
screenshot.png (29.09 KiB) Viewed 2826 times
random_town_layout_r10787.patch
(8.49 KiB) Downloaded 52 times
Last edited by skidd13 on 04 Aug 2007 23:57, edited 1 time in total.
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

I updated the random thing. Now its at a usable state. ;)
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests