How to start with new grf?
Moderator: Graphics Moderators
How to start with new grf?
Hello!
I want to develop newGRF's for OTTD. I searched for tutorials, found a few of them, but nothing that can really help. I want to make an industry, (similar to bank), producing something, what I can transport outside the city. So I begin my GRF like this: At compile I get this error: "[Knmlc ERROR: "mygrf.nml", line 21: Cargo list must be an array with no more than 2 values"
Okay, I think I looking for what NML means an array. And I found nothing. But thats not all. There is not a single tutorial for this. How can I do this?
I want to develop newGRF's for OTTD. I searched for tutorials, found a few of them, but nothing that can really help. I want to make an industry, (similar to bank), producing something, what I can transport outside the city. So I begin my GRF like this: At compile I get this error: "[Knmlc ERROR: "mygrf.nml", line 21: Cargo list must be an array with no more than 2 values"
Okay, I think I looking for what NML means an array. And I found nothing. But thats not all. There is not a single tutorial for this. How can I do this?
Re: How to start with new grf?
Replace...
with...
And later, if you want more cargotypes...
Code: Select all
prod_cargo_types: cargotype(TOYS);
Code: Select all
prod_cargo_types: [cargotype(TOYS)];
Code: Select all
prod_cargo_types: [cargotype(TOYS), cargotype(BOYS)];
Re: How to start with new grf?
Cadde wrote:Replace...with...Code: Select all
prod_cargo_types: cargotype(TOYS);
And later, if you want more cargotypes...Code: Select all
prod_cargo_types: [cargotype(TOYS)];
Code: Select all
prod_cargo_types: [cargotype(TOYS), cargotype(BOYS)];
okay, so it must been prod_cargo_types: [TOYS, ...].
Thanks!
I have a second question realated to this. Ia I said I want to create a custom industry. Is there any tutorial for that?
Re: How to start with new grf?
Not that i know of no, but i assume you know what you want your industry to do. Right?
And you already have the necessary properties and sprites set up for that industry?
Then you go over the nml documentation and find stuff that's relevant to your interests. If you can't find an answer on the Wiki or here on the forums then do ask.
I am pretty sure a lot of people have gone through the basics of NML without a tutorial and once they know NML well enough to write a tutorial, they don't feel like writing a tutorial.
And you already have the necessary properties and sprites set up for that industry?
Then you go over the nml documentation and find stuff that's relevant to your interests. If you can't find an answer on the Wiki or here on the forums then do ask.
I am pretty sure a lot of people have gone through the basics of NML without a tutorial and once they know NML well enough to write a tutorial, they don't feel like writing a tutorial.
Re: How to start with new grf?
Code: Select all
layouts: IND_LIFE_TYPE_PROCESSING;
At some point in my learning I turned from tutorials to looking at how other people have dealt with the topic of concern. For industries, I learned a lot from Yeti and OpenGFX+ Industries. This Yeti page is as close to a tutorial as I have seen:
http://dev.openttdcoop.org/projects/yeti/wiki/Code
To some extent, I view most of the OpenGFX+ code as tutorial: they are examples of how to do it right with minor variations from vanilla.
http://dev.openttdcoop.org/projects/ogfx-industries
A lot of projects use build systems that can make it harder for to a beginner to understand so here's a simplified but functional oil well that I wrote when I was first getting started with industries.
- Attachments
-
- eg.nml
- trivial oil well
- (925 Bytes) Downloaded 149 times
Who is online
Users browsing this forum: No registered users and 27 guests