Crusader kings 2 как сделать мод

Обновлено: 16.05.2024

Довольно любопытный мод, позволяющий изменять де-юре границы прямо в игре без ожидания в 100 лет. Вы можете передать любое графство, герцогство или королевство в другое герцогство, королевство или империю соответственно, потратив при это определенную сумму золота, престижа или благочестия. Кроме того, вы можете создать номинальный титул из любого графства, герцогства или королевства, а затем передать в его состав какие-либо другие титулы. При этом важно заметить, что цена создания такого номинального титула меньше, чем в решениях (если вы, допустим, герцог, и можете создать номинальное королевство) однако вы не можете создать титул выше вашего, то-есть вам необходимо быть королём или императором, чтобы создать другое номинальное королевство.

В целом, этот инструмент подойдёт если вы хотите немного подкорректировать де-юре границы каких-либо титулов, создать новый, или же, теоретически, что будет очень актуально для не брезгующих небольшими дырами геймплея маляров, создать одну огромную империю, в которую де-юре входили бы все королевства, а сами де-юре империи при этом де-юре не имели в своём составе королевства, но давали прирост престижа.

Передача титулов происходит следующим образом:
1. Нажимаете ПКМ на иконке титула, в состав которого вы хотите передать какой-либо другой более низкий по уровню титул. Выбираете "Назначить получающим [ранг титула]".
2. Нажимаете ПКМ на иконке титула, который вы хотите передать, находите кнопку "Передать [ранг титула]".

И, собственно, всё.

Номинальный титул создаётся простыми нажатиями на иконке титула ПКМ и кнопочке "Создать номинальное [ранг будущего титула] из [ранг существующего титула]". Только не забывайте, что вы уже должны обладать каким-либо титулом ранга того титула, который вы собираетесь создавать, или выше.

This article is timeless and should be accurate for any version of the game.

This tutorial explains in details the steps required to create a basic mod.

Note that another approach is to copy/paste and modify an existing mod (though not a mod installed via Steam Workshop since these are packaged differently).

It is assumed that the OS is Windows, but this could apply to MacOS or Linux with few changes.

Specific guides

Only includes guides not already linked in the "How to mod" column above or otherwise.
    - how to find errors in your mod - how to change a save game
    - how to migrate a mod from patch 2.3.6 to patch 2.4.X - how to migrate a mod from patch 2.4.5 to patch 2.5.X - how to migrate a mod from patch 2.5.2 to patch 2.6.X - how to migrate a mod from patch 2.6.3 to patch 2.7.X - how to migrate a mod from patch 2.7.2 to patch 2.8.X - how to migrate a mod from patch 2.8.3.2 to patch 3.0.X - how to migrate a mod from patch 3.0.X to patch 3.1.X - how to merge mod files with a new vanilla patch
    - Creating a total conversion mod - Advanced guide for creating a Windows installer

Steps

Create the CK2 mod directory

There are 2 different directories involved:

  • The CK2 install directory: it contains the base game files, which should not be modified directly and considered 'read-only' (modifications will be lost when Steam is updating). It can be found via Steam: find CK2 in your games library, right click on the name and select properties in the menu. Choose the local files tab and then press browse local files. It will take you to a path that ends with something like steamapps\common\Crusader Kings II .

/My Documents/Paradox Interactive/Crusader Kings II/ , where

is the home directory. Depending on your configuration and Windows version, this could look like: C:\Users\<YourUser>\Documents\Paradox Interactive\Crusader Kings II , and in Linux,

Tip: you may create shortcuts to these directories on your desktop.

Step 1: Create a mod folder

/My Documents/Paradox Interactive/Crusader Kings II/mod/ , if it doesn't exist.

Note: there is also a legacy common\Crusader Kings II\mod\ folder in the CK2 install directory, but it must not be used to store mods.

Create the .mod file

The .mod format here is just a plain text file, saved with .mod file extension instead of the .txt extension.

Tip: most CK2 files use .txt extension, but there is also .csv (localization), .gfx (graphics), .sfx (sounds), .gui (interface), .lua (global variables) and .info (documentation).

Step 2: Create an empty file named "mymod.mod" in the CK2 mod folder (

/My Documents/Paradox Interactive/Crusader Kings II/mod/mymod.mod ).

Note: make sure the file extension is .mod (and not .mod.txt) - disable "Hide Known Extensions" option of Windows explorer.

Step 3: Open the file with your editor and add:

Tip: the path is relative to CK2 user directory, hence the "mod/" prefix.

Create the mod data folder

Step 4: Create an empty folder named "mymod" in the CK2 mod folder (

/My Documents/Paradox Interactive/Crusader Kings II/mod/mymod/ ).

Tip: best practice is to use same name for path folder as the mod file name, so that they are next to each other when browsing the CK2 mod folder.

Note: folder and file names are case sensitive on OS other than Windows, so a best practice is to use only lower-case.

Making a game modification


We need a little change that will be quickly visible in-game, to validate that the mod is working.

Let's do some basic localization modding and change the text "Choose Your Starting Era" on the lobby to "Choose Your Favourite Era" (the corresponding localisation key is PICK_YOUR_STARTING_ERA )

Step 5: Create an empty folder named "localisation" in the mod data folder (

/My Documents/Paradox Interactive/Crusader Kings II/mod/mymod/localisation/ ).

Step 6: Create an empty file named "00_mymod.csv" in that folder (

/My Documents/Paradox Interactive/Crusader Kings II/mod/mymod/localisation/00_mymod.csv ).

Tip: the "00_" prefix is to ensure our localization is loaded first and overrides the vanilla one. Each folder has its own loading order/overriding behavior.

Step 7: Open the file with a text editor and copy the following lines to the file and save:

Testing the mod


Step 8: Activate the mod "My mod" in the launcher (and don't activate any other mod) and start the game.

Troubleshooting: if the mod doesn't show up in the launcher, it probably means the .mod file is not in the correct folder or has the wrong extension (.txt instead of .mod).

Tip: notice that the in-game checksum has not changed compared to the one from the launcher. This is because the localisation folder doesn't alter the checksum, as it's only a cosmetic change.

Step 9: Click on Start and verify that the title of the pop-up has changed.

Troubleshooting: if the change is not visible in game, or the game crashes, check for errors logged by the game at startup in error.log.

Note: each time you modify something in the mod files, you need to stop and restart CK2 so that the change is taken into account.

Please help with verifying or updating older sections of this article.
At least some were last verified for version 3.2.

Modding, or creating mods, is the act of modifying the behavior of the base game (often referred as vanilla), either for personal use, or to release publicly to other players, for instance via the Steam Workshop.

As for all Paradox games, Crusader Kings II is moddable to a great extent.

Motivations of modders may vary widely: better translation to native language, more events or decisions, better map, major overhaul, etc.

Modding is not magic or heresy, anybody can learn to build a mod, and this guide is intended to lower the entry barriers to the world of CKII modding.

Yet, however good the documentation, there is still a learning curve to it, and it cannot replace the need to read some working vanilla code and do lots of trial and error!

Game data

    , useful for debugging mods. , which allow to influence some hardcoded vanilla behaviors , conditions, and commands used for scripting , used to influence calculations made by the game

Game structure

The game data is composed of hierarchy of folders, containing game files.

A mod follows the same folder structure as the base game, so that when loading the game the engine will combine files from vanilla and mod(s). In most folders, the engine will load all the files within, which allows a mod to add new definitions (titles, religions, . ) without having to copy and modify vanilla files. To make use of this, it is important to understand how the scripts are loaded both at file level and definition level.

The behavior when loading a mod is the following:

  • Engine processes folders and files based on some hardcoded load order.
  • If current folder is defined as replace_path , all vanilla files in that folder will be ignored, and only mod files will be loaded (if any).
  • If the mod folder and vanilla folder both contain files with same names, vanilla files will be ignored and mod version will be used.
  • Inside a given folder, the order in which files are processed is usually alphanumerical on combined vanilla and mod file names, though some folders may have a different behavior.
  • When encountering more than once the same definition (title, religion, decision, . ), the duplicate definition may:
    • be ignored (first definition wins)
    • fully override the previous definition (last definition wins)
    • partially override the previous definition (definitions are merged/additive, which only makes sense if there is actually something to merge: hierarchy, list, etc.)
    • coexist/break both (in which case duplicate IDs must be avoided)

    Below is a list of CKII game files and folders, with associated modding guide, and loading behavior.

    For loading behavior, the cell colours highlight whether the behaviour is the expected one , strange or requiring some attention , or unexpected and to be avoided .

    • achievements.txt
    • defines.lua
    • defines.txt
    • hints.txt
    • region_colors.txt
    • static_modifiers.txt
    • technology.txt
    • Defines Steam Achievements
    • POP, general, diplomatic, economic and military variables
    • Defines playable start- and end-date
    • Defines the displayed hints
    • RGB code for each region
    • All difficulty, rank and standard modifiers data

    Note: vanilla files were moved inside /dlc/dlc030.zip

    • ambitions\
    • characters\
    • coats_of_arms\
    • cursors\
    • eurfonts\
    • event_pictures\
    • flags\
    • fonts\
    • FX\
    • interface\
    • loadingscreens\
    • mapitems\
    • models\
    • polishfonts\
    • titles\
    • traits\

    Graphics are mapped to a logical name (GFX_xxx) inside .\interface\*.gfx files
    Warning: a missing flag for a title in flags\ will cause wrong flags to appear for most titles, due to a shift.

    • generalstuff.gfx
    • sound.sfx
    • Loading of *.gfx files is in alphanumerical order. Last spriteType definition loaded overrides previous ones with same name, if any (i.e. use zz_ file prefix to override vanilla sprites).
    • Only sound.sfx is taken into account, other .sfx files are ignored.
    • adjacencies.csv
    • default.map
    • definition.csv
    • geographical_region.txt
    • positions.txt
    • provinces.bmp
    • rivers.bmp
    • terrain.bmp
    • topology.bmp
    • trees.bmp
    • world_normal_height.bmp

    Text editors

    Here are text editors with CK2 language support:

    Содержание

    Prerequisites

    • Install a good text editor (such as Notepad++), since default Notepad on Windows can possibly mess up the file encoding.

    Содержание

    Tools & utilities

    These are utilities for modders. For player tools, see utilities.
      - Editor to change files, is better than normal editor - very helpful to read code - Support tool to find errors in files / Forum thread - View mod files & create CK2 compatible 3D models - Tool to preview character portraits - alphabetize your localisation file

    Guidelines

    Mod structure

    Mods are located in folder

    \Paradox Interactive\Crusader Kings II\mod, which must contain:

    • the .mod file, to tell the launcher what to do with the mod-folder.
    • the mod folder or zip containing the mod data. The mod data must have the same file and folder structure as if it was along with CK2game.exe in the game directory. Note that folder and file names are case sensitive on Mac and Linux.

    The name of the .mod file must not contain any white-spaces, otherwise it will not auto-select when re-starting the launcher.

    The content of the .mod file is:

    Warning: do not set user_dir for sub-mods of a main mod, as all user_dir of active mods are concatenated.

    • replace_path works with folders, not files. To overwrite a file, just create a file with the same name in the mod.
    • replace_path only affects files in the specified folder, not files in sub-folders within that folder. For instance, replacing "history" does not replace "history/characters" as well.
    • To reduce mod size and improve mod compatibility, it is usually best to minimize the amount of folders that are replace_path.
    • replace_path is ignored when installing mod in the old Crusader Kings II\mod folder, hence why user mod folder must be used.
    • Unless you are sure you do need replace_path, you almost certainly don't.

    If the name of the dependency includes space, you have to enclose the name in escaped quotation marks. "\"Mod with space in name\""

    Below are some examples mod files, depending on the category of the mod:

    Small mod

    Small mods are the most common, and should neither use user_dir nor replace_path in order to keep compatibility with other small mods.

    Big mod

    Overhaul mods typically use user_dir as saves wouldn't be loadable outside of the mod anyway. For total conversion mods, replace_path can be used to completely ignore vanilla directories that don't make sense in the context of the mod (history, flags, . )

    Sub mod

    Sub-mods of a main mod typically use dependencies to be able to override files from main mod.

    Advanced tips

    • For the bigger mods using a source control management tool (Git, . ), it is handy to create a symbolic link between CKII mod folder and the working directory of the local repository, especially if the mod also has sub-mods. Note that you'll still need to copy the .mod file(s) manually, but they rarely change. Run the following command from the parent directory of main git folder, replacing:
      • <mod_path_name> by the value of path attribute from .mod file
      • <git_mod_folder> by the name of the sub-folder that contain mod data (folders common, decisions, events, etc. )

      Testing Mods

      Certain, more obscure console commands (that don't show up if you type 'help' in the console) are extremely useful in the process of testing a mod.

      • observe - switches you to Observer Mode. You will no longer play as any specific character - this will allow the game to run for a long period of time, uninterrupted. It also makes every invisible trait and secret religion visible.
      • run <filename.txt> - runs script in a txt file located in the in the Documents install directory. It will be executed from the player's scope. Useful for testing tricky scripts - you can just have the script open in a different window, run it, tweak the script, save it, and run it again - it will be recompiled every time.
      • reloadevents - reloads and recompiles every single event (may take a while depending on your hardware). Useful if you want to tweak an entire event or chain of events without rebooting the game every time.
      • reloadloc - reloads the entire localisation table. Useful if you spot a typo while testing your mod, or if you are trying to fit as much text in an event frame as possible.

      More Console commands are available on the main page, and are very useful for more specific alterations like adding lovers or killing people.

      Данный мод позволяет переигрывать штрафы в виде +возраста при создании в редакторе персонажей сверхчеловека
      то есть, легко можно убавить пару десятков или сотен лет или же наоборот добавить. Также мод добавляет возможность одарить созданного вами сверхчеловека ордой тяжелой конницы и грудой золота или же изменить тип правительства в вашем государстве
      (добавить в чертах "Редактор правителя", а потом выбрать в интригах одноименное решение)




      Crusader Kings 2 "Мод на способности из Наруто"

      Crusader Kings 2 получила подписку, в которую входят все DLC

      Crusader Kings 2: Таблица для Cheat Engine [UPD: 04.07.2019] <Recifense></p>
<p>

      Читайте также: