|
Post by oblivion26 on Mar 7, 2019 15:36:49 GMT
So like the title says, does anyone know how to mod in more cadet houses? I want to add more cadet houses to the generic cadet house selection event, but besides from changing the COAs and names of the selections already there I have no idea how to implement more choices and cadet houses to the event. Any help would be awesome!
|
|
erbkaiser
Modder (CK2)
Taking a long break from modding
Posts: 693
|
Post by erbkaiser on Mar 7, 2019 17:00:27 GMT
I guess you mean you want to add them to the decision for custom/random dynasties?
Start by making a copy of \events\cadet_event.txt and change cadet.11 to this:
#CUSTOM HOUSE CADETS character_event = { id = cadet.11 desc = "EVTDESCcadet.1" picture = GFX_evt_courtiers_talking is_triggered_only = yes option = { name = "EVTOPTAcadet.11" trigger = { not = { has_global_flag = cadet_fashbinder } } set_global_flag = cadet_fashbinder set_dynasty_flag = cadet_made_fashbinder FROM = { dynasty = 450240 } } option = { name = "EVTOPTBcadet.11" trigger = { not = { has_global_flag = cadet_who } } set_global_flag = cadet_who set_dynasty_flag = cadet_made_who FROM = { dynasty = 450241 } } option = { name = "EVTOPTCcadet.11" trigger = { not = { has_global_flag = cadet_Noscotland } } set_global_flag = cadet_Noscotland set_dynasty_flag = cadet_made_Noscotland FROM = { dynasty = 450242 } } option = { name = "more..." character_event = { id = cadet.900 } } after = { if = { # Fired from house customizer - father/sibling will be FROMFROMFROM limit = { FROM = { character = ROOT } } hidden_tooltip = { FROMFROMFROM = { add_trait = assign_mission_target set_dynasty_flag = has_cadet_house ROOT = { add_trait = assign_mission_target set_dynasty_flag = is_cadet_house set_dynasty_flag = cadet_house_@PREV PREV = { set_dynasty_flag = owned_cadet_house_@ROOT } } reverse_opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } any_dynasty_member = { limit = { NOT = { character = PREV } } reverse_opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } } } } } else = { # Granting a cadet dynasty hidden_tooltip = { add_trait = assign_mission_target set_dynasty_flag = has_cadet_house FROM = { add_trait = assign_mission_target set_dynasty_flag = is_cadet_house set_dynasty_flag = cadet_house_@PREV ROOT = { set_dynasty_flag = owned_cadet_house_@PREV } } reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } any_dynasty_member = { limit = { NOT = { character = ROOT } } reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } } } } # hidden_tooltip = { # add_trait = assign_mission_target # set_dynasty_flag = has_cadet_house # FROM = { # add_trait = assign_mission_target # set_dynasty_flag = is_cadet_house # set_dynasty_flag = cadet_house_@PREV # if = { # limit = { NOT = { character = ROOT } } # ROOT = { set_dynasty_flag = owned_cadet_house_@PREV } # } # } # reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # any_dynasty_member = { # limit = { NOT = { character = ROOT } } # reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # } # } } } Then at the end of the file add this:
#CUSTOM HOUSE CADETS character_event = { id = cadet.900 desc = "EVTDESCcadet.1" picture = GFX_evt_courtiers_talking is_triggered_only = yes option = { name = "EVTOPTDcadet.11" trigger = { not = { has_global_flag = cadet_america } } set_global_flag = cadet_america set_dynasty_flag = cadet_made_america FROM = { dynasty = 450243 } } option = { name = "House Whatever 1" trigger = { not = { has_global_flag = cadet_custom1 } } set_global_flag = cadet_custom1 set_dynasty_flag = cadet_made_custom1 FROM = { dynasty = 451000 } } option = { name = "House Whatever 2" trigger = { not = { has_global_flag = cadet_custom2 } } set_global_flag = cadet_custom2 set_dynasty_flag = cadet_made_custom2 FROM = { dynasty = 451001 } } option = { name = "more..." character_event = { id = cadet.901 } } after = { if = { # Fired from house customizer - father/sibling will be FROMFROMFROM limit = { FROM = { character = ROOT } } hidden_tooltip = { FROMFROMFROM = { add_trait = assign_mission_target set_dynasty_flag = has_cadet_house ROOT = { add_trait = assign_mission_target set_dynasty_flag = is_cadet_house set_dynasty_flag = cadet_house_@PREV PREV = { set_dynasty_flag = owned_cadet_house_@ROOT } } reverse_opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } any_dynasty_member = { limit = { NOT = { character = PREV } } reverse_opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } } } } } else = { # Granting a cadet dynasty hidden_tooltip = { add_trait = assign_mission_target set_dynasty_flag = has_cadet_house FROM = { add_trait = assign_mission_target set_dynasty_flag = is_cadet_house set_dynasty_flag = cadet_house_@PREV ROOT = { set_dynasty_flag = owned_cadet_house_@PREV } } reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } any_dynasty_member = { limit = { NOT = { character = ROOT } } reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } } } } # hidden_tooltip = { # add_trait = assign_mission_target # set_dynasty_flag = has_cadet_house # FROM = { # add_trait = assign_mission_target # set_dynasty_flag = is_cadet_house # set_dynasty_flag = cadet_house_@PREV # if = { # limit = { NOT = { character = ROOT } } # ROOT = { set_dynasty_flag = owned_cadet_house_@PREV } # } # } # reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # any_dynasty_member = { # limit = { NOT = { character = ROOT } } # reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # } # } } } character_event = { id = cadet.901 desc = "EVTDESCcadet.1" picture = GFX_evt_courtiers_talking is_triggered_only = yes option = { name = "House Whatever 3" trigger = { not = { has_global_flag = cadet_custom3 } } set_global_flag = cadet_custom3 set_dynasty_flag = cadet_made_custom3 FROM = { dynasty = 451002 } } option = { name = "House Whatever 4" trigger = { not = { has_global_flag = cadet_custom4 } } set_global_flag = cadet_custom4 set_dynasty_flag = cadet_made_custom4 FROM = { dynasty = 451003 } } option = { name = "House Whatever 5" trigger = { not = { has_global_flag = cadet_custom5 } } set_global_flag = cadet_custom5 set_dynasty_flag = cadet_made_custom5 FROM = { dynasty = 451004 } } option = { name = "House Whatever 6" trigger = { not = { has_global_flag = cadet_custom6 } } set_global_flag = cadet_custom6 set_dynasty_flag = cadet_made_custom6 FROM = { dynasty = 451005 } } after = { if = { # Fired from house customizer - father/sibling will be FROMFROMFROM limit = { FROM = { character = ROOT } } hidden_tooltip = { FROMFROMFROM = { add_trait = assign_mission_target set_dynasty_flag = has_cadet_house ROOT = { add_trait = assign_mission_target set_dynasty_flag = is_cadet_house set_dynasty_flag = cadet_house_@PREV PREV = { set_dynasty_flag = owned_cadet_house_@ROOT } } reverse_opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } any_dynasty_member = { limit = { NOT = { character = PREV } } reverse_opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } opinion = { who = ROOT modifier = opinion_cadet_affection years = 200 } } } } } else = { # Granting a cadet dynasty hidden_tooltip = { add_trait = assign_mission_target set_dynasty_flag = has_cadet_house FROM = { add_trait = assign_mission_target set_dynasty_flag = is_cadet_house set_dynasty_flag = cadet_house_@PREV ROOT = { set_dynasty_flag = owned_cadet_house_@PREV } } reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } any_dynasty_member = { limit = { NOT = { character = ROOT } } reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } } } } # hidden_tooltip = { # add_trait = assign_mission_target # set_dynasty_flag = has_cadet_house # FROM = { # add_trait = assign_mission_target # set_dynasty_flag = is_cadet_house # set_dynasty_flag = cadet_house_@PREV # if = { # limit = { NOT = { character = ROOT } } # ROOT = { set_dynasty_flag = owned_cadet_house_@PREV } # } # } # reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # any_dynasty_member = { # limit = { NOT = { character = ROOT } } # reverse_opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # opinion = { who = FROM modifier = opinion_cadet_affection years = 200 } # } # } } } Hopefully it'll be obvious how to add even more choices, you can have four options per event so you can add as many choices as you like.
Then add a new file in common\dynasties\ with a name like custom_cadets.txt and add this:
#MORE CUSTOM PLAYER CADET HOUSES 451000 = { name = "Whatever 1" culture = hedge used_for_random = no can_appear = no } 451001 = { name = "Whatever 2" culture = hedge used_for_random = no can_appear = no } 451002 = { name = "Whatever 3" culture = hedge used_for_random = no can_appear = no } 451003 = { name = "Whatever 4" culture = hedge used_for_random = no can_appear = no } 451004 = { name = "Whatever 5" culture = hedge used_for_random = no can_appear = no } 451005 = { name = "Whatever 6" culture = hedge used_for_random = no can_appear = no } Rename Whatever 1-6 to the names you like.
Save the event and dynasty file in your mod folder and make it a sub-mod for AGOT.
If you also want to give them custom COAs, you'll need to know how to edit tga files. Let me know if you need that info and I'll add it here.
|
|
|
Post by oblivion26 on Mar 7, 2019 17:25:45 GMT
Damn, thank you so much! I'll definitely try this once I'm home (on my phone at the moment). The one question I would have about the .tga files is how would I make the event choose COAs from a .tga file I created instead of the crownlander's .tga (or cadet .tga, i forget which one has the generic cadet house COAs) where the current generic COAs are? So far ive just been slotting in and replacing the generic COAs with my own but I would like to just make my own curated .tga file of cadet COAs that the mod pulls from.
|
|
erbkaiser
Modder (CK2)
Taking a long break from modding
Posts: 693
|
Post by erbkaiser on Mar 7, 2019 18:14:12 GMT
You need to add a new COA image file for that.
Add a file in your mod's \gfx\coats_of_arms folder with a name like dynasties_custom_cadet.tga In it, paste the COA files you want next to each other - make sure they are within the grid of 128x128 pixels exactly (use an existing file as a template). I suggest creating a file of 1280x128
Suppose you add six COAs for dynasties 451000 to 451006: then you'll have a file of 1280x128 pixels, that way you can put up to 10 images in a row (but you'll only be using 6 now).
To add them to the game as options, you need to copy \interface\coat_of_arms\coats_of_arms.txt
Then edit it. Look for the last COA entry dynasties_cadet3.tga and add your entry below it so it looks like this:
texture = { file = "gfx\\coats_of_arms\\dynasties_cadet3.tga" size = { x = 10 y = 11 } noOfFrames = 107 color = 0 random = no # Do not use for random CoAs } texture = { file = "gfx\\coats_of_arms\\dynasties_custom_cadet.tga" size = { x = 10 y = 1 } noOfFrames = 10 color = 0 random = no # Do not use for random CoAs } Now, to edit the dynasties:
#MORE CUSTOM PLAYER CADET HOUSES 451000 = { name = "Whatever 1" culture = hedge coat_of_arms = { template = 0 layer = { texture = 22 texture_internal = 0 emblem = 0 color = 0 color = 0 color = 0 } } used_for_random = no can_appear = no } 451001 = { name = "Whatever 2" culture = hedge coat_of_arms = { template = 0 layer = { texture = 22 texture_internal = 1 emblem = 0 color = 0 color = 0 color = 0 } } used_for_random = no can_appear = no } 451002 = { name = "Whatever 3" culture = hedge coat_of_arms = { template = 0 layer = { texture = 22 texture_internal = 2 emblem = 0 color = 0 color = 0 color = 0 } } used_for_random = no can_appear = no } 451003 = { name = "Whatever 4" culture = hedge coat_of_arms = { template = 0 layer = { texture = 22 texture_internal = 3 emblem = 0 color = 0 color = 0 color = 0 } } used_for_random = no can_appear = no } 451004 = { name = "Whatever 5" culture = hedge coat_of_arms = { template = 0 layer = { texture = 22 texture_internal = 4 emblem = 0 color = 0 color = 0 color = 0 } } used_for_random = no can_appear = no } 451005 = { name = "Whatever 6" culture = hedge coat_of_arms = { template = 0 layer = { texture = 22 texture_internal = 5 emblem = 0 color = 0 color = 0 color = 0 } } used_for_random = no can_appear = no }
texture = 22: the 23rd texture entry in the coats_of_arms file (remember, counting starts at 0) texture_internal = 0: the 1st entry in the texture file
That should do the trick. Should you need to add more than 10 textures, you'll need to change the entry in coats_of_arms.txt to have y = 2 (2 rows) and the noOfFrames to 20. You can get the first COA of the second row with texture_internal = 10.
|
|