Create a submod for the AGOT mod in Crusader Kings 3. I want an event to appear in the later bookmarks for a king of House Targaryen after the ruins of Summerhall are restored, allowing for the decision to create and grant the title of Prince of Summerhall to the younger son/brother, similar to how it happens with Dragonstone when the heir comes of age.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Creating a submod for the A Game of Thrones (AGOT) mod in Crusader Kings 3 (CK3) involves scripting events and decisions that integrate seamlessly with the existing mod framework. Below is a comprehensive guide to creating an event that allows a House Targaryen king to restore Summerhall and grant the title of Prince of Summerhall to a younger son or brother after the restoration.
Overview
Objective: After the ruins of Summerhall are restored, a decision/event should appear for a House Targaryen king in later bookmarks to grant the title of Prince of Summerhall to a younger son or brother, similar to the Dragonstone succession when the heir comes of age.
Components:
Event Script: Defines the event's triggers, options, and effects.
Localization: Provides the text displayed to the player.
Integration: Ensures the event is recognized by the AGOT mod and triggers appropriately.
Step 1: Setting Up the Mod Structure
Ensure you have a CK3 mod set up. If not, follow these steps:
Create the Mod Folder:
Navigate to Documents > Paradox Interactive > Crusader Kings III > mod.
Create a new folder named AGOT_Summerhall.
Create Necessary Subfolders:
events: To store event scripts.
localization\english: For English localization files.
Step 2: Writing the Event Script
Create a new file named summerhall_restoration_event.txt in the events folder with the following content:
plaintext
namespace = agot_event
# Event: Restoration of Summerhall
country_event = {
id = agot_event.1000
title = "EVENT_AGOT_Summerhall_Restoration_TITLE"
desc = "EVENT_AGOT_Summerhall_Restoration_DESC"
picture = GFX_evt_construction_project # You can choose an appropriate image
trigger = {
tag = TARGARYEN
has_title = t_targaryens
NOT = { has_title = p_summerhall }
YEAR > 1066 # Adjust the year based on the mod's timeline
owns_slot = 2 # Assuming Summerhall is in a specific province slot
# Check if Summerhall ruins are restored
OR = {
owns = c_summerhall_ruins
# You may need a custom condition based on how ruins are represented
}
}
option = {
name = "EVENT_AGOT_Summerhall_Restoration_OPTION_1" # Grant title to son/brother
ai_chance = { factor = 80 }
# Choose the younger son or brother
hidden_effect = {
# Select the target (younger son or brother)
if = {
limit = { has_daughter = no }
set_title = {
title = p_summerhall
holder = heir # Assign to heir if applicable
}
}
if = {
limit = { has_daughter = yes }
set_title = {
title = p_summerhall
holder = { relative = younger_son } # You might need a custom script to select
}
}
}
trigger = {} # Additional triggers if necessary
}
option = {
name = "EVENT_AGOT_Summerhall_Restoration_OPTION_2" # Do nothing
ai_chance = { factor = 20 }
}
}
Notes:
ID: Ensure the event ID (agot_event.1000) is unique within the AGOT mod to prevent conflicts.
Trigger Conditions:
tag = TARGARYEN: Ensures the event only triggers for House Targaryen.
NOT = { has_title = p_summerhall }: The title hasn't been granted yet.
YEAR > 1066: Adjust this year based on when "later bookmarks" occur in your mod.
owns_slot = 2: Replace with the actual slot or condition representing Summerhall.
has_title = c_summerhall_ruins: Adjust based on how the ruins are tracked in the mod.
Options:
Grant Title: Assigns the title to the heir or a younger son/brother.
Do Nothing: Allows the player to decline the decision.
Step 3: Localization
Create a new file named summerhall_restoration_event_l_english.yml in the localization\english folder with the following content:
yaml
l_english:
EVENT_AGOT_Summerhall_Restoration_TITLE: "Restoration of Summerhall"
EVENT_AGOT_Summerhall_Restoration_DESC: "The ruins of Summerhall have been restored to their former glory. As a sign of unity and strength, you may grant the title of Prince of Summerhall to a younger son or brother, ensuring the legacy of House Targaryen continues."
EVENT_AGOT_Summerhall_Restoration_OPTION_1: "Grant the title of Prince of Summerhall to my younger son/brother."
EVENT_AGOT_Summerhall_Restoration_OPTION_2: "Do not take any action."
Notes:
Ensure the localization keys match those used in the event script.
Customize the text to fit the lore and style of the AGOT mod.
Step 4: Defining the Prince of Summerhall Title
If the title Prince of Summerhall (p_summerhall) doesn't already exist in the AGOT mod, you'll need to define it.
Create or Edit the Titles File:
Navigate to common > titles.
If titles are organized by realm or another categorization, place accordingly.
Create a file named titles_summerhall.txt with the following content:
plaintext
# Prince of Summerhall
p_summerhall = {
color = { 0.5 0.3 0.2 } # Choose an appropriate color
liege = d_targaryens # Assuming it's a prince under House Targaryen
# Define any specific conditions or attributes
}
Add Localization:
Add the following lines to your localization file (summerhall_restoration_event_l_english.yml):
yaml
p_summerhall: "Prince of Summerhall"
d_summerhall: "Duchy of Summerhall" # If necessary
Step 5: Ensuring Integration with Bookmarks
To ensure the event appears in later bookmarks:
Check Bookmark Conditions: Verify the YEAR > 1066 (or your chosen year) aligns with the desired bookmarks.
Testing: Load the mod in CK3, fast-forward to a later bookmark, and verify the event triggers appropriately for House Targaryen kings.
Step 6: Additional Enhancements (Optional)
Dynamic Selection: Enhance the event to dynamically select the appropriate younger son or brother based on available characters.
Success Chance: Introduce a probability factor to determine if the restoration is successful.
Cost/Resources: Require the player to spend some resources or gold to restore Summerhall.
Complete Example
events/summerhall_restoration_event.txt
plaintext
namespace = agot_event
country_event = {
id = agot_event.1000
title = "EVENT_AGOT_Summerhall_Restoration_TITLE"
desc = "EVENT_AGOT_Summerhall_Restoration_DESC"
picture = GFX_evt_construction_project
trigger = {
tag = TARGARYEN
has_title = d_targaryens # Assuming 'd_targaryens' is the main DUchy or Kingdom
NOT = { has_title = p_summerhall }
year > 1066
owns = c_summerhall_ruins # Replace with the actual County ID
}
immediate = {
# Optionally, add immediate effects like starting construction
}
option = {
name = "EVENT_AGOT_Summerhall_Restoration_OPTION_1"
ai_chance = { factor = 80 }
hidden_effect = {
# Find a younger son or brother
# This is a simplified example; more complex logic may be needed
if = {
limit = { has_heir = yes }
grant_title = p_summerhall
add_dynasty_claim = {
target = heir
claim_type = temporal
}
}
# Additional logic to select the appropriate character
}
}
option = {
name = "EVENT_AGOT_Summerhall_Restoration_OPTION_2"
ai_chance = { factor = 20 }
}
}
l_english:
EVENT_AGOT_Summerhall_Restoration_TITLE: "Restoration of Summerhall"
EVENT_AGOT_Summerhall_Restoration_DESC: "The ruins of Summerhall have been restored to their former glory. As a sign of unity and strength, you may grant the title of Prince of Summerhall to a younger son or brother, ensuring the legacy of House Targaryen continues."
EVENT_AGOT_Summerhall_Restoration_OPTION_1: "Grant the title of Prince of Summerhall to my younger son/brother."
EVENT_AGOT_Summerhall_Restoration_OPTION_2: "Do not take any action."
p_summerhall: "Prince of Summerhall"
d_summerhall: "Duchy of Summerhall"
Step 7: Testing the Mod
After setting up the scripts and localization:
Activate the Mod: Launch CK3, go to the Mods section, and activate your AGOT_Summerhall submod.
Load or Start a Game: Choose a House Targaryen ruler and advance to a later bookmark.
Trigger the Event: Ensure the event appears if the conditions are met.
Verify Effects: Confirm that granting the title works as intended and that the title reflects in the game.
Troubleshooting
Event Not Triggering:
Double-check trigger conditions.
Ensure the title IDs (p_summerhall, c_summerhall_ruins) match those defined in the mod.
Verify the event is placed in the correct folder and referenced properly.
Localization Issues:
Ensure the .yml file is correctly formatted with proper indentation.
Confirm that localization keys match those in the event script.
Script Errors:
Use CK3's check_mod function to identify any syntax errors or issues within the mod files.
Conclusion
By following the steps above, you can create a submod for the AGOT mod in CK3 that introduces an event allowing House Targaryen kings to restore Summerhall and grant the title of Prince of Summerhall to a younger son or brother. Customize and expand upon this foundation to enrich your gameplay experience further.