How to create Newgrf for my self

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
Manager
Engineer
Engineer
Posts: 13
Joined: 05 Dec 2013 16:59
Location: Jakarta, Indonesia

How to create Newgrf for my self

Post by Manager »

Hello guys, i want a create Newgrf for my self, but i not know for a make :cry:

what you know how to make NewGRF alone?

Sorry for my English :oops:
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9424
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: How to create Newgrf for my self

Post by planetmaker »

Manager wrote:Hello guys, i want a create Newgrf for my self, but i not know for a make :cry:

what you know how to make NewGRF alone?

Sorry for my English :oops:
have a look at the tutorial(s), e.g. http://www.tt-wiki.net/wiki/NMLTutorial and also make use of the documentation at http://newgrf-specs.tt-wiki.net/wiki/NML:Main
There's many open source projects found at the DevZone which can act as examples.
Transportman
Tycoon
Tycoon
Posts: 2755
Joined: 22 Feb 2011 18:34

Re: How to create Newgrf for my self

Post by Transportman »

What planetmaker says, but note that not all features are available in NML. Most important, stations are not available in NML.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Manager
Engineer
Engineer
Posts: 13
Joined: 05 Dec 2013 16:59
Location: Jakarta, Indonesia

Re: How to create Newgrf for my self

Post by Manager »

Thanks, I want a create busses, what can GRFmaker?
Manager
Engineer
Engineer
Posts: 13
Joined: 05 Dec 2013 16:59
Location: Jakarta, Indonesia

Re: How to create Newgrf for my self

Post by Manager »

so, it is very difficult
I do not understand at all
Transportman
Tycoon
Tycoon
Posts: 2755
Joined: 22 Feb 2011 18:34

Re: How to create Newgrf for my self

Post by Transportman »

I would suggest following the NML Tutorial, it starts with building up a NewGRF from scratch, and then it shows how to code a road vehicle.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Manager
Engineer
Engineer
Posts: 13
Joined: 05 Dec 2013 16:59
Location: Jakarta, Indonesia

Re: How to create Newgrf for my self

Post by Manager »

thank you for the advice, I will reinstall NML :wink:
whether GRFMaker can be used to make a busses? :(
Transportman
Tycoon
Tycoon
Posts: 2755
Joined: 22 Feb 2011 18:34

Re: How to create Newgrf for my self

Post by Transportman »

GRFmaker is not needed if you use NML.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Manager
Engineer
Engineer
Posts: 13
Joined: 05 Dec 2013 16:59
Location: Jakarta, Indonesia

Re: How to create Newgrf for my self

Post by Manager »

Thanks,
I am still confused how to run the application , what was easy and the right route ?

Installing NML
Go to http://bundles.openttdcoop.org/nml/nightlies/LATEST/ and download NML - rXXXX - windows- win32.zip , replacing XXXX with the actual version number of the package . The ZIP file contains a number of files that all need to stay together . Where these files go depends on Whether you want to take the easy route or do it properly .
Easy route
The easy route is to extract all the NML program files in the same directory as your project NML ( where your files with the NML code and the directories with language and graphics files will go later ) . With this , you can use the NML program for this project alone . If you want to work on multiple projects GRF coded in NML , you need to copy the NML program files to each of these project directories .
Proper route
If you want to run NML from any directory , you need to add the directory containing the executable nmlc.exe ( and related files) to your PATH environment variable . This can break Windows if you do not do it Correctly , so follow the instructions carefully . The instructions have been written for Windows 7 and may Differ slightly on other Windows versions .
First , extract the NML program files to a directory of your choice , eg C : \ tools \ NML . It is preferred that you do not have spaces in the directory path , so avoid the " Program Files " directory . Once you have that , remember the directory path carefully and follow these steps :
Rightclick "Computer " on the desktop or in the Start menu and select Properties . This will open the System Configuration window from the panel .
Click Advanced system settings in the left pane . This will open the System Properties window .
Click the Advanced tab .
On the Advanced tab , click the Environment Variables ... button . This will open the Environment Variables window .
In the bottom half of the window below System variables , find the Path entry and select it .
With the Path entry selected , click the Edit ... button . An edit box will Appear .
Do not touch the variable name and do not remove anything from the Variable value! ( This is where you can break your computer . )
Put your cursor at the end of the Variable name box and type a semicolon Followed by the directory path to the NML program , in this case ; C : \ tools \ NML
Confirm your changes by clicking the OK button in each of the three windows .
Now you can use the NML program from any directory on your computer .
using NML
As said before , NML is a command - line program and therefore does not have a GUI ; much like GRFCodec , in fact . That means you need to run it from a command prompt window . You can start the command prompt from the Start > Programs > Accessories > Command Prompt , or by entering cmd into the Run dialog or the Start menu search bar .
Next , you need to change directory to the project folder has your roomates NML ( code) files in it . Then run the program to compile Cell nmlc GRF . For example :
Manager
Engineer
Engineer
Posts: 13
Joined: 05 Dec 2013 16:59
Location: Jakarta, Indonesia

Re: How to create Newgrf for my self

Post by Manager »

which route should choose?
Transportman
Tycoon
Tycoon
Posts: 2755
Joined: 22 Feb 2011 18:34

Re: How to create Newgrf for my self

Post by Transportman »

If it is just one NewGRF you want to work on, use the easy route, if you plan on making more NewGRFs, go with the proper route.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Manager
Engineer
Engineer
Posts: 13
Joined: 05 Dec 2013 16:59
Location: Jakarta, Indonesia

Re: How to create Newgrf for my self

Post by Manager »

okay, if NML can edit NewGRF? I just want to edit the only busses Ikarus :D
User avatar
kamnet
Moderator
Moderator
Posts: 7578
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: How to create Newgrf for my self

Post by kamnet »

Neither NFO (via GRFCodec) nor NML are simple to learn, but they're not difficult to learn, either. You simply have to take some time to read it, practice it and learn how it works. It's clearly possible to learn as many people - many of whom have no prior experience - have learned, and produce many NewGRFs. Just be patient, try, and ask questions in the NewGRF Technical Discussion forum. There are many people who are willing to help answer your questions.
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: How to create Newgrf for my self

Post by FooBar »

Manager wrote:okay, if NML can edit NewGRF? I just want to edit the only busses Ikarus :D
NML cannot edit existing NewGRFs (unless they are made in NML and you have access to the source code).
Manager
Engineer
Engineer
Posts: 13
Joined: 05 Dec 2013 16:59
Location: Jakarta, Indonesia

Re: How to create Newgrf for my self

Post by Manager »

All right, Thanks all
I will try it.
But I can not run the application NML
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: How to create Newgrf for my self

Post by Sylf »

NML is not an application you launch to start building your own newGRF. It is a language specification used to write the newGRF meta information. It is a programming language. You write your NML program using a text editor like Notepad, Sublime Text or vi.

Then you run the nmlc program which will compile your .nml file and image files into your .grf file.

You should really read the NML Tutorial.
User avatar
YNM
Tycoon
Tycoon
Posts: 3568
Joined: 22 Mar 2012 11:10
Location: West Java

Re: How to create Newgrf for my self

Post by YNM »

NML is a command-line program ; it doesn't have any graphical UI to show, except for the stats that it'll print (in command prompt) on every execution that you initiate. You don't code with the NML executables ; you provide the graphics, then write an .nml file, to do this follow the NML tutorial, write the .lng files for the strings in your NML code, then run a command in command prompt (assuming you use windows) to compile them. If your compilation succeed, there will be a .grf file produced, which you can use in OpenTTD.

The NML executables also can be used to decompile a .grf file (if it was written using NML, mind you, im not sure whether Ikarus Bus Set use NML or NFO, also mind the copyright or license used) if you run the correct command. This will result, if everything is correct, an uncommented .nml file, a single / some .lng files, and the graphics files.
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
Manager
Engineer
Engineer
Posts: 13
Joined: 05 Dec 2013 16:59
Location: Jakarta, Indonesia

Re: How to create Newgrf for my self

Post by Manager »

All right guys
User avatar
Phreeze
Route Supervisor
Route Supervisor
Posts: 507
Joined: 12 Feb 2010 14:30
Location: Luxembourg

Re: How to create Newgrf for my self

Post by Phreeze »

basically, follow the tutorial. if you can manage to create the GRF from the tutorial, just edit the files and change graphics ;)
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google [Bot], trexxet and 9 guests