
I have a number of different projects as far as New Objects concerns, currently put on hold as I can't find enough space to make them come true. But this side effects will most definately change everything...
Lakie, you're a genious...

Moderator: Graphics Moderators
Unfortunately real life interference prevented me from following up on this since OpenTTD 1.1 was branched.Rubidium wrote:As we need to develop a whole new spec/mechanism to give objects a layout and the time it takes for new specs to be properly tested I don't intend to do any work on this before 1.1 is branched, i.e. I won't push it into the 1.1 stable series.
Any thoughts?michael blunck wrote:The only "irregular layout" in TTD that I´m aware of is that of industries.
Maybe we could stick to that, resp borrow from it?
Thanks FooBar, I´m doing exactly this all the time.FooBar wrote: I'm not sure if this is what you're after, but foundations are drawn by default and can be disabled by an object flag. If you then want custom foundations, you have to add these manually to the object spritelayout.
Nah, it is not.FooBar wrote: From what I understand this flag is the replacement of the callback.
Point is that TTDPatch/OTTD are able to draw "custom foundations" for "houses, industry and airports" (nfo spec) "automatically", i.e. w/o having to manually check for all the slope variations. OTOH, stations don´t have that CB either (objects implementation is similar to stations), so that´s where my question arises: is it intentionally, or had it been forgotten?FooBar wrote: If you actually need it to be a callback to conditionally draw foundations or not, then that is not possible.
Yeah, both objects and stations have a bit flag to control drawing of foundations:FooBar wrote:At least we've established that you're well aware of all the possibilities.
I.e., the way how custom foundations are handled by some of the other features (the newGRF supplies an additional sprite block with the foundations, and then they´re drawn by the game according to the actual slopes w/o any further tinkering by the newGRF) is not available to objects, right?planetmaker wrote:For objects it simply means "no foundations are drawn" and you'll have to adjust your sprites and tile layout to the actual slope of the tile. You then can draw your own foundations as part of the tile layout.
Too complicated for this trivial task, IMO.michi_cc wrote: For OpenTTD you can probably achieve a similar effect by using an advanced sprite layout with register offset, which is used to select the proper ground sprite.
That's one of the use cases the adv. spritelayouts were explicitly designed for.michael blunck wrote:Too complicated for this trivial task, IMO.michi_cc wrote: For OpenTTD you can probably achieve a similar effect by using an advanced sprite layout with register offset, which is used to select the proper ground sprite.
Code: Select all
spritelayout spritelayout_name {
ground {
sprite: groundsprite_set(slope_to_sprite_offset(nearby_tile_slope(0, 0)));
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
}
}
I doubt that.planetmaker wrote: That's one of the use cases the adv. spritelayouts were explicitly designed for.
Indeed, I remember discussing it with Rubidium a long time ago. I can't remember the reasons for why it was dropped but I think it was along the lines of being considered redundant, or not worth the hassle implementing considering the available functionality can already achieve it...planetmaker wrote:EDIT: IIRC it was considered. But as stations are special in the way they handle their tile layouts and all other tile specs are more like houses and industries it was decided to not follow the stations special way to handle things. Leaving it to the NewGRF to decide on how foundations are drawn is the much more flexible approach. And as quoted above not more than 6 lines to get full slope awareness. In NFO a function to convert tile slope to offset might come in handy the same way but would be needed once and for all only, too.
Ah, thanks for clearing this up. Obviously, I´ve been irritated by the fact that newobjects (initially, in TTDPatch) had been based more on the stations concept than on houses or industry tiles.frosch wrote: [...] This was not forgotton. This is just not possible.
Stations draw sprites by resolving the A123 chain, which then returns a spriteset. Stations can resolve the A123 multiple times to get spritesets for foundations, and up to eight (TTDP: two) spritesets for the sprite layout.
Houses, industries, objects and airports otoh do not return a spriteset in the A123 chain, but a sprite layout.
This would be a very useful feature for eyecandy stuff, so one more graphicsdeveloper can be added to the list of requestorswallyweb wrote:Unfortunately real life interference prevented me from following up on this since OpenTTD 1.1 was branched.Rubidium wrote:As we need to develop a whole new spec/mechanism to give objects a layout and the time it takes for new specs to be properly tested I don't intend to do any work on this before 1.1 is branched, i.e. I won't push it into the 1.1 stable series.
Is this a good to time to revive the discussion around the potential for this feature? In a recent discussion, SAC was asking me about this feature, so a demand for it would seem to extend beyond myself and Michael Blunck:
Any thoughts?michael blunck wrote:The only "irregular layout" in TTD that I´m aware of is that of industries.
Maybe we could stick to that, resp borrow from it?
Users browsing this forum: No registered users and 3 guests