「Mod」の版間の差分
16行目: | 16行目: | ||
== 助言とガイドライン== | == 助言とガイドライン== | ||
− | * ''' | + | * '''変更のためのModを作成する'''。小さな変更にも個人用Modを使用し、CK3ゲームフォルダ内のゲームファイルは警告なしに上書きされる可能性があるため、直接変更しないでください。<ref>訳者注:Steamの場合、ゲームがアップデートされてもCK3ゲームフォルダ内の変更したファイルはそのまま残ります。ただし整合性の確認を実施すると全てのファイルがもとに戻ります。</ref> |
− | * ''' | + | * '''適切なテキストエディタ'''を使用して、ファイルを編集し、フォルダを検索します。以下は無料です。 |
− | ** [https://code.visualstudio.com/ Visual Studio Code]. | + | ** [https://code.visualstudio.com/ Visual Studio Code]. Paradox構文のハイライト、バリデーション、およびトリガと効果のツールチップを備えた有志のCWTools拡張を使うことができます。インストールするには、VSの左パネルにあるExtensionsに行き、CWToolsを検索してください。(注意:検証ルールは不完全であり、GUIおよびローカライズ・ファイルに多くの誤ったエラーが表示されます。) |
− | ** [https://notepad-plus-plus.org/downloads/ Notepad++]. | + | ** [https://notepad-plus-plus.org/downloads/ Notepad++]。Perlを言語として選択すると、強調表示が適切に行われ、コードやコメントのブロックを折り畳めるようになります。デフォルトに設定するには、「Settings」、「Styler Configurator」の左側のリストでPerlを探し、下部の"User ext."フィールドに"gui txt" (ダブルクオーテーションは不要です) を追加します。 |
− | ** [https://atom.io/ Atom] | + | ** [https://atom.io/ Atom]。 ローカライズファイルの編集に必要なUTF-8-BOMエンコーディングの機能は含まれません。それが必要ない場合は、非常にカスタマイズ可能です。よりよい結果を得るには、言語設定で「Perl6」を使用します。デフォルトに設定するには、File、Configに移動し、「core:」を探し、その下に次のように追加します。 "customFileTypes: "source.perl6": [ "txt" "gui"]"。[https://discuss.atom.io/t/how-do-i-make-atom-recognize-a-file-with-extension-x-as-language-y/26539 ここに例があります]。 |
− | ** [https://www.sublimetext.com/ Sublime Text] | + | ** [https://www.sublimetext.com/ Sublime Text]。Imperatorの開発者がリリースしたCK3: [https://forum.paradoxplaza.com/forum/index.php?threads/sublime-tools-for-imperator.1274246/ Sublime Tools]拡張機能が使えます。エフェクトとトリガーのカラーハイライトが追加されます。Sublimeでコメントを切り替える場合は、[https://cdn.discordapp.com/attachments/563655919892692996/649656191173263370/PDXComments.tmPreference このファイル]を同じ「User」フォルダに追加する必要があります。 |
− | * ''' | + | * '''error.logファイルで実行エラーを常に確認してください。'''<nowiki>...\Documents\Paradox Interactive\Crusader Kings III\logs</nowiki>にあります。 |
− | * ''' | + | * '''ログフォルダには、エフェクト、トリガ、およびスコープの一覧も含まれます。'''ゲーム内で「script_docs」および「DumpDataTypes」コンソールコマンドを使用して生成します。 |
− | * ''' | + | * 「reload gui」、「reload gfx」コマンドを使用するには、'''「-debug_mode -develop」起動オプションを指定して'''ゲームを開始します。 |
− | ** | + | ** Steamの場合:Steamでゲームを右クリック→プロパティ→起動オプション→<code>-debug_mode -develop</code>を追加する |
− | ** | + | ** Windowsの場合、.exeファイルのショートカットを作成し、右クリックして 「プロパティ」 を選択し、「 -debug_mode」 を 「リンク先」の欄の最後に追加する |
− | * ''' | + | * '''LinuxのCK3フォルダのディレクトリは'''<nowiki>~/.local/share/Paradox Interactive/Crusader Kings III</nowiki>です。 |
− | * ''' | + | * '''Modに関する重要な事実を明確かつ簡潔に伝える''' |
− | ** | + | **あなたのModの説明は、あなたのModがゲームに何を追加したり変更したりするかについての短いが明確な説明で'''始まる'''必要があります。変更履歴や、注意事項や前提条件、インストール手順などの長いリストから始めないでください。 |
− | * | + | *説明を読んでいる人がこのModについて以前に聞いたことがあると思ってはいけません(もしそうであれば、一般的には説明を読みません)。 |
− | ** | + | **あなたのModが鉄人モード(Ironman)互換であるかどうかを明確かつひと目で分かるように述べます。(あなたには明白に思えたとしても!) |
− | * | + | * Steamバージョンをサブスクライブする場合は、ローカルModを削除してください。削除しないと、ゲームで動作しない場合があります。 |
− | * | + | * 作業内容をバックアップします。手動で、あるいはGitのようなソース管理システムを使って!GitHubをチームコラボレーションに使うことも検討してください。 |
− | * | + | * ([https://winmerge.org/?lang=en WinMerge]のような)適切なマージツールを使用してフォルダ間をマージし、修正されたファイルを新しいパッチ用に更新します。 |
− | * | + | * 数十行または数百行のコードでテキストを置換する場合は、正規表現を使用できます。これらは、上記のすべてのテキストエディタで使用できます。教材:[https://regexone.com/ RegexOne]、[https://regexr.com/ RegExr]。 |
=== ローカライズファイル === | === ローカライズファイル === |
2021年1月6日 (水) 01:20時点における版
Mod、またはModを作成することは、個人的な使用のために、またはParadox ModsまたはSteam Workshopを介して他のプレーヤーに公開するために、ゲームのアセットまたは動作を変更する行為のことです。
Paradoxの他のゲームと同様、Crusader Kings IIIもかなり改造可能です。Modderの動機は大きく異なることでしょう。母国語へのより良い翻訳、より多くのイベントやディシジョン、より良い地図、大規模な見直し、チートの追加などなど。
このガイドは、Crusader Kings IIIのModの世界への参入障壁を低くすることを目的としています。しかし、まだ習得には時間がかかり、バニラのコードを読んで試行錯誤を繰り返す必要があります。
重要なこと:ほとんどのMODではチェックサムが変更され、プレイヤーは実績を獲得できなくなります。チェックサムに影響するフォルダとファイルのリストについては、ゲームフォルダのchecksum_manifest.txtを参照してください。安全なModは、テクスチャ、シェーダー、フォント、音楽を置き換えるものだけです。[1]
助言とガイドライン
- 変更のためのModを作成する。小さな変更にも個人用Modを使用し、CK3ゲームフォルダ内のゲームファイルは警告なしに上書きされる可能性があるため、直接変更しないでください。[2]
- 適切なテキストエディタを使用して、ファイルを編集し、フォルダを検索します。以下は無料です。
- Visual Studio Code. Paradox構文のハイライト、バリデーション、およびトリガと効果のツールチップを備えた有志のCWTools拡張を使うことができます。インストールするには、VSの左パネルにあるExtensionsに行き、CWToolsを検索してください。(注意:検証ルールは不完全であり、GUIおよびローカライズ・ファイルに多くの誤ったエラーが表示されます。)
- Notepad++。Perlを言語として選択すると、強調表示が適切に行われ、コードやコメントのブロックを折り畳めるようになります。デフォルトに設定するには、「Settings」、「Styler Configurator」の左側のリストでPerlを探し、下部の"User ext."フィールドに"gui txt" (ダブルクオーテーションは不要です) を追加します。
- Atom。 ローカライズファイルの編集に必要なUTF-8-BOMエンコーディングの機能は含まれません。それが必要ない場合は、非常にカスタマイズ可能です。よりよい結果を得るには、言語設定で「Perl6」を使用します。デフォルトに設定するには、File、Configに移動し、「core:」を探し、その下に次のように追加します。 "customFileTypes: "source.perl6": [ "txt" "gui"]"。ここに例があります。
- Sublime Text。Imperatorの開発者がリリースしたCK3: Sublime Tools拡張機能が使えます。エフェクトとトリガーのカラーハイライトが追加されます。Sublimeでコメントを切り替える場合は、このファイルを同じ「User」フォルダに追加する必要があります。
- error.logファイルで実行エラーを常に確認してください。...\Documents\Paradox Interactive\Crusader Kings III\logsにあります。
- ログフォルダには、エフェクト、トリガ、およびスコープの一覧も含まれます。ゲーム内で「script_docs」および「DumpDataTypes」コンソールコマンドを使用して生成します。
- 「reload gui」、「reload gfx」コマンドを使用するには、「-debug_mode -develop」起動オプションを指定してゲームを開始します。
- Steamの場合:Steamでゲームを右クリック→プロパティ→起動オプション→
-debug_mode -develop
を追加する - Windowsの場合、.exeファイルのショートカットを作成し、右クリックして 「プロパティ」 を選択し、「 -debug_mode」 を 「リンク先」の欄の最後に追加する
- Steamの場合:Steamでゲームを右クリック→プロパティ→起動オプション→
- LinuxのCK3フォルダのディレクトリは~/.local/share/Paradox Interactive/Crusader Kings IIIです。
- Modに関する重要な事実を明確かつ簡潔に伝える
- あなたのModの説明は、あなたのModがゲームに何を追加したり変更したりするかについての短いが明確な説明で始まる必要があります。変更履歴や、注意事項や前提条件、インストール手順などの長いリストから始めないでください。
- 説明を読んでいる人がこのModについて以前に聞いたことがあると思ってはいけません(もしそうであれば、一般的には説明を読みません)。
- あなたのModが鉄人モード(Ironman)互換であるかどうかを明確かつひと目で分かるように述べます。(あなたには明白に思えたとしても!)
- Steamバージョンをサブスクライブする場合は、ローカルModを削除してください。削除しないと、ゲームで動作しない場合があります。
- 作業内容をバックアップします。手動で、あるいはGitのようなソース管理システムを使って!GitHubをチームコラボレーションに使うことも検討してください。
- (WinMergeのような)適切なマージツールを使用してフォルダ間をマージし、修正されたファイルを新しいパッチ用に更新します。
- 数十行または数百行のコードでテキストを置換する場合は、正規表現を使用できます。これらは、上記のすべてのテキストエディタで使用できます。教材:RegexOne、RegExr。
ローカライズファイル
- localizationフォルダにある*.yml[3]ファイルはゲームで正しく読み込まれるようにするためにBOM付きUTF-8[4]でエンコードされて保存されている必要があります。
- ゲームでファイルを正しく読み込むには、ファイル名を*l_<language>.ymlの形式で保存する必要があります。例:council_l_english.yml。
- "localization"とアメリカ英語のスペルを使用する必要があります。イギリス英語の"localisation"というスペルにすると動作しません。
- 既存のローカライズ値を上書きするには、変更を加えたファイルをlocalization フォルダ内の「replace」という名前のフォルダに置きます。[5]
Modの作成
Modの初期ファイル郡を作成するには、ゲームランチャーを使用することをお勧めします。
Modのアップロード/アップデート
Upload your mod again to update it
Modをアップロードしたりアップデートしましょう。
- ランチャーを開きます
- 「MOD」セクションを開きます。
- 「MODツール」を押して、自分のmodをドロップダウンメニューから選びます。
- それをどのプラットフォームにアップロードするかを選びます。
- 説明を書きます[6]
- 説明を確定します。 (更新する場合は、ランチャーがサイトから最新のものをコピーしたことを確認してください。)
- サムネイルを追加します。
- *Steam Workshopの場合、modフォルダにthumbnail.pngを入れます。1:1の比率で最大1MBを使用します。Workshopで表示される最大のサムネイルは、約600x600ピクセルです。
- Paradox Modsの場合は、説明の下のフィールドにサムネイルをドラッグします。推奨最小サイズは900x500、pngまたはjpg、最大1MBです。
- 「アップロード」ボタンを押します。
Save game editing
Save files are located in:
- Windows: Documents\Paradox Interactive\Crusader Kings III\save games
- Linux: ~/.local/share/Paradox Interactive/Crusader Kings III/save games
It is not possible to edit an ironman save!
First start the game in the debug mode and save.
- On Steam: right-click the game on Steam -> Properties -> Set Launch Options -> add -debug_mode
- Windows: Create a shortcut for the .exe file -> right-click it -> Properties -> add -debug_mode at the end of the Target field
PC:
- Find the save file in the save games folder.
- Right-click the save file and extract it like an archive with 7-Zip or WinRar.
- Rename the extracted 'gamestate' file to something with a .ck3 extension.
- Right-click it and open with your text editor (Windows Notepad is not recommended as the save files are very big).
- Edit the file and save it.
- Load it in the game.
Autosaves can be edited directly without extracting the gamestate.
Mac:
- Open Terminal
- Ensure that the directory is set to the correct folder
- Type in "unzip FileName.ck3"
- Rename the extracted 'gamestate' file to something with a .ck3 extension
- Edit this plain-text save
- Load it directly in the game (no need to re-compress)
OS | Save type | Location |
---|---|---|
Windows | Local | C:\Users\%USERPROFILE%\Documents\Paradox Interactive\Crusader Kings III\save games
|
Windows | Steam Cloud | C:\Program Files (x86)\Steam\userdata\####\1158310\remote\save games
|
Mac | Local | $HOME/Documents/Paradox Interactive/Crusader Kings III/save games
|
Linux | Local | $HOME/.local/share/Paradox Interactive/Crusader Kings III/save games
|
Contents of the gamestate file
The table below contains the possible first-level blocks in the gamestate file. Entries are provided in order of appearance.
Block | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
meta_data | Contains metadata about the game, such as the game version. Used by the main menu screen. | ||||||||
ironman_manager | Related to ironman saving. | ||||||||
(various variables) | These variables do not belong in a block.
| ||||||||
variables | Contains script flags. | ||||||||
game_rules | Contains the save's current game rules. | ||||||||
provinces | Contains province data, including buildings. | ||||||||
landed_titles | Contains the following sub-blocks:
| ||||||||
dynasties | Contains the following sub-blocks:
| ||||||||
deleted_characters | |||||||||
living | Contains entries of living characters. The following format is used for each character:
index={ first_name="..." birth=(date) female=yes # Optional culture=(culture index) faith=(faith index) dynasty_house=(dynasty house index) # Optional skill={ (diplomacy) (stewardship) (martial) (intrigue) (learning) (prowess) } # One value for each skill sexuality=(sexuality id) # Optional dna="(dna string)" # Optional mass=(value) # Optional traits={ (trait index...) } # List of trait indices inactive_traits = { (trait index...) } # Optional. List of trait indices # Optional (family_data) family_data={ primary_spouse=(character id) spouse=(character id) child = { (character id...) } # List of character ids } alive_data={ # Optional (variables), contains flags variables={ data={ # (...) } } gold=(value) # Optional income=(value) # Optional location=(landed title index) # Optional fertility=(value) health=(value) piety={ currency=(value) accumulated=(value) # Optional } prestige={ currency=(value) accumulated=(value) # Optional } weight_update=(value) } # End of alive_data block court_data={ # All keys within this block are optional employer=(character id) council_task=(council task index) regiment=(regiment index) knight=yes } # Optional (landed_data) landed_data={ domain={ (landed title index...) } # List of landed title indices vassal_contracts={ (values) } # List of values became_ruler_date=(date) laws={ "(law id)"... } # List of law ids strength=(value) balance=(value) succession={ (character id...) } # List of character ids domain_limit=(value) vassal_limit=(value) vassals_towards_limit=(value) government="(government id)" realm_capital=(value ai_allowed_to_marry=yes council={ (value...) } # List of values at_peace_penalty=(value) diplo_centers={ (value...) } # List of values election_titles={ (landed title index...) } # List of landed title indices } # End of landed_data block # Optional (playable_data) playable_data={ knights={ (character id...) } # List of character ids was_player=yes } } | ||||||||
dead_unprunable | Contains character entries. | ||||||||
characters | Contains the following sub-blocks:
| ||||||||
character_lookup | |||||||||
units | |||||||||
activities | |||||||||
opinions | Contains the following sub-blocks:
| ||||||||
relations | Encompasses hooks, alliances, Contains the following sub-blocks:
| ||||||||
schemes | Contains the following sub-blocks:
| ||||||||
stories | Contains the following sub-blocks:
| ||||||||
pending_character_interactions | Contains the following sub-blocks:
| ||||||||
secrets | Contains the following sub-blocks:
| ||||||||
armies | Contains the following sub-blocks:
| ||||||||
religion | Contains the following sub-blocks:
| ||||||||
wars | Contains the following sub-blocks:
| ||||||||
sieges | Contains the following sub-blocks:
| ||||||||
raid | Contains the following sub-blocks:
| ||||||||
succession | |||||||||
holdings | |||||||||
ai | Contains the following sub-blocks:
| ||||||||
county_manager | Contains the following sub-blocks:
| ||||||||
fleet_manager | Contains the following sub-blocks:
| ||||||||
council_task_manager | Contains the following sub-blocks:
| ||||||||
important_action_manager | Contains the following sub-blocks:
| ||||||||
faction_manager | Contains the following sub-blocks:
| ||||||||
culture_manager | Contains the following sub-blocks:
| ||||||||
mercenary_company_manager | Contains the following sub-blocks:
| ||||||||
holy_orders | Contains the following sub-blocks:
| ||||||||
coat_of_arms | Contains the following sub-blocks:
| ||||||||
(triggered events) | Each triggered event has its own block, started using triggered_event={ | ||||||||
next_player_event_id=(value) (variable) | |||||||||
played_character | Contains the following sub-blocks:
| ||||||||
currently_played_characters={ (character id...) } | List of character ids.
|
Extracting files From Microsoft Store version
If you want to read the files using the Microsoft Store version, you can use a program called UWPDumper to extract the files.
- Download the latest x64 binary of UWPDumper
- Enable Developer Mode (Windows Settings -> Update and Security -> For Developers -> Developer Mode).
- Run CK3.
- Run UWPInjector.exe from the program you just downloaded.
- Enter the number next to ck3.exe : ParadoxInteractive.ProjectTitus_zfnrdv2de78ny as the processID.
- Check where it is going to store the files (probably somewhere like C:\Users\%USERPROFILE%\AppData\Local\Packages\ParadoxInteractive.ProjectTitus_zfnrdv2de78ny\TempState\DUMP
- Wait for the program to finish.
The files should then be present in the directory specified earlier. If you want to edit the files, create a mod and copy the desired files there.
Tools & utilities
- Exporters (Maya and Photoshop)
- Clausewitz Maya Exporter: a tool to create and export 3D models to use in CK3 and other Clausewitz games.
- UWPDumper: a tool to extract files from Microsoft Store games.
日本語化Mod
Xbox GamepassなどSteam以外でプレイしている人はSteamWorkshopオンリーでの配布なのでModファイルを自身で抽出する作業が必要
- https://github.com/matanki-saito/Ck3JpMod
- Releaseページへ移動
- JSONファイルを開くとZIPファイルのリンク先がわかるのでそれをDLしModフォルダに展開
- ゲームランチャーでModを有効化
外部リンク
- CK3 User Mods パラドックスフォーラム
- Crusader Kings 公式Discord Modチャンネル。server-rolesチャネルに移動し、Channel Access postでCK3 Moddingを選択します。
- CK3 Mod Coop CK3のMod専用のコミュニティDiscordサーバー。
Documentation | Effects • Triggers • Modifiers • Scopes • Variables • Data types • Localization • Customizable localization |
Scripting | AI • Bookmarks • Characters • Commands • Council • Culture • Decisions • Dynasties • Events • Governments • History • Holdings • Lifestyles • Regiments • Religions • Story cycles • Titles • Traits |
Map | Map • Terrain |
Graphics | 3D models • Exporters • Interface • Coat of arms • Graphical assets • Fonts • Particles • Shaders • Unit models |
Audio | Music • Sound |
Other | Console commands • Checksum • Mod structure • Troubleshooting |
- ↑ 訳者注:日本語化Modはlocalizationフォルダを置き換えているために実績達成が不可能になっています。
- ↑ 訳者注:Steamの場合、ゲームがアップデートされてもCK3ゲームフォルダ内の変更したファイルはそのまま残ります。ただし整合性の確認を実施すると全てのファイルがもとに戻ります。
- ↑ 訳者注:アスタリスク(*)は任意の長さの文字列を意味します
- ↑ 訳者注:ほとんどのテキストエディタはUTF-8と書いてある場合はBOMなしを意味します。BOM付きを保存できるエディタを用意してください。
- ↑ 訳者注:実例が日本語化MODのgithub repositoryにあるので参考にしてみてください。: https://github.com/matanki-saito/Ck3JpMod
- ↑ 訳者注:Steam上であとから追加できるのと日本語用の説明は書けないため、ここでは丁寧に書かないほうがおすすめです。
- ↑ 訳者注:SteamのModにアップロードするには場合によってはSteam Workshopへの規約同意が必要です。またゲームをシェアしているなどで、所有していない場合はアップロードできません。さらにそのアカウントに一度も入金がなかったり、スチームガードを無効化している場合などはSteam上で利用制限アカウントとなり、アップロードできません。詳細な条件についてはこちらを参照ください。 https://support.steampowered.com/kb_article.php?ref=1047-edfm-2932&l=japanese
- ↑ 訳者注:BBCode(掲示板のコード)のことです