<?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_graphics</id>
	<title>NMLTutorial/Road vehicle 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_graphics"/>
	<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_graphics&amp;action=history"/>
	<updated>2026-05-02T03:19:11Z</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_graphics&amp;diff=7646&amp;oldid=prev</id>
		<title>FooBar: /* Spritesets */ explain the identifiers</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_graphics&amp;diff=7646&amp;oldid=prev"/>
		<updated>2011-08-24T13:08:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Spritesets: &lt;/span&gt; explain the identifiers&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 13:08, 24 August 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 44:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 44:&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;&amp;lt;/pre&amp;gt;&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;&amp;lt;/pre&amp;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 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;The identifiers &#039;&#039;spriteset_flatbed_truck_1_goods_empty&#039;&#039; and &#039;&#039;spriteset_flatbed_truck_1_goods_full&#039;&#039; are chosen not without reason (read: with a reason). It lets you know that it&#039;s a spriteset, that it&#039;s for the flatbed truck 1, that the graphics are for goods cargo and that one of the spritesets is for an empty truck and one for a fully loaded truck.&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;== Spritegroup ==&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;== Spritegroup ==&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_graphics&amp;diff=7624&amp;oldid=prev</id>
		<title>FooBar: spritegroup is not spriteset</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_graphics&amp;diff=7624&amp;oldid=prev"/>
		<updated>2011-08-23T18:47:13Z</updated>

		<summary type="html">&lt;p&gt;spritegroup is not spriteset&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 18:47, 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 14:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&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;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;== &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Spritegroups&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;== &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Spritesets&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;div&gt;Each road vehicle has eight sprites. Because we have two sets of eight sprites (empty and full), we need a spritegroup for each of these sprites. Both sprite groups will contain eight sprite references. Let&#039;s name the spritegroups &#039;&#039;spriteset_flatbed_truck_1_goods_empty&#039;&#039; and &#039;&#039;spriteset_flatbed_truck_1_goods_full&#039;&#039; and have a look at the code:&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;Each road vehicle has eight sprites. Because we have two sets of eight sprites (empty and full), we need a spritegroup for each of these sprites. Both sprite groups will contain eight sprite references. Let&#039;s name the spritegroups &#039;&#039;spriteset_flatbed_truck_1_goods_empty&#039;&#039; and &#039;&#039;spriteset_flatbed_truck_1_goods_full&#039;&#039; and have a look at the code:&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;/table&gt;</summary>
		<author><name>FooBar</name></author>
	</entry>
	<entry>
		<id>https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_graphics&amp;diff=7612&amp;oldid=prev</id>
		<title>FooBar: initial version at 0</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_graphics&amp;diff=7612&amp;oldid=prev"/>
		<updated>2011-08-22T21:43:56Z</updated>

		<summary type="html">&lt;p&gt;initial version at 0&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 21:43, 22 August 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 71:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 71:&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;    name: string(STR_GRF_NAME);&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;    name: string(STR_GRF_NAME);&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;div&gt;    desc: string(STR_GRF_DESC);&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;    desc: string(STR_GRF_DESC);&lt;/div&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;    version: &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&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;    version: &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0&lt;/ins&gt;;&lt;/div&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;    min_compatible_version: &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&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;    min_compatible_version: &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0&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;div&gt;}&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;}&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;/table&gt;</summary>
		<author><name>FooBar</name></author>
	</entry>
	<entry>
		<id>https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_graphics&amp;diff=7606&amp;oldid=prev</id>
		<title>FooBar: Adding graphics to the road vehicle example.</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=NMLTutorial/Road_vehicle_graphics&amp;diff=7606&amp;oldid=prev"/>
		<updated>2011-08-22T21:20:58Z</updated>

		<summary type="html">&lt;p&gt;Adding graphics to 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 the [[NMLTutorial/Road vehicle item definition|second part]] of the road vehicle example. Now that you know how to link the graphics to the NML code, let&amp;#039;s do that for the road vehicle and give it some graphics!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example graphics ==&lt;br /&gt;
This will be the graphics for our road vehicle. All sprites are contained in a single file:&lt;br /&gt;
&lt;br /&gt;
[[Image:Flatbed truck 1 goods.png|frame|none|Empty flatbed truck sprites and flatbed trucks sprites loaded with a container]]&lt;br /&gt;
&lt;br /&gt;
For this example, the graphics file will be stored in a folder named &amp;#039;&amp;#039;gfx&amp;#039;&amp;#039; which resides next to the nml file and the graphics file will be named &amp;#039;&amp;#039;flatbed_truck_1_goods.png&amp;#039;&amp;#039;. The relative path therefore will be &amp;#039;&amp;#039;gfx/flatbed_truck_1_goods.png&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Spritegroups ==&lt;br /&gt;
Each road vehicle has eight sprites. Because we have two sets of eight sprites (empty and full), we need a spritegroup for each of these sprites. Both sprite groups will contain eight sprite references. Let&amp;#039;s name the spritegroups &amp;#039;&amp;#039;spriteset_flatbed_truck_1_goods_empty&amp;#039;&amp;#039; and &amp;#039;&amp;#039;spriteset_flatbed_truck_1_goods_full&amp;#039;&amp;#039; and have a look at the code:&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 definition&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_goods_empty, &amp;quot;gfx/flatbed_truck_1_goods.png&amp;quot;) {&lt;br /&gt;
    //left_x, upper_y, width, height, offset_x, offset_y&lt;br /&gt;
    [ 0,      0,        8,    18,      -3,       -10]&lt;br /&gt;
    [ 16,     0,       20,    16,     -14,        -7]&lt;br /&gt;
    [ 48,     0,       28,    12,     -14,        -6]&lt;br /&gt;
    [ 96,     0,       20,    16,      -6,        -7]&lt;br /&gt;
    [ 128,    0,        8,    18,      -3,       -10]&lt;br /&gt;
    [ 144,    0,       20,    16,     -14,        -7]&lt;br /&gt;
    [ 176,    0,       28,    12,     -14,        -6]&lt;br /&gt;
    [ 224,    0,       20,    16,      -6,        -7]&lt;br /&gt;
}&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;
    //left_x, upper_y, width, height, offset_x, offset_y&lt;br /&gt;
    [ 260,    0,        8,    18,      -3,      -10]&lt;br /&gt;
    [ 276,    0,       20,    16,     -14,       -7]&lt;br /&gt;
    [ 308,    0,       28,    12,     -14,       -6]&lt;br /&gt;
    [ 356,    0,       20,    16,      -6,       -7]&lt;br /&gt;
    [ 388,    0,        8,    18,      -3,      -10]&lt;br /&gt;
    [ 404,    0,       20,    16,     -14,       -7]&lt;br /&gt;
    [ 436,    0,       28,    12,     -14,       -6]&lt;br /&gt;
    [ 484,    0,       20,    16,      -6,       -7]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Spritegroup ==&lt;br /&gt;
With this done, we can combine both in a spritegroup. We have graphics for full and empty, but these are not different in stations than while on the road. So both &amp;lt;code&amp;gt;loaded&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;loading&amp;lt;/code&amp;gt; will have the same definition of two spriteset.&lt;br /&gt;
&lt;br /&gt;
And because a spriteset needs to exist be fore it can be referenced, the spritegroup definition goes below the spriteset definitions!&lt;br /&gt;
&lt;br /&gt;
The code:&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;
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;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you&amp;#039;ve paid real good attention, you&amp;#039;ll notice that the &amp;#039;&amp;#039;&amp;#039;spritegroup identifier is exactly the same identifier as used in the item definition for the default graphics&amp;#039;&amp;#039;&amp;#039;. If you didn&amp;#039;t notice that, you don&amp;#039;t have to be ashamed of yourself. Just remember that in order to attach the graphics to the vehicle, the identifier needs to be the same. Indeed similar how to reference spritesets from the spritegroup, this time the spritegroup gets referenced from the item definition!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Putting everything together ==&lt;br /&gt;
Now we can add this to the code we already had. Once more remember that something needs to exist before it can be referenced. As the item references the spritegroup and the spritegroup references the spriteset, you can fill the rest in yourself. Right? Anyways, the correct answer is that the spritesets go above the item and that the spritegroup goes between the spritesets and the item, 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: 1;&lt;br /&gt;
    min_compatible_version: 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//graphics definition&lt;br /&gt;
spriteset(spriteset_flatbed_truck_1_goods_empty, &amp;quot;gfx/flatbed_truck_1_goods.png&amp;quot;) {&lt;br /&gt;
    //left_x, upper_y, width, height, offset_x, offset_y&lt;br /&gt;
    [ 0,      0,        8,    18,      -3,      -10]&lt;br /&gt;
    [ 16,     0,       20,    16,     -14,       -7]&lt;br /&gt;
    [ 48,     0,       28,    12,     -14,       -6]&lt;br /&gt;
    [ 96,     0,       20,    16,      -6,       -7]&lt;br /&gt;
    [ 128,    0,        8,    18,      -3,      -10]&lt;br /&gt;
    [ 144,    0,       20,    16,     -14,       -7]&lt;br /&gt;
    [ 176,    0,       28,    12,     -14,       -6]&lt;br /&gt;
    [ 224,    0,       20,    16,      -6,       -7]&lt;br /&gt;
}&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;
    //left_x, upper_y, width, height, offset_x, offset_y&lt;br /&gt;
    [ 260,    0,        8,    18,      -3,      -10]&lt;br /&gt;
    [ 276,    0,       20,    16,     -14,       -7]&lt;br /&gt;
    [ 308,    0,       28,    12,     -14,       -6]&lt;br /&gt;
    [ 356,    0,       20,    16,      -6,       -7]&lt;br /&gt;
    [ 388,    0,        8,    18,      -3,      -10]&lt;br /&gt;
    [ 404,    0,       20,    16,     -14,       -7]&lt;br /&gt;
    [ 436,    0,       28,    12,     -14,       -6]&lt;br /&gt;
    [ 484,    0,       20,    16,      -6,       -7]&lt;br /&gt;
}&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;
        default: spritegroup_flatbed_truck_1_goods; // use a goods container for a (loaded) flatbed truck&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want, you can now [[NMLTutorial/Installation|encode]] this into a working NewGRF!&lt;br /&gt;
&lt;br /&gt;
And if you noticed that the numbers for the sprites in both spritegroups look very much alike, you&amp;#039;re right at that. Continue to learn how to avoid this duplication by means of a template.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{NMLTutorialNavbar|Spriteset and spritegroup|Template}}&lt;/div&gt;</summary>
		<author><name>FooBar</name></author>
	</entry>
</feed>