Patch: Shape Towns

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
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: Patch: Shape Towns

Post by Roest »

zypa wrote:The patch is quite cool.
But i do not like the max 25 tiles limit. Is there a way to allow bigger cities?
The idea was to prevent towns growing into huge sprawls. A radius of 25 is already very big but of course i can increase it.
User avatar
mph
Engineer
Engineer
Posts: 124
Joined: 24 Aug 2007 20:47

Re: Patch: Shape Towns

Post by mph »

I really like it, in particular in conjunction with towns build no roads as it can prevent towns from expanding along a long road. In one game i had a large town connected by a road to another town on the other side of the map, and in the end many of the new buildings in the second town were actually part of the first. However, the option of how big towns should be able to grow should be totally controllable be the user, as i suppose this is really the purpose of the patch. I still want to be able to have massive cities, but not all of them.
previously known as daylight
zypa
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 30 Mar 2006 12:05
Location: Germany
Contact:

Re: Patch: Shape Towns

Post by zypa »

Roest wrote:
zypa wrote:The patch is quite cool.
But i do not like the max 25 tiles limit. Is there a way to allow bigger cities?
The idea was to prevent towns growing into huge sprawls. A radius of 25 is already very big but of course i can increase it.
That would be really great. I do not really know why there is a hardcoded limit. Some people may not like big sprawls, they can set th limit to 10 tiles, if people like huge sprawls, they can set the limit to xx tiles.
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: Patch: Shape Towns

Post by Roest »

It's 255 in the latest patch pack.
zypa
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 30 Mar 2006 12:05
Location: Germany
Contact:

Re: Patch: Shape Towns

Post by zypa »

Thank you very much! :bow:
User avatar
jacke
Director
Director
Posts: 533
Joined: 19 May 2002 14:47
Location: Sweden

Re: Patch: Shape Towns

Post by jacke »

Thanks a lot for this great patch! :)
Any plans on updating it for 0.6.1 or current trunk, though?
Bazhosh
Engineer
Engineer
Posts: 10
Joined: 02 Oct 2007 23:15
Location: Germany
Contact:

Re: Patch: Shape Towns

Post by Bazhosh »

Hi!

I updated this patch to the current rev. 14996.

Since this is the first patch I've created, I can't make any guarantees that it is working correctly! ;-)

It lacks this change of the original patch.
Dont know where to put it...

Code: Select all

Index: src/openttd.cpp
===================================================================
--- src/openttd.cpp	(revision 12737)
+++ src/openttd.cpp	(working copy)
@@ -2478,6 +2478,16 @@
 			}
 		}
 	}
+	/* 
+	 * Shape Town patch, towns without a max_radius get 100 assigned,
+	 * which should be more than enough
+	 */
+	if (CheckSavegameVersion(94)) {
+		Town *t;
+		FOR_ALL_TOWNS(t) {
+			t->max_radius = 100;
+		}
+	}
 
 	return InitializeWindowsAndCaches();
 }
Attachments
shapetown-14996.patch
(20.79 KiB) Downloaded 79 times
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2874
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Patch: Shape Towns

Post by ChillCore »

I believe everything concerning loading and saving can be found in the saveload folder as of r14828.
There are not too many files there, you should find it fast enough.

While updating another patch lately myself, the stuff from openttd.cpp went to afterload.cpp.
In your case it could be another file.

Good luck and happy patching.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
jacke
Director
Director
Posts: 533
Joined: 19 May 2002 14:47
Location: Sweden

Re: Patch: Shape Towns

Post by jacke »

Great job Bazhosh! I will try your patch as soon as I get some spare time...
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests