Modifying introduction date

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
lorran78
Engineer
Engineer
Posts: 4
Joined: 07 Sep 2014 15:40

Modifying introduction date

Post by lorran78 »

Hello,

I wanted to play a game from year 0 to have more time to test my optimised city without modern buildings but all vehicules come much later...
So i changed pnml file from the last version of opengfx+ source (ogfx-trains-6016-source.tar.xz), and i used nml program with the nml from ftp.
But i always obtain the same grf file even if i change pnml of vehicle like that :

"item(FEAT_TRAINS, asiastar, 26) {
property {
sprite_id: SPRITE_ID_NEW_TRAIN;
misc_flags: bitmask(TRAIN_FLAG_MU, TRAIN_FLAG_2CC);
-----------------add--------------
introduction_date: date(1300, 1, 1);
-----------------------------------
}
graphics { asiastar_engine_switch_gui; }
livery_override (passenger_wagon) { asiastar_passenger_year_switch; }
livery_override (mail_wagon) { asiastar_mail_year_switch; }
livery_override (valuables_wagon) { asiastar_valuables_year_switch; }
}"

Someone told me that i must use make program but how?

Thx.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Modifying introduction date

Post by planetmaker »

OpenTTD does not read NML files. It reads grf files.

You got the source code of a NewGRF written in NML, thus you need to use the nml compiler in order to transform that nml code (along with the graphics) into a NewGRF. In a new game you can then use that NewGRF.

https://www.tt-wiki.net/wiki/NMLTutorial for an NML tutorial
https://www.tt-wiki.net/wiki/NMLTutorial/Installation for how to install NML and possibly get your nml source compiled. The source you downloaded requires nml installed, as well as the default unix programming tools gcc, make and some other small tools. The readme lists them in section 5.3.
lorran78
Engineer
Engineer
Posts: 4
Joined: 07 Sep 2014 15:40

Re: Modifying introduction date

Post by lorran78 »

Yes i know OTTD doesn't read nml but gfx
I installed all software to compile but now i don't know how to use make with the makefile into source of the grf
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Modifying introduction date

Post by Transportman »

lorran78 wrote:Yes i know OTTD doesn't read nml but gfx
I installed all software to compile but now i don't know how to use make with the makefile into source of the grf
Make is a bit of a separate beast, that precompiles all partial NML files (.pnml) into one big .nml and then calls the NML program to compile that .nml into a .grf.

There are some guides to set up such an environment, these guides can be found here. Once you have set up such an environment, it is just calling make from the command line (or first open bash if you are on Windows 10), which will then create the .grf for you.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 16 guests