Difference between revisions of "Setting up Database"

From Nexus Mods Wiki
Jump to: navigation, search
Line 2: Line 2:
 
<span class="TextRun SCXW209497143 BCX2" data-contrast="none" style="color: rgb(47, 84, 150);  font-size: 13pt;  font-family: Calibri Light, Calibri Light_MSFontService, sans-serif;  line-height: 22.6625px" lang="EN-GB"><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">Database</span></span><span class="EOP SCXW209497143 BCX2" data-ccp-props="{" style="font-size: 13pt;  line-height: 22.6625px;  font-family: Calibri Light, Calibri Light_MSFontService, sans-serif">&nbsp;</span>
 
<span class="TextRun SCXW209497143 BCX2" data-contrast="none" style="color: rgb(47, 84, 150);  font-size: 13pt;  font-family: Calibri Light, Calibri Light_MSFontService, sans-serif;  line-height: 22.6625px" lang="EN-GB"><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">Database</span></span><span class="EOP SCXW209497143 BCX2" data-ccp-props="{" style="font-size: 13pt;  line-height: 22.6625px;  font-family: Calibri Light, Calibri Light_MSFontService, sans-serif">&nbsp;</span>
 
</div> <div class="OutlineElement Ltr BCX2 SCXW209497143" style="direction: ltr">
 
</div> <div class="OutlineElement Ltr BCX2 SCXW209497143" style="direction: ltr">
<span class="TextRun SCXW209497143 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">Game database contains all the game data, such as items, dialogues, perks etc... The </span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">modding</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">pack contains a dump of the game database in SQL format. You are going to need to run a </span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">postgreSQL</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">server on your computer, which the </span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">modding</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">tools will connect to.</span></span><span class="EOP SCXW209497143 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>
+
<span class="TextRun SCXW209497143 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">The Game database contains all the game data, such as items, dialogues, perks etc... The </span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">modding</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">pack contains a dump of the game database in SQL format. You are going to need to run a </span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">postgreSQL</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">server on your computer, which the </span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">modding</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">tools will connect to.</span></span><span class="EOP SCXW209497143 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>
 
</div> <div class="OutlineElement Ltr BCX2 SCXW209497143" style="direction: ltr">
 
</div> <div class="OutlineElement Ltr BCX2 SCXW209497143" style="direction: ltr">
 
<span class="TextRun SCXW209497143 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">First download and install </span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">postgresql</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">from their website</span></span><span class="TextRun SCXW209497143 BCX2" data-contrast="none" style="color: rgb(255, 0, 0);  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">([https://www.postgresql.org/ https://www.postgresql.org/])</span></span><span class="TextRun SCXW209497143 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">, then install it. DB server should automatically start. Then you need to connect to the server, create a database called “</span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">ConfigDB</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">” (the name is </span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">unforunately</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">hardcoded into some of the tools), and add extension “</span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">uuid-ossp</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">”.</span></span><span class="EOP SCXW209497143 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>
 
<span class="TextRun SCXW209497143 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">First download and install </span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">postgresql</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">from their website</span></span><span class="TextRun SCXW209497143 BCX2" data-contrast="none" style="color: rgb(255, 0, 0);  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">([https://www.postgresql.org/ https://www.postgresql.org/])</span></span><span class="TextRun SCXW209497143 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">, then install it. DB server should automatically start. Then you need to connect to the server, create a database called “</span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">ConfigDB</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">” (the name is </span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">unforunately</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">hardcoded into some of the tools), and add extension “</span><span class="SpellingError SCXW209497143 BCX2" style="background-color: inherit">uuid-ossp</span><span class="NormalTextRun SCXW209497143 BCX2" style="background-color: inherit">”.</span></span><span class="EOP SCXW209497143 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>
Line 20: Line 20:
 
<span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">Ideally this command should run with no output of any kind (the -q switch hides all non-errors, and there should be no errors). In your database, there should be now a schema called “</span><span class="SpellingError SCXW122478776 BCX2" style="background-color: inherit">modding</span><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">” with 468 tables.</span></span><span class="EOP SCXW122478776 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>
 
<span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">Ideally this command should run with no output of any kind (the -q switch hides all non-errors, and there should be no errors). In your database, there should be now a schema called “</span><span class="SpellingError SCXW122478776 BCX2" style="background-color: inherit">modding</span><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">” with 468 tables.</span></span><span class="EOP SCXW122478776 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>
 
</div> <div class="OutlineElement Ltr BCX2 SCXW122478776" style="direction: ltr">
 
</div> <div class="OutlineElement Ltr BCX2 SCXW122478776" style="direction: ltr">
<span class="TextRun SCXW108787113 BCX2" data-contrast="none" style="color: rgb(47, 84, 150);  font-size: 13pt;  font-family: Calibri Light, Calibri Light_MSFontService, sans-serif;  line-height: 22.6625px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW108787113 BCX2" style="background-color: inherit">Autoincrement</span></span>
+
<span class="TextRun SCXW108787113 BCX2" data-contrast="none" style="color: rgb(47, 84, 150);  font-size: 13pt;  font-family: Calibri Light, Calibri Light_MSFontService, sans-serif;  line-height: 22.6625px" lang="EN-GB"><span class="NormalTextRun SCXW108787113 BCX2" style="background-color: inherit">Autoincrement</span></span>
</div> <div class="OutlineElement Ltr BCX2 SCXW122478776" style="direction: ltr"><div class="OutlineElement Ltr BCX2 SCXW224964571" style="direction: ltr">
+
</div> <div class="OutlineElement Ltr BCX2 SCXW122478776" style="direction: ltr"><div class="OutlineElement Ltr BCX2 SCXW224964571" style="direction: ltr">
<span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">Some tables use autoincrement to generate IDs for new entries. If you are going to create new dialogues, you are going to need to adjust the initial value for this autoincrement to a value unique for your mod. If you don’t, your mod will clash with any other mods that also failed to set a unique value.</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">To do this, open</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">file</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit"></span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">Data_references.sql</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">/</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">sequences.sql</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">and change the value 10578 to any value unique to your mod (</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">ideally a value that is far enough from other mod’s values, by at least seve</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">ral hundreds</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">. Since the first ids are used by KCD’s entries,</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">choose a number higher than 100</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">000</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">)</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">.</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit"></span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">Then run</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">following</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">command:</span></span><span class="EOP SCXW224964571 BCX2" data-ccp-props="{" 201341983":0,"335559739":160,"335559740":259}"="" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>
+
<span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">Some tables use autoincrement to generate IDs for new entries. If you are going to create new dialogues, you are going to need to adjust the initial value for this autoincrement to a value unique for your mod. If you don’t, your mod will clash with any other mods that also failed to set a unique value.</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">To do this, open</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">file</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">Data_references.sql</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">/</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">sequences.sql</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">and change the value 10578 to any value unique to your mod (</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">ideally a value that is far enough from other mod’s values, by at least seve</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">ral hundreds</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">. Since the first ids are used by KCD’s entries,</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">choose a number higher than 100</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">000</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">)</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">.</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">Then run</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">following</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">command:</span></span><span class="EOP SCXW224964571 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>
</div> <div class="OutlineElement Ltr BCX2 SCXW224964571" style="direction: ltr">
+
</div> <div class="OutlineElement Ltr BCX2 SCXW224964571" style="direction: ltr">
<span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">psql.exe -f</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">Data_reference</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">/</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">sequences</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">.</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">sql</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">-U</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">postgres</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">–d</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">ConfigDB</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">–</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">q</span></span><span class="EOP SCXW224964571 BCX2" data-ccp-props="{" 201341983":0,"335559739":160,"335559740":259}"="" style="font-size: 11pt;  line-height: 19.425px;  font-family: Consolas, Consolas_MSFontService, monospace">&nbsp;</span>
+
<span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">psql.exe -f</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">Data_reference</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">/</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">sequences</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">.</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">sql</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">-U</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">postgres</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">–d</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">ConfigDB</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">–</span></span><span class="TextRun SCXW224964571 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Consolas, Consolas_MSFontService, monospace;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW224964571 BCX2" style="background-color: inherit">q</span></span><span class="EOP SCXW224964571 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Consolas, Consolas_MSFontService, monospace">&nbsp;</span>
 
</div>  
 
</div>  
 
&nbsp;
 
&nbsp;
Line 32: Line 32:
 
<span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">There are several tools that work with the SQL database. Most of them require you to set up correct registry keys which they read connection information from. To do that, modify file</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-weight: bold;  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">Tools</span><span class="ContextualSpellingAndGrammarError SCXW122478776 BCX2" style="background-color: inherit">/</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-weight: bold;  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="ContextualSpellingAndGrammarError SCXW122478776 BCX2" style="background-color: inherit">!</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-weight: bold;  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="ContextualSpellingAndGrammarError SCXW122478776 BCX2" style="background-color: inherit">registry/db.reg</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">&nbsp; (you only need to modify the password, “</span><span class="SpellingError SCXW122478776 BCX2" style="background-color: inherit">postgres</span><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">” is the default user) and then run it. </span><span class="AdvancedProofingIssue SCXW122478776 BCX2" style="background-color: inherit">All of</span><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">the tools, except the Sandbox editor, use these registry keys. To get the Sandbox to connect, fill in correct connection information in</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-weight: bold;  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="SpellingError SCXW122478776 BCX2" style="background-color: inherit">user.cfg</span><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">.</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">Sandbox editor also requires</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">an</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">ODBC driver to use. Install one for </span><span class="SpellingError SCXW122478776 BCX2" style="background-color: inherit">postgreSQL</span><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">from</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="none" style="color: rgb(255, 0, 0);  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">their </span><span class="ContextualSpellingAndGrammarError SCXW122478776 BCX2" style="background-color: inherit">site(</span></span>[https://odbc.postgresql.org/ <span class="TextRun Underlined SCXW122478776 BCX2" data-contrast="none" style="color: rgb(255, 0, 0);  text-decoration: underline;  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">https://odbc.postgresql.org/</span></span>]<span class="TextRun SCXW122478776 BCX2" data-contrast="none" style="color: rgb(255, 0, 0);  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">)</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">(use 64-bit version).</span></span><span class="EOP SCXW122478776 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>
 
<span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">There are several tools that work with the SQL database. Most of them require you to set up correct registry keys which they read connection information from. To do that, modify file</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-weight: bold;  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">Tools</span><span class="ContextualSpellingAndGrammarError SCXW122478776 BCX2" style="background-color: inherit">/</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-weight: bold;  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="ContextualSpellingAndGrammarError SCXW122478776 BCX2" style="background-color: inherit">!</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-weight: bold;  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="ContextualSpellingAndGrammarError SCXW122478776 BCX2" style="background-color: inherit">registry/db.reg</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">&nbsp; (you only need to modify the password, “</span><span class="SpellingError SCXW122478776 BCX2" style="background-color: inherit">postgres</span><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">” is the default user) and then run it. </span><span class="AdvancedProofingIssue SCXW122478776 BCX2" style="background-color: inherit">All of</span><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">the tools, except the Sandbox editor, use these registry keys. To get the Sandbox to connect, fill in correct connection information in</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-weight: bold;  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="SpellingError SCXW122478776 BCX2" style="background-color: inherit">user.cfg</span><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">.</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">Sandbox editor also requires</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">an</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">ODBC driver to use. Install one for </span><span class="SpellingError SCXW122478776 BCX2" style="background-color: inherit">postgreSQL</span><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">from</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="none" style="color: rgb(255, 0, 0);  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">their </span><span class="ContextualSpellingAndGrammarError SCXW122478776 BCX2" style="background-color: inherit">site(</span></span>[https://odbc.postgresql.org/ <span class="TextRun Underlined SCXW122478776 BCX2" data-contrast="none" style="color: rgb(255, 0, 0);  text-decoration: underline;  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">https://odbc.postgresql.org/</span></span>]<span class="TextRun SCXW122478776 BCX2" data-contrast="none" style="color: rgb(255, 0, 0);  font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">)</span></span><span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">(use 64-bit version).</span></span><span class="EOP SCXW122478776 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>
 
</div> <div class="OutlineElement Ltr BCX2 SCXW122478776" style="direction: ltr">
 
</div> <div class="OutlineElement Ltr BCX2 SCXW122478776" style="direction: ltr">
<span class="TextRun SCXW108787113 BCX2" data-contrast="none" style="color: rgb(47, 84, 150);  font-size: 13pt;  font-family: Calibri Light, Calibri Light_MSFontService, sans-serif;  line-height: 22.6625px" xml:lang="EN-GB" lang="EN-GB"><span class="NormalTextRun SCXW108787113 BCX2" style="background-color: inherit">Working with Database</span></span>
+
<span class="TextRun SCXW108787113 BCX2" data-contrast="none" style="color: rgb(47, 84, 150);  font-size: 13pt;  font-family: Calibri Light, Calibri Light_MSFontService, sans-serif;  line-height: 22.6625px" lang="EN-GB"><span class="NormalTextRun SCXW108787113 BCX2" style="background-color: inherit">Working with Database</span></span>
 
</div> <div class="OutlineElement Ltr BCX2 SCXW122478776" style="direction: ltr">
 
</div> <div class="OutlineElement Ltr BCX2 SCXW122478776" style="direction: ltr">
 
<span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">The database can be edited with any SQL client you prefer, or you can use our custom tool.&nbsp; It is a plugin for MS Excel, which simplifies editing tables by unpacking foreign keys. To use it, you need to install in from Tools/ExcelDbAddin2, which installs it directly into MS Excel (it can be removed at any time in “Add or Remove programs”). It will appear as a new menu item called “WHS DB”.</span></span><span class="EOP SCXW122478776 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>
 
<span class="TextRun SCXW122478776 BCX2" data-contrast="auto" style="font-size: 11pt;  font-family: Calibri, Calibri_MSFontService, sans-serif;  line-height: 19.425px" lang="EN-GB"><span class="NormalTextRun SCXW122478776 BCX2" style="background-color: inherit">The database can be edited with any SQL client you prefer, or you can use our custom tool.&nbsp; It is a plugin for MS Excel, which simplifies editing tables by unpacking foreign keys. To use it, you need to install in from Tools/ExcelDbAddin2, which installs it directly into MS Excel (it can be removed at any time in “Add or Remove programs”). It will appear as a new menu item called “WHS DB”.</span></span><span class="EOP SCXW122478776 BCX2" data-ccp-props="{" style="font-size: 11pt;  line-height: 19.425px;  font-family: Calibri, Calibri_MSFontService, sans-serif">&nbsp;</span>

Revision as of 17:43, 29 October 2019

Database 

The Game database contains all the game data, such as items, dialogues, perks etc... The moddingpack contains a dump of the game database in SQL format. You are going to need to run a postgreSQLserver on your computer, which the moddingtools will connect to. 

First download and install postgresqlfrom their website(https://www.postgresql.org/), then install it. DB server should automatically start. Then you need to connect to the server, create a database called “ConfigDB” (the name is unforunatelyhardcoded into some of the tools), and add extension “uuid-ossp”. 

In pgAdmin(a tool that comes with basicpostgresqlpackage): 

RTENOTITLE

Or run psql.exe (also comes withpostgresql) and input following commands: 

CREATE DATABASE ConfigDB 
CREATE EXTENSION “uuid-ossp 

Then run psql.exe to restore the database from provided dumps: 

psql.exe -f Data_reference/modding.sql-U postgres–d ConfigDB-q 

psql.exe -f Data_reference/public.sql-U postgres–d ConfigDB-q 

Ideally this command should run with no output of any kind (the -q switch hides all non-errors, and there should be no errors). In your database, there should be now a schema called “modding” with 468 tables. 

Autoincrement

Some tables use autoincrement to generate IDs for new entries. If you are going to create new dialogues, you are going to need to adjust the initial value for this autoincrement to a value unique for your mod. If you don’t, your mod will clash with any other mods that also failed to set a unique value.To do this, openfileData_references.sql/sequences.sqland change the value 10578 to any value unique to your mod (ideally a value that is far enough from other mod’s values, by at least several hundreds. Since the first ids are used by KCD’s entries,choose a number higher than 100000).Then runfollowingcommand: 

psql.exe -fData_reference/sequences.sql-Upostgres–dConfigDBq 

 

Setting up tools 

There are several tools that work with the SQL database. Most of them require you to set up correct registry keys which they read connection information from. To do that, modify fileTools/!registry/db.reg  (you only need to modify the password, “postgres” is the default user) and then run it. All ofthe tools, except the Sandbox editor, use these registry keys. To get the Sandbox to connect, fill in correct connection information inuser.cfg.Sandbox editor also requiresanODBC driver to use. Install one for postgreSQLfromtheir site(https://odbc.postgresql.org/)(use 64-bit version). 

Working with Database

The database can be edited with any SQL client you prefer, or you can use our custom tool.  It is a plugin for MS Excel, which simplifies editing tables by unpacking foreign keys. To use it, you need to install in from Tools/ExcelDbAddin2, which installs it directly into MS Excel (it can be removed at any time in “Add or Remove programs”). It will appear as a new menu item called “WHS DB”. 

Any changes made to the database will be visible in the Sandbox editor (with the exception ofLocalization). The game, however, reads the database from XML files inside Tables.pakor mod PAK files. To create such PAKs, use the editor’s modding window .