{"id":26486713,"url":"https://github.com/kaiser-chris/war-goal-framework","last_synced_at":"2026-01-04T08:03:09.471Z","repository":{"id":269718611,"uuid":"908245877","full_name":"kaiser-chris/war-goal-framework","owner":"kaiser-chris","description":"A framework designed to add new War Goals to Victoria 3","archived":false,"fork":false,"pushed_at":"2024-12-25T15:11:55.000Z","size":1002,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-25T16:19:20.089Z","etag":null,"topics":["framework","mod","utility","victoria3"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaiser-chris.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-25T15:06:10.000Z","updated_at":"2024-12-25T15:50:07.000Z","dependencies_parsed_at":"2024-12-25T16:19:24.320Z","dependency_job_id":"8c5cf165-b0c2-4167-9955-349933b306f5","html_url":"https://github.com/kaiser-chris/war-goal-framework","commit_stats":null,"previous_names":["kaiser-chris/war-goal-framework"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaiser-chris%2Fwar-goal-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaiser-chris%2Fwar-goal-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaiser-chris%2Fwar-goal-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaiser-chris%2Fwar-goal-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaiser-chris","download_url":"https://codeload.github.com/kaiser-chris/war-goal-framework/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244561040,"owners_count":20472339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["framework","mod","utility","victoria3"],"created_at":"2025-03-20T06:20:42.997Z","updated_at":"2026-01-04T08:03:04.441Z","avatar_url":"https://github.com/kaiser-chris.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\r\n**War Goal Framework** is a mod for Victoria 3.\r\n\r\n**THIS MOD IS FEATURE COMPLETE BUT UNTESTED!**\r\n\r\n## Caveats / Limitations\r\n\r\n - You cannot add War Goals to an existing category.\r\n - Custom Diplomatic Plays need to have a base game War Goal attached, and custom War Goals can only be added additionally. I recommend using War Reparations as a base War Goal and then attaching your custom War Goal to that.\r\n - It is not possible for a custom war goal to modify peace acceptance since the game does not expose peace acceptance as a number but only as a string.\r\n\r\n## Add a War Goal Category\r\n\r\n**Custom War Goals need to be part of a custom category.**\r\n\r\nTo create a custom War Goal Category, you will need to create\r\na new building type that represents the category (See [wgf_example_war_goals.txt](mod/common/buildings/wgf_example_war_goals.txt)):\r\n\r\n - The building icon will be the icon used in the War Goal list\r\n - Make sure the building is not shown to the user (potential trigger)\r\n\r\nThere are a few localization keys needed to make the category show up correctly (See [wgf_example_war_goal_l_english.yml](mod/localization/english/wgf_example_war_goal_l_english.yml)):\r\n\r\n - \\\u003cbuilding type\\\u003e: Category name shown in the War Goal list\r\n - \\\u003cbuilding type\\\u003e_type_name: Internal category name used to connect the category with a War Goal\r\n - \\\u003cbuilding type\\\u003e_tooltip: Tooltip shown when hovering over the category in the War Goal list\r\n\r\nAlso, there needs to be a corresponding Scripted GUI that determines whether to show or hide the category (See [wgf_example_war_goal_sguis.txt](mod/common/scripted_guis/wgf_example_war_goal_sguis.txt))\r\n\r\n - The name of the scripted gui needs to be the same as the corresponding building type\r\n - Scope needs to be diplomatic_play\r\n - The is_shown trigger will decide whether to show or hide the category\r\n - The following scopes are available for use in the trigger:\r\n   - scope:war_goal = building type that represents the war goal\r\n   - scope:target = diplomatic play target\r\n   - scope:initiator = diplomatic play initiator\r\n\r\nFinally, we need to add the category to the global list of custom War Goal Categories `wgf_custom_war_goals_types`:\r\n```\r\nadd_to_global_variable_list = {\r\n    name = wgf_custom_war_goals_types\r\n    target = bt:wgf_example_war_goal_category\r\n}\r\n```\r\n**NOTE: I recommend doing this in the global history file** (See [00_activate_example_war_goal.txt](mod/common/history/global/00_activate_example_war_goal.txt)).\r\n\r\n## Add a War Goal\r\n\r\n**Custom War Goals need to be part of a custom category.**\r\n\r\nTo create a custom War Goal, you will need to create\r\na new building type that represents the War Goal (See [wgf_example_war_goals.txt](mod/common/buildings/wgf_example_war_goals.txt)):\r\n\r\n- The building icon will be the icon used in the War Goal list\r\n- Make sure the building is not shown to the user (potential trigger)\r\n\r\nThere are a few localization keys needed to make the category show up correctly (See [wgf_example_war_goal_l_english.yml](mod/localization/english/wgf_example_war_goal_l_english.yml)):\r\n\r\n- \\\u003cbuilding type\\\u003e: War Goal name shown in the War Goal list\r\n- \\\u003cbuilding type\\\u003e_type_name: Internal category name used to connect the category with a War Goal\r\n- \\\u003cbuilding type\\\u003e_tooltip: Tooltip shown when hovering over the category in the War Goal list\r\n- \\\u003cbuilding type\\\u003e_effects_desc: Effect shown in the Diplomatic Play panel when hovering the War Goal\r\n\r\nAlso, there needs to be a corresponding Scripted GUI that determines whether to show or hide the War Goal (See [wgf_example_war_goal_sguis.txt](mod/common/scripted_guis/wgf_example_war_goal_sguis.txt))\r\n\r\n- The name of the scripted gui needs to be the same as the corresponding building type\r\n- Scope needs to be diplomatic_play\r\n- The is_shown trigger will decide whether to show or hide the category\r\n- The following scopes are available for use in the trigger:\r\n    - scope:war_goal = building type that represents the war goal\r\n    - scope:target = diplomatic play target\r\n    - scope:initiator = diplomatic play initiator\r\n\r\nSince War Goals cost maneuvers and infamy, we also need to add a few scripted values (See [wgf_example_war_goals.txt](mod/common/script_values/wgf_example_war_goals.txt)):\r\n\r\n- \\\u003cbuilding type\\\u003e_cost: Maneuver cost to add the War Goal to a Diplomatic Play\r\n- \\\u003cbuilding type\\\u003e_infamy: Infamy cost to add the War Goal to a Diplomatic Play\r\n- \\\u003cbuilding type\\\u003e_cost_primary: Maneuver cost to make the War Goal a primary demand in the Diplomatic Play \r\n- \\\u003cbuilding type\\\u003e_infamy_primary: Infamy cost to make the War Goal a primary demand in the Diplomatic Play\r\n\r\n**NOTE: These scripted values can be as simple or complex as you want. They are scoped to the diplomatic play.**\r\n\r\nFinally, we need to add the War Goal to the global list of custom War Goals `wgf_custom_war_goals`:\r\n```\r\nadd_to_global_variable_list = {\r\n    name = wgf_custom_war_goals\r\n    target = bt:wgf_example_war_goal\r\n}\r\n```\r\n**NOTE: I recommend doing this in the global history file** (See [00_activate_example_war_goal.txt](mod/common/history/global/00_activate_example_war_goal.txt)).\r\n\r\n## War Goal Effects\r\n\r\nTo have your War Goal actually affect the game, you will need to define a few on_actions (See [wgf_example_war_goal_enforcement.txt](mod/common/on_actions/wgf_example_war_goal_enforcement.txt)):\r\n\r\n - `on_diplo_play_back_down` to enforce our war goal if it was a primary demand\r\n - `on_war_end` to enforce our war goal at the end of a war\r\n\r\n## Using War Goal in custom Diplomatic Play\r\n\r\nWar Goals and their maneuver cost are saved in the following variables and lists on the diplomatic play:\r\n\r\n - `wgf_active_war_goals` all custom War Goals are added here\r\n - `wgf_active_war_goals_primary` all primary demands are **ALSO** added here\r\n - `wgf_cost` current maneuver cost of all custom war goals in the diplomatic play\r\n\r\nTo have your War Goal added to a custom (or any) diplomatic play automatically,\r\nyou will need to create an `on_action` for it\r\n(See [wgf_example_diplomatic_play.txt](mod/common/on_actions/wgf_example_diplomatic_play.txt)):\r\n\r\n- `on_diplomatic_play_started` there we check whether the diplomatic play is of the wanted type and then add our custom War Goal\r\n\r\n## Example Screenshots\r\n![War Goal Category](assets/screenshots/category.png)\r\n![War Goal](assets/screenshots/war_goal.png)\r\n![Make War Goal Primary](assets/screenshots/primary.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaiser-chris%2Fwar-goal-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaiser-chris%2Fwar-goal-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaiser-chris%2Fwar-goal-framework/lists"}