NFO help: Multiple stations in category

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

Moderator: Graphics Moderators

Post Reply
User avatar
Elyon
Engineer
Engineer
Posts: 2
Joined: 28 Jan 2014 02:16
Location: Denmark

NFO help: Multiple stations in category

Post by Elyon »

I have managed to get a custom (rail) station into the game. My issue comes when trying to get another station into the same category, or the game in general.

Shouldn't this code create two extra station IDs for default stations, and put them in the station category "NEWS"?

Code: Select all

//     +- Change
//     |  +- Feature: Stations
//     |  |  +- Number of properties
//     |  |  |  +- Number of stations
//     |  |  |  |  + ID of first station to change
//     |  |  |  |  |  +- Property: Class ID
//     |  |  |  |  |  |  +- Class ID
-1 * 0 00 04 01 02 00 08 "NEWS"
                         "NEWS"
The category name string is defined elsewhere, and works fine.

The above code produces one category for the default station, and an extra category for the first new station. However, the second new station is nowhere to be seen.

If I change the category of the second new station to "NEWT", it gets put in its own category. Selecting this third category correctly selects the second new station, however it is not shown in the station tile list on the right side of the station selection window.

Splitting the station class ID assignment into two separate pseudosprites yields the same results.


What am I missing? (Please request more context if required)
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Re: NFO help: Multiple stations in category

Post by mart3p »

Elyon wrote:Shouldn't this code create two extra station IDs for default stations, and put them in the station category "NEWS"?
This code doesn't "create" station IDs. It sets the station class property for the specified station ID(s). In this case, two station IDs (00 and 01) are both allocated to the "NEWS" class.

Both of these two new stations need an action 3 to assign their graphics. They also both need an action 4 to define the station name.

Post the code for your action 3s and action 4s if you need more help. :wink:
Image
User avatar
Elyon
Engineer
Engineer
Posts: 2
Joined: 28 Jan 2014 02:16
Location: Denmark

Re: NFO help: Multiple stations in category

Post by Elyon »

mart3p wrote:Both of these two new stations need an action 3 to assign their graphics.
Ah, that would be why. I had only assigned the graphics of the first station. Thanks!
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 15 guests