Creating a submod for the AGOT (A Game of Thrones) mod in Crusader Kings 3 to introduce a new event and title is an exciting project! Below, I'll guide you through the steps to create an event that allows a King of House Targaryen to grant the title "Prince of Summerhall" to a younger son or brother after restoring the ruins of Summerhall.
Overview
- Set Up Your Mod Structure
- Create the Title: Prince of Summerhall
- Develop the Event
- Create the Decision
- Localization
- Testing Your Mod
Step 1: Set Up Your Mod Structure
First, you'll need to create a new mod folder with the appropriate file structure.
-
Navigate to Your Mods Folder:
- Windows:
Documents/Paradox Interactive/Crusader Kings III/mod
- Mac:
~/Documents/Paradox Interactive/Crusader Kings III/mod
-
Create a New Folder for Your Mod:
- Name it something like
agot_prince_of_summerhall.
-
Create a descriptor.mod File in Your Mod Folder:
version="1.0"
tags={
}
name="AGOT - Prince of Summerhall Submod"
dependencies={
"A Game of Thrones"
}
path="mod/agot_prince_of_summerhall"
supported_version="1.9.*"
-
Set Up the Mod File Structure:
Inside your mod folder, create the following directories:
common/
landed_titles/
scripted_effects/
events/
decisions/
localization/
Step 2: Create the Title: Prince of Summerhall
You'll need to define the new title in the landed_titles folder.
-
Create a New File:
common/landed_titles/agot_summerhall_titles.txt
-
Define the Title:
d_summerhall = {
color = { 255 0 0 }
capital = 12345 # Replace with the actual county ID of Summerhall
# Title Localization
name = "Summerhall"
title = "Prince of"
dynastic = yes
landless = no
# De Jure Counties
de_jure_counties = {
c_summerhall
}
# Coat of Arms (Optional)
coat_of_arms = {
template = "your_coa_template"
}
}
- Note: Replace
12345 with the actual county ID for Summerhall, and define c_summerhall correctly.
Step 3: Develop the Event
Create an event that triggers after Summerhall is restored.
-
Create a New File:
events/agot_summerhall_event.txt
-
Write the Event Script:
namespace = agot_summerhall
event agot_summerhall.1 on_action={
on_yearly_pulse
trigger={
has_title = k_iron_throne
culture = valyrian
has_landed_title = c_summerhall
c_summerhall = {
has_province_modifier = summerhall_restored
}
NOT = { has_variable = prince_of_summerhall_created }
}
immediate = {
set_variable = prince_of_summerhall_created value = yes
}
options = {
option = {
name = agot_summerhall.1.t
trigger={
has_secondary_heir = yes
}
# Grant the title to the second heir
scope:heir_secondary = {
gain_title = d_summerhall
}
}
option = {
name = agot_summerhall.1.f
# Do nothing
}
}
}
- Explanation:
- Trigger: Checks if the player is the King of the Iron Throne, is Valyrian, owns Summerhall, has restored it, and hasn't already created the title.
- Immediate: Sets a variable to prevent the event from firing again.
- Options: Allows the player to grant the title to a younger son/brother.
Step 4: Create the Decision
Alternatively, you can create a decision instead of an event.
-
Create a New File:
decisions/agot_summerhall_decisions.txt
-
Write the Decision Script:
decisions = {
create_prince_of_summerhall = {
picture = "decision_grant_title"
major = yes
ai_goal = no
possible = {
has_title = k_iron_throne
culture = valyrian
has_landed_title = c_summerhall
c_summerhall = {
has_province_modifier = summerhall_restored
}
NOT = { has_variable = prince_of_summerhall_created }
}
allowed = {
has_secondary_heir = yes
}
effect = {
set_variable = prince_of_summerhall_created value = yes
scope:heir_secondary = {
gain_title = d_summerhall
}
}
ai_will_do = {
factor = 0
}
}
}
Step 5: Localization
Provide localization for the event and decision text.
-
Create a New File:
localization/english/agot_summerhall_l_english.yml
-
Add Localization Entries:
l_english:
agot_summerhall.1: "A Title for Summerhall"
agot_summerhall.1.t: "Grant the title of Prince of Summerhall to my [GetRelation('heir_secondary')]"
agot_summerhall.1.f: "Do nothing"
create_prince_of_summerhall: "Create the Title 'Prince of Summerhall'"
create_prince_of_summerhall_desc: "Now that Summerhall has been restored, I can grant it as a title to my [GetRelation('heir_secondary')]."
Step 6: Testing Your Mod
Before playing, ensure your mod is recognized by the game.
-
Enable the Mod:
- Start CK3 and enable your mod in the launcher.
-
Check for Errors:
- Use the in-game console (
~) to check for syntax errors.
- Use
debug_mode to get province IDs if needed.
-
Playtesting:
- Start a new game in a later bookmark.
- Restore Summerhall if not already done.
- See if the event triggers or the decision appears.
- Verify that the title is granted correctly.
Additional Tips
Conclusion
By following these steps, you should have a functioning submod that introduces a new event or decision for the King of House Targaryen to grant the title of "Prince of Summerhall" to a younger son or brother.
If you encounter any issues or need further assistance, feel free to ask!