We have already heard many reasons why some consider this to be unfeasible; I will not repeat them here. Whether one agrees with them or not, the fact remains that nobody has stepped out and written such a program, not even started to work on it. Therefore, I think it is fair to assume that, even if the task could be theoretically possible, it poses practical difficulties that so far have stopped anyone from undertaking it.
So, what I am hereby proposing is that we devise, instead of some kind of program that helps us write NFO, a new extension system in OpenTTD to achieve the same goals that a GRF has (change or add vehicles, stations, buildings, etc.) only that in a more human-friendly fashion. The idea is not to drop GRF support--we want it to make use of the many excellent GRFs already available--but to add a new way in which such GRFs can be created from now on, one that is easier and does not scare newcomers off. This would mean that people wishing to make GRFs for OpenTTD would need to spend less time coding, and particularly much less in the early stages of learning.
While this idea had been lurking in my head for quite some time, it was the recent addition of Squirrel to OpenTTD (for NoAI) what finally set me off to writing an implementation, which I am attaching as a patch against r15084. The patch gives OpenTTD the ability to read a new kind of GRF file, a "SquirrelGRF" file, which is nothing more than a standard Squirrel text file that uses a set of predefined functions to tell OpenTTD what to do or to change, similarly to actions in a NewGRF file. For example, the NewGRF file whose NFO coding is
Code: Select all
0 * 4 02 00 00 00
1 * 23 08 06 10 32 54 76 "Name" 00 "Description" 00
2 * 8 00 00 01 01 00 09 c2 01
Code: Select all
GRFInfo (0x76543210, "Name", "Description");
RailVehicleChangeSpeed (0, 450);
Any comments or suggestions about the idea or the patch are welcome.