Large multi-topic post incoming...
Tutorial
==========
Since there were no complaints about the tutorial, I've gone ahead and added it to my website next to the source bundle for future authors to find. If you still happen to find any errors or have any questions, do let me know.
Progress update
==========
I've been working a little on adding some more lighting effects, starting first with a suggestion by supermop long ago to add some extra runway eyecandy at airports:

- Bondworth Falls Transport, Jun 11th, 2050.png (39.13 KiB) Viewed 18070 times
These lights unfortunately only really work on the City Airport, but it looks cool nonetheless.
Also started adding some navigation lights to planes and will do the same for ships. Improvements to industries and buildings will hopefully come next.
NewGRF News! (Sort of)
==========
So in the first post of this thread I made a claim that it is not possible for NewGRFs to detect a base graphics set, therefore making and playing with night NewGRFs wasn't really viable unless you wanted to always be stuck in the dark.
Well, I've proven myself wrong.
As it turns out, it
is in fact possible for NewGRFs to detect NightGFX, and thus conditionally provide nighttime sprites only when it is active. It's done basically the same way you detect if another NewGRF is active, in NML specifically the
grf_current_status function. The nightgfx_extra.grf file, which is part of the baseset bundle, has a GRFID (in this case "\FFOTN") which can be queried to see if it is active, and surprisingly it actually works despite being part of a baseset.
[Example]:
The way I did it was start by defining a simple test for NightGFX:
Code: Select all
nightgfx_check = (grf_current_status("\FFOTN") == 1);
Later, somewhere in the graphics callback (just before deciding what spritesets to use) include a switch to test for this:
Code: Select all
switch (FEAT_SHIPS, SELF, switch_spriteset_rhododendron_ferry_night_check, nightgfx_check) {
1: spriteset_rhododendron_ferry_1_stopped32;
spriteset_rhododendron_ferry_1_stopped;
}
This switch will point to either the normal "daytime" graphics or, if the condition is true, a dummy/copy of that spriteset with a unique identifier that will later be used by the
alternative_sprites block where the "night" graphics will be provided.
[/Example]
Doing this I was able to make a test NewGRF switch between daytime and nighttime by saving the game, exiting to the menu, switching base sets, and reloading the game. Admittedly it's a little bit of a hackish solution, but it does seem to work. It certainly could make it easier for NewGRF authors to decide to make night grfs now that it doesn't need to be exclusive

I'm just more than a little disappointed I didn't realize this earlier, it's so obvious

(The same technique could be used to detect other base graphics sets as well, as long as you know the GRFID to query, but what purpose that might serve I don't know.)
Anyway, hopefully someone will find this interesting; I know I certainly did
