Many NML questions
Moderator: Graphics Moderators
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: Many NML questions
Yes, I understand - sprites are orphaned if it is on spriteset image but not used.


Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: Many NML questions
For NAPR I want to make what last and first cars in consist change sprites when train is flipping, but I can't find the solution. I asked Pikka for code from NARS v2.03, but he didn't answer.


Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
Re: Many NML questions
try making a switch with the variable.
For more variables, check this: https://newgrf-specs.tt-wiki.net/wiki/N ... _parameter
Code: Select all
vehicle_is_reversed
For more variables, check this: https://newgrf-specs.tt-wiki.net/wiki/N ... _parameter
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: Many NML questions
Ok, will try.


Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: Many NML questions
Ok, It work, but not all. Is there a way to check for the vehicle_type_id of the vehicle at the rear of train? If It is, today (or tomorrow) in NAPR will be real push-pull trains!


Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: Many NML questions
Hmm, It works, but I can't find a variable, which I can use to detect the id of first carriage in train, and, as I understand, I can't make it with default switch.
Here is the part of code, with which I have these questions. Comet II detects P32AC-DM well, but P32AC-DM can't detect no cab, no car.
Here is the part of code, with which I have these questions. Comet II detects P32AC-DM well, but P32AC-DM can't detect no cab, no car.
Code: Select all
switch(FEAT_TRAINS, PARENT, sw_P32AC_DM_general, vehicle_type_id) {
item_Comet_II_Car: sw_push_pull_P32AC_DM_Comet_II;
sw_P32AC_DM_gui;
}
switch(FEAT_TRAINS, PARENT, sw_push_pull_Comet_II, vehicle_type_id) {
item_P32AC_DM: sw_push_pull_Comet_II_P32AC_DM;
sw_Comet_II_Cab_gui;
}
item (FEAT_TRAINS, item_Comet_II_Cab) {
...
}
graphics {
...
default: sw_push_pull_Comet_II;
}
}
item (FEAT_TRAINS, item_Comet_II_Car) {
...
}
item (FEAT_TRAINS, item_P32AC_DM) {
...
graphics {
...
default: sw_P32AC_DM_general;
}
}


Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: Many NML questions
By returning this thread back from the dead, I want to understand how to use Composing vehicles from multiple sprites. Can someone explain it?


Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
-
- Route Supervisor
- Posts: 459
- Joined: 14 Oct 2017 11:06
- Location: Ukraine
Re: Many NML questions
Well, I learned it by myself, so no need to help me already 



Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
Who is online
Users browsing this forum: No registered users and 8 guests