Custom Buildings

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
PaulC
Director
Director
Posts: 616
Joined: 31 Jul 2006 12:40
Location: Lancs, England
Contact:

Custom Buildings

Post by PaulC »

A while back I coded a quickie grf to make tropical buildings appear in temperate climate, and it was suggested that I expand the grf to allow for more possibilities. Well, I've gone and done just that. :)

"Custom Buildings" contains no shiny new graphics and by default doesn't really do much, but has a number of parameters which allow you to choose which building set you want to use in each climate and to optionally disable certain buildings. Some temperate houses have been modified to accept food, but otherwise no building properties have been changed. If used in arctic climate, temperate and tropical buildings will not have snow above the snow line.

I'm posting here because it's still very much a WIP and there are more things that I would like to add, but it's fully usable in both OTTD and TTDP, with original or OGFX graphics. In fact it actually works best with OGFX because those graphics are a bit less climate specific. Comments, crits and suggestions are all welcome!

Known issues: If using arctic buildings in arctic climate with churches turned off, churches will still appear above the snowline as "shops and offices". I've reported this as an OTTD bug (FS#5148).

EDIT: Should anyone be interested in providing a translation, the relevant lines of code are in the attached text file:
english.txt
(2.42 KiB) Downloaded 325 times
UPDATE: Latest version is v0.1b and can be downloaded here.
Attachments
Custom Buildings.png
Custom Buildings.png (44.26 KiB) Viewed 13247 times
custom_buildings.grf
(3.88 KiB) Downloaded 562 times
Last edited by PaulC on 18 Apr 2012 03:06, edited 3 times in total.
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: Custom Buildings

Post by supermop »

Why, why would anyone want to disable the capsule tower? My heart aches just thinking about it. I'd prefer the disable options to be 'no' and 'hell no' for that option.
User avatar
PaulC
Director
Director
Posts: 616
Joined: 31 Jul 2006 12:40
Location: Lancs, England
Contact:

Re: Custom Buildings

Post by PaulC »

supermop wrote:Why, why would anyone want to disable the capsule tower? My heart aches just thinking about it. I'd prefer the disable options to be 'no' and 'hell no' for that option.
Well, whatever floats your boast. :) As a distinctive, real-world Japanese building it doesn't really fit into any climate, but then I guess there's also something quintessentially TT about it as well.
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: Custom Buildings

Post by supermop »

Seeing that building in TT in 94 is part of what inspired me to study architecture!

I can however see people's desire to limit the 'futuristic' buildings,
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Custom Buildings

Post by Hyronymus »

Looks like a fun grf so to say. Does it support multiple languages?

Will it be possible to load buildings from more than one climates into one climate by the way?
User avatar
PaulC
Director
Director
Posts: 616
Joined: 31 Jul 2006 12:40
Location: Lancs, England
Contact:

Re: Custom Buildings

Post by PaulC »

Hyronymus wrote:Looks like a fun grf so to say. Does it support multiple languages?
Do you mean for the parameters? I can add them if anyone feels like doing the translations.
Hyronymus wrote:Will it be possible to load buildings from more than one climates into one climate by the way?
It would be easy enough to code, but I'm not sure how useful such a "mash-up" would be. I have thought about a "more buildings per climate" option though, which would be similar but more selective.
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Custom Buildings

Post by Transportman »

Looks like a nice NewGRF. I agree with the suggestion of Hyronymus to have multiple climate buildings in a game.

Another suggestion I have is to make the boolean parameters the other way around. So default on and remove disable from the strings (and make the changes also in the code to reflect that :p). Now on means disable and off means enable, in the new situation it would be on means enable and off means disable. That seems more logical to me.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
zooks
Transport Coordinator
Transport Coordinator
Posts: 262
Joined: 29 Jun 2006 08:36

Re: Custom Buildings

Post by zooks »

This grf does exactly what I was thinking about for a while. Nice one!
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Custom Buildings

Post by Hyronymus »

PaulC wrote:
Hyronymus wrote:Looks like a fun grf so to say. Does it support multiple languages?
Do you mean for the parameters? I can add them if anyone feels like doing the translations.
Hyronymus wrote:Will it be possible to load buildings from more than one climates into one climate by the way?
It would be easy enough to code, but I'm not sure how useful such a "mash-up" would be. I have thought about a "more buildings per climate" option though, which would be similar but more selective.
I was asking because if you coded it in NML it's fairly easy to provide different languages. And you can write me down for Dutch then.

If it's posible to allow multiple climate buildings in one climate then I think you should, of only to make cities far more varied.
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Custom Buildings

Post by FooBar »

In NFO it's not too hard to provide translations either. It's just more work on the one who has to implement them (translations have to be merged into the code with NFO, unlike NML where you can rely on the translator to provide a working language file).
User avatar
PaulC
Director
Director
Posts: 616
Joined: 31 Jul 2006 12:40
Location: Lancs, England
Contact:

Re: Custom Buildings

Post by PaulC »

Transportman wrote:Another suggestion I have is to make the boolean parameters the other way around. So default on and remove disable from the strings (and make the changes also in the code to reflect that :p). Now on means disable and off means enable, in the new situation it would be on means enable and off means disable. That seems more logical to me.
If I remove "Disable" from those strings it would be less obvious what those parameters are for. I kinda get what you're saying, but it's not a change I'm likely to make I'm afraid.
Hyronymus wrote:I was asking because if you coded it in NML it's fairly easy to provide different languages. And you can write me down for Dutch then.
I've actually coded in nfo, but as FooBar says that doesn't really make your job any harder. These are the relevant lines of code if you or anyone else is still interested:

(EDIT: Code removed - see first post instead.)
Hyronymus wrote:If it's posible to allow multiple climate buildings in one climate then I think you should, of only to make cities far more varied.
Well, I'll see. :) I still think it needs to be done a bit more intelligently though, I'm not convinced that this mix of houses is a good look...
Attachments
Unnamed, 6th Mar 1945.png
Unnamed, 6th Mar 1945.png (71.99 KiB) Viewed 12979 times
Last edited by PaulC on 18 Apr 2012 02:52, edited 1 time in total.
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Custom Buildings

Post by Transportman »

PaulC wrote:
Transportman wrote:Another suggestion I have is to make the boolean parameters the other way around. So default on and remove disable from the strings (and make the changes also in the code to reflect that :p). Now on means disable and off means enable, in the new situation it would be on means enable and off means disable. That seems more logical to me.
If I remove "Disable" from those strings it would be less obvious what those parameters are for. I kinda get what you're saying, but it's not a change I'm likely to make I'm afraid.
Maybe change "Disable" to "Enable" or "Allow"?
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Custom Buildings

Post by Hyronymus »

Seeing the screenshot I think the subtropical houses should be left out but the rest doesn't look that bad.

See attachment for the Dutch translation BTW.
Attachments
Dutch translation Custom Buildings v0.1.txt
(2.7 KiB) Downloaded 323 times
User avatar
PaulC
Director
Director
Posts: 616
Joined: 31 Jul 2006 12:40
Location: Lancs, England
Contact:

Re: Custom Buildings

Post by PaulC »

Thanks Hyronymus! Dutch translation now included in v0.1a...
Attachments
custom_buildings.grf
(5.84 KiB) Downloaded 279 times
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Custom Buildings

Post by planetmaker »

German (though the names of the office buildings will need translations; I'm not 100% sure currently which those are without looking it up and I don't find the names in OpenTTD's English language file):

Code: Select all

  3 * 106    14 "C" "INFO" "C" "PARA" "C" d0 "T" "NAME" 7F "Gemäßigtes Klima" 00 "T" "DESC" 7F "Wähle, welches Häuserset für das gemäßigte Klima gewählt werden soll." 00 00 00 00 00
    4 * 108    14 "C" "INFO" "C" "PARA" "C" d1 "T" "NAME" 7F "Sub-arktisches Klima" 00 "T" "DESC" 7F "Wähle, welches Häuserset für das sub-arktische Klima gewählt werden soll." 00 00 00 00 00
    5 * 112    14 "C" "INFO" "C" "PARA" "C" d2 "T" "NAME" 7F "Sub-tropisches Klima" 00 "T" "DESC" 7F "Wähle, welches Häuserset für das tropische Klima gewählt werden soll." 00 00 00 00 00
    6 * 95    14 "C" "INFO" "C" "PARA" "C" d3 "T" "NAME" 7F "Keine Kirchen" 00 "T" "DESC" 7F "Kirchen werden nicht gebaut  (IDs #03, 3C, 3D und 53)." 00 00 00 00 00
    7 * 119    14 "C" "INFO" "C" "PARA" "C" d4 "T" "NAME" 7F "Keine Statuen, Brunnen und Parks" 00 "T" "DESC" 7F "Statuen, Brunnen und Parks werden nicht gebaut (IDs #09-0C)." 00 00 00 00 00
    8 * 120    14 "C" "INFO" "C" "PARA" "C" d5 "T" "NAME" 7F "Kein Bürogebäude'capsule'" 00 "T" "DESC" 7F "Das Bürogebäude 'capsule' wird nicht gebaut (ID #11)." 00 00 00 00 00
    9 * 99    14 "C" "INFO" "C" "PARA" "C" d6 "T" "NAME" 7F "Kein altes Stadion" 00 "T" "DESC" 7F "Das alte Stadion wird nicht gebaut (ID #14-17)." 00 00 00 00 00
   10 * 105    14 "C" "INFO" "C" "PARA" "C" d7 "T" "NAME" 7F "Kein modernes Stadion" 00 "T" "DESC" 7F "Das moderne Stadion wird nicht gebaut (ID #20-23)." 00 00 00 00 00
   11 * 116    14 "C" "INFO" "C" "PARA" "C" d8 "T" "NAME" 7F "Kein Bürogebäude 'vertical tube'" 00 "T" "DESC" 7F "Keine Bürogebäude 'vertical tube' wird gebaut (ID #24)." 00 00 00 00 00

   30 * 120    14 "C" "INFO" "C" "PARA" "C"  d0 "C" "VALU" "T" d0 7F "Häuser vom gemäßigten Klima" 00 "T" d1 7F "Häuser vom sub-arktischem Klima" 00 "T" d2 7F "Häuser vom tropischen Klima" 00 00 00 00 00 00
   31 * 120    14 "C" "INFO" "C" "PARA" "C"  d1 "C" "VALU" "T" d0 7F "Häuser vom gemäßigten Klima" 00 "T" d1 7F "Häuser vom sub-arktischem Klima" 00 "T" d2 7F "Häuser vom tropischen Klima" 00 00 00 00 00 00
   32 * 120    14 "C" "INFO" "C" "PARA" "C"  d2 "C" "VALU" "T" d0 7F "Häuser vom gemäßigten Klima" 00 "T" d1 7F "Häuser vom sub-arktischem Klima" 00 "T" d2 7F "Häuser vom tropischen Klima" 00 00 00 00 00 00

   33 * 206    08 07 "PC" 10 11 "Nutzerspezifische Häuser v0.1" 00 98 "Beschreibung: " 89 "Erlaubt mehr Kontrolle über die Standardhäuser mit der Möglichkeit die Häuser einzelner Klimata zu wählen und einzelne Gebäude zu deaktivieren." 0D 98 "Programm von: " 89 "PaulC" 00
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Custom Buildings

Post by Hyronymus »

I left the office buildings untranslated too, for the same reason :).
User avatar
PaulC
Director
Director
Posts: 616
Joined: 31 Jul 2006 12:40
Location: Lancs, England
Contact:

Re: Custom Buildings

Post by PaulC »

Thanks for the translation PM! :)

Building id#11 is called "Modern office building" in the game, #24 is just called "Offices". I used "capsule" and "vertical tube" to make it more obvious which buildings those parameters are for, so feel free to translate them however you want.
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Custom Buildings

Post by Hyronymus »

PaulC wrote:Thanks for the translation PM! :)

Building id#11 is called "Modern office building" in the game, #24 is just called "Offices". I used "capsule" and "vertical tube" to make it more obvious which buildings those parameters are for, so feel free to translate them however you want.
Perhaps an idea to add a galery on the wiki with all the default buidlings in OpenTTD and their default cargo acceptance values. Then you can "link" to it.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Custom Buildings

Post by planetmaker »

It could also go into the existing list as found in the NewGRF wiki: http://newgrf-specs.tt-wiki.net/wiki/DefaultHouseProps though adding the sprite numbers would probably go already go a long way: http://mz.openttdcoop.org/opengfx/newgr ... =2033:2091 (edite sprite numbers in URL)
User avatar
PaulC
Director
Director
Posts: 616
Joined: 31 Jul 2006 12:40
Location: Lancs, England
Contact:

Re: Custom Buildings

Post by PaulC »

Hyronymus and planetmaker wrote:...
I can see how such an illustrated list would be useful on the wiki, though I wouldn't want to use that for the action 14 URL, if that's what you meant. When the grf is more "finished" it will link to a proper release topic or perhaps it's own wiki page, but that's for the future... :)

For the here and now is another update (v0.1b) containing planetmaker's German translation:
Attachments
custom_buildings.grf
(7.6 KiB) Downloaded 389 times
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google Adsense [Bot] and 14 guests