activate_title = { title = d_children_of_atom = yes }
to
activate_title = { title = d_children_of_atom status = yes }
to
activate_title = { title = d_children_of_atom status = yes }
option = {
name = OK
if = {
limit = {
is_father_real_father = yes
}
father = { ROOT = { set_graphical_culture = PREV }}
}
if = {
limit = {
is_father_real_father = no
}
real_father = { ROOT = { set_graphical_culture = PREV }}
}
}
set_graphical_culture = german
if = {
limit = {
is_father_real_father = yes
}
if = {
limit = { father = { graphical_culture = germangfx } }
set_graphical_culture = german
}
}
set_graphical_culture only accepts cultures.
Example
Code:set_graphical_culture = german
This would set the character's graphical culture to "germangfx". To do what you want to do you'd need to do something like this;
Code:if = { limit = { is_father_real_father = yes } if = { limit = { father = { graphical_culture = germangfx } } set_graphical_culture = german } }
Repeating the ifs for each graphical culture.
Sets the ethnicity of character, based on the default graphical_culture of a culture, or of the culture of another character or province.
No it is not wrong the command does take a scope.Oh thank you. The wiki said the command was able to use cultures, characters and provines:
Which is wrong I assume![]()
No it is not wrong the command does take a scope.
if = {
limit = {
is_father_real_father = yes
}
father = { ROOT = { set_graphical_culture = PREV }}
}
set_graphical_culture = father
Well ... then I'm confused. If it actually can take a scope, why does code like this do not work for me?:
Code:if = { limit = { is_father_real_father = yes } father = { ROOT = { set_graphical_culture = PREV }} }
or even
Code:set_graphical_culture = father
What would be the correct syntax?
Yes I tried it and using it the way you have said it works. I'm more confused by @blackninja9939 who said the command actually could take a character or province scope as input - which would be a lot more elegant.
@Drakons @KorbahI completely understand.
EK uses the method I described as the scoping method didn't work properly 3 or 4 (5?) years ago when I first wrote the script, maybe it's been fixed but that method at least is proven to work. I'm sure @blackninja9939 will be around to post the correct method sometime
It'd be great to simplify my own scripts if it works.
create_character = {
random_traits = yes
culture = english
dynasty = ROOT
}
new_character = {
ROOT = {
set_father = PREV
set_graphical_culture = PREV
}
}
Wait… you can do that? Just execute a text file of commands from the console? That is *so* cool! Is that in the production version, or just the dev build?@Drakons @Korbah
It definitely works with scopes, maybe there is an issue with some specific scopes or in certain use cases but I tested it by just making a file in Documents/Paradox Interactive/Crusader Kings 2 called test.txt and added the following to it:
Then get in game and start as a character who is say Muslim and type in the console "run test.txt" and you will get a newly generated father and your graphical culture will change to be his aka the English graphics.Code:create_character = { random_traits = yes culture = english dynasty = ROOT } new_character = { ROOT = { set_father = PREV set_graphical_culture = PREV } }
Yep it is in the public build and has been for a few versions now, not sure when it was added thoughWait… you can do that? Just execute a text file of commands from the console? That is *so* cool! Is that in the production version, or just the dev build?
Casus Belli file comments said:"#ai_will_do: modifies value AI places on the CB compared to other CBs (default: 1) Note: is in title scope"
ai_will_do = {
factor = 0
ROOT =
{
has_character_flag = peaceful_ai
}
}
random_dynasty_member_even_if_dead = {
limit = {
is_alive = no
is_female = no
}
save_global_event_target_as = NOX_dead_male_family
}
random_character = {
limit = {
is_alive = no
is_female = no
}
save_global_event_target_as = NOX_dead_male1
}
any_character = {
limit = {
NOT = { is_lowborn = yes}
random_dynasty_member_even_if_dead = {
limit = {
is_alive = no
is_female = no
}
save_global_event_target_as = NOX_dead_male1
}
}
}
I'm not sure what scope it starts in, but if it's in a title scope, you can just change to the title holder's scope like this:I'm not very experienced in CK2 scripting, so I'm slightly confused by the ai_will_do clause regarding Casus Belli:
does that mean that I can't use something like this:
Code:ai_will_do = { factor = 0 ROOT = { has_character_flag = peaceful_ai } }
Because that is character scope, not title?
Basically, I want to make a (useful in MP) mod that allows the player to forbid the AI to declare war. I was going to put this check in the can_use section, but since there's an ai_will_do section, I thought it was potentially more convenient (albeit more difficult to test and be sure it is actually working).
Thanks in advance![]()
ai_will_do = {
holder_scope = {
has_character_flag = peaceful_ai
}
}
I'm not sure what scope it starts in, but if it's in a title scope, you can just change to the title holder's scope like this:
Code:ai_will_do = { holder_scope = { has_character_flag = peaceful_ai } }
(stuff went before)
ai_will_do = {
factor = 1
modifier = {
factor = 0
ROOT = {
opinion = { who = FROM value = 25 }
}
}
modifier = {
factor = 0.5
ROOT = {
opinion = { who = FROM value = 0 }
}
}
modifier = {
factor = 0.5
ROOT = {
opinion = { who = FROM value = -25 }
}
}
}
(stuff after)