<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://newgrf-specs.tt-wiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hyronymus</id>
	<title>GRFSpecs - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://newgrf-specs.tt-wiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hyronymus"/>
	<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/wiki/Special:Contributions/Hyronymus"/>
	<updated>2026-05-14T06:57:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=NML:GRF&amp;diff=3220</id>
		<title>NML:GRF</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=NML:GRF&amp;diff=3220"/>
		<updated>2012-07-08T11:51:11Z</updated>

		<summary type="html">&lt;p&gt;Hyronymus: Added an example of the string for providing an URL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{NMLNavBlocksyntax}}&lt;br /&gt;
&lt;br /&gt;
== GRF block ==&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
 grf {&lt;br /&gt;
 	grfid: &amp;amp;lt;literal-string&amp;amp;gt;;&lt;br /&gt;
 	name: &amp;amp;lt;string&amp;amp;gt;;&lt;br /&gt;
 	desc: &amp;amp;lt;string&amp;amp;gt;;&lt;br /&gt;
 	[url: &amp;amp;lt;string&amp;amp;gt;;]&lt;br /&gt;
 	[version: &amp;amp;lt;expression&amp;amp;gt;;&lt;br /&gt;
 	[min_compatible_version: &amp;amp;lt;expression&amp;amp;gt;;]]&lt;br /&gt;
 	[param { ... }]&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Mind: the items enclosed in [...] indicate optional lines: The [] itself are not part of the syntax.&lt;br /&gt;
&lt;br /&gt;
== GRF parameters ==&lt;br /&gt;
&lt;br /&gt;
As part of the grf block you can specify some parameter settings that the user will be able to change as part of the newgrf configuration. These can for example be used to disable parts of your NewGRF or to change between multiple graphics in case that&#039;s not possible at runtime. In general the settings (sub-)block looks like&lt;br /&gt;
&lt;br /&gt;
 param &amp;amp;lt;num&amp;amp;gt; {&lt;br /&gt;
 	&amp;amp;lt;name&amp;amp;gt; {&lt;br /&gt;
 		type:    &amp;amp;lt;type&amp;amp;gt;;&lt;br /&gt;
 		name:    &amp;amp;lt;string&amp;amp;gt;;&lt;br /&gt;
 		desc:    &amp;amp;lt;string&amp;amp;gt;;&lt;br /&gt;
 		min_value: &amp;amp;lt;expression&amp;amp;gt;;&lt;br /&gt;
 		max_value: &amp;amp;lt;expression&amp;amp;gt;;&lt;br /&gt;
 		def_value: &amp;amp;lt;expression&amp;amp;gt;;&lt;br /&gt;
 		bit: &amp;amp;lt;expression&amp;amp;gt;;&lt;br /&gt;
 		names: {&lt;br /&gt;
 			0: &amp;amp;lt;string&amp;amp;gt;;&lt;br /&gt;
 			1: &amp;amp;lt;string&amp;amp;gt;;&lt;br /&gt;
 			.&lt;br /&gt;
 			.&lt;br /&gt;
 			.&lt;br /&gt;
 		};&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Looking at the single entries:&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;num&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optional, you can specify in which param number this setting should be stored.&lt;br /&gt;
&lt;br /&gt;
 type&lt;br /&gt;
&lt;br /&gt;
This defines the parameter type. Possible values are &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;bool&amp;lt;/code&amp;gt; for on/off statements or &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;int&amp;lt;/code&amp;gt; for positive integer values&lt;br /&gt;
&lt;br /&gt;
 name&lt;br /&gt;
&lt;br /&gt;
This gives the parameter name as shown in the parameter configuration dialogue of OpenTTD.&lt;br /&gt;
&lt;br /&gt;
 desc&lt;br /&gt;
&lt;br /&gt;
This gives the description which is displayed when the parameter is selected. Here you can explain the meaning and impact it will have&lt;br /&gt;
&lt;br /&gt;
 min_value&lt;br /&gt;
&lt;br /&gt;
The minimum acceptable value for the parameter (only valid for type int), default of min_value is 0&lt;br /&gt;
&lt;br /&gt;
 max_value&lt;br /&gt;
&lt;br /&gt;
The maximum acceptable value for the parameter (only valid for type int), default of max_value = 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
 def_value&lt;br /&gt;
&lt;br /&gt;
This sets the default value for this parameter. If left out, the default value of 0 will be used.&lt;br /&gt;
&lt;br /&gt;
 bit&lt;br /&gt;
&lt;br /&gt;
Only valid for settings with type &amp;quot;bool&amp;quot;. The value is the bit in which this setting should be stored.&lt;br /&gt;
&lt;br /&gt;
 names&lt;br /&gt;
&lt;br /&gt;
If you chose type &amp;lt;code style=&amp;quot;color:darkgreen&amp;quot;&amp;gt;int&amp;lt;/code&amp;gt; and the numbers themselves are only used internally, have no direct numerical meaning and are better explained in words, you can use this to associate the single numbers with a string which describes it and is shown to the user instead of the value.&lt;br /&gt;
&lt;br /&gt;
== A simple example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=example&amp;gt;&lt;br /&gt;
 grf {&lt;br /&gt;
 	grfid: &amp;quot;AB\03\02&amp;quot;;&lt;br /&gt;
 	name: string(STR_GRF_NAME);&lt;br /&gt;
 	desc: string(STR_GRF_DESC);&lt;br /&gt;
	url: string(STR_GRF_URL);&lt;br /&gt;
 	version: 1;&lt;br /&gt;
 	min_compatible_version: 0;&lt;br /&gt;
 	param {&lt;br /&gt;
 		param_provide {&lt;br /&gt;
 			type:    int;&lt;br /&gt;
 			name:    string(STR_PARAM_PROVIDE);&lt;br /&gt;
 			desc:    string(STR_PARAM_PROVIDE_DESC);&lt;br /&gt;
 			min_value: 0;&lt;br /&gt;
 			max_value: 1;&lt;br /&gt;
 			def_value: 0;&lt;br /&gt;
 			names: {&lt;br /&gt;
 				0: string(STR_PARAM_PROVIDE_ENGINES_AND_WAGONS);&lt;br /&gt;
 				1: string(STR_PARAM_PROVIDE_WAGONS_ONLY);&lt;br /&gt;
 			};&lt;br /&gt;
 		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hyronymus</name></author>
	</entry>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Action8&amp;diff=481</id>
		<title>Action8</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Action8&amp;diff=481"/>
		<updated>2004-01-22T17:24:40Z</updated>

		<summary type="html">&lt;p&gt;Hyronymus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Action 8&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Action 8=&lt;br /&gt;
&lt;br /&gt;
Giving your .grf file an ID&lt;br /&gt;
&lt;br /&gt;
-=Why does your .grf file need an ID?=-&lt;br /&gt;
&lt;br /&gt;
There are many new graphic sets available to TTD players. &amp;amp;nbsp;Of course, we need to make sure that we never get sets mixed up. &amp;amp;nbsp;To make sure this will never happen you can set an ID. &amp;amp;nbsp;Another useful feature of Action 8 is the ability to include useful information into the final .grf file. Here, we explain how Action 8 works.&lt;br /&gt;
&lt;br /&gt;
-=Format=-&lt;br /&gt;
&lt;br /&gt;
Like all other pseudo-sprites, Action 8 consists of hexadecimal bits. There is no limitation in the total amount of hexadecimal bits you can use in Action 8. One term does have a limit though. Let&#039;s give an example of what an Action 8 line looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+&amp;amp;lt;Sprite-number&amp;amp;gt; * &amp;amp;lt;Length&amp;amp;gt; &amp;amp;lt;Action&amp;amp;gt; &amp;amp;lt;Version&amp;amp;gt; &amp;amp;lt;Grf-id&amp;amp;gt; &amp;amp;lt;Description&amp;amp;gt; &amp;amp;lt;Moreinfo&amp;amp;gt;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a short overview of what every term means:&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Byte&#039;&#039;&#039;|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;-+Sprite-number+-&amp;amp;gt; |A sequential sprite number&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;-+Length+-&amp;amp;gt; |The total numer of bytes in the action&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;-+Action+-&amp;amp;gt; |Action type. &amp;amp;nbsp;In this case, 08&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;-+Version+-&amp;amp;gt; |Graphics version&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;-+Grf-id+-&amp;amp;gt; |A unique ID for your .grf file&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;-+Description+-&amp;amp;gt; |A comment field, usually for .grf file name&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;-+Moreinfo+-&amp;amp;gt; |Another comment field, usually for copyright||&lt;br /&gt;
&lt;br /&gt;
-=Filling in the terms=-&lt;br /&gt;
&lt;br /&gt;
Now that you know what an Action 8 looks like it&#039;s time to explain how you should fill in the several terms in Action 8. It seems wise to discuss each term seperatly.&lt;br /&gt;
&lt;br /&gt;
===Sprite-number===&lt;br /&gt;
&lt;br /&gt;
Action 8 &#039;&#039;&#039;must be the first pseudosprite after the first line in the .NFO file&#039;&#039;&#039;. Remember that in the first line of the .NFO file you tell the computer how many (pseudo-)sprites there are in the .grf file. This first line is numbered 0 and doesn&#039;t count in the total amount of (pseudo-)sprites in the .NFO file. According to this, Action 8 will be sprite-number 1.&lt;br /&gt;
&lt;br /&gt;
There is one exception to this rule. You can have several [[Action7|Action 7&#039;s]] before your first Action 8. If you have &#039;&#039;n&#039;&#039; Action 7&#039;s before Action 8, Action 8 will have spritenumber &#039;&#039;n+1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Length===&lt;br /&gt;
&lt;br /&gt;
The total numer of bytes in Action 8. &amp;amp;nbsp;Start counting from &amp;amp;lt;-+Action+-&amp;amp;gt;, the bit that sets the pseudo-sprite to act as the specified action.&lt;br /&gt;
&lt;br /&gt;
===Action===&lt;br /&gt;
&lt;br /&gt;
The type of action this pseudo-sprites defines. It should be 08 here because we want this pseudo-sprite to act as Action 8.&lt;br /&gt;
&lt;br /&gt;
===Version===&lt;br /&gt;
&lt;br /&gt;
This should be the graphics version that your file will support. Valid values are:&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;TTDPatch version&#039;&#039;&#039;|&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2.0r1 Stable TTDPatch + current alpha series|&amp;lt;center&amp;gt;05&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.0 &amp;amp;nbsp; &amp;amp;nbsp;Stable TTDPatch|&amp;lt;center&amp;gt;04&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.9.1 alpha 28 - 2.0 Stable TTDPatch|&amp;lt;center&amp;gt;01&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.9.1 before alpha 28|&amp;lt;center&amp;gt;00&amp;lt;/center&amp;gt;||&lt;br /&gt;
&lt;br /&gt;
Entries for 00 and 01 are included only for completeness, and to aid with updating existing graphics. &amp;amp;nbsp;They &#039;&#039;&#039;should not&#039;&#039;&#039; be used with new graphics. Using these old values may break future compatibility. Features have been added since these early versions and some early actions refer to other current actions.&lt;br /&gt;
&lt;br /&gt;
===Grf-id===&lt;br /&gt;
&lt;br /&gt;
This is a series of 4 bytes. &amp;amp;nbsp;It&#039;s almost a convention to use the first two bytes for the creator&#039;s initials in ASCII code, e.g. &amp;amp;nbsp;54 57 for &amp;amp;quot;TW&amp;amp;quot; (see below). The last two bytes should be numbers. This can be a version number, but you should take care if you plan on producing multiple sets.&lt;br /&gt;
&lt;br /&gt;
===Description===&lt;br /&gt;
&lt;br /&gt;
This comment field should contain a brief description of the set, converted into hexadecimal bytes, &#039;&#039;&#039;null-terminated (ending in 00)&#039;&#039;&#039;. &amp;amp;nbsp;If you miss the final 00 here, this and other sprites may fail.&lt;br /&gt;
&lt;br /&gt;
===Moreinfo===&lt;br /&gt;
&lt;br /&gt;
This is an additional comment field to store even more information about the set, possibly for a brief copyright notice or other attribution. This field is also &#039;&#039;&#039;null-terminated&#039;&#039;&#039;. &amp;amp;nbsp;If you miss the final 00 here, this and other sprites may fail.&lt;br /&gt;
&lt;br /&gt;
-=Example=-&lt;br /&gt;
&lt;br /&gt;
Below is an example of what a real Action 8 pseudo-sprite could look like.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+1 * 43 08 05 54 57 01 06 20 54 75 74 6F 72 69 61 6C 20 65 78 61 6D 70 6C 65 00 20 43 6F 70 79 72 69 67 68 74 3A 20 53 79 73 74 65 6D 00+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s clarify it bit by bit. In order to understand what the bits say you could use a hexadecimal editor.&lt;br /&gt;
&lt;br /&gt;
||&#039;&#039;&#039;Byte&#039;&#039;&#039;|&#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;-+1+-&amp;lt;/center&amp;gt;|&amp;amp;lt;-+Sprite-number+-&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;-+43+-&amp;lt;/center&amp;gt;|&amp;amp;lt;-+Length+-&amp;amp;gt; of the action in bytes; start counting at 08 (&amp;amp;lt;-+Action+-&amp;amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;-+08+-&amp;lt;/center&amp;gt;|&amp;amp;lt;-+Action+-&amp;amp;gt;: sets this pseudo-sprite to function as Action 8&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;-+05+-&amp;lt;/center&amp;gt;|&amp;amp;lt;-+Version+-&amp;amp;gt;: this .grf file works with TTDPatch 2.0r1 + alpha series&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;-+54 57 01 06+-&amp;lt;/center&amp;gt;|&amp;amp;lt;-+Grf-id+-&amp;amp;gt;: ASCII code for TW, then the numbers 1 and 6&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;-+20 54 .. 65 00+-&amp;lt;/center&amp;gt;|&amp;amp;lt;-+Description+-&amp;amp;gt;, &#039;&#039;&#039;null-terminated &#039;&#039;&#039;: Tutorial example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;-+20 43 .. 6D 00+-&amp;lt;/center&amp;gt;|&amp;amp;lt;-+Moreinfo+-&amp;amp;gt;, &#039;&#039;&#039;null-terminated &#039;&#039;&#039;: Copyright: sytem||&lt;/div&gt;</summary>
		<author><name>Hyronymus</name></author>
	</entry>
</feed>