my 2x2 buildings stopped working...

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

my 2x2 buildings stopped working...

Post by PikkaBird »

Anyone got any ideas why? :D They're not generating any more in recent versions (nightly and stable) of OTTD. 2x2 buildings in old savegames have been replaced by cottages...

Here's an example of one of the 2x2 buildings in code. I'm sure there's something simple I'm doing wrong which has been tightened up in OTTD code recently.

Code: Select all

// 09 0A 0B 0C - Rural Industrial 2x2


  284 * 49	 00 07 \b19 01 09
 08 19 // substitute
 18 28 // probability
 09 10 // flags (2x2)
 13 01 78 // zone and climate
 0A 00 FF // years built (1800 to 2050)
 21 \w0 22 \w20000 //long format years

 0B \b20 0C \b10 // population and mail
 0D 01 0E 01 0F 01 // pax/mail/goods acceptance
 10 40 00 // LA rating for removal
 11 80 // Destruction cost
 12 08 DC // Name
 14 01 1D 00 // Callback flags
 1C 02 // Class (light industrial)
 1F \b40 // Lifespan

  285 * 33	 00 07 \b13 01 0A
 08 19 // substitute
  18 00 // probability
   09 00 // flags (extra)
 0B \b0 0C \b10 // population and mail
 0D 01 0E 01 0F 00 // pax/mail/goods acceptance
 10 40 00 // LA rating for removal
 11 80 // Destruction cost
 12 08 DC // Name
 1C 02 // Class (light industrial)
 1F \b40 // Lifespan

  286 * 33	 00 07 \b13 01 0B
 08 19 // substitute
  18 00 // probability
   09 00 // flags (extra)
 0B \b0 0C \b10 // population and mail
 0D 01 0E 01 0F 00 // pax/mail/goods acceptance
 10 40 00 // LA rating for removal
 11 80 // Destruction cost
 12 08 DC // Name
 1C 02 // Class (light industrial)
 1F \b40 // Lifespan

  287 * 33	 00 07 \b13 01 0C
 08 19 // substitute
  18 00 // probability
   09 00 // flags (extra)
 0B \b0 0C \b10 // population and mail
 0D 01 0E 01 0F 00 // pax/mail/goods acceptance
 10 40 00 // LA rating for removal
 11 80 // Destruction cost
 12 08 DC // Name
 1C 02 // Class (light industrial)
 1F \b40 // Lifespan


// =============== stable and storage sheds =====================
  288 * 4	 01 07 0D 01

  289 sprites/uk_houses/cottage.pcx 128 112 09 47 64 -31 -16
  290 sprites/uk_houses/cottage.pcx 192 112 09 47 64 -31 -16

  291 sprites/uk_houses/cottage.pcx 256 112 09 47 64 -31 -16
  292 sprites/uk_houses/cottage.pcx 320 112 09 47 64 -31 -16

  293 sprites/uk_houses/cottage.pcx 384 112 09 47 64 -31 -16
  294 sprites/uk_houses/cottage.pcx 448 112 09 47 64 -31 -16

  295 sprites/uk_houses/cottage.pcx 512 112 09 47 64 -31 -16
  296 sprites/uk_houses/cottage.pcx 576 112 09 47 64 -31 -16

  297 sprites/tai/townbase.pcx 192 32 09 31 64 -31 -0

  298 sprites/uk_houses/cottage.pcx 0 176 09 47 64 -31 -16
  299 sprites/uk_houses/cottage.pcx 64 176 09 47 64 -31 -16

  300 sprites/uk_houses/cottage.pcx 128 176 09 47 64 -31 -16
  301 sprites/uk_houses/cottage.pcx 192 176 09 47 64 -31 -16

//                          v           v           v
  302 * 17	 02 07 00 00 08 80 00 80 00 80 00 80 00 00 10 10 10
  303 * 17	 02 07 01 00 08 80 00 80 01 80 00 80 00 00 10 10 10

  304 * 17	 02 07 02 00 08 80 00 80 02 80 00 80 00 00 10 10 10
  305 * 17	 02 07 03 00 08 80 00 80 03 80 00 80 00 00 10 10 10

  306 * 17	 02 07 10 00 08 80 00 80 04 80 00 80 00 00 10 10 10
  307 * 17	 02 07 11 00 08 80 00 80 06 80 00 80 00 00 10 10 10

  308 * 17	 02 07 12 00 08 80 00 80 05 80 00 80 00 00 10 10 10
  309 * 17	 02 07 13 00 08 80 00 80 07 80 00 80 00 00 10 10 10

  310 * 17	 02 07 20 00 08 80 00 80 09 80 00 80 00 00 10 10 10
  311 * 17	 02 07 21 00 08 80 00 80 0A 80 00 80 00 00 10 10 10

  312 * 17	 02 07 22 00 08 80 00 80 0B 80 00 80 00 00 10 10 10
  313 * 17	 02 07 23 00 08 80 00 80 0C 80 00 80 00 00 10 10 10


// randomise
  314 * 15	 02 07 00 80 00 00 04
   00 00
   10 00
   20 00
   10 00
  315 * 15	 02 07 01 80 00 00 04
   01 00
   11 00
   21 00
   11 00
  316 * 15	 02 07 02 80 00 00 04
   02 00
   12 00
   22 00
   12 00
  317 * 15	 02 07 03 80 00 00 04
   03 00
   13 00
   23 00
   13 00


// name
  318 * 20	 04 09 FF 01 33 D0 "Storage Sheds" 00
  319 * 13	 04 09 FF 01 34 D0 "Stable" 00
  320 * 14	 04 09 FF 01 35 D0 "Paddock" 00
  321 * 15	 02 07 11 80 00 00 04
   34 80
   33 80
   35 80
   33 80
  322 * 17	 02 07 00 85 0C 00 FF FF 01 11 00 4d 01 4d 01 00 00 // type 0 name
  323 * 17	 02 07 01 85 0C 00 FF FF 01 11 00 4d 01 4d 01 01 00 // type 0 name
  324 * 17	 02 07 02 85 0C 00 FF FF 01 11 00 4d 01 4d 01 02 00 // type 0 name
  325 * 17	 02 07 03 85 0C 00 FF FF 01 11 00 4d 01 4d 01 03 00 // type 0 name

// ============================================
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: my 2x2 buildings stopped working...

Post by Michi_cc »

The substitute type needs to have the same size as the new house. This was done to prevent possible crashes when changing grfs in-game.

Use

Code: Select all

./openttd -d grf=1
to get more information.

-- Michael Lutz
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: my 2x2 buildings stopped working...

Post by PikkaBird »

Thanks Michael.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: my 2x2 buildings stopped working...

Post by planetmaker »

Michi_cc wrote:Use

Code: Select all

./openttd -d grf=1
to get more information.
I had a similar problem... and this helped me, too. So also thank you from here :-)
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 12 guests