Difference between revisions of "Modding Tool"

From Nexus Mods Wiki
Jump to: navigation, search
m
 
Line 19: Line 19:
  
 
== 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>  
+
<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).
  

Latest revision as of 04: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