<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.shroudforge.net/index.php?action=history&amp;feed=atom&amp;title=DInput8_chain_loading_standard%2Fen-gb</id>
	<title>DInput8 chain loading standard/en-gb - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.shroudforge.net/index.php?action=history&amp;feed=atom&amp;title=DInput8_chain_loading_standard%2Fen-gb"/>
	<link rel="alternate" type="text/html" href="https://wiki.shroudforge.net/index.php?title=DInput8_chain_loading_standard/en-gb&amp;action=history"/>
	<updated>2026-11-21T15:16:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.shroudforge.net/index.php?title=DInput8_chain_loading_standard/en-gb&amp;diff=2962&amp;oldid=prev</id>
		<title>FuzzyBot: Updating to match new version of source page</title>
		<link rel="alternate" type="text/html" href="https://wiki.shroudforge.net/index.php?title=DInput8_chain_loading_standard/en-gb&amp;diff=2962&amp;oldid=prev"/>
		<updated>2026-11-14T16:58:33Z</updated>

		<summary type="html">&lt;p&gt;Updating to match new version of source page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ShroudForge Modloader Wiki Post&lt;br /&gt;
title: DInput8 chain loading standard&lt;br /&gt;
description: Many Enshrouded mod loaders and DLL mods want to be the game&amp;#039;s `dinput8.dll`, and only one file can have that name. A loader that holds the name starts the other DLLs listed in `dinput8-chain.ini`, next to the game&amp;#039;s exe. EMF, Kiln, ShroudForge, XHL-Core and Auto Loot Plus read this file. This page writes down the rules, so that every loader reads the file the same way and a player&amp;#039;s list works whichever loader holds `dinput8.dll`.&lt;br /&gt;
language: en-GB&lt;br /&gt;
picture:ShroudForge-Wiki-dinput8-chain.svg&lt;br /&gt;
creator: Bonsaibauer&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:ShroudForge-Wiki-dinput8-chain.svg|thumb|left|600px|DInput8 chain loading standard]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Many Enshrouded mod loaders and DLL mods want to be the game&amp;#039;s &amp;lt;code&amp;gt;dinput8.dll&amp;lt;/code&amp;gt;, and only one file can have that name. A loader that holds the name starts the other DLLs listed in &amp;lt;code&amp;gt;dinput8-chain.ini&amp;lt;/code&amp;gt;, next to the game&amp;#039;s exe. EMF, Kiln, ShroudForge, XHL-Core and Auto Loot Plus read this file. This page writes down the rules, so that every loader reads the file the same way and a player&amp;#039;s list works whichever loader holds &amp;lt;code&amp;gt;dinput8.dll&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This page is in the public domain (CC0): copy it into your own project&amp;#039;s docs, change it, no credit needed. Changes that more than one loader agrees on are welcome as pull requests to EMF&amp;#039;s repository.&lt;br /&gt;
&lt;br /&gt;
The words must and should below are what a loader that follows this spec does.&lt;br /&gt;
&lt;br /&gt;
== The file ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; my mods&lt;br /&gt;
[Chain]&lt;br /&gt;
mods\mymod\mymod.dll&lt;br /&gt;
autolootplus.dll&lt;br /&gt;
&lt;br /&gt;
[EMF]&lt;br /&gt;
creative.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Where: &amp;lt;code&amp;gt;dinput8-chain.ini&amp;lt;/code&amp;gt; in the folder of the game&amp;#039;s exe (&amp;lt;code&amp;gt;enshrouded.exe&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;enshrouded_server.exe&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Encoding: a loader must read UTF-8 with or without a BOM, and UTF-16 LE with a BOM. It should also read the system&amp;#039;s ANSI code page when the bytes are not valid UTF-8 (a file saved by an old Notepad). A tool that writes the file must keep the encoding and line breaks it found.&lt;br /&gt;
* Lines: blank lines are skipped. A line starting with &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt; is a comment. &amp;lt;code&amp;gt;; &amp;lt;/code&amp;gt; in front of a DLL&amp;#039;s line switches that DLL off, so players can turn one off without deleting the line. A comment may follow a name after a space or tab (&amp;lt;code&amp;gt;mymod.dll ; my mod&amp;lt;/code&amp;gt;), and a name may stand in double quotes.&lt;br /&gt;
* Sections (names are not case-sensitive): &amp;lt;code&amp;gt;&amp;amp;#91;Chain&amp;amp;#93;&amp;lt;/code&amp;gt; is shared: every loader that follows this spec starts its DLLs. Any other section belongs to one tool, which names it after itself (&amp;lt;code&amp;gt;&amp;amp;#91;EMF&amp;amp;#93;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;#91;Kiln&amp;amp;#93;&amp;lt;/code&amp;gt;): other loaders must ignore it. Lines before any section count as &amp;lt;code&amp;gt;&amp;amp;#91;Chain&amp;amp;#93;&amp;lt;/code&amp;gt; (older files have no section at all).&lt;br /&gt;
* &amp;lt;code&amp;gt;key=value&amp;lt;/code&amp;gt; lines: a line &amp;lt;code&amp;gt;name=value&amp;lt;/code&amp;gt; counts as a DLL entry when its value names a &amp;lt;code&amp;gt;.dll&amp;lt;/code&amp;gt;. Other keys are settings of the tool that wrote them; other loaders ignore them.&lt;br /&gt;
&lt;br /&gt;
== The DLLs ==&lt;br /&gt;
&lt;br /&gt;
* Paths are relative to the exe&amp;#039;s folder. &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; is read as &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;. A loader must refuse absolute paths, drive letters, UNC paths (&amp;lt;code&amp;gt;\\server\...&amp;lt;/code&amp;gt;) and any &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; part: a chain file must not reach outside the game folder.&lt;br /&gt;
* Only &amp;lt;code&amp;gt;.dll&amp;lt;/code&amp;gt; files. A line naming anything else is skipped and reported.&lt;br /&gt;
* Never &amp;lt;code&amp;gt;dinput8.dll&amp;lt;/code&amp;gt; itself, and a loader must not start another copy of itself. EMF, for example, recognises its own loader under another name and does nothing in that copy.&lt;br /&gt;
* Each DLL once. When a DLL is listed twice (in &amp;lt;code&amp;gt;&amp;amp;#91;Chain&amp;amp;#93;&amp;lt;/code&amp;gt; and a tool&amp;#039;s own section, or twice in one section), it is started once, at its first place.&lt;br /&gt;
* Order: DLLs are started in the order of their lines, top to bottom, &amp;lt;code&amp;gt;&amp;amp;#91;Chain&amp;amp;#93;&amp;lt;/code&amp;gt; and the loader&amp;#039;s own section in the order they appear in the file.&lt;br /&gt;
* When: from the loader&amp;#039;s own &amp;lt;code&amp;gt;DllMain&amp;lt;/code&amp;gt; (or right after it, before any game code runs), with &amp;lt;code&amp;gt;LoadLibrary&amp;lt;/code&amp;gt;. This is the moment a chained DLL would have started had it been &amp;lt;code&amp;gt;dinput8.dll&amp;lt;/code&amp;gt; itself.&lt;br /&gt;
* At most 256 entries count. More are reported and skipped.&lt;br /&gt;
* Failures: a missing DLL, or one that fails to load (Windows&amp;#039; error 126, or 1114 when its &amp;lt;code&amp;gt;DllMain&amp;lt;/code&amp;gt; failed), is skipped and reported. The game goes on.&lt;br /&gt;
&lt;br /&gt;
== Reporting ==&lt;br /&gt;
&lt;br /&gt;
A loader should log one line per chained DLL: started, skipped (switched off, refused, already loaded) or failed with Windows&amp;#039; error number. EMF also writes the same as a table to &amp;lt;code&amp;gt;emf\chain_status.txt&amp;lt;/code&amp;gt;, so players can paste it.&lt;br /&gt;
&lt;br /&gt;
== When you move another tool&amp;#039;s dinput8.dll ==&lt;br /&gt;
&lt;br /&gt;
An installer that finds another tool&amp;#039;s &amp;lt;code&amp;gt;dinput8.dll&amp;lt;/code&amp;gt; should rename it (never delete it), list the new name in its own section of &amp;lt;code&amp;gt;dinput8-chain.ini&amp;lt;/code&amp;gt;, and put it back when uninstalled. EMF names it &amp;lt;code&amp;gt;&amp;amp;lt;tool&amp;amp;gt;.dll&amp;lt;/code&amp;gt; when it recognises the tool, else after the DLL&amp;#039;s version information, else &amp;lt;code&amp;gt;dinput8-previous.dll&amp;lt;/code&amp;gt;, and records what it moved in &amp;lt;code&amp;gt;emf\moved.txt&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Exports ==&lt;br /&gt;
&lt;br /&gt;
The game calls &amp;lt;code&amp;gt;DirectInput8Create&amp;lt;/code&amp;gt; on whoever holds &amp;lt;code&amp;gt;dinput8.dll&amp;lt;/code&amp;gt;. The loader must forward that call to Windows&amp;#039; own &amp;lt;code&amp;gt;dinput8.dll&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;%SystemRoot%\System32\dinput8.dll&amp;lt;/code&amp;gt;). Chained DLLs do not receive DirectInput calls: a mod that does its work in &amp;lt;code&amp;gt;DirectInput8Create&amp;lt;/code&amp;gt; must move it to &amp;lt;code&amp;gt;DllMain&amp;lt;/code&amp;gt; or a thread it starts.&lt;br /&gt;
&lt;br /&gt;
== Who follows it ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tool !! Reads &amp;lt;code&amp;gt;&amp;amp;#91;Chain&amp;amp;#93;&amp;lt;/code&amp;gt; !! Own section&lt;br /&gt;
|-&lt;br /&gt;
| EMF || yes (also lines before any section) || &amp;lt;code&amp;gt;&amp;amp;#91;EMF&amp;amp;#93;&amp;lt;/code&amp;gt; (DLLs its installer renamed)&lt;br /&gt;
|-&lt;br /&gt;
| ShroudForge || yes (it wants each entry inside &amp;lt;code&amp;gt;mods\&amp;amp;lt;folder&amp;amp;gt;\&amp;lt;/code&amp;gt; and reports the others) || &lt;br /&gt;
|-&lt;br /&gt;
| Kiln || yes (also &amp;lt;code&amp;gt;&amp;amp;#91;EMF&amp;amp;#93;&amp;lt;/code&amp;gt;, for DLLs EMF&amp;#039;s older installers renamed) || none: its own list is &amp;lt;code&amp;gt;kiln\chain.ini&amp;lt;/code&amp;gt; (quoted names and a comment after a name: planned)&lt;br /&gt;
|-&lt;br /&gt;
| XHL-Core, Auto Loot Plus || yes || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Tell us when your tool reads the file, or reads it differently, and we will update the table.&lt;br /&gt;
&lt;br /&gt;
== Source ==&lt;br /&gt;
&lt;br /&gt;
[https://github.com/matenm/emf-enshrouded/blob/main/docs/modding/dinput8-chain.md EMF shared dinput8-chain.ini specification]. The original specification is dedicated to the public domain under CC0.&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding:Shroudforge]]&lt;/div&gt;</summary>
		<author><name>FuzzyBot</name></author>
	</entry>
</feed>