Jump to content

Tutorials / help database ( put your tutorial's links here ! :) )


Hazraogh

Recommended Posts

Hey everyone ! As the new modding tools of KCD are a bit more complicated, why not to regroup every future help / tutorials in here so modders can create new content more easilly. I'm currently studying the modding tools but with my work on the other side, I won't be able to create tutorials for now. So, for our dear modders, let's put the help in here ! :smile:

 

Here is the first link who regroup basically the explainations of the tools and all but it's a bit brutal and can be a little bit hard to understand sometimes, that's why I think videos and tutorials would be a nice help. :smile:

 

https://wiki.nexusmo...efore_You_Start

Link to comment
Share on other sites

Made this post in the mod tools thread. Thought I'd repost it here if there are still people having issues with the database setup.

 

This is how I got the sql import and connection setup to work.
As a sidenote, it would seem that the database names are case sensitive so it's important the name of the database is exactly ConfigDB when you create it in pgAdmin and when you reference it in the commandline, user.cfg and db.reg. It didn't work for me when I named it configDB, at least.

Update: It would seem that Warhorse studio has come out and stated that the tools are not case sensitive on the database name, psql can still be though so it's always easier to use correct capitalization to be safe.

The flags you enter at step 5 are most definitely case sensitive, though. -f means -f, not -F and -U means -U, not -u.

Psql.exe seems to have trouble with the folder Program Files (x86), so if your game is located under that folder or you experience error messages, try copying modding.sql, public.sql and sequences.sql to c:\ and use that path at step 5 instead.

1. Download and extract the mod package to your kingdom come folder. https://www.nexusmods.com/kingdomcomedeliverance/mods/864?tab=files&BH=26
2. Download, install and create the database and extension as explained in the wiki. https://wiki.nexusmods.com/index.php/Setting_up_Database
3. Download the odbc-driver at https://www.postgresql.org/ftp/odbc/versions/msi/. Pick the "psqlodbc_12_00_0000-x64.zip" version, it worked for me. Unpack and run the msi.
4. Windowskey + R to open the run window. Type cmd and press enter.
5. TYPE in "C:\Program Files\PostgreSQL\11\bin\psql.exe" -f d:\SteamLibrary\SteamApps\Common\KingdomComeDeliverance\Data_reference\modding.sql -U postgres –d ConfigDB -q
and press enter.
Some of us have experienced problem with getting psql.exe to accept the flags when copy/pasting, so do type it in.
If you installed postgreSQL or Kingdom Come to another location than me, adjust the filepath before pressing enter.
6. Type in the password you chose during the database installation when prompted and press enter.. Wait for the program to finish executing, the modding.sql file is quite large so this might take a minute.
7. Repeat steps 4 to 6 replacing modding.sql with public.sql.
8. Open the file sequences.sql with Notepad. It's located in the same folder as the prior sql-files.
9. Change the value 10578 to any value above 100000. This is where the unique id's for the database entries for your mod will start. It has to be unique from other mods to not interfere with them. The tools will still work if you leave it as it is, so do that if you feel unsure.
10. Save
11. Repeat steps 4 to 6 replacing modding.sql with sequences.sql.
12. Find db.reg and edit it in Notepad (e.g. c:\program files(x86)\Steam\SteamApps\Common\KingdomComeDeliverance\Tools\!Registry\db.reg)
13. Edit the line "password="1234" and replace with the correct password you provided when installing the database, between the second pair of quotation marks.
14. Save
15. Run the registry file db.reg
16. Find and edit user.cfg in the Notepad (e.g. c:\program files(x86)\Steam\SteamApps\Common\KingdomComeDeliverance\user.cfg)
17. It should look like this:

wh_ai_ErrorBreak 7

wh_sys_SQLServer = "127.0.0.1"
wh_sys_SQLDatabase = "ConfigDB"
wh_sys_SQLUser = "postgres"
wh_sys_SQLPassword = "here you enter the password you chose during database installation"
wh_sys_SQLBranch = "modding"

wh_sys_PreferredDB = SQL, TBL, XML
wh_sys_SQLWritable = 1

18. Save

And its done. Good luck!

Edited by JoelTarnabene
Link to comment
Share on other sites

  • 2 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...