差分

ナビゲーションに移動 検索に移動
ディシジョン mod の日本語化(kagi)
{{version|1.14}}
{{expand|with=examples, advanced uses}}

※2025/10/6、英wikiよりkagi翻訳を通しました。機械翻訳なので一部不自然な日本語があるかもしれません。ぜひ編集してくれるとありがたいです。

[[Decision]]はゲームに改造として追加できます。これは任意の行動で、冒険者や伯爵以上の統治者が実行できます。

== 配置場所 ==
Decisions は、mod の {{cite file|common\decisions}} フォルダー内の .txt ファイルに入れます。1つのテキストファイルに複数の decision を含めてもかまいません。

== 構造 ==
Decisions は次のように定義できます:
<pre>
my_decision = {
effect = {
add_gold = 100
}

# Other blocks
}
</pre>
<code>my_decision</code> と書かれている部分は、その decision の「名前」または「キー」あるいは「ID」と呼ばれます。内容は自由ですが、一意であるべきです。同じ名前で別の decision を定義すると、どちらかがもう片方を上書きします(どちらが最後に読み込まれたかによります)。慣例として、decision 名の末尾を「_decision」にすることが多いですが、必須ではありません。

=== 基本例 ===
<pre>
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.
}
</pre>

== ローカライズ ==
プレイヤー向けに decision を説明するため、[[Localization]] ファイルに4つのエントリを追加する必要があります。

4つすべては、decision の ID に「_desc」「_tooltip」「_confirm」を付けたものになります。

例えば、<code>localization/english/my_decisions_l_english.yml</code> というファイルを作成し、次の内容を入れます:<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 内の <code>title</code>、<code>desc</code>、<code>selection_tooltip</code>、<code>confirm_text</code> エントリを使って、これらのローカライズのデフォルト名を変更できます。同じローカライズを使う複数の decision を作る場合に便利です。

=== キー/ブロック ===

以下の表は、定義できるキーとブロックを示します。「Boolean」値は yes または no です。

完全な一覧は common/decision/decision.info ファイルを参照してください。

{| class="wikitable"
! Key/block
! Type
! Description
! Example
|-
| picture
| String (file name)
| Decision の画像、必要ならサウンドを設定します。トリガーで選択する複数画像の設定も可能です。
|<code>picture = { reference = "gfx/image.dds" }</code>
|-
| extra_picture
| String (file name)
| 追加の画像。現在は「Struggle」関連の decision で使用。
|
|-
| decision_group_type
| String
| この decision を入れる折りたたみ式の decision グループの種類。種類は common\decision_group_types に一覧あり。
|<code>decision_group_type = major</code>
|-
| sort_order
| Number
| この decision を一覧のどの位置に置くか。値が大きいほど上に表示されます。
|
|-
| is_invisible
| yes/no
|
|
|-
| ai_goal
| yes/no
| AI がこの decision のためにリソースを確保します。これを設定すると <code>ai_check_interval</code> は無視されます。
|
|-
| ai_check_interval
| Integer
| この decision を何ヶ月ごとに評価するか。ai_goal = yes の場合を除き必須。0 は AI が決して評価しないことを意味します。
|
|-
| cooldown
| Block
| 一度実行した後、再度利用不可になる期間。年・月・日で設定可能。
|<code>cooldown = { years = 5 }</code>
|-
| confirm_click_sound
| String
| 再生するサウンドファイル
|<code>confirm_click_sound = "event:/DLC/FP2/SFX/UI/fp2_struggle_ending_decision_confirm"</code>
|-
| selection_tooltip
| Localization key or block
| 決定パネル上のツールチップをデフォルトから上書きします。デフォルトは decision 名 + "_tooltip"。イベント記述のようにブロックにもできます。
|
|-
| title
| Localization key or block
| タイトルのデフォルトキー(通常は decision 名)を上書き。イベント記述のようにブロックにもできます。
|
|-
| desc
| Localization key or block
| 説明文のデフォルトキー(decision 名 + "_desc")を上書き。
イベント記述のようにブロックにもできます。
|<pre>desc = start_hunt_decision</pre>
|-
| confirm_text
| Localization key or Block
| 確認ボタンのテキストのデフォルトキー(decision_name + "_confirm")を上書き。
イベント記述のようにブロックにもできます。
|
|-
| is_shown
| Trigger
|Decision タブに表示される条件を決めます。
|<pre>
is_shown = {
has_royal_court = yes
}</pre>
|-
| is_valid_showing_failures_only
| Trigger
| 今この decision を実行できるか?このトリガーと <code>is_valid</code> の両方を満たす必要があります。このトリガーのツールチップには未達成の条件のみが表示されます。
|<pre>
is_valid_showing_failures_only = {
is_available_adult = yes
is_at_war = no
}
</pre>
|-
| is_valid
| Trigger
| 今この decision を実行できるか?<code>is_valid_showing_failures_only</code> と両方を満たす必要があります。
|<pre>
is_valid = {
piety_level >= 3
}
</pre>
|-
| cost
| Block
| この decision のコスト(ゴールド、敬虔、威信)を設定します。各リソースのデフォルトは 0。すべてを定義する必要はありません。値はスクリプト値でも可。
|
<pre>
cost = {
gold = 42
piety = 42
prestige = 42
}
</pre>
|-
| minimum_cost
| Block
| <code>cost</code> に似ていますが、キャラクターがその額を所持している必要があるだけで、decision 実行時に差し引かれません。decision から起動されるイベントで実コストをスクリプトする場合などに有用です。
|-
| effect
| Block
| decision 実行時の効果。
|<pre>
add_character_modifier = {
modifier = vow_of_poverty_modifier
}
</pre>
|-
| ai_potential
| Trigger
|AI がこの decision を検討するかどうか。
|<pre>ai_potential = {
always = yes
}</pre>
|-
| ai_will_do
| Block
|AI が検討時にこの decision を実行する確率(%)の計算。
|<pre>ai_will_do = {
base = 100
}</pre>
|-
| should_create_alert
| Trigger
| 通常なら「実行可能」通知を出す場面で、このトリガーを確認します。満たされない場合はアラートを表示しません。可能ではあるが有用でない状況がある場合に便利です。
|<pre>
should_create_alert = {
gold >= 50
}
</pre>
|-
| widget
| String or Block
| 追加オプションを持つカスタム GUI ウィジェット。
ウィジェットは <code>gui/decision_view_widgets/</code> に作成し、ファイル名はウィジェット名と一致させます。
重要! デフォルトのコントローラーは機能しません。create_holy_order を使用してみてください
|<pre>
widget = {
gui = "decision_view_widget_commission_artifact"
controller = decision_option_list_controller
...
}
</pre>
|}

=== 値 ===
数値を直接書く代わりに、decision 内で使える設定値(通常はファイル先頭付近)を定義できます。重複記述を避け、ある場所だけ値を変えて他を変え忘れるような微妙なミスを防ぎ、またバランス調整の意図を強調するのに役立ちます。

例えば:
<pre>
@sale_of_titles_prestige_cost = 500

sale_of_titles_decision = {
... stuff ...

cost = {
prestige = @sale_of_titles_prestige_cost
}

... stuff ...
}
</pre>

== カスタムウィジェット ==
カスタム GUI ウィジェットを decision に追加して、プレイヤーに追加の選択をさせることができます。

詳細は .info ファイルの widget 項目を参照してください。

'''重要!''' デフォルトのコントローラーは機能しません。<code>controller = create_holy_order</code> の使用を試してください

== Decision のテスト ==
Mod のテスト時に、decision のクールダウンを自動的にリフレッシュしたい場合があります(例: 狩りや宴の開始で発火する on-action をテストする場合)。これは <code>effect remove_decision_cooldown = decision_id</code> を実行することで行えます。組み込み decision の ID 一覧は以下を参照してください。

== Decision ID ==
decision の ID を素早く見つけるには、ローカライズフォルダー内でその名前を検索します。<code>my_decision: "My decision"</code> のような形が見つかるはずです。

フォルダー検索には VSCode のような適切なテキストエディタを使いましょう。

ローカライズフォルダーを放り込み、右クリック > Find in Folder または Ctrl+Shift+F を押します。

多くの場合、スペースをアンダースコアに置き換えて末尾に _decision を付けたものが ID に一致します。

例えば、「Commission Artifact」は commission_artifact_decision です。

内部名が一致しない decision の一部を以下の表に示します:
<!-- Generated by script: https://github.com/SaucyPigeon/ck3_mapdata -->
{| class="mildtable"
! 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)<br>restore_roman_empire_holy (as Holy Roman Emperor)<br>restore_roman_empire_italian (as Emperor of Italia)
|-
| Host Grand Rite || host_witch_ritual_decision
|}

{{Modding navbox}}
[[Category:Modding]]
98

回編集

案内メニュー