If that's the solution to all the trouble as described by YSH, that's interesting. It *should* work without as the ID is optional. But if it works with it, that's at least a good hint as in where the problem hidesAndrew350 wrote:The problem of all the houses not showing up seems to be because you aren't setting a house id in the item definitions. Adding one just before HOUSE_SIZE_1x1 seems to work:
item (FEAT_HOUSES, item_rij50, 01, HOUSE_SIZE_1X1) {
...
}
I'm not sure if that's working as intended or not, I just know it works
Problems with NML Houses
Moderator: Graphics Moderators
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Problems with NML Houses
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
Re: Problems with NML Houses
Adding an ID of -1 to each item does indeed work, for the multi-tile houses also.
Re: Problems with NML Houses
Hi all, quick question. If I try to set IDs for only a few houses and leave the rest blank, then only the ones which I've set IDs for will show up in-game. Leaving them all blank works fine though. Is this intentional (i.e. should you only assign IDs on an all or none basis), or is it possibly related to the bug above?
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Problems with NML Houses
That does not sound like intended. It should - in principle - work with any combination and automatically assign an ID to the ones where you haven't defined explicitly an ID.Andrew350 wrote:Hi all, quick question. If I try to set IDs for only a few houses and leave the rest blank, then only the ones which I've set IDs for will show up in-game. Leaving them all blank works fine though. Is this intentional (i.e. should you only assign IDs on an all or none basis), or is it possibly related to the bug above?
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
Re: Problems with NML Houses
It seems that as long as the houses are defined "in order" everything works fine regardless of the IDs being set, but if I mix it up, say like this:
id 00
id 01
blank (no id)
id 03
id 02
blank
...etc
The first "blank" house in this scenario will not appear in-game, but any others defined afterwards will. And if I remove the house "id 02", then it shows up fine. The above setup should work, though, correct?
id 00
id 01
blank (no id)
id 03
id 02
blank
...etc
The first "blank" house in this scenario will not appear in-game, but any others defined afterwards will. And if I remove the house "id 02", then it shows up fine. The above setup should work, though, correct?
Re: Problems with NML Houses
okay this thread about nml problem with houses right, i want to ask a question, how to match the houses direction with the road direction?
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Problems with NML Houses
You can check the tile class of the adjacent tiles to be of type TILE_CLASS_ROAD by means of the variable nearby_tile_class. Choose the appropriate sprite(s) depending on the result of that check.andov3 wrote:okay this thread about nml problem with houses right, i want to ask a question, how to match the houses direction with the road direction?
The more advanced solution, which also makes sure that the house does no change when the adjacent roads change, is to (mis)use the animation frame to store the result.
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
Re: Problems with NML Houses
Or you can make a separate item for each direction of the house, and using construction_check only let them be build facing a road.planetmaker wrote:The more advanced solution, which also makes sure that the house does no change when the adjacent roads change, is to (mis)use the animation frame to store the result.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Problems with NML Houses
Yes, that might be a lot easierYSH wrote:Or you can make a separate item for each direction of the house, and using construction_check only let them be build facing a road.planetmaker wrote:The more advanced solution, which also makes sure that the house does no change when the adjacent roads change, is to (mis)use the animation frame to store the result.
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
Re: Problems with NML Houses
nah i only got 2 sprites, the first one is facing south west, the second one is facing northwest, which variable ? the construction_check or the NEARBY_TILE_ROAD?
Re: Problems with NML Houses
You would have a switch checking the road tile:
and place construction_check in the graphics part of the item:
Code: Select all
// Road to the South
switch (FEAT_HOUSES,SELF, switch_roadS, nearby_tile_class(1,0))
{
TILE_CLASS_ROAD: 1;
return 0;
}
Code: Select all
construction_check: switch_roadS;
Who is online
Users browsing this forum: No registered users and 15 guests