Difference between revisions of "Modding Tool"

From Nexus Mods Wiki
Jump to: navigation, search
m
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
Modding Tool
 
  
 
The Modding tool creates data PAKs for the mod. The tool is started from editor menu.
 
The Modding tool creates data PAKs for the mod. The tool is started from editor menu.
  
[[File:Modding Tool Image1.png|409x396px|Modding Tool Image1.png]]
+
[[File:Modding Tool Image1.png|RTENOTITLE]]
  
 
This opens dialog window:
 
This opens dialog window:
  
[[File:Modding Tool Image2.png|A screenshot of a cell phone Description automatically generated]]
+
[[File:Modding Tool Image2.png|RTENOTITLE]]
 +
 
 +
The button 'Create new mod' opens another dialog window, it is described later in this document.
  
 
Paks are created for the mod selected in the combo box. Mod folder must exist already.
 
Paks are created for the mod selected in the combo box. Mod folder must exist already.
Line 14: Line 14:
 
Normalized mod name is filesystem friendly name. It is used as part of pak name. The normalized name is set by:
 
Normalized mod name is filesystem friendly name. It is used as part of pak name. The normalized name is set by:
  
*Tag "modid" in mod manifest (it can contain lowercase letters and underscore)  
+
*    Tag "modid" in mod manifest (it can contain lowercase letters and underscore)  
*Mod name in mod manifest (the name is converted to suitable format)  
+
*    Mod name in mod manifest (the name is converted to suitable format)  
*Mod folder name (the name is converted to suitable format)  
+
*    Mod folder name (the name is converted to suitable format)  
 
 
= Tables =
 
  
 +
== Tables ==
 +
<div style="color:black"><div style="background:#ffce1f; border:1px solid #cccccc; padding:5px 10px">If you see errors during this phase, ensure you have [[Setting_up_Database|set up database]] correctly, including the user.cfg file. You need to have XML or TBL in wh_sys_PreferredDB, otherwise the editor won't be able to write created diff tables.<br/> Also make sure you have the latest version of Tables_reference.pak in Data folder. See "update files" in [https://www.nexusmods.com/kingdomcomedeliverance/mods/864/modding?tab=files modding package download site].</div> </div>
 
The tables are in 'Data/Libs/Tables' (or 'Libs/Tables inside the PAK'). The Modding Tool can store just modified parts of tables to mod PAKs. This allows to use several mods in one time. Name of patch table is ORIGINAL_TABLE_NAME__NORMALIZED_MOD_NAME, e.g. 'poi_type__my_first_mod' is created for 'poi_type'. Suffix of table file is XML (human readable format) and TBL (quick binary format).
 
The tables are in 'Data/Libs/Tables' (or 'Libs/Tables inside the PAK'). The Modding Tool can store just modified parts of tables to mod PAKs. This allows to use several mods in one time. Name of patch table is ORIGINAL_TABLE_NAME__NORMALIZED_MOD_NAME, e.g. 'poi_type__my_first_mod' is created for 'poi_type'. Suffix of table file is XML (human readable format) and TBL (quick binary format).
  
 
Steps to create mod tables pak:
 
Steps to create mod tables pak:
  
#Ensure no mod is active (otherwise the mod would contain modifications from other mods)  
+
#Ensure no mod is active (otherwise the mod would contain modifications from other mods)<br/> &nbsp;
#Extract and modify table files (by editor or manually)  
+
#Extract and modify table files (by editor or manually)<br/> &nbsp;
#You can test the your modification now in the editor or in the game (in this case you must set sys_pakpriority to 0)  
+
#You can test the your modification now in the editor or in the game (in this case you must set sys_pakpriority to 0)<br/> &nbsp;
#Ensure you have PAK with reference tables 'Tables_reference.pak' in folder 'Data'  
+
#Ensure you have PAK with reference tables 'Tables_reference.pak' in folder 'Data'<br/> &nbsp;  
#<o:wrapblock>[[File:Modding Tool Image3.png|A screenshot of a cell phone Description automatically generated]] <w:wrap type="topAndBottom">
+
#Create diff tables for your mod by pressing button 'Create mod tables'. In few seconds it compares current tables to reference ones and creates diff table files (in case there is a difference). Result dialog should look like this one:<br/> [[File:Modding Tool Image3.png|RTENOTITLE]]<br/> Details you can see in editor console or in 'editor.log'<br/> &nbsp;
 
+
#Again - you can test the your modification now in the editor or in the game (in this case you must set sys_pakpriority to 0)<br/> &nbsp;
{| style="border:undefined"
+
#Pack the diff files by pressing button 'Pack tables'. All table files (*.TBL, *.XML) are packed into file 'mods/MOD_FOLDER/data/tables_patch.pak'. Result dialog should look like this one:<br/> [[File:Modding Tool Image4.png|RTENOTITLE]]<br/> Details you can see in editor console or in 'editor.log'  
|-
 
| width="317" height="0" | &nbsp;
 
|-
 
| &nbsp;
 
| [[File:Modding Tool Image4.png|A screenshot of a cell phone Description automatically generated]]
 
|}
 
 
 
</w:wrap></o:wrapblock><br/> Create diff tables for you mod by pressing button 'Create mod tables'. In few seconds it compares current tables to reference ones and created diff table files (in case there is a difference). Result dialog should look like this one:
 
 
 
Details you can see in editor console or in 'editor.log'
 
<ol start="6">
 
<li>Again - you can test the your modification now in the editor or in the game (in this case you must set sys_pakpriority to 0)</li>
 
<li>Pack the diff files by pressing button 'Pack tables'. All table files (*.TBL, *.XML) are packed into file 'mods/MOD_FOLDER/data/tables_patch.pak'. Result dialog should look like this one:[[File:Modding Tool Image5.png|RTENOTITLE]]</li>
 
</ol>
 
 
 
Details you can see in editor console or in 'editor.log'
 
  
 
&nbsp;
 
&nbsp;
  
= Other files (not tables, not localization) =
+
== Other files (not tables, not localization) ==
  
 
The non-table files in folder 'Data' should be packed into file 'mods/MOD_FOLDER/data/data.pak'. Modding tool disables data compression for some files and excludes the tables folder.
 
The non-table files in folder 'Data' should be packed into file 'mods/MOD_FOLDER/data/data.pak'. Modding tool disables data compression for some files and excludes the tables folder.
Line 56: Line 40:
 
Steps to create the pak:
 
Steps to create the pak:
  
1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Extract and modify files (by editor or manually)
+
1.&nbsp;&nbsp; &nbsp;Extract and modify files (by editor or manually)
 +
 
 +
2.&nbsp;&nbsp; &nbsp;You can test your modification now in the editor or in the game (in this case you must set sys_pakpriority to 0)
  
2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; You can test the your modification now in the editor or in the game (in this case you must set sys_pakpriority to 0)
+
3.&nbsp;&nbsp; &nbsp;Pak the diff files by pressing button 'Pack other files'. Result dialog should look like this one: &nbsp;
  
3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pak the diff files by pressing button 'Pack other files'. Result dialog should look like this one: [[File:Modding Tool Image6.png|RTENOTITLE]]
+
[[File:Modding Tool Image5.png|RTENOTITLE]]
  
 
Details you can see in editor console or in 'editor.log'
 
Details you can see in editor console or in 'editor.log'
  
= Localization - text =
+
== Localization - text ==
  
 
The localization texts are packed into 'mods/MOD_FOLDER/Localization/LANGUAGE_xml.pak'
 
The localization texts are packed into 'mods/MOD_FOLDER/Localization/LANGUAGE_xml.pak'
Line 72: Line 58:
 
#Modify or add the texts in the database  
 
#Modify or add the texts in the database  
 
#Select language in the combo box  
 
#Select language in the combo box  
#<o:wrapblock>[[File:Modding tool Image5.png|A screenshot of a cell phone Description automatically generated]] <w:wrap type="topAndBottom">
+
#Push the button 'Create and pack mod texts'. It starts external tool – this tool finds differences in text database and stores the differences into mod pak. This needs several minutes. You should see new window like this one:<br/> [[File:Modding Tool Image6.png|RTENOTITLE]]<br/> In case of error the error message is written to this window and messagebox is displayed after external tool ends.
 +
 
 +
== Localization - voiceover ==
 +
 
 +
The voiceover files are packed into 'mods/MOD_FOLDER/Localization/LANGUAGE.pak'. Only *.ogg files are supported.
 +
 
 +
Steps to create text localization pak:
 +
 
 +
#&nbsp;&nbsp;&nbsp; Put your files into folder Localization/Dialog
 +
#&nbsp;&nbsp;&nbsp; Select language in the combo box
 +
 
 +
Push the button 'Pack voiceovers'. Result dialog should look like this one:
 +
 
 +
[[File:Modding Tool Image7.png|RTENOTITLE]]
 +
 
 +
Details you can see in editor console or in 'editor.log'
  
{| style="border:undefined"
+
== Creating the new mod ==
|-
 
| width="18" height="0" | &nbsp;
 
|-
 
| &nbsp;
 
| [[File:Modding tool Image6.png|A screenshot of a cell phone Description automatically generated]]
 
|}
 
  
</w:wrap></o:wrapblock><br/> Push button 'Create and pack mod texts'. It starts external tool – this tool finds differences in text database and stores the differences into mod pak. This needs several minutes. You should see new window like this one:
+
Press the button 'Create new mod' in the main modding dialog.
  
In case of error the error message is written to this window and messagebox is displayed after external tool ends.
+
This opens the dialog window:
  
= Localization - voiceover =
+
[[File:Modding Tool Image8.png|RTENOTITLE]]
  
The voiceover files are packed into 'mods/MOD_FOLDER/Localization/LANGUAGE.pak'. Only *.ogg files are supported.
+
&nbsp;
  
Steps to create text localization pak:
+
Fill the properties and press button 'Create this mod'. This creates mod folder and manifest file.
  
#Put your files into folder Localization/Dialog
+
'Name' and 'Normalized name' are mandatory.
#Select language in the combo box
 
  
Push button 'Pack voiceovers'. Result dialog should look like this one:[[File:Modding tool Image7.png|A screenshot of a cell phone Description automatically generated]]
+
The 'Normalized name' can contain lowercase letters and underscore only. This is also name of mod folder. Normalized name is created automatically from the name if checkbox 'Auto create normalized name' is checked.
  
Details you can see in editor console or in 'editor.log' {{KCDNavigation}}
+
The checkbox 'Modifies level' declares the mod contains significant changes in level structure. In this case the file 'newgame.whs' is refreshed each time the game starts. Otherwise the game menu option 'New game' could fail. Refreshing of the file causes slower game starting (few seconds). {{KCDNavigation}}
  
[[Category:Pages with broken file links]] [[Category:Tools]] [[Category:Kingdom Come Deliverance]]
+
[[Category:Tools]] [[Category:Kingdom Come Deliverance]]

Latest revision as of 05:39, 22 October 2021

The Modding tool creates data PAKs for the mod. The tool is started from editor menu.

RTENOTITLE

This opens dialog window:

RTENOTITLE

The button 'Create new mod' opens another dialog window, it is described later in this document.

Paks are created for the mod selected in the combo box. Mod folder must exist already.

Normalized mod name is filesystem friendly name. It is used as part of pak name. The normalized name is set by:

  •     Tag "modid" in mod manifest (it can contain lowercase letters and underscore)
  •     Mod name in mod manifest (the name is converted to suitable format)
  •     Mod folder name (the name is converted to suitable format)

Tables

If you see errors during this phase, ensure you have set up database correctly, including the user.cfg file. You need to have XML or TBL in wh_sys_PreferredDB, otherwise the editor won't be able to write created diff tables.
Also make sure you have the latest version of Tables_reference.pak in Data folder. See "update files" in modding package download site.

The tables are in 'Data/Libs/Tables' (or 'Libs/Tables inside the PAK'). The Modding Tool can store just modified parts of tables to mod PAKs. This allows to use several mods in one time. Name of patch table is ORIGINAL_TABLE_NAME__NORMALIZED_MOD_NAME, e.g. 'poi_type__my_first_mod' is created for 'poi_type'. Suffix of table file is XML (human readable format) and TBL (quick binary format).

Steps to create mod tables pak:

  1. Ensure no mod is active (otherwise the mod would contain modifications from other mods)
     
  2. Extract and modify table files (by editor or manually)
     
  3. You can test the your modification now in the editor or in the game (in this case you must set sys_pakpriority to 0)
     
  4. Ensure you have PAK with reference tables 'Tables_reference.pak' in folder 'Data'
     
  5. Create diff tables for your mod by pressing button 'Create mod tables'. In few seconds it compares current tables to reference ones and creates diff table files (in case there is a difference). Result dialog should look like this one:
    RTENOTITLE
    Details you can see in editor console or in 'editor.log'
     
  6. Again - you can test the your modification now in the editor or in the game (in this case you must set sys_pakpriority to 0)
     
  7. Pack the diff files by pressing button 'Pack tables'. All table files (*.TBL, *.XML) are packed into file 'mods/MOD_FOLDER/data/tables_patch.pak'. Result dialog should look like this one:
    RTENOTITLE
    Details you can see in editor console or in 'editor.log'

 

Other files (not tables, not localization)

The non-table files in folder 'Data' should be packed into file 'mods/MOD_FOLDER/data/data.pak'. Modding tool disables data compression for some files and excludes the tables folder.

Steps to create the pak:

1.    Extract and modify files (by editor or manually)

2.    You can test your modification now in the editor or in the game (in this case you must set sys_pakpriority to 0)

3.    Pak the diff files by pressing button 'Pack other files'. Result dialog should look like this one:  

RTENOTITLE

Details you can see in editor console or in 'editor.log'

Localization - text

The localization texts are packed into 'mods/MOD_FOLDER/Localization/LANGUAGE_xml.pak'

Steps to create text localization pak:

  1. Modify or add the texts in the database
  2. Select language in the combo box
  3. Push the button 'Create and pack mod texts'. It starts external tool – this tool finds differences in text database and stores the differences into mod pak. This needs several minutes. You should see new window like this one:
    RTENOTITLE
    In case of error the error message is written to this window and messagebox is displayed after external tool ends.

Localization - voiceover

The voiceover files are packed into 'mods/MOD_FOLDER/Localization/LANGUAGE.pak'. Only *.ogg files are supported.

Steps to create text localization pak:

  1.     Put your files into folder Localization/Dialog
  2.     Select language in the combo box

Push the button 'Pack voiceovers'. Result dialog should look like this one:

RTENOTITLE

Details you can see in editor console or in 'editor.log'

Creating the new mod

Press the button 'Create new mod' in the main modding dialog.

This opens the dialog window:

RTENOTITLE

 

Fill the properties and press button 'Create this mod'. This creates mod folder and manifest file.

'Name' and 'Normalized name' are mandatory.

The 'Normalized name' can contain lowercase letters and underscore only. This is also name of mod folder. Normalized name is created automatically from the name if checkbox 'Auto create normalized name' is checked.

The checkbox 'Modifies level' declares the mod contains significant changes in level structure. In this case the file 'newgame.whs' is refreshed each time the game starts. Otherwise the game menu option 'New game' could fail. Refreshing of the file causes slower game starting (few seconds).

Kingdom Come: Deliverance: Forum | Before you start | Tutorials & Instructions | Basic Mods | Tools | Documentation | Glossary | EULA