=== Visual Studio Code ===
[https://code.visualstudio.com/ Visual Studio Code] は、ParadoxScript を構文強調表示する各種拡張機能があるため、モッダーにとって最有力の選択肢と考えられています。
'''推奨拡張機能:'''
* [https://marketplace.visualstudio.com/items?itemName=tboby.cwtools-vscode CWTools - Paradox Language Services(Thomas Boby 作)]
* [https://marketplace.visualstudio.com/items?itemName=tboby.paradox-syntax Paradox Syntax Highlighting(Thomas Boby 作)]
{| class="mw-collapsible mw-collapsed wikitable"
! Visual Studio Code 用スニペット
|-
| VSCode のスニペットは、複雑なスクリプト効果、条件文、さらにはイベント全体など、繰り返しのコードパターンを簡単に入力できるテンプレートです。<br>CK3 のスクリプトコンポーネントをテンプレート化するためのカスタムスニペットは簡単に作成できます。以下にバニラのサンプルセットを載せます。これを拡張し、あなたのMODのニーズに合わせたセットを作ることを推奨します。<br><br>詳しく読む: [https://marketplace.visualstudio.com/items?itemName=tboby.cwtools-vscode Snippets in Visual Studio Code - Microsoft Corporation]
|-
| <syntaxhighlight lang="json">
/////////////////////////////////////////////////////////////////////////////////////////////////////
// Crusader Kings 3 - Snippets for Visual Studio Code. //
// //
// How to use in four easy steps: //
// 1. Install [CWTools - Paradox Language Services] by Thomas Boby //
// 2. Install [Paradox Syntax Highlighting] by Thomas Boby //
// 3. Copy this file to ..AppData\Roaming\Code\User\snippets //
// 4. That's it! Now just start typing the prefix of a snippet and press tab to insert it! //
/////////////////////////////////////////////////////////////////////////////////////////////////////
// Learn more: https://code.visualstudio.com/docs/editor/userdefinedsnippets //
// Use https://vscodesnippetgenerator.azurewebsites.net/, other tools convert tabs into spaces!! //
/////////////////////////////////////////////////////////////////////////////////////////////////////
"Hidden Event": {
"prefix": ["event", "hidden event"],
"body": [
"yournamespace.0000 = {",
"\thidden = yes",
"",
"\timmediate = {",
"\t\t",
"\t}",
"}"
],
"description": "A hidden event, does not render UI or present any options. Utilized for the automation of certain tasks, such as sieges or timed outcomes."
},
"Random Chance": {
"prefix": ["random"],
"body": [
"random = {",
"\tchance = 25",
"\tadd_trait = Typhus",
"}"
],
"description": "A random chance for something to happen. Can use weights."
},
"Random List": {
"prefix": ["list", "random list"],
"body": [
"random_list = {",
"\t50 = { add_gold = 25 }",
"\t50 = { add_gold = 500 }",
"}"
],
"description": "A list of possibilities. One will always be picked, can use weights and triggers."
},
"Banner Notification": {
"prefix": ["notification", "toast", "interface", "banner notification", "send_interface_toast"],
"body": [
"send_interface_toast = {",
"\ttype = event_toast_effect_bad",
"\ttitle = stress_threshold_prison.1041.t",
"\tleft_icon = ROOT",
"",
"\tadd_stewardship_lifestyle_xp = minor_lifestyle_experience",
"\tadd_piety = -15",
"}"
],
"description": "An interface element displayed at the top of the screen."
},
"Message Notification": {
"prefix": ["notification", "message", "interface", "message notification", "send_interface_message"],
"body": [
"send_interface_message = {",
"\ttype = event_stewardship_neutral",
"\ttitle = hold_court.6180.t",
"\tleft_icon = scope:client",
"\tright_icon = ROOT",
"",
"\tadd_gold = 50",
"}"
],
"description": "An interface element displayed in the corner of the screen."
},
"Triggered Animation": {
"prefix": ["triggered animation", "animation"],
"body": [
"triggered_animation = {",
"\ttrigger = { always = yes }",
"\tanimation = beg",
"}"
],
"description": "Allows you to make conditional animations, works as a first_valid."
},
"Script Header List": {
"prefix": ["script header list", "header", "index"],
"body": [
"### EVENT LIST ####################################################################",
"## XXXX - XXXX\tEvent Name Here by Author Name Here",
"## XXXX - XXXX\tEvent Name Here by Author Name Here",
"## XXXX - XXXX\tEvent Name Here by Author Name Here",
"## XXXX - XXXX\tEvent Name Here by Author Name Here",
"## XXXX - XXXX\tEvent Name Here by Author Name Here",
"## XXXX - XXXX\tEvent Name Here by Author Name Here",
"## XXXX - XXXX\tEvent Name Here by Author Name Here",
"###################################################################################"
],
"description": "A list containing all events on a script file, useful for organization."
},
"Event Header": {
"prefix": ["event header", "header"],
"body": [
"###################################",
"# Your event title here",
"# By Your name here",
"###################################"
],
"description": "A header comment for scripts, containing name and author."
},
"Valid Combatant Trigger": {
"prefix": ["valid combatant trigger"],
"body": ["can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = liege }"],
"description": "Trigger component used to check if a character can be an active combatant."
},
== On Actions (on_action) ==
On Action は、ゲームコードで特定のアクション(子の誕生、土地の相続、フックの使用など)が呼び出されるたびに実行されるスクリプトです。<br>これにより、該当する On Action が呼ばれたタイミングで、モッダーは独自のスクリプトを割り込ませて実行できます。