Page 1 of 1

Help in creating a new simple train newGRF

Posted: 16 Nov 2017 15:27
by Gliptal
Hey everyone,

I'm looking for a couple of pointers on how to create a very simple newGRF centered around trains. Ideally I'd only modify the default trains slightly (names, speeds), and add new trains to the roster using the default available sprites.

I know how to code and looked at NML already, but I'm at a loss about how to handle sprites, where to get them, or how to compile a newGRF and what files are needed.

I'd appreciate even very simple directions on how to start, a working example with a single train that uses existing graphics would be perfect for example!

Re: Help in creating a new simple train newGRF

Posted: 16 Nov 2017 18:54
by Erato
You must be looking for this: https://www.tt-wiki.net/wiki/NMLTutorial

Re: Help in creating a new simple train newGRF

Posted: 16 Nov 2017 21:48
by Gliptal
Thanks man. Where would I find the default graphic files? I can't seem to find .bmps either in the OpenTTD directory or the OpenGFX+ repo.

Re: Help in creating a new simple train newGRF

Posted: 16 Nov 2017 22:13
by Erato
Gliptal wrote:Thanks man. Where would I find the default graphic files? I can't seem to find .bmps either in the OpenTTD directory or the OpenGFX+ repo.
After compiling the code, the .png files are no longer accessible. I presume with "default graphics" you mean the graphics of the standard OpenTTD trains and such. That'd be these: https://dev.openttdcoop.org/projects/op ... prites/png Also take a look at viewtopic.php?p=644154#p644154 for blank patterns of any size.

Re: Help in creating a new simple train newGRF

Posted: 16 Nov 2017 22:16
by Gliptal
Erato wrote:
Gliptal wrote:Thanks man. Where would I find the default graphic files? I can't seem to find .bmps either in the OpenTTD directory or the OpenGFX+ repo.
After compiling the code, the .png files are no longer accessible. I presume with "default graphics" you mean the graphics of the standard OpenTTD trains and such. That'd be these: https://dev.openttdcoop.org/projects/op ... prites/png Also take a look at viewtopic.php?p=644154#p644154 for blank patterns of any size.
Thank you, this really helps get me started!

Re: Help in creating a new simple train newGRF

Posted: 17 Nov 2017 01:24
by Gliptal
I managed to replicate the Kirby with my newGRF. How would I go to remove the old trains from the list when my grf is active?

Re: Help in creating a new simple train newGRF

Posted: 17 Nov 2017 10:25
by Zephyris
https://newgrf-specs.tt-wiki.net/wiki/NML:Disable_items

I think this is what you're after...

Re: Help in creating a new simple train newGRF

Posted: 17 Nov 2017 12:42
by Gliptal
Thank you everyone.