ディシジョン Mod
![]() |
この記事やセクションの改善にご協力ください 特に次の拡張が求められています → examples, advanced uses. |
※2025/10/6、英wikiよりkagi翻訳を通しました。機械翻訳なので一部不自然な日本語があるかもしれません。ぜひ編集してくれるとありがたいです。
Decisionはゲームに改造として追加できます。これは任意の行動で、冒険者や伯爵以上の統治者が実行できます。
配置場所[編集 | ソースを編集]
Decisions は、mod の common\decisions
フォルダー内の .txt ファイルに入れます。1つのテキストファイルに複数の decision を含めてもかまいません。
構造[編集 | ソースを編集]
Decisions は次のように定義できます:
my_decision = { effect = { add_gold = 100 } # Other blocks }
my_decision
と書かれている部分は、その decision の「名前」または「キー」あるいは「ID」と呼ばれます。内容は自由ですが、一意であるべきです。同じ名前で別の decision を定義すると、どちらかがもう片方を上書きします(どちらが最後に読み込まれたかによります)。慣例として、decision 名の末尾を「_decision」にすることが多いですが、必須ではありません。
基本例[編集 | ソースを編集]
custom_decision = { picture = { reference = "gfx/interface/illustrations/decisions/decision_smith.dds" } desc = custom_decision_desc selection_tooltip = custom_decision_tooltip is_shown = { # Put conditions for the decision to show up here. } effect = { # Add effects of the decision here. } ai_check_interval = 0 # Change this value if you want the AI to consider this decision. }
ローカライズ[編集 | ソースを編集]
プレイヤー向けに decision を説明するため、Localization ファイルに4つのエントリを追加する必要があります。
4つすべては、decision の ID に「_desc」「_tooltip」「_confirm」を付けたものになります。
例えば、localization/english/my_decisions_l_english.yml
というファイルを作成し、次の内容を入れます:<syntaxhighlight lang="c">
l_english:
my_decision: "My decision's name" my_decision_desc: "Description shown when you open it" my_decision_tooltip: "Tooltip shown when hovering over it" my_decision_confirm: "The text on the confirm button"
</syntaxhighlight>ローカライズの定義方法については、間違えやすいのでLocalizationページを必ず読んでください。
必要であれば、decision 内の title
、desc
、selection_tooltip
、confirm_text
エントリを使って、これらのローカライズのデフォルト名を変更できます。同じローカライズを使う複数の decision を作る場合に便利です。
キー/ブロック[編集 | ソースを編集]
以下の表は、定義できるキーとブロックを示します。「Boolean」値は yes または no です。
完全な一覧は common/decision/decision.info ファイルを参照してください。
Key/block | Type | Description | Example |
---|---|---|---|
picture | String (file name) | Decision の画像、必要ならサウンドを設定します。トリガーで選択する複数画像の設定も可能です。 | picture = { reference = "gfx/image.dds" }
|
extra_picture | String (file name) | 追加の画像。現在は「Struggle」関連の decision で使用。 | |
decision_group_type | String | この decision を入れる折りたたみ式の decision グループの種類。種類は common\decision_group_types に一覧あり。 | decision_group_type = major
|
sort_order | Number | この decision を一覧のどの位置に置くか。値が大きいほど上に表示されます。 | |
is_invisible | yes/no | ||
ai_goal | yes/no | AI がこの decision のためにリソースを確保します。これを設定すると ai_check_interval は無視されます。
|
|
ai_check_interval | Integer | この decision を何ヶ月ごとに評価するか。ai_goal = yes の場合を除き必須。0 は AI が決して評価しないことを意味します。 | |
cooldown | Block | 一度実行した後、再度利用不可になる期間。年・月・日で設定可能。 | cooldown = { years = 5 }
|
confirm_click_sound | String | 再生するサウンドファイル | confirm_click_sound = "event:/DLC/FP2/SFX/UI/fp2_struggle_ending_decision_confirm"
|
selection_tooltip | Localization key or block | 決定パネル上のツールチップをデフォルトから上書きします。デフォルトは decision 名 + "_tooltip"。イベント記述のようにブロックにもできます。 | |
title | Localization key or block | タイトルのデフォルトキー(通常は decision 名)を上書き。イベント記述のようにブロックにもできます。 | |
desc | Localization key or block | 説明文のデフォルトキー(decision 名 + "_desc")を上書き。
イベント記述のようにブロックにもできます。 |
desc = start_hunt_decision |
confirm_text | Localization key or Block | 確認ボタンのテキストのデフォルトキー(decision_name + "_confirm")を上書き。
イベント記述のようにブロックにもできます。 |
|
is_shown | Trigger | Decision タブに表示される条件を決めます。 | is_shown = { has_royal_court = yes } |
is_valid_showing_failures_only | Trigger | 今この decision を実行できるか?このトリガーと is_valid の両方を満たす必要があります。このトリガーのツールチップには未達成の条件のみが表示されます。
|
is_valid_showing_failures_only = { is_available_adult = yes is_at_war = no } |
is_valid | Trigger | 今この decision を実行できるか?is_valid_showing_failures_only と両方を満たす必要があります。
|
is_valid = { piety_level >= 3 } |
cost | Block | この decision のコスト(ゴールド、敬虔、威信)を設定します。各リソースのデフォルトは 0。すべてを定義する必要はありません。値はスクリプト値でも可。 |
cost = { gold = 42 piety = 42 prestige = 42 } |
minimum_cost | Block | cost に似ていますが、キャラクターがその額を所持している必要があるだけで、decision 実行時に差し引かれません。decision から起動されるイベントで実コストをスクリプトする場合などに有用です。
| |
effect | Block | decision 実行時の効果。 | add_character_modifier = { modifier = vow_of_poverty_modifier } |
ai_potential | Trigger | AI がこの decision を検討するかどうか。 | ai_potential = { always = yes } |
ai_will_do | Block | AI が検討時にこの decision を実行する確率(%)の計算。 | ai_will_do = { base = 100 } |
should_create_alert | Trigger | 通常なら「実行可能」通知を出す場面で、このトリガーを確認します。満たされない場合はアラートを表示しません。可能ではあるが有用でない状況がある場合に便利です。 | should_create_alert = { gold >= 50 } |
widget | String or Block | 追加オプションを持つカスタム GUI ウィジェット。
ウィジェットは |
widget = { gui = "decision_view_widget_commission_artifact" controller = decision_option_list_controller ... } |
値[編集 | ソースを編集]
数値を直接書く代わりに、decision 内で使える設定値(通常はファイル先頭付近)を定義できます。重複記述を避け、ある場所だけ値を変えて他を変え忘れるような微妙なミスを防ぎ、またバランス調整の意図を強調するのに役立ちます。
例えば:
@sale_of_titles_prestige_cost = 500 sale_of_titles_decision = { ... stuff ... cost = { prestige = @sale_of_titles_prestige_cost } ... stuff ... }
カスタムウィジェット[編集 | ソースを編集]
カスタム GUI ウィジェットを decision に追加して、プレイヤーに追加の選択をさせることができます。
詳細は .info ファイルの widget 項目を参照してください。
重要! デフォルトのコントローラーは機能しません。controller = create_holy_order
の使用を試してください
Decision のテスト[編集 | ソースを編集]
Mod のテスト時に、decision のクールダウンを自動的にリフレッシュしたい場合があります(例: 狩りや宴の開始で発火する on-action をテストする場合)。これは effect remove_decision_cooldown = decision_id
を実行することで行えます。組み込み decision の ID 一覧は以下を参照してください。
Decision ID[編集 | ソースを編集]
decision の ID を素早く見つけるには、ローカライズフォルダー内でその名前を検索します。my_decision: "My decision"
のような形が見つかるはずです。
フォルダー検索には VSCode のような適切なテキストエディタを使いましょう。
ローカライズフォルダーを放り込み、右クリック > Find in Folder または Ctrl+Shift+F を押します。
多くの場合、スペースをアンダースコアに置き換えて末尾に _decision を付けたものが ID に一致します。
例えば、「Commission Artifact」は commission_artifact_decision です。
内部名が一致しない decision の一部を以下の表に示します:
Decision | Internal name |
---|---|
Call Hunt | start_hunt |
Search for Physician | hire_physician |
Borrow Gold from Holy Order | borrow_from_holy_order |
Challenge the Ruler | tribal_challenge_ruler |
Stop Gaining Weight | stop_gain_weight |
Stop Losing Weight | stop_lose_weight |
Attempt Suicide | commit_suicide |
Return Roma | return_rome |
Determine Bhakti | select_personal_deity |
Give Your Ancestor a Sky Burial | give_sky_burial |
Raise a Runestone | raise_runestone |
Found Holy Order | create_holy_order |
Revoke Holy Order Lease | cancel_holy_order_lease |
Go on a Pilgrimage | go_on_pilgrimage |
Undertake the Hajj | go_on_hajj |
Restore the Kingdom of Cornwall | restore_dumnonia |
Reclaim Constantinople | set_capital_constantinople |
Reclaim Rome | set_capital_rome |
Restore the Papacy | restore_papacy |
Form the Swiss Confederation | form_switzerland_kingdom |
Form Archduchy of Austria | form_austria_kingdom |
Dismantle the Papacy | dismantle_papacy |
Restore Carolingian Borders | reform_carolingian_empire |
Unify the Burgundies | unify_burgundy_kingdom |
Unify Italy | unify_italian_empire |
Adopt Feudalism (unused) | convert_to_feudalism |
Adopt Feudal / Clan Ways through Liege | convert_to_feudalism_liege_converted |
Adopt Feudal / Clan Ways | convert_whole_realm_to_feudalism |
Form the Outremer Empire | create_outremer_empire |
Sell Minor Titles | sale_of_titles |
Restore the Ash'ari Caliphate | restore_sunni_caliphate |
Restore Israel | create_israel_kingdom |
Restore the Faith High Priesthood | jewish_restore_high_priesthood |
Restore the Faith High Priesthood | zoroastrian_restore_high_priesthood |
Become the Saoshyant | become_saoshyant |
Dismantle German Pretenders | dismantle_holy_pretender |
Dismantle Greek Pretenders | dismantle_byz_pretender |
Form the Sultanate of Rum | form_rum_sultanate |
Revive Greater Armenia | create_armenian_empire |
Consecrate Bloodline | declare_bloodline_holy |
Build a Grand Church | build_grand_church |
Faith Cannibalism | accept_cannibalism |
Request Claim on Ireland | england_request_laudabiliter |
Inspire Opus Francigenum | promote_gothic_innovations |
Build a Glass Monument | lunatic_building |
Promote Christian Settlements | promote_hungarian_settlement |
Revive Táltosism | revive_magyar_paganism |
Unite the West Slavs | unite_the_western_slavs |
Unite the South Slavs | unite_the_southern_slavs |
Defenders of High God | defenders_of_highgod |
Found a New Kingdom | found_kingdom |
Found a New Empire | found_empire |
Amnesty for False Conversions | encourage_confession_of_false_conversions |
Restore the Holy Roman Empire | restore_holy_roman_empire |
Adopt Special Succession Type | adopt_special_succession |
Found the Kingdom of Aragon | form_the_kingdom_of_aragon |
Indulge in Drink | stress_loss_drunkard |
Consume Hashish Cakes | stress_loss_hashishiyah |
Visit a Brothel | stress_loss_rakish |
Seclude Yourself | stress_loss_reclusive |
Lash Out | stress_loss_irritable |
Flagellate | stress_loss_flagellant |
Visit the Market | stress_loss_profligate |
Donate to Charity | stress_loss_improvident |
Confess | stress_loss_contrite |
Indulge in Food | stress_loss_comfort_eater |
Shun Food | stress_loss_inappetetic |
Write Thoughts Down | stress_loss_journaller |
Talk to Confidant | stress_loss_confider |
Work off Some Stress | stress_loss_athletic |
Accuse the Krstjani of Heresy | accuse_krstjani_of_heresy |
Prepare to Cross the Carpathians | launch_hungarian_migration |
Restore the Roman Empire | restore_roman_empire (as Byzantine Emperor) restore_roman_empire_holy (as Holy Roman Emperor) restore_roman_empire_italian (as Emperor of Italia) |
Host Grand Rite | host_witch_ritual_decision |
ドキュメンテーション | スクリプト • スコープ • 効果 • トリガー • 変数 • 補正リスト |
スクリプト | AI • ブックマーク • キャラクター • コマンド • 評議会 • 文化 • ディシジョン • 王朝 • イベント • 政府 • 歴史 • 領地 • ライフスタイル • 連隊 • 宗教 • スクリプト値 • ストーリーサイクル • 闘争 • 称号 • 特性 |
インターフェース | インターフェース • データ型 • ローカライズ • カスタムローカライズ • フレーバー化 |
マップ | マップ • 地形 |
グラフィック | 3Dモデル • エクスポーター • 紋章 • グラフィックアセット • フォント • パーティクル • シェーダー • ユニットモデル |
オーディオ | 音楽 • サウンド |
その他 | コンソールコマンド • チェックサム • Modの構造 • Mod制作ツール • トラブルシューティング |