OpenTTD

Tasklist

FS#3466 - Houses: allow sloped land under houses

Attached to Project: OpenTTD
Opened by George (George) - Friday, 01 January 2010, 18:29 GMT
Last edited by andythenorth (andythenorth) - Friday, 01 September 2017, 08:15 GMT
Type Feature Request
Category NewGRF
Status New
Assigned To No-one
Operating System Windows
Severity Medium
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 2
  • Kogut (Kogut) (2010-11-23)
  • George (George) (2010-01-04)
Private No

Details

r18545

Special house "Praha hotel" intends to be build on the sloped land, where the NE tile is sloped, while the SW tile is flat.
I use the following code
// FF specifies the SW tile, F0 the NE tile
357 * 15 02 07 FF 81 62 00 00 1F 01 F0 00 00 00 00 80
358 * 23 02 07 F0 81 62 00 00 1F 03
F0 00 04 04
F0 00 0C 0C
F0 00 00 00
00 80

For CB 17, but OTTD puts a house on the tile that does not fit this rule. At the example, the SW tile is located on the 0E slope
Is it a bug in my code or in OTTD?
This task depends upon

Comment by George (George) - Friday, 01 January 2010, 18:31 GMT
BTW, if I do not allow NE tile to be build on 00 slope, it does not appear at all
Comment by Thijs Marinussen (Yexo) - Saturday, 02 January 2010, 17:22 GMT
From http://wiki.ttdpatch.net/tiki-index.php?page=Callbacks#House_construction_check_17_
"For multi-tile buildings, this callback is always called for the north tile type .... in OTTD r13489, the callback is now called for the final position of the north tile."

The callback is only called once, and only for the north tile. Your check for the southwest tile is never executed.
Comment by George (George) - Sunday, 03 January 2010, 15:38 GMT
Would it be hard to call it for every tile?
Comment by frosch (frosch) - Sunday, 03 January 2010, 19:45 GMT
The callback is also supposed to check lots of other stuff (like population etc.) which you only want to call once.
Isn't checking the adjacent tiles in the north-tile callback enough?
Comment by George (George) - Sunday, 03 January 2010, 21:55 GMT
Well, I changed the code for hotel praha as you suggest, and now I get no instance on the map. Why?
// Slope check
358 * 15 02 07 F0 81 62 10 00 1F 01 F0 00 00 00 00 80
359 * 19 02 07 F0 81 62 00 00 1F 02
F0 00 04 04
F0 00 0C 0C
00 80
Comment by George (George) - Sunday, 03 January 2010, 22:00 GMT
Also, when I allow northern tile to be flat, I get the house located on land with non-flat southern tile
// Slope check
359 * 15 02 07 F0 81 62 10 00 1F 01 F0 00 00 00 00 80
360 * 23 02 07 F0 81 62 00 00 1F 03
F0 00 04 04
F0 00 0C 0C
F0 00 00 00
00 80
Comment by George (George) - Sunday, 03 January 2010, 22:07 GMT
Sorry, looks my fault here, should be 01, not 10
Comment by George (George) - Sunday, 03 January 2010, 22:10 GMT
Changed 10 to 01, but it does not apppear
Comment by George (George) - Sunday, 03 January 2010, 22:12 GMT
and appears if flat northern tile is allowed
// Slope check
359 * 15 02 07 F0 81 62 01 00 1F 01 F0 00 00 00 00 80
360 * 23 02 07 F0 81 62 00 00 1F 03
F0 00 04 04
F0 00 0C 0C
F0 00 00 00
00 80
Comment by frosch (frosch) - Monday, 04 January 2010, 21:42 GMT
Ok, the grf defines the following house:
House 0xA1 in NE, house 0xA2 in SW.
It requires the SW tile to be flat, and the NE tile to be sloped with either East corner raised or North&East corner raised.
So far so good.

The problem is:
Callback 17 can only restrict the possible house locations and not allow "more".
A normal 2x1 house is build on two adjacent tiles which get a leveled platform. For that OTTD checks that the platforms have equal heights. But with above slope combination the tiles do not have equal heights.

So maybe we need a new flag in property 19 to disable any default slope checks.
Comment by George (George) - Monday, 04 January 2010, 22:52 GMT
Yes
Comment by George (George) - Tuesday, 05 January 2010, 15:33 GMT
BTW, what does the status "Waiting on reporter" mean?
Comment by Remko Bijker (Rubidium) - Wednesday, 21 July 2010, 23:10 GMT
  • Field changed: Status (Waiting on reporter → New)
It means that at some moment "we" needed a reply from you.
Comment by George (George) - Thursday, 22 July 2010, 04:21 GMT
And why didn't contacted me then? ;)
Comment by Remko Bijker (Rubidium) - Thursday, 22 July 2010, 16:15 GMT
It was changed to that just after one of the developers asked you a question. If you email address was correct at that point you would have gotten an email with the question (which is now over half a year old though). Same way that you should receive an email about this comment.

Loading...