Patch: Cities

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

Post Reply
TheJosh
Engineer
Engineer
Posts: 75
Joined: 17 Apr 2007 12:19
Contact:

Patch: Cities

Post by TheJosh »

This patch is now in Trunk

Hey,

I have created a patch that makes a user-definable number of 'cities', towns with large populations. You can also customize how much larger the cities is (by a multiplier)

I have tested this patch and it appears to work quite well.

This patch has been compiled against the latest nightly I could find. (rev 9666)

Could this patch please be considered for integration with OpenTTD?

Josh


Edit:
v2
Just put up the latest version of the patch, fixes an issue with towns that are 64x64.
Now, if the number of towns is less than or equal to 2, no cites will be created.
If the number of towns is less than or equal to 4, only one city will be created.

v3
Merged with some other city work
Attachments
cities.3.patch
The very latest version of the patch
(11.52 KiB) Downloaded 224 times
Last edited by TheJosh on 18 Apr 2007 14:28, edited 5 times in total.
User avatar
Ben_K
Tycoon
Tycoon
Posts: 1166
Joined: 01 Jun 2006 15:15
Location: Sydney, AUS

Re: Patch: Cities

Post by Ben_K »

TheJosh wrote:Could this patch please be considered for integration with OpenTTD?
I think you have to submit it for review somewhere... maybe through the flyspray bug-reporting system but Im not entirely sure.

Welcome to the forum. :)
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7597
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

The best way is to get on #OpenTTD and poke the developers! I've seen it done before! :P
Image
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1796
Joined: 30 Mar 2005 09:43

Post by peter1138 »

Hmm, but isn't the availability of larger towns already specified by that 1 in x patch option?
He's like, some kind of OpenTTD developer.
TheJosh
Engineer
Engineer
Posts: 75
Joined: 17 Apr 2007 12:19
Contact:

Post by TheJosh »

This patch creates a number of large towns at level generation time.

Also, i have discovered a bug, I recommend you don't try this on a 64x64 town, with a 'number of cities' set to something above 1...

I will release a version in a few hours that fixes that problem.

Here is a screenshot, notice the three towns with larger populations, yet it is only 1950
Attachments
Screenshot showing three large towns even though it is only 1950. As you can also see, the number of cities, and how much bigger they are is all customizable.
Screenshot showing three large towns even though it is only 1950. As you can also see, the number of cities, and how much bigger they are is all customizable.
cities_patch_screenshot.png (32.6 KiB) Viewed 6879 times
TheJosh
Engineer
Engineer
Posts: 75
Joined: 17 Apr 2007 12:19
Contact:

Post by TheJosh »

Just did an update to fix a few bugs I found, see the first post for the latest version. have fun hacking your source to get rid of v1!
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Post by boekabart »

TheJosh wrote:Just did an update to fix a few bugs I found, see the first post for the latest version. have fun hacking your source to get rid of v1!
That's what the SVN REVERT command was invented for :)
TheJosh
Engineer
Engineer
Posts: 75
Joined: 17 Apr 2007 12:19
Contact:

Post by TheJosh »

Did some more work.
Attachments
cities.3.patch
version 3 (latest)
(11.52 KiB) Downloaded 181 times
TheJosh
Engineer
Engineer
Posts: 75
Joined: 17 Apr 2007 12:19
Contact:

Post by TheJosh »

Now in Trunk, thanks to Maedhros. (after 2 days...)
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Post by boekabart »

After 4 posts you've worked a patch into trunk? How much did you DONATE??? ;)
DeletedUser21
Tycoon
Tycoon
Posts: 11501
Joined: 20 Sep 2004 22:45

Post by DeletedUser21 »

Ooh ooh ooh! Do another one TheJosh there is a big list in the suggestions thread somewhere! :mrgreen:

We might pay you! :mrgreen:
xmart2k
Engineer
Engineer
Posts: 91
Joined: 04 May 2006 07:36
Contact:

Post by xmart2k »

try the idea for a new subsidiaries patch :))))
User avatar
Ben_K
Tycoon
Tycoon
Posts: 1166
Joined: 01 Jun 2006 15:15
Location: Sydney, AUS

Post by Ben_K »

Josh, well done! And only a handful of posts! Keep up this record and you'll be everyones new best friend! ;)
Great work.

I assume Josh got this in through good coding and also, the fact that he has done so many changes in the few days. It shows enthusiasm and I personally think that is a vital attribute! 8)
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 1 guest