Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Nov 21, 2018 3:13 pm

All times are UTC




Post new topic  Reply to topic  [ 21 posts ]  Go to page 1 2 Next
Author Message
 Post subject: Custom Buildings
PostPosted: Mon Apr 16, 2012 5:39 pm 
Offline
Director
Director
User avatar

Joined: Mon Jul 31, 2006 12:40 pm
Posts: 610
Location: Lancs, England
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:

Attachment:
english.txt [2.42 KiB]
Downloaded 125 times

UPDATE: Latest version is v0.1b and can be downloaded here.


Attachments:
Custom Buildings.png
Custom Buildings.png [ 44.26 KiB | Viewed 7118 times ]
custom_buildings.grf [3.88 KiB]
Downloaded 314 times

_________________
My projects: New Town Names | Snow Aware Arctic Buildings | Custom Buildings | Mini GRFs | Bits & Bobs
Contributions: BK Enhanced Tunnel Set | Fix TTD GRF Bugs | INFRA Foundations | OpenGFX | OpenGFX+ Airports
Other stuff: The GRFs That Time Forgot! | Buildings in Glasgow

What's that in my avatar? It's the Brighton & Rottingdean Seashore Electric Railway - bonkers Victorian engineering!


Last edited by PaulC on Wed Apr 18, 2012 3:06 am, edited 3 times in total.
Top
   
 Post subject: Re: Custom Buildings
PostPosted: Mon Apr 16, 2012 5:47 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Feb 21, 2010 12:15 am
Posts: 1031
Location: Fitzroy North - 96
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.

_________________
Image
Trolleybi! Trucks and Buses -- Docklands -- Unspooled -- MLSS


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Mon Apr 16, 2012 6:14 pm 
Offline
Director
Director
User avatar

Joined: Mon Jul 31, 2006 12:40 pm
Posts: 610
Location: Lancs, England
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.

_________________
My projects: New Town Names | Snow Aware Arctic Buildings | Custom Buildings | Mini GRFs | Bits & Bobs
Contributions: BK Enhanced Tunnel Set | Fix TTD GRF Bugs | INFRA Foundations | OpenGFX | OpenGFX+ Airports
Other stuff: The GRFs That Time Forgot! | Buildings in Glasgow

What's that in my avatar? It's the Brighton & Rottingdean Seashore Electric Railway - bonkers Victorian engineering!


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Mon Apr 16, 2012 8:05 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Feb 21, 2010 12:15 am
Posts: 1031
Location: Fitzroy North - 96
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,

_________________
Image
Trolleybi! Trucks and Buses -- Docklands -- Unspooled -- MLSS


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Mon Apr 16, 2012 8:31 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13178
Location: The Netherlands
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?

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Mon Apr 16, 2012 9:42 pm 
Offline
Director
Director
User avatar

Joined: Mon Jul 31, 2006 12:40 pm
Posts: 610
Location: Lancs, England
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.

_________________
My projects: New Town Names | Snow Aware Arctic Buildings | Custom Buildings | Mini GRFs | Bits & Bobs
Contributions: BK Enhanced Tunnel Set | Fix TTD GRF Bugs | INFRA Foundations | OpenGFX | OpenGFX+ Airports
Other stuff: The GRFs That Time Forgot! | Buildings in Glasgow

What's that in my avatar? It's the Brighton & Rottingdean Seashore Electric Railway - bonkers Victorian engineering!


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 5:50 am 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2655
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


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 10:11 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Jun 29, 2006 8:36 am
Posts: 259
This grf does exactly what I was thinking about for a while. Nice one!

_________________
My screenshots
A fractal heightmap generator for openttd


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 10:49 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13178
Location: The Netherlands
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.

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 11:02 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6559
Location: The Netherlands
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).

_________________
FooBar's Tram Tracks | TransRapid Track Set | Metro Track Set | OpenGFX base graphics set | FIRS Industry Replacement Set
Dutch Tram Set | Dutch Trainset 2 | Dutch Road Furniture


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 12:12 pm 
Offline
Director
Director
User avatar

Joined: Mon Jul 31, 2006 12:40 pm
Posts: 610
Location: Lancs, England
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 6850 times ]

_________________
My projects: New Town Names | Snow Aware Arctic Buildings | Custom Buildings | Mini GRFs | Bits & Bobs
Contributions: BK Enhanced Tunnel Set | Fix TTD GRF Bugs | INFRA Foundations | OpenGFX | OpenGFX+ Airports
Other stuff: The GRFs That Time Forgot! | Buildings in Glasgow

What's that in my avatar? It's the Brighton & Rottingdean Seashore Electric Railway - bonkers Victorian engineering!


Last edited by PaulC on Wed Apr 18, 2012 2:52 am, edited 1 time in total.
Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 1:27 pm 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2655
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


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 4:12 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13178
Location: The Netherlands
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 138 times

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10
Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 5:41 pm 
Offline
Director
Director
User avatar

Joined: Mon Jul 31, 2006 12:40 pm
Posts: 610
Location: Lancs, England
Thanks Hyronymus! Dutch translation now included in v0.1a...


Attachments:
custom_buildings.grf [5.84 KiB]
Downloaded 130 times

_________________
My projects: New Town Names | Snow Aware Arctic Buildings | Custom Buildings | Mini GRFs | Bits & Bobs
Contributions: BK Enhanced Tunnel Set | Fix TTD GRF Bugs | INFRA Foundations | OpenGFX | OpenGFX+ Airports
Other stuff: The GRFs That Time Forgot! | Buildings in Glasgow

What's that in my avatar? It's the Brighton & Rottingdean Seashore Electric Railway - bonkers Victorian engineering!
Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 6:00 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9052
Location: Sol d
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:
  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

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 6:06 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13178
Location: The Netherlands
I left the office buildings untranslated too, for the same reason :).

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 6:25 pm 
Offline
Director
Director
User avatar

Joined: Mon Jul 31, 2006 12:40 pm
Posts: 610
Location: Lancs, England
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.

_________________
My projects: New Town Names | Snow Aware Arctic Buildings | Custom Buildings | Mini GRFs | Bits & Bobs
Contributions: BK Enhanced Tunnel Set | Fix TTD GRF Bugs | INFRA Foundations | OpenGFX | OpenGFX+ Airports
Other stuff: The GRFs That Time Forgot! | Buildings in Glasgow

What's that in my avatar? It's the Brighton & Rottingdean Seashore Electric Railway - bonkers Victorian engineering!


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 6:31 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13178
Location: The Netherlands
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.

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Tue Apr 17, 2012 7:03 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9052
Location: Sol d
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)

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
 Post subject: Re: Custom Buildings
PostPosted: Wed Apr 18, 2012 3:02 am 
Offline
Director
Director
User avatar

Joined: Mon Jul 31, 2006 12:40 pm
Posts: 610
Location: Lancs, England
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 192 times

_________________
My projects: New Town Names | Snow Aware Arctic Buildings | Custom Buildings | Mini GRFs | Bits & Bobs
Contributions: BK Enhanced Tunnel Set | Fix TTD GRF Bugs | INFRA Foundations | OpenGFX | OpenGFX+ Airports
Other stuff: The GRFs That Time Forgot! | Buildings in Glasgow

What's that in my avatar? It's the Brighton & Rottingdean Seashore Electric Railway - bonkers Victorian engineering!
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 21 posts ]  Go to page 1 2 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.