feature/patch: adjust number of towns more directly

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
tecxx
Engineer
Engineer
Posts: 106
Joined: 23 Jun 2003 19:31
Location: Tirol/Austria
Contact:

feature/patch: adjust number of towns more directly

Post by tecxx »

Hello,

i've written a small patch that allows you to choose the number of towns more exactly than the current model (low,normal,high).

see the screenshot....

so in a 8*8 map a setting of 1 results in ONE town, a setting of 10 results in 10 towns, etc...

in 10*10 maps the number is stretched like the currently used system. a setting of 1 will be about 8 towns then, a setting of 11 results in about 200 towns.

please tell me what you think, if you like it i'll upload the patch file.
Attachments
numtowns.JPG
numtowns.JPG (117.08 KiB) Viewed 4482 times
User avatar
Arsenal
Traffic Manager
Traffic Manager
Posts: 227
Joined: 06 Jan 2004 21:25

Post by Arsenal »

You should do the same for industries as well, as it suffers from the same problem as towns on big maps.

Any chance of being more specific on industries by the way? eg for every 10 coal mines, there is 1 power station, 4 farms = 1 factory, 6 forests = 1 sawmill, 12 iron ores = 1 steelmill, 3 steel mills = 1 factory.

It it silly when I have a map with more power stations than there are coal mines.

Numbers are merely suggestions
tecxx
Engineer
Engineer
Posts: 106
Joined: 23 Jun 2003 19:31
Location: Tirol/Austria
Contact:

Post by tecxx »

i digged through the code today, and found out that industries are placed on the map via some very strange ammount/type tables, which are multiplied by another very strange "low/normal/high" table. the result is then sent through the function which stretches the ammount based on the map size (same as the town placement). so just modifying some values like i did with the numtowns patch won't do it,

but if there is the demand, i could rewrite the WHOLE thing, including a gui window, to let you choose the ammount of industries on an industry type basis (like you suggested). however i would need some support because i'm not sure how to create gui's in the openttd code yet.

in the meantime, i've attached the compiled exe file (latest svn+my changes) and the modified lang files, so you can test it.
Attachments
english.zip
modified english lang file for numtowns patch
(61.74 KiB) Downloaded 278 times
openttd_numtowns.zip
openttd rev1881 + numtowns patch
(405.56 KiB) Downloaded 302 times
User avatar
Arsenal
Traffic Manager
Traffic Manager
Posts: 227
Joined: 06 Jan 2004 21:25

Post by Arsenal »

Will this work with svn r1883?

If so, I'll download it and test it.
User avatar
Arsenal
Traffic Manager
Traffic Manager
Posts: 227
Joined: 06 Jan 2004 21:25

Post by Arsenal »

Had a go with this.

:shock: :shock:

Unbelievably difficult when towns = 1, industries = none and map size 8x9 or greater.
The towns are small (pop between 50-500) to begin with, and it took me all of 26 years to repay a £500,000 loan on a 10x10 map. :shock: :shock:

Have a go with settings I suggested. You'll be shocked!
tecxx
Engineer
Engineer
Posts: 106
Joined: 23 Jun 2003 19:31
Location: Tirol/Austria
Contact:

Post by tecxx »

hehe ;=)
well i believe that 1 town/no industries is a bit difficult, but thats not the point anyway. we're usually playing this game with just industries in the beginning and after some years we start servicing the towns (to make them bigger). this was not possible because there were too many towns - hence this patch. it allows you to freely modify the ammount, so now anyone can adjust this to their needs.
i'll take a look at the industry thing when i got time to do it....
Bronchandes Gindenstaun
Engineer
Engineer
Posts: 11
Joined: 20 Feb 2005 12:51
Contact:

city growing

Post by Bronchandes Gindenstaun »

hey.
the city growing problem is now solved. ive experienced very slow city growing on big maps. probably because of tooo many cities and some kind of round robin city cycle and growing algorithm. well done tecxx =)

bronch
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests