Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Sep 26, 2018 9:51 am

All times are UTC




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Tue Feb 21, 2017 9:02 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sat Nov 17, 2007 5:23 pm
Posts: 160
Skype: ben313371
Hey there.

I've always kinda wanted to have a god at creating my own version of the Starting Ratings GRF https://www.tt-forums.net/viewtopic.php?p=1183003#p1183003 as I thought that since it doesn't deal with graphics development, but instead, depends entirely on scripts, I'd have an easier time with creating my first GRF, But I am having trouble getting started.

So I did a quick search around the internet and discovered that NML was a good program to code in, but I need a program to compress the files into a Game Resource File.

So first, I looked around for the tools that are used for OTTD development https://wiki.openttd.org/NewGRF_development_tools and despite how many tools are there, there are only 2 or 3 tools which are actually used for GRF development, which are the following:
  • GRF Wizard - which seems to be a tool that handles with purely the graphics side of things (Sprites and all that.), it links in with GRF codec which, in itself, does very much the same thing, just with Command Prompt.
  • NML - Which seems to be a command prompt program to compile scripts written in NML written by an external editor (eg: notepad or notepad++).
  • m4nfo - Another NML editor which seems to need its own Operating System.

So now I need to merge the 2 somehow... But since I don't really know how to code in NML and use the programs that I have retrieved it seems that I have got bogged down with trying to understand how to do it.


Top
   
PostPosted: Tue Feb 21, 2017 9:09 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9036
Location: Sol d
The only officially supported programmes are
* NML
* grfcodec

There is no way to write NewGRFs or base grfs without the coding part. However that coding part is not tricky, and there are tutorials and for the simple cases it's just telling the programme how your NewGRF is called and where it finds the graphics

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Tue Feb 21, 2017 12:26 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sat Nov 17, 2007 5:23 pm
Posts: 160
Skype: ben313371
Alright, Yeah, that makes sense.

Since the station ratings GRF doesn't contain any graphics what so ever, do you think it's best to start off with that? or should I attempt something similar to the base set? Ie: minimal coding and mostly graphics.

I ask this because I'm comfortable with a basic understanding of coding, but I'm not sure on how to translate that into a way that OTTD understands and I find that the https://newgrf-specs.tt-wiki.net website seems to confuse me even more.


Top
   
PostPosted: Tue Feb 21, 2017 1:58 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9036
Location: Sol d
have a look at the tutorials at https://www.tt-wiki.net/wiki/NMLTutorial and browse the many projects available at the DevZone for examples: http://dev.openttdcoop.org

Consider a similarily free license for your work - so that others can profit from what you make in the same way you profit from those existing projects.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Fri Mar 24, 2017 4:26 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sat Nov 17, 2007 5:23 pm
Posts: 160
Skype: ben313371
Thank you for linking that, I've been trying to work through it and for the most part I've ben reasonably successful, the only thing I don't have is a sample to test if I've installed the nml encoder correctly.


Top
   
PostPosted: Fri Mar 24, 2017 5:41 pm 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2648
Ben1338 wrote:
Thank you for linking that, I've been trying to work through it and for the most part I've ben reasonably successful, the only thing I don't have is a sample to test if I've installed the nml encoder correctly.

You can test that by running nmlc from the command line. If installed correctly and nmlc is in your path (which would be helpful as you don't have to mess with pointing to file paths all the time), it should answer with something.

_________________
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML


Top
   
PostPosted: Fri Mar 24, 2017 6:29 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sat Nov 17, 2007 5:23 pm
Posts: 160
Skype: ben313371
Fair enough, thank you.


Top
   
PostPosted: Sat Mar 25, 2017 5:24 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4668
Location: home
Standard trick in these cases is to query version (with --version) or online help (with -h), like
Code:
nmlc --version
That eliminates the need for a specification.

I typically make a batch script for running it anyway, even if it is in the path, as that eliminates the need to specify the input file, output file, and compile options, each time.

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.