New stations and tile info

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

Moderator: Graphics Moderators

Post Reply
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

New stations and tile info

Post by XeryusTC »

I am currently cleaning up the code of Red*Star's modern station set and I ran into a bit of trouble. I need to be able to change the sprite of certain tiles only if a certain tile is adjacent to it. This other tile is not even in the same class of stations (might not even end up in the same newgrf) so I was wondering if this is even technically possible or should I just switch sprites when there is just any station tile adjacent to it as I currently have?
With a quick look at the wiki I suspect that variable 68 could help me out here but I'm not entirely sure whether that is so.

On a different note I wonder if it is also possible to have two different callbacks for the same station tile. I want to be able to change the appearance of a tile and also enable/disable animation on it depending on its location. I have no clue if that is possible though. Should I possibly use station property 11 instead of callback 14 for changing the looks of the station and then use callbacks for the animation?
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: New stations and tile info

Post by DaleStan »

XeryusTC wrote:(might not even end up in the same newgrf)
That will cause you problems, it appears. Keep the two station definitions in the same GRF, and var 68 should be useful.
XeryusTC wrote:On a different note I wonder if it is also possible to have two different callbacks for the same station tile.
You can't have callbacks for station tiles at all. Stations, yes, but not tiles.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Re: New stations and tile info

Post by XeryusTC »

DaleStan wrote:
XeryusTC wrote:(might not even end up in the same newgrf)
That will cause you problems, it appears. Keep the two station definitions in the same GRF, and var 68 should be useful.
Thank you, I will keep the station definitions in the same newgrf then.
DaleStan wrote:
XeryusTC wrote:On a different note I wonder if it is also possible to have two different callbacks for the same station tile.
You can't have callbacks for station tiles at all. Stations, yes, but not tiles.
Well, the same question applies for stations then.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: New stations and tile info

Post by PikkaBird »

XeryusTC wrote:Well, the same question applies for stations then.
Of course you can. :) Newgrf wouldn't be very useful if a given vehicle/station/whatnot could only use one callback.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 13 guests