Building Properties

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
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Building Properties

Post by Baldy's Boss »

Do all building NewGRFs work off a code-specified set of building properties or are designers able to create types that go beyond the parameters of default sets?
(Besides my noted belief that stadium size should track town population I'm wondering if really tall buildings can have really large populations).
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Building Properties

Post by Alberth »

The easiest to read page is https://newgrf-specs.tt-wiki.net/wiki/NML:Houses
Understanding everything isn't really needed, but it gives a good impression of what things you can configure in a house.

"code" is in 'house callbacks', small pieces of code that get called on certain events, and then typically given an answer what to do or what to draw.
Being a retired OpenTTD developer does not mean I know what I am doing.
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Re: Building Properties

Post by Baldy's Boss »

Got it,there are a set number of types and a population limit of 255.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Building Properties

Post by adf88 »

In case of multi-tile buildings only the most norther tile can have population, other tiles must have 0 population. Max population of a tile is 255 inhabitants, this amount results in generating about 16 passengers every 256 ticks. Passenger generation can be further increased by using "Custom cargo production (2E)" callback. It can be defined on any house tile (not only the northern one) and allows to increase passengers generated out a single tile up to 255*256 every 256 ticks.

Mail generation is similar except of that there is no "only the northern tile" rule, each house tile is like a separate house.

Further reading here and here.
Baldy's Boss wrote:there are a set number of types
Actually no. NewGRFs can define entirely new house types. They can also replace or disable any chosen type from the default set.
:] don't worry, be happy and checkout my patches
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Re: Building Properties

Post by Baldy's Boss »

In any event you can't change the size of a stadium to match the size of a town,and you can't further expand a company headquarters once the company is hundreds of times the size it takes to reach the current top size headquarters.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Building Properties

Post by Eddi »

Baldy's Boss wrote:In any event you can't change the size of a stadium
why would you even need that? a football field is the same size no matter whether you're in a tiny village or a huge city. the only thing that changes is the audience seats, and you don't necessarily need to adjust the footprint of the stadium for that, you can just make it more fancy looking. and you can do that with NewGRFs easily.

if you seriously want larger sports complexes you need to code them as industries instead of houses.
Baldy's Boss wrote:once the company is hundreds of times the size it takes to reach the current top size headquarters.
the size of your company doesn't actually matter for how your headquarter looks, it's based on your performance rating. also, the headquarter isn't actually a "house" in the technical sense of the word.
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Re: Building Properties

Post by Baldy's Boss »

Eddi wrote:
Baldy's Boss wrote:In any event you can't change the size of a stadium
why would you even need that? a football field is the same size no matter whether you're in a tiny village or a huge city. the only thing that changes is the audience seats, and you don't necessarily need to adjust the footprint of the stadium for that, you can just make it more fancy looking. and you can do that with NewGRFs easily.

if you seriously want larger sports complexes you need to code them as industries instead of houses.
Baldy's Boss wrote:once the company is hundreds of times the size it takes to reach the current top size headquarters.
the size of your company doesn't actually matter for how your headquarter looks, it's based on your performance rating. also, the headquarter isn't actually a "house" in the technical sense of the word.
The number of spectator seats should affect the visible size of the stadium and should depend on town population.
Companies of vastly different sizes can achieve top performance ratings...the HQ ought to keep growing if the company does (and perhaps take on a disused look if the company is in decline).
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Building Properties

Post by adf88 »

Baldy's Boss wrote:In any event you can't change the size of a stadium to match the size of a town
I don't know what you mean exactly but NewGRFs can behave like that - they can give an impression of larger/smaller stadiums. The graphics may look differently or even change dynamically. Also it doesn't have to be a 2x2 tile building, other sizes (1x1, 1x2 and 2x1) are permitted too. There can be many different stadiums in a set.
:] don't worry, be happy and checkout my patches
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 50 guests