City Builder patch

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

Honza_
Engineer
Engineer
Posts: 122
Joined: 29 Aug 2010 10:29

City Builder patch

Post by Honza_ »

Hi,
recently there were some patches, which added more town effect cargos, to increase town building challenge. I missed the variability, so I start working on a citybuilder patch, being inspired by another patches and few servers that run city building goal.

So far I got to program additional setting for all cargo slots, namely: amount needed per month, population from which to require the cargo and storage decay (not very common, but I like this option). Each can be defined by desire in menu for all cargo slots (32 slots).
This make it possible to lay any industry set available, one just needs to fill in the cargos defined in them.




NEWS:
Idea revided
After some thoughts I remade the system of town requirements to be configurable via NEWGRF.
This is done by new properties of cargo feature, properties 20, 21 and 22.
Game mechanics, newgrf configuration and more is described in manual, which is part of the enclosed archive as well as everything you need.

Download from Novapolis site
Novapolis Citybuilder client 1.2.3

Town gui detail:
Town GUI
Town GUI
town.png (74.43 KiB) Viewed 9090 times
There is Cargo name, amount delivered current month, required cargo (proportional to population), cargo in storage (if decay is under 100%, there can be something left), and from what population cargo is needed.
When cargo is not needed yet, the row is faded with grey colour, when it is needed, it is orange, and finally when enough cargo is supplied, it turns green to ease the recognition :-)


Setting gui:
config_grf.PNG
config_grf.PNG (21.38 KiB) Viewed 9090 times

Any improving ideas are welcomed
Last edited by Honza_ on 05 Nov 2012 20:35, edited 8 times in total.
User avatar
Nickman
Engineer
Engineer
Posts: 66
Joined: 27 Jun 2006 23:07

Re: City Builder patch

Post by Nickman »

I love the idea!
Layout of the interface seems good, but could indeed use some improvements.

Keep up the good work!
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Re: City Builder patch

Post by Korenn »

The town demand patch also allows any cargo to be used, by defining the proper town effects in a newgrf.

Newgrf is the way the developers want to implement town growth changes. So all this customisability would be moved out of the base interface and into newgrf actions.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: City Builder patch

Post by planetmaker »

Korenn wrote:The town demand patch also allows any cargo to be used, by defining the proper town effects in a newgrf.

Newgrf is the way the developers want to implement town growth changes. So all this customisability would be moved out of the base interface and into newgrf actions.
Which could still result in a pretty similar configuration interface - just found as NewGRF parameters. But the general handling for players would be much easier as they could resort to well-tested configurations available as NewGRFs. And it will allow more interesting town, industry and scenario-dedicated NewGRFs.
Attachments
basecost.png
basecost.png (58.95 KiB) Viewed 11648 times
Honza_
Engineer
Engineer
Posts: 122
Joined: 29 Aug 2010 10:29

Re: City Builder patch

Post by Honza_ »

Korenn wrote:The town demand patch also allows any cargo to be used, by defining the proper town effects in a newgrf.
Yes, I read tread with your nice patch. Newgrf could be of good use to configure town demands. I decoded the grfs you have there, and it seems to me like only list of cargo definitions from cargo sets (correct me if wrong, I havent time to open original cargo sets now).

From what I know, your town demand patch supporst 6 cargos with town effect, so I can imagine configuring with newgrf.
But would it be possible to apply it to this patch, where I use amoun/from population activation/storage decay? If so, only good, but I think newgrf wont help here, as I cant even think ofa way to set different number of town effect cargos in it.

Unless some development and support for newgrf is here for this thing, I guess my patch cant relay on newgrf.

Dont mourn though, I dont desire to include it to trunk :-)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: City Builder patch

Post by planetmaker »

Honza_ wrote:
Korenn wrote:The town demand patch also allows any cargo to be used, by defining the proper town effects in a newgrf.
Unless some development and support for newgrf is here for this thing, I guess my patch cant relay on newgrf.
That's what you patch could provide instead. It'd make it suddenly a commonly usable implementation.
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Re: City Builder patch

Post by Korenn »

planetmaker wrote:
Honza_ wrote:
Korenn wrote:The town demand patch also allows any cargo to be used, by defining the proper town effects in a newgrf.
Unless some development and support for newgrf is here for this thing, I guess my patch cant relay on newgrf.
That's what you patch could provide instead. It'd make it suddenly a commonly usable implementation.
to rephrase what planetmaker said: No, all that newgrf support does not yet exist. It needs writing by someone. But once it is written, it should allow a variable amount of cargoes to influence town growth in different ways.

You should swing by the openttd channel on IRC if you want details on what the devs have in mind.
Honza_
Engineer
Engineer
Posts: 122
Joined: 29 Aug 2010 10:29

Re: City Builder patch

Post by Honza_ »

It could be nice, if anybody want to do it, hey, thumbs up. But I dont volunteer to code a thing which would result in the same functionality as my current patch just to make it controlable from different place.

I would rather hear suggestions on the citybulding system
Honza_
Engineer
Engineer
Posts: 122
Joined: 29 Aug 2010 10:29

Re: City Builder patch

Post by Honza_ »

Citybuilder mechanics works fine now, just to align the gui and thing is to be shipped in package :-))
Citybuilder Transport, 1990-05-01.png
Citybuilder with ECS
(275.46 KiB) Downloaded 5 times
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: City Builder patch

Post by oberhümer »

I do hope you're not just making it one huge file, it makes things harder to update. I've made the same error before.
Other than that, good work.
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
Honza_
Engineer
Engineer
Posts: 122
Joined: 29 Aug 2010 10:29

Re: City Builder patch

Post by Honza_ »

New gui!
Citybuilder Transport, 1990-12-29.png
(278.83 KiB) Downloaded 2 times
Some problem with widget width though, as I am widget noob.

Oberhümer, not sure what you mean with one big file, but thanks.
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: City Builder patch

Post by oberhümer »

I mean as a single block patch file in contrast to using MQ or something like it, where you would have a sequence of many small diffs.
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
Honza_
Engineer
Engineer
Posts: 122
Joined: 29 Aug 2010 10:29

Re: City Builder patch

Post by Honza_ »

Of course it will be only one diff file
Honza_
Engineer
Engineer
Posts: 122
Joined: 29 Aug 2010 10:29

Re: City Builder patch

Post by Honza_ »

Project abandoned
User avatar
JacobD88
Chief Executive
Chief Executive
Posts: 708
Joined: 16 Aug 2008 17:51
Location: Long Eaton, Nottinghamshire. UK
Contact:

Re: City Builder patch

Post by JacobD88 »

Honza_ wrote:Project abandoned
Sorry to hear than Honza_ it was an interesting patch :bow:
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: City Builder patch

Post by Lord Aro »

NoGo obsoleted it, i guess
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Honza_
Engineer
Engineer
Posts: 122
Joined: 29 Aug 2010 10:29

Re: City Builder patch

Post by Honza_ »

Not sure what nogo is. Actually last version of the patch can be downloaded at luukland.net if anyone would be interested.
I just simply havent time or lust to work on it further.
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: City Builder patch

Post by Supercheese »

Honza_ wrote:Not sure what nogo is.
This: http://www.tt-forums.net/viewtopic.php? ... 31#p981031
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
Xaroth
Engineer
Engineer
Posts: 103
Joined: 01 May 2006 09:09

Re: City Builder patch

Post by Xaroth »

Interesting patch, especially the part around line 250 ...

Never thought I'd see somebody attempt to troll somebody through a 'serious' patch though... kudos for that..
Lead Manager of OpenDUNE
Honza_
Engineer
Engineer
Posts: 122
Joined: 29 Aug 2010 10:29

Re: City Builder patch

Post by Honza_ »

The development of City-Builder patch revived.
For news read 1st post.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 46 guests