<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://www.tt-wiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Oberh%C3%BCmer</id>
	<title>TTWiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://www.tt-wiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Oberh%C3%BCmer"/>
	<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/wiki/Special:Contributions/Oberh%C3%BCmer"/>
	<updated>2026-04-15T11:38:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle&amp;diff=7648</id>
		<title>NMLTutorial/Road vehicle</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle&amp;diff=7648"/>
		<updated>2011-08-24T15:29:44Z</updated>

		<summary type="html">&lt;p&gt;Oberhümer: tiny error :)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLTutorial}}&lt;br /&gt;
''The example used here is from the [http://dev.openttdcoop.org/projects/nml/repository/show/examples NML source]. The code for this was originally written by Terkhen and planetmaker. The graphics used in the example are by DanMack and Zephyris. Code and graphics are both licensed according to the GPL v2 or later. The code has been modified for the purpose of this tutorial''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
In this part of the tutorial we'll be making a road vehicle. The example spans a couple of pages and has some intermediate pages introducing new concepts. We'll be assuming that you already have the graphics and know how to create the language file(s).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Grf block ==&lt;br /&gt;
You already [[NMLTutorial/Starting an NML file|know]] how to make a grf block, so make one or copy the example below. This goes at the top of your NML file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:darkblue;&amp;quot;&amp;gt;&lt;br /&gt;
//define the grf&lt;br /&gt;
grf {&lt;br /&gt;
    grfid: &amp;quot;NML\03&amp;quot;;&lt;br /&gt;
    name: string(STR_GRF_NAME);&lt;br /&gt;
    desc: string(STR_GRF_DESC);&lt;br /&gt;
    version: 0;&lt;br /&gt;
    min_compatible_version: 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Language file ==&lt;br /&gt;
In the grf block you just defined two strings. These of course should go into at least one language file and more than one if you want to provide translations. For this example, we'll limit ourselves to english.lng:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:darkblue; white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
##grflangid 0x01&lt;br /&gt;
&lt;br /&gt;
# GRF name and description&lt;br /&gt;
STR_GRF_NAME   :NML Example NewGRF: Road Vehicle&lt;br /&gt;
STR_GRF_DESC   :{ORANGE}NML Example NewGRF: Road Vehicle{}{BLACK}This NewGRF is intended to provide a coding example for the high-level NewGRF-coding language NML.{}Original graphics by {SILVER}DanMack, Zephyris, {BLACK}coding by {SILVER}Terkhen, planetmaker.{}{BLACK}This NewGRF defines a first-generation flatbed truck.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this you have the basics of the NML and language file. Continue to learn about the item block; after that you'll be using it to define a road vehicle.&lt;br /&gt;
&lt;br /&gt;
{{NMLTutorialNavbar|Starting an NML file|Item}}&lt;/div&gt;</summary>
		<author><name>Oberhümer</name></author>
	</entry>
</feed>