Here is the release thread for this newGRF.
This newGRF has very modest aims working towards version 1.0
- add to the game 6 new railtypes with speed limits: 40, 80 and 160 km/h (both normal and electrified)
- allow the user to select a price model for the use of those rails
Later versions will get slightly more ambitious, but the above is the core of what I want to accomplish.
Since I'm new at writing newGRFs, I've needed some time to come up with the NFO to reach my goals.
And yes, I'm aware things like GRFmaker and NML exist. I've briefly considered using them and rejected
the idea for a few reasons:
- neither seems entirely mature
- both seem to be only laying an extra layer on NFO, which in my eyes simply increases the chances of falling prey to some bug
- writing straight NFO might not be very user-friendly, but it's not all that bad either in my opinion
So I came up with the file attached, which *kind of* accomplishes the goals I had set myself. Still, there are some issues and questions I'd like to mention and I'd be gratefull for any helpfull hints regarding coding the more seasoned programmers among you could spare me.
Issue 1: NFOrenum and vehicle IDs above the standard range.
NFOrenum seems to like producing errors when you try to use vehicle IDs greater then the default. This is rather puzzling, since GRFcodec doesn't complain making the grf and the grf file itself works as expected.
Issue 2: Action 4 on trains behaving strange
According to the wiki, the offset in an action 4 can be either a byte or a word depending on the high bit of the language ID. It also mentions the byte version is only allowed when using it to set a vehicles name. I wanted to set a vehicles name, but decided to use the word version. Behold: it didn't work. I received no error, but the name wasn't set and the action 4 wasn't recognized by grf2html as belonging to the vehicle. Seems for some reason you're obligated to use the byte version, not simply allowed. Or maybe it's a bug. In the first case it's probably a good idea that this gets mentioned a bit clearer on the wiki. In the second case, I believe I just added something to someones workload
Working
Code: Select all
-1 * 0 04 00 7F 01 75 "MyTrain" 00
Code: Select all
-1 * 0 04 00 FF 01 75 00 "MyTrain" 00
I have zero talent at drawing stuff, so making image sprites myself is not an option for me. For this project, that doesn't look to be a major problem so far, as I managed to get a somewhat working version 0.1 without having a single image sprite in my NFO. Still, I'm a bit unsure about the way it works now. Am I right in assuming that my new railtypes simply take the images of the lowest railtype when I don't define anything myself ? Is there a way for me to point them to use other existing images without actually including those ? In particular, the menubar for the electrified railtypes would look nicer if copied from ELRL instead of RAIL.
Question 2: image sprites and license stuff
Sooner or later I'm going to need to include images somewhere. At that point, I'm facing the licensing horror issue. For things with a clear owner, I can always ask permission so that's easy. Is it allowed to include sprites present in the original game ? I assume not since those are probably considered licensed to Chris Sawyer. How about OpenGFX ? Do I need to ask permission there, or does it suffice to simply mention the origin of the graphics ? What's the policy on graphics from people you can't contact ? Does it suffice to give credit ?
Question 3: "activating" railtypes
From what I understand, railtypes are disabled by default until the player can buy at least 1 loc belonging to that railtype. Is there any way around that requirement ? Anything planned for the future that would help ? Having a way to activate a railtype when another railtype becomes active would help me here. So would activating a railtype using dates instead of checking the presence of a loc. Now I've been forced to include 6 locs I don't want. The best "solution" I've come up wih myself would be to request the owner of the "invisible" loc out there (a newgrf to allow wagons to be parked as eyecandy) to be allowed to use those sprites to make my locs invisible. That would still keep them on the list, but make them a bit less obtrusive.