<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://sadocs.unreliable.network/index.php?action=history&amp;feed=atom&amp;title=Creating_Mods%2FCreating_a_DLL_Mod</id>
	<title>Creating Mods/Creating a DLL Mod - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://sadocs.unreliable.network/index.php?action=history&amp;feed=atom&amp;title=Creating_Mods%2FCreating_a_DLL_Mod"/>
	<link rel="alternate" type="text/html" href="https://sadocs.unreliable.network/index.php?title=Creating_Mods/Creating_a_DLL_Mod&amp;action=history"/>
	<updated>2026-05-01T15:27:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://sadocs.unreliable.network/index.php?title=Creating_Mods/Creating_a_DLL_Mod&amp;diff=370&amp;oldid=prev</id>
		<title>PkR: PkR moved page Creating a DLL Mod to Creating Mods/Creating a DLL Mod</title>
		<link rel="alternate" type="text/html" href="https://sadocs.unreliable.network/index.php?title=Creating_Mods/Creating_a_DLL_Mod&amp;diff=370&amp;oldid=prev"/>
		<updated>2025-10-12T14:43:23Z</updated>

		<summary type="html">&lt;p&gt;PkR moved page &lt;a href=&quot;/wiki/Creating_a_DLL_Mod&quot; class=&quot;mw-redirect&quot; title=&quot;Creating a DLL Mod&quot;&gt;Creating a DLL Mod&lt;/a&gt; to &lt;a href=&quot;/wiki/Creating_Mods/Creating_a_DLL_Mod&quot; title=&quot;Creating Mods/Creating a DLL Mod&quot;&gt;Creating Mods/Creating a DLL Mod&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:43, 12 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>PkR</name></author>
	</entry>
	<entry>
		<id>https://sadocs.unreliable.network/index.php?title=Creating_Mods/Creating_a_DLL_Mod&amp;diff=360&amp;oldid=prev</id>
		<title>Kell: Discord links</title>
		<link rel="alternate" type="text/html" href="https://sadocs.unreliable.network/index.php?title=Creating_Mods/Creating_a_DLL_Mod&amp;diff=360&amp;oldid=prev"/>
		<updated>2025-10-08T22:06:24Z</updated>

		<summary type="html">&lt;p&gt;Discord links&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&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 22:06, 8 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l119&quot;&gt;Line 119:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 119:&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;Now press Ctrl+B or click &amp;quot;Build&amp;quot; in the top panel -&amp;gt; &amp;quot;Build Solution&amp;quot;.&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;Now press Ctrl+B or click &amp;quot;Build&amp;quot; in the top panel -&amp;gt; &amp;quot;Build Solution&amp;quot;.&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;The DLL should now build. If you get errors, make sure you haven&#039;t missed a step and try to understand their meaning. If you are stuck, you should come on our Discord server for help.&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;The DLL should now build. If you get errors, make sure you haven&#039;t missed a step and try to understand their meaning. If you are stuck, you should come on our &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[https://discord.gg/gqJCF47 &lt;/ins&gt;Discord server&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;] &lt;/ins&gt;for help.&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;== 7. Testing the mod ==&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;== 7. Testing the mod ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l131&quot;&gt;Line 131:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 131:&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;3. Now you can launch the game, make sure the mod is enabled.&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;3. Now you can launch the game, make sure the mod is enabled.&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;If nothing happens, it&#039;s probably working! If an error shows up, try to understand it or ask us for directions on Discord.&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;If nothing happens, it&#039;s probably working! If an error shows up, try to understand it or ask us for directions on &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[https://discord.gg/gqJCF47 &lt;/ins&gt;Discord&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&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;== 8. Doing something ==&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;== 8. Doing something ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kell</name></author>
	</entry>
	<entry>
		<id>https://sadocs.unreliable.network/index.php?title=Creating_Mods/Creating_a_DLL_Mod&amp;diff=359&amp;oldid=prev</id>
		<title>Kell: Typos</title>
		<link rel="alternate" type="text/html" href="https://sadocs.unreliable.network/index.php?title=Creating_Mods/Creating_a_DLL_Mod&amp;diff=359&amp;oldid=prev"/>
		<updated>2025-10-08T21:52:21Z</updated>

		<summary type="html">&lt;p&gt;Typos&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&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:52, 8 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&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;If you want to have more control over the game, you can compile a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;c&lt;/del&gt;++ DLL to modify or call the game&#039;s own code easily. This tutorial will go through the most basic method to get a DLL running.&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;If you want to have more control over the game, you can compile a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;C&lt;/ins&gt;++ DLL to modify or call the game&#039;s own code easily. This tutorial will go through the most basic method to get a DLL running.&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;Note that if you just want to replace assets or change level geometry for example, you do not need a DLL.&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;Note that if you just want to replace assets or change level geometry for example, you do not need a DLL.&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;== 1. Prerequisites ==&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;== 1. Prerequisites ==&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;In order to build DLL files, you will need Visual Studio Community with C++ capabilities. You can &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;downloader &lt;/del&gt;the Visual Studio &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;installer &lt;/del&gt;[https://visualstudio.microsoft.com/fr/downloads/ here].  &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;In order to build DLL files, you will need Visual Studio Community with C++ capabilities. You can &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;download &lt;/ins&gt;the Visual Studio &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Installer &lt;/ins&gt;[https://visualstudio.microsoft.com/fr/downloads/ here].  &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;Open the installer, choose Visual Studio Community, then &amp;quot;Desktop Development with C++&amp;quot; and wait until the installation is finished.&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;Open the installer, choose Visual Studio Community, then &amp;quot;Desktop Development with C++&amp;quot; and wait until the installation is finished.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kell</name></author>
	</entry>
	<entry>
		<id>https://sadocs.unreliable.network/index.php?title=Creating_Mods/Creating_a_DLL_Mod&amp;diff=357&amp;oldid=prev</id>
		<title>Kell: Initial draft</title>
		<link rel="alternate" type="text/html" href="https://sadocs.unreliable.network/index.php?title=Creating_Mods/Creating_a_DLL_Mod&amp;diff=357&amp;oldid=prev"/>
		<updated>2025-10-08T21:47:57Z</updated>

		<summary type="html">&lt;p&gt;Initial draft&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;If you want to have more control over the game, you can compile a c++ DLL to modify or call the game&amp;#039;s own code easily. This tutorial will go through the most basic method to get a DLL running.&lt;br /&gt;
&lt;br /&gt;
Note that if you just want to replace assets or change level geometry for example, you do not need a DLL.&lt;br /&gt;
&lt;br /&gt;
== 1. Prerequisites ==&lt;br /&gt;
In order to build DLL files, you will need Visual Studio Community with C++ capabilities. You can downloader the Visual Studio installer [https://visualstudio.microsoft.com/fr/downloads/ here]. &lt;br /&gt;
&lt;br /&gt;
Open the installer, choose Visual Studio Community, then &amp;quot;Desktop Development with C++&amp;quot; and wait until the installation is finished.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Note: You only need the toolkit (the latest is v143), the SDK and the debugger.&amp;#039;&amp;#039;&lt;br /&gt;
[[File:Visual-studio-installer.gif|none|646x646px]]&lt;br /&gt;
&lt;br /&gt;
== 2. Creating a DLL project ==&lt;br /&gt;
Now that Visual Studio is installed, we need to make a C++ DLL project.&lt;br /&gt;
&lt;br /&gt;
1. Click on &amp;quot;Create a new project&amp;quot; on the starting page. If there&amp;#039;s no starting page, click on &amp;quot;File&amp;quot; then &amp;quot;New project&amp;quot;.&lt;br /&gt;
[[File:Visual-studio-launcher.png|none|600x600px]]&lt;br /&gt;
2. Select the Dynamic Link Library (DLL) template&lt;br /&gt;
[[File:Visual-studio-launcher-template.png|none|600x600px]]&lt;br /&gt;
3. Choose a name and a location for your project.&lt;br /&gt;
[[File:Visual-studio-launcher-createproject.png|none|600x600px]]&lt;br /&gt;
Navigate to the location you&amp;#039;ve chosen for the project. Visual Studio has created several project files.&lt;br /&gt;
&lt;br /&gt;
* The folder where the &amp;lt;code&amp;gt;.sln&amp;lt;/code&amp;gt; file is located is called the &amp;#039;&amp;#039;&amp;#039;&amp;lt;u&amp;gt;solution&amp;lt;/u&amp;gt;&amp;#039;&amp;#039;&amp;#039; folder.&lt;br /&gt;
* The subfolder containing the &amp;lt;code&amp;gt;.vcxproj&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.cpp&amp;lt;/code&amp;gt; files is called the &amp;#039;&amp;#039;&amp;#039;&amp;lt;u&amp;gt;project&amp;lt;/u&amp;gt;&amp;#039;&amp;#039;&amp;#039; folder.&lt;br /&gt;
The &amp;lt;code&amp;gt;.cpp&amp;lt;/code&amp;gt; files are files containing C or C++ code, they will be compiled into machine code inside the DLL. The &amp;lt;code&amp;gt;.h&amp;lt;/code&amp;gt; files are header files, they contain information that cpp files can use.&lt;br /&gt;
&lt;br /&gt;
== 3. Add the Mod Loader headers ==&lt;br /&gt;
We already have enough to build a DLL, but we do not have modding capabilities yet. For that, we need to add the Mod Loader headers.&lt;br /&gt;
&lt;br /&gt;
1. Go on the GitHub page of the [https://github.com/X-Hax/sadx-mod-loader SADX Mod Loader] or the [https://github.com/X-Hax/sa2-mod-loader SA2 Mod Loader].&lt;br /&gt;
&lt;br /&gt;
2. Download the repository by clicking on the green &amp;quot;&amp;lt; &amp;gt; Code&amp;quot; button then &amp;quot;Download ZIP&amp;quot;.&lt;br /&gt;
[[File:Github-download-repo.png|none|296x296px]]&lt;br /&gt;
3. Move the content of SADXModLoader/include (or SA2ModLoader/include) into your &amp;#039;&amp;#039;&amp;#039;project&amp;#039;&amp;#039;&amp;#039; folder.&lt;br /&gt;
[[File:Dll-mod-project-folder-example-sadx.png|none|502x502px]]&lt;br /&gt;
These files provide modding capabilities to your project, we will learn how to actually use them later on.&lt;br /&gt;
&lt;br /&gt;
== 4. Creating a source file ==&lt;br /&gt;
Now we need a space to start coding, we will create a new source (.cpp) file where we will put our own code.&lt;br /&gt;
&lt;br /&gt;
1. In Visual Studio, right click &amp;quot;Source Files&amp;quot; then click Add -&amp;gt; New Item...&lt;br /&gt;
[[File:Visual-studio-add-new-item.png|none|450x450px]]&lt;br /&gt;
2. Name it however you want, for example mod.cpp&lt;br /&gt;
[[File:Visual-studio-add-new-item-form-cpp.png|none|450x450px]]&lt;br /&gt;
3. Now we have our own space where we can start coding.&lt;br /&gt;
&lt;br /&gt;
The first line should be:&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;quot;pch.h&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;If you&amp;#039;re new to C++ development, you will learn what this is used for later.&lt;br /&gt;
&lt;br /&gt;
After that, we need to include the Mod Loader headers with the following line:&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;quot;SADXModLoader.h&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OR&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;quot;SA2ModLoader.h&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 5. Adding the entry points ==&lt;br /&gt;
Now we need to add entry points to our DLL for the Mod Loader. In order for the Mod Loader to see our entry points, we need to use DLL exports. A DLL export allows other programs to use things from our DLL.&lt;br /&gt;
&lt;br /&gt;
First we add the &amp;#039;&amp;#039;&amp;#039;ModInfo&amp;#039;&amp;#039;&amp;#039; export, this tells the Mod Loader that our DLL is a valid mod.&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;extern &amp;quot;C&amp;quot; __declspec(dllexport) ModInfo SADXModInfo = { ModLoaderVer };&amp;lt;/syntaxhighlight&amp;gt;OR&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot; __declspec(dllexport) ModInfo SA2ModInfo = { ModLoaderVer };&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Now we can add the most important entry point, the Init function:&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot; __declspec(dllexport) void __cdecl Init(const char* path, const HelperFunctions&amp;amp; helperFunctions)&lt;br /&gt;
{&lt;br /&gt;
	// Executed at startup, contains helperFunctions and the path to your mod folder&lt;br /&gt;
	// This is where we initialize things, override functions, replace static data, etc.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;And a bunch of other optional exports:&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot; __declspec(dllexport) void __cdecl OnFrame()&lt;br /&gt;
{&lt;br /&gt;
	// Executed every running frame of SADX&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot; __declspec(dllexport) void __cdecl OnInput()&lt;br /&gt;
{&lt;br /&gt;
	// Executed before the game processes input&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot; __declspec(dllexport) void __cdecl OnControl()&lt;br /&gt;
{&lt;br /&gt;
	// Executed when the game processes input&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot; __declspec(dllexport) void __cdecl OnRenderDeviceReset()&lt;br /&gt;
{&lt;br /&gt;
	// Executed when the window size changes&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot; __declspec(dllexport) void __cdecl OnRenderDeviceLost()&lt;br /&gt;
{&lt;br /&gt;
	// Executed when the game fails to render the scene&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot; __declspec(dllexport) void __cdecl OnRenderSceneStart()&lt;br /&gt;
{&lt;br /&gt;
	// Executed before the game starts rendering the scene&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot; __declspec(dllexport) void __cdecl OnRenderSceneEnd()&lt;br /&gt;
{&lt;br /&gt;
	// Executed when the game finishes rendering the scene&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot; __declspec(dllexport) void __cdecl OnExit()&lt;br /&gt;
{&lt;br /&gt;
	// Executed when the game is about to terminate&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Here is what your source file should more or less look like:&lt;br /&gt;
[[File:Mod-example-dllexports.png|none|604x604px]]&lt;br /&gt;
&lt;br /&gt;
== 6. Building the DLL ==&lt;br /&gt;
Our project is ready, we can now build the mod.&lt;br /&gt;
&lt;br /&gt;
First, make sure you are building for the x86 (32bit) architecture, you can select it at the top.&lt;br /&gt;
[[File:Vs-build-mode.png|none|360x360px]]&lt;br /&gt;
Currently, it is building in the &amp;quot;&amp;#039;&amp;#039;&amp;#039;Debug&amp;#039;&amp;#039;&amp;#039;&amp;quot; configuration. This mode is useful for [[debugging]] and should only be used while testing your mod. Once you want to release it to the world, you should change it to the &amp;quot;&amp;#039;&amp;#039;&amp;#039;Release&amp;#039;&amp;#039;&amp;#039;&amp;quot; configuration and rebuild.&lt;br /&gt;
&lt;br /&gt;
Now press Ctrl+B or click &amp;quot;Build&amp;quot; in the top panel -&amp;gt; &amp;quot;Build Solution&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The DLL should now build. If you get errors, make sure you haven&amp;#039;t missed a step and try to understand their meaning. If you are stuck, you should come on our Discord server for help.&lt;br /&gt;
&lt;br /&gt;
== 7. Testing the mod ==&lt;br /&gt;
Our DLL was generated in the solution folder, inside a &amp;quot;Debug&amp;quot; or &amp;quot;Release&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
1. Copy the DLL into your mod folder.&lt;br /&gt;
&lt;br /&gt;
2. If you have not already, you need to edit the mod in the Mod Manager to add the name of your dll.&lt;br /&gt;
[[File:Samm-edit-mode-context-menu.png|none|302x302px]]&lt;br /&gt;
[[File:Samm-edit-mod-dllname.png|none|600x600px]]&lt;br /&gt;
3. Now you can launch the game, make sure the mod is enabled.&lt;br /&gt;
&lt;br /&gt;
If nothing happens, it&amp;#039;s probably working! If an error shows up, try to understand it or ask us for directions on Discord.&lt;br /&gt;
&lt;br /&gt;
== 8. Doing something ==&lt;br /&gt;
The problem is that our DLL does nothing for now.&lt;br /&gt;
&lt;br /&gt;
This is where you should start experimenting:&lt;br /&gt;
&lt;br /&gt;
* If you are new to C++ development, see [[General Programming Guide]].&lt;br /&gt;
* Open the Mod Loader headers to see what they contain, specifically the Variables and Functions ones.&lt;br /&gt;
* If you are already experimented, take a look at the community driven [[Working with the Disassembly|disassembly]].&lt;br /&gt;
* Take a look at open source SADX/SA2 mods on GitHub to learn from them.&lt;br /&gt;
&lt;br /&gt;
If you want to quickly check if it&amp;#039;s working, try to add &amp;lt;code&amp;gt;Rings = 999;&amp;lt;/code&amp;gt; in the OnFrame entry point, this is the ingame ring counter.&lt;br /&gt;
&lt;br /&gt;
If you have enabled the Debug Console in the Mod Manager options, you can print to it with:&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
PrintDebug(&amp;quot;text\n&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After any modification, you need to rebuild the DLL, and move it to the mod folder again.&lt;br /&gt;
&lt;br /&gt;
Once you are familiar enough with the process, you can make your life easier with [[debugging]].&lt;/div&gt;</summary>
		<author><name>Kell</name></author>
	</entry>
</feed>