<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://www.tt-wiki.net/index.php?action=history&amp;feed=atom&amp;title=NMLTutorial%2FRoad_vehicle_cargo_graphics</id>
	<title>NMLTutorial/Road vehicle cargo graphics - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.tt-wiki.net/index.php?action=history&amp;feed=atom&amp;title=NMLTutorial%2FRoad_vehicle_cargo_graphics"/>
	<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_cargo_graphics&amp;action=history"/>
	<updated>2026-05-02T03:18:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_cargo_graphics&amp;diff=8440&amp;oldid=prev</id>
		<title>FooBar: allow to skip ahead to 32 bit sprites section</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_cargo_graphics&amp;diff=8440&amp;oldid=prev"/>
		<updated>2012-06-26T11:25:22Z</updated>

		<summary type="html">&lt;p&gt;allow to skip ahead to 32 bit sprites section&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:25, 26 June 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 264:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 264:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the ones brave enough to continue, we have some really nice topics in store for you. You&#039;ll learn to do some funky stuff with callbacks and switches (amonst others) and we have three more fully featured examples for you, each a little more advanced than the previous.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the ones brave enough to continue, we have some really nice topics in store for you. You&#039;ll learn to do some funky stuff with callbacks and switches (amonst others) and we have three more fully featured examples for you, each a little more advanced than the previous.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you don&#039;t care about all the other fancy things you can do, but do want to add 32 bit sprites, for this time we&#039;ll allow you to skip ahead to the [[NMLTutorial/32 bit sprites|part on 32 bit sprites]]. Adding 32 bit sprites does not require any more knowledge than what you have gained now.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{NMLTutorialNavbar|Cargotable|Callback and switch}}&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{NMLTutorialNavbar|Cargotable|Callback and switch}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div style=&quot;text-align:center&quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{NMLTutorialNavbar|Cargotable|32 bit sprites}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>FooBar</name></author>
	</entry>
	<entry>
		<id>https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_cargo_graphics&amp;diff=8353&amp;oldid=prev</id>
		<title>Hazzard at 16:19, 10 May 2012</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_cargo_graphics&amp;diff=8353&amp;oldid=prev"/>
		<updated>2012-05-10T16:19:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:19, 10 May 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Because the graphics are open source, I&#039;ll give them to you so you don&#039;t have to draw them first:&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Because the graphics are open source, I&#039;ll give them to you so you don&#039;t have to draw them first:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Flatbed truck 1 copper.png|frame|none|Graphics for copper cargo]]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Flatbed truck 1 copper.png|frame|none|Graphics for copper cargo&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; (not to be confused with copper ore)&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Flatbed truck 1 paper.png|frame|none|Graphics for paper cargo]]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Flatbed truck 1 paper.png|frame|none|Graphics for paper cargo]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hazzard</name></author>
	</entry>
	<entry>
		<id>https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_cargo_graphics&amp;diff=7634&amp;oldid=prev</id>
		<title>FooBar: next page is Callback and switch</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_cargo_graphics&amp;diff=7634&amp;oldid=prev"/>
		<updated>2011-08-23T20:57:36Z</updated>

		<summary type="html">&lt;p&gt;next page is Callback and switch&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:57, 23 August 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 265:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 265:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the ones brave enough to continue, we have some really nice topics in store for you. You&#039;ll learn to do some funky stuff with callbacks and switches (amonst others) and we have three more fully featured examples for you, each a little more advanced than the previous.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the ones brave enough to continue, we have some really nice topics in store for you. You&#039;ll learn to do some funky stuff with callbacks and switches (amonst others) and we have three more fully featured examples for you, each a little more advanced than the previous.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{NMLTutorialNavbar|Cargotable|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Switch&lt;/del&gt;}}&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{NMLTutorialNavbar|Cargotable|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Callback and switch&lt;/ins&gt;}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>FooBar</name></author>
	</entry>
	<entry>
		<id>https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_cargo_graphics&amp;diff=7630&amp;oldid=prev</id>
		<title>FooBar: conclude the road vehicle example</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_cargo_graphics&amp;diff=7630&amp;oldid=prev"/>
		<updated>2011-08-23T20:00:42Z</updated>

		<summary type="html">&lt;p&gt;conclude the road vehicle example&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{NMLTutorial}}&lt;br /&gt;
&amp;#039;&amp;#039;The example used here is from the 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&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This continues and concludes the [[NMLTutorial/Road vehicle graphics template|fourth part]] of the road vehicle example. We&amp;#039;ll add some different graphics for different cargos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== More graphics ==&lt;br /&gt;
So far, our truck is rather boring, showing just a container when it&amp;#039;s loaded regardless of the cargo it carries. NML makes it easy to supply different graphics depending the cargo the vehicle is refitted to.&lt;br /&gt;
&lt;br /&gt;
Because the graphics are open source, I&amp;#039;ll give them to you so you don&amp;#039;t have to draw them first:&lt;br /&gt;
&lt;br /&gt;
[[Image:Flatbed truck 1 copper.png|frame|none|Graphics for copper cargo]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Flatbed truck 1 paper.png|frame|none|Graphics for paper cargo]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Flatbed truck 1 steel.png|frame|none|Graphics for steel cargo]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Flatbed truck 1 wood.png|frame|none|Graphics for wood cargo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== More spritesets and spritegroups ==&lt;br /&gt;
Each block of sprites will need a spriteset and the empty and full states again need to be combined in a spriteset. Look [[NMLTutorial/Road vehicle graphics|back]] if you&amp;#039;ve forgotten how to do that.&lt;br /&gt;
&lt;br /&gt;
The spritesets of course will use the template we made earlier. As there&amp;#039;s nothing new to say about the spritesets and spritegroups, I&amp;#039;ll just give them to you:&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;
/* Define various cargo-specific graphics */&lt;br /&gt;
&lt;br /&gt;
/* Paper */&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_paper_empty, &amp;quot;gfx/flatbed_truck_1_paper.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(0, 0) &lt;br /&gt;
}&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_paper_full, &amp;quot;gfx/flatbed_truck_1_paper.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(260, 0) &lt;br /&gt;
}&lt;br /&gt;
spritegroup spritegroup_flatbed_truck_1_paper {&lt;br /&gt;
    loaded: [spriteset_flatbed_truck_1_paper_empty, spriteset_flatbed_truck_1_paper_full];&lt;br /&gt;
    loading: [spriteset_flatbed_truck_1_paper_empty, spriteset_flatbed_truck_1_paper_full];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Steel */&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_steel_empty, &amp;quot;gfx/flatbed_truck_1_steel.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(0, 0) &lt;br /&gt;
}&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_steel_full, &amp;quot;gfx/flatbed_truck_1_steel.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(260, 0) &lt;br /&gt;
}&lt;br /&gt;
spritegroup spritegroup_flatbed_truck_1_steel {&lt;br /&gt;
    loaded: [spriteset_flatbed_truck_1_steel_empty, spriteset_flatbed_truck_1_steel_full];&lt;br /&gt;
    loading: [spriteset_flatbed_truck_1_steel_empty, spriteset_flatbed_truck_1_steel_full];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Wood */&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_wood_empty, &amp;quot;gfx/flatbed_truck_1_wood.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(0, 0) &lt;br /&gt;
}&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_wood_full, &amp;quot;gfx/flatbed_truck_1_wood.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(260, 0) &lt;br /&gt;
}&lt;br /&gt;
spritegroup spritegroup_flatbed_truck_1_wood {&lt;br /&gt;
    loaded: [spriteset_flatbed_truck_1_wood_empty, spriteset_flatbed_truck_1_wood_full];&lt;br /&gt;
    loading: [spriteset_flatbed_truck_1_wood_empty, spriteset_flatbed_truck_1_wood_full];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Copper */&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_copper_empty, &amp;quot;gfx/flatbed_truck_1_copper.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(0, 0) &lt;br /&gt;
}&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_copper_full, &amp;quot;gfx/flatbed_truck_1_copper.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(260, 0) &lt;br /&gt;
}&lt;br /&gt;
spritegroup spritegroup_flatbed_truck_1_copper {&lt;br /&gt;
    loaded: [spriteset_flatbed_truck_1_copper_empty, spriteset_flatbed_truck_1_copper_full];&lt;br /&gt;
    loading: [spriteset_flatbed_truck_1_copper_empty, spriteset_flatbed_truck_1_copper_full];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These new spriteset and spritegroup definitions can be added to the one you already have.&lt;br /&gt;
&lt;br /&gt;
You may have noticed that some of the empty vehicle graphics are the same. To reduce the filesize of the NewGRF and to limit the number of sprites ingame, it is better not to duplicate sprites if you don&amp;#039;t have to. In this case that can be solved by removing the spritesets that define duplicate sprites. From the spritegroups, you need to change the references to removed spritesets to point to the one remaining spriteset instead. Because spritesets need to be defined before they can be referenced, this will involve some reordering of the spritesets and spritegroups. Once you have the road vehicle working with different graphics, it will be a nice challenge for you to try and remove the duplicates yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Cargotable ==&lt;br /&gt;
Before you can link the graphics to the vehicle and the different cargos, you need to tell NML which cargos you&amp;#039;ll be using in your NML file. This means adding a cargotable.&lt;br /&gt;
&lt;br /&gt;
First, you need to [http://newgrf-specs.tt-wiki.net/wiki/CargoTypes#Cargo_Labels look up] the labels of the cargos we have custom graphics for. For paper, steel, copper and wood these labels are &amp;lt;code&amp;gt;PAPR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;STEL&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;COPR&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WOOD&amp;lt;/code&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
This will give us the following cargotable:&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;
cargotable {&lt;br /&gt;
    PAPR, // Paper&lt;br /&gt;
    STEL, // Steel&lt;br /&gt;
    COPR, // Copper&lt;br /&gt;
    WOOD, // Wood&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final comma (after WOOD) isn&amp;#039;t needed, but doesn&amp;#039;t hurt either. The cargotable itself should go somewhere near the top of your NML file, as it needs to be defined before you can use any of the cargo labels elsewhere. Below the template definition seems a good place for it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linking the graphics ==&lt;br /&gt;
&lt;br /&gt;
Linking the graphics to the vehicle and a specific cargo label is easy. It is done in the graphics block of the item block of the vehicle. There you just write the label of the cargo, followed by a colon and the identifier of the spritegroup (or spriteset if you don&amp;#039;t have a spritegroup). Finish the line with a simicolon.&lt;br /&gt;
&lt;br /&gt;
This will change our graphics block into the following:&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;
    graphics {&lt;br /&gt;
        PAPR: spritegroup_flatbed_truck_1_paper;&lt;br /&gt;
        STEL: spritegroup_flatbed_truck_1_steel;&lt;br /&gt;
        COPR: spritegroup_flatbed_truck_1_copper;&lt;br /&gt;
        WOOD: spritegroup_flatbed_truck_1_wood;&lt;br /&gt;
        default: spritegroup_flatbed_truck_1_goods; // Default to Goods.&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now this truck will show different sprites when refitted to paper, steel, copper or wood. When refitted to something else, it will show the container we already had.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The complete code ==&lt;br /&gt;
The complete NML file that defines this road vehicle with it&amp;#039;s different (templated) graphics will now look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:darkblue; white-space: pre-wrap; max-height: 200px; overflow:scroll&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;
&lt;br /&gt;
/* Sprite template for a truck */&lt;br /&gt;
template tmpl_truck(x, y) {&lt;br /&gt;
    //left_x, upper_y, width, height, offset_x, offset_y&lt;br /&gt;
    [  0 + x, y,        8,    18,      -3,      -10]&lt;br /&gt;
    [ 16 + x, y,       20,    16,     -14,       -7]&lt;br /&gt;
    [ 48 + x, y,       28,    12,     -14,       -6]&lt;br /&gt;
    [ 96 + x, y,       20,    16,      -6,       -7]&lt;br /&gt;
    [128 + x, y,        8,    18,      -3,      -10]&lt;br /&gt;
    [144 + x, y,       20,    16,     -14,       -7]&lt;br /&gt;
    [176 + x, y,       28,    12,     -14,       -6]&lt;br /&gt;
    [224 + x, y,       20,    16,      -6,       -7]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Define a cargo translation table&lt;br /&gt;
 * All cargo types that need any special treatment must be included here */&lt;br /&gt;
cargotable {&lt;br /&gt;
    PAPR, // Paper&lt;br /&gt;
    STEL, // Steel&lt;br /&gt;
    COPR, // Copper&lt;br /&gt;
    WOOD, // Wood&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Define various cargo-specific graphics */&lt;br /&gt;
&lt;br /&gt;
/* Paper */&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_paper_empty, &amp;quot;gfx/flatbed_truck_1_paper.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(0, 0) &lt;br /&gt;
}&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_paper_full, &amp;quot;gfx/flatbed_truck_1_paper.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(260, 0) &lt;br /&gt;
}&lt;br /&gt;
spritegroup spritegroup_flatbed_truck_1_paper {&lt;br /&gt;
    loaded: [spriteset_flatbed_truck_1_paper_empty, spriteset_flatbed_truck_1_paper_full];&lt;br /&gt;
    loading: [spriteset_flatbed_truck_1_paper_empty, spriteset_flatbed_truck_1_paper_full];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Steel */&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_steel_empty, &amp;quot;gfx/flatbed_truck_1_steel.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(0, 0) &lt;br /&gt;
}&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_steel_full, &amp;quot;gfx/flatbed_truck_1_steel.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(260, 0) &lt;br /&gt;
}&lt;br /&gt;
spritegroup spritegroup_flatbed_truck_1_steel {&lt;br /&gt;
    loaded: [spriteset_flatbed_truck_1_steel_empty, spriteset_flatbed_truck_1_steel_full];&lt;br /&gt;
    loading: [spriteset_flatbed_truck_1_steel_empty, spriteset_flatbed_truck_1_steel_full];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Wood */&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_wood_empty, &amp;quot;gfx/flatbed_truck_1_wood.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(0, 0) &lt;br /&gt;
}&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_wood_full, &amp;quot;gfx/flatbed_truck_1_wood.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(260, 0) &lt;br /&gt;
}&lt;br /&gt;
spritegroup spritegroup_flatbed_truck_1_wood {&lt;br /&gt;
    loaded: [spriteset_flatbed_truck_1_wood_empty, spriteset_flatbed_truck_1_wood_full];&lt;br /&gt;
    loading: [spriteset_flatbed_truck_1_wood_empty, spriteset_flatbed_truck_1_wood_full];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Copper */&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_copper_empty, &amp;quot;gfx/flatbed_truck_1_copper.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(0, 0) &lt;br /&gt;
}&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_copper_full, &amp;quot;gfx/flatbed_truck_1_copper.png&amp;quot;) { &lt;br /&gt;
    tmpl_truck(260, 0) &lt;br /&gt;
}&lt;br /&gt;
spritegroup spritegroup_flatbed_truck_1_copper {&lt;br /&gt;
    loaded: [spriteset_flatbed_truck_1_copper_empty, spriteset_flatbed_truck_1_copper_full];&lt;br /&gt;
    loading: [spriteset_flatbed_truck_1_copper_empty, spriteset_flatbed_truck_1_copper_full];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Goods */&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_goods_empty, &amp;quot;gfx/flatbed_truck_1_goods.png&amp;quot;) {&lt;br /&gt;
    tmpl_truck(0, 0)&lt;br /&gt;
}&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_goods_full, &amp;quot;gfx/flatbed_truck_1_goods.png&amp;quot;) {&lt;br /&gt;
    tmpl_truck(260, 0)&lt;br /&gt;
}&lt;br /&gt;
spritegroup spritegroup_flatbed_truck_1_goods {&lt;br /&gt;
    loaded: [spriteset_flatbed_truck_1_goods_empty, spriteset_flatbed_truck_1_goods_full];&lt;br /&gt;
    loading: [spriteset_flatbed_truck_1_goods_empty, spriteset_flatbed_truck_1_goods_full];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Define the road vehicle */&lt;br /&gt;
item(FEAT_ROADVEHS, item_flatbed_truck_1) {&lt;br /&gt;
    property {&lt;br /&gt;
        /* Properties common to all vehicle types */&lt;br /&gt;
        name:                           string(STR_NAME_FLATBED_TRUCK_1);&lt;br /&gt;
        climates_available:             bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL);&lt;br /&gt;
        introduction_date:              date(1926,01,01);&lt;br /&gt;
        model_life:                     65;&lt;br /&gt;
        /* retire_early not set, use default retirement behaviour */&lt;br /&gt;
        vehicle_life:                   15;&lt;br /&gt;
        reliability_decay:              20;&lt;br /&gt;
        refittable_cargo_classes:       bitmask(CC_PIECE_GOODS, CC_EXPRESS);&lt;br /&gt;
        non_refittable_cargo_classes:   bitmask(CC_PASSENGERS, CC_REFRIGERATED);&lt;br /&gt;
        loading_speed:                  5;&lt;br /&gt;
        cost_factor:                    108;&lt;br /&gt;
        running_cost_factor:            90;&lt;br /&gt;
        /* cargo_age_period is left at default */&lt;br /&gt;
&lt;br /&gt;
        /* RV-specific properties */&lt;br /&gt;
        sprite_id:                      SPRITE_ID_NEW_ROADVEH; //enable new graphics&lt;br /&gt;
        speed:                          48 km/h;&lt;br /&gt;
        misc_flags:                     bitmask(ROADVEH_FLAG_2CC);&lt;br /&gt;
        refit_cost:                     0; // Refitting is free&lt;br /&gt;
        /* callback_flags are not set, no need to manually enable callbacks */&lt;br /&gt;
        running_cost_base:              RUNNING_COST_ROADVEH;&lt;br /&gt;
        power:                          120 hp;&lt;br /&gt;
        weight:                         9.5 ton;&lt;br /&gt;
        /* TE and air drag coefficient is left at default */&lt;br /&gt;
        cargo_capacity:                 20;&lt;br /&gt;
        sound_effect:                   SOUND_BUS_START_PULL_AWAY;&lt;br /&gt;
        /* Visual effect is left at default (no effect) */&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* Define graphics */&lt;br /&gt;
    graphics {&lt;br /&gt;
        PAPR: spritegroup_flatbed_truck_1_paper;&lt;br /&gt;
        STEL: spritegroup_flatbed_truck_1_steel;&lt;br /&gt;
        COPR: spritegroup_flatbed_truck_1_copper;&lt;br /&gt;
        WOOD: spritegroup_flatbed_truck_1_wood;&lt;br /&gt;
        default: spritegroup_flatbed_truck_1_goods; // Default to a goods container.&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This concludes our road vehicle example. If you think this was easy or not too bad, with some more practice, you&amp;#039;ll make a great NML coder. If you think this was really difficult, you&amp;#039;d better give up now that you haven&amp;#039;t spent too much time; maybe you should concentrate on graphics and leave the code to others.&lt;br /&gt;
&lt;br /&gt;
For the ones brave enough to continue, we have some really nice topics in store for you. You&amp;#039;ll learn to do some funky stuff with callbacks and switches (amonst others) and we have three more fully featured examples for you, each a little more advanced than the previous.&lt;br /&gt;
&lt;br /&gt;
{{NMLTutorialNavbar|Cargotable|Switch}}&lt;/div&gt;</summary>
		<author><name>FooBar</name></author>
	</entry>
</feed>