You're trying to grant the title to the owner of e_hre, right?
Try something like
e_hre = {
owner = {
k_germany = {
gain_title = PREV }}}
gain_title targets a character, while PREV in your last attempt was a title scope. No guarantees this'll work though.
e_hre = {
owner = {
k_germany = {
gain_title = PREV }}
destroy_landed_title = THIS
}
@burny26:
You'd need to use any_courtier (however, to narrow that down to a *specific* courtier, you need to have a random_courtier in the options section, I believe) (more experienced modders can correct me if I'm wrong).
Anyhow, an example of a trigger:
Code:trigger = { any_courtier = { OR = { trait = awesome trait = has_three_eyes } } }
So in this case, the event will be triggered if there's a courtier that has the awesome or has three eyes trait.
As for major = yes, I believe it would fire off for everyone in the CKII world (I dunno, that's just my guess though).
@burny26: You probably already know this, but I would suggest looking at a vanilla event that has any_courier and random_courtier (such as some of the guardian events where you can praise the child at court and piss people off), in order to make sure how it works - this is something that still confuses me, and I think I'd be worse f I didn't look at the vanilla events.
Yes, it's possible to create new graphical culture groups, though if you notice PI has already defined quite a number of graphical culture groups (such as englishgfx, ugricgfx, etc.) that are, for all intents and purposes, unused (although technically they are used in the cultures text file, since they don't have any defined graphics these cultures just defer to northern European, occitanian, muslim, etc.)
I think what you can do is go to cb_types, find the corresponding CB type (I don't know what it is caused), and code in NOT = { has_landed_title = e_hre } in the can_use section for ROOT.
prestige = {
name = CB_NAME_PRESTIGE
war_name = WAR_NAME_PRESTIGE
sprite = 16
truce_days = 1825
hostile_against_others = yes
is_permanent = yes
check_all_titles = yes # if permanent, setting this to true will check against all of someones titles, including vassal held titles
press_claim = yes
can_ask_to_join_war = yes
can_use_title = {
NOT = { tier = count }
OR = {
FROM = { has_landed_title = PREV }
holder_scope = { is_liege_or_above = FROM }
}
NOT = {
OR = {
ROOT = { has_landed_title = PREV }
holder_scope = { is_liege_or_above = ROOT }
}
}
[COLOR="#00FF00"] ROOT = {
religion_group = pagan_group
{ prestige = FROM }
}[/COLOR]
FROM = {
religion_group = pagan_group
}
}
is_valid_title = {
OR = {
FROM = { has_landed_title = PREV }
holder_scope = { is_liege_or_above = FROM }
}
}
on_success_title = {
usurp_title_plus_barony_if_unlanded = ROOT
any_attacker = {
limit = { character = ROOT }
participation_scaled_prestige = 120
}
any_attacker = {
limit = { NOT = { character = ROOT } }
hidden_tooltip = { participation_scaled_prestige = 100 }
}
FROM = {
prestige = -100
}
}
on_fail_title = {
ROOT = {
prestige = -150
}
any_defender = {
limit = { character = FROM }
participation_scaled_prestige = 120
}
any_defender = {
limit = { NOT = { character = FROM } }
hidden_tooltip = { participation_scaled_prestige = 100 }
}
}
on_reverse_demand = {
ROOT = {
prestige = -200
transfer_scaled_wealth = {
to = FROM
value = 4.0
}
}
any_defender = {
limit = { character = FROM }
participation_scaled_prestige = 150
}
any_defender = {
limit = { NOT = { character = FROM } }
hidden_tooltip = { participation_scaled_prestige = 150 }
}
}
on_add = {
ROOT = { prestige = -50 }
attacker_ai_victory_worth = {
factor = -1 # always accept
}
attacker_ai_defeat_worth = {
factor = 100
}
defender_ai_victory_worth = {
factor = -1 # always accept
}
defender_ai_defeat_worth = {
factor = 100
}
}
ROOT = {
religion_group = pagan_group
{ prestige = FROM }
}
ROOT = {
prestige = 100
}
FROM = {
NOT = { prestige = 100 }
}
}
### MARSHAL ###
character_event = {
id = 73200
desc = "EVTDESC73200" #I want to be marshal, I am better...
picture = GFX_evt_spymaster
only_men = yes
min_age = 16
capable_only = yes
prisoner = no
trigger = {
is_ruler = no
is_councillor = no
independent = no
NOT = { liege = { has_character_flag = asked_marshal_petition } }
NOT = { has_character_flag = asked_for_job }
[COLOR="#00FF00"]liege = {
job_marshal = {
same_liege = ROOT
NOT = { martial = ROOT }
NOT = { has_minor_title = title_regent }
}
}[/COLOR]
}
mean_time_to_happen = {
months = 6
modifier = {
factor = 0.25
trait = ambitious
}
}
immediate = {
set_character_flag = asked_for_job
liege = { set_character_flag = asked_marshal_petition }
}
option = {
name = "EVTOPTA73200"
liege = { letter_event = { id = 73201 tooltip = EVTTOOLTIP73201 } }
}
}
Yes, I see what you mean.ash001: how sure are you? The reason I tried that is because that's more or less how it's done in the event where one of your vassals/courtiers wishes to be Marshal. Here's the code with the pertinent piece highlighted again. Having to use specific numbers is something I'd like to avoid if possible.
Code:### MARSHAL ### character_event = { id = 73200 desc = "EVTDESC73200" #I want to be marshal, I am better... picture = GFX_evt_spymaster only_men = yes min_age = 16 capable_only = yes prisoner = no trigger = { is_ruler = no is_councillor = no independent = no NOT = { liege = { has_character_flag = asked_marshal_petition } } NOT = { has_character_flag = asked_for_job } [COLOR="#00FF00"]liege = { job_marshal = { same_liege = ROOT NOT = { martial = ROOT } NOT = { has_minor_title = title_regent } } }[/COLOR] } }
Thanks! I did the same - pray you have better luck than I did. I replaced the word 'prestige' with 'martial'. Unfortunately, it seems you were right as everything then worked appropriately - the Casus Beli was only valid against characters I had greater martial than. It does seem that the prestige function works completely differently. How disappointing. If anybody knows a workaround, please share.Yes, I see what you mean.
But I think it's specific to skills like martial, intrigue, stewardship, and so on.
I don't think treasury, prestige, traits or piety apply the same rule - at least I haven't seen this anywhere...
...and since the code you used didn't work...
...but, of course, I could be wrong and someone else might enlighten us here.
EDIT - in fact, I'll run a test later on to see how this works... A condition or trigger like this could definitely come in handy...
Well im new to coding ,so any help/advice is welcome!
#Dancing Monkey
character_event = {
id = 74000
desc = "EVTDESC74000"
picture = GFX_evt_jugglers
min_age = 20
capable_only = yes
prisoner = no
only_rulers = yes
trigger = {
has_character_modifier = holding_summer_fair
any_vassal = {
OR = {
trait = kind
trait = charitable
trait = honest
}
}
}
mean_time_to_happen = {
days = 180
}
option = {
name = "EVTOPTE74000"
tooltip_info = charitable
trigger = {
trait = charitable
}
random_vassal = {
limit = {
OR = {
trait = kind
trait = charitable
trait = honest
}
}
opinion = {
modifier = opinion_approves
who = ROOT
years = 2
}
}
}
}
Also, the holy war CB is the one named "religious", correct?
Hmm... some of the summer fair and hunting events might be worth looking at. HEre's an example of one - the first event from the summer_fair_events.txt (it uses any_vasal and random_vassal, but it works the same way as with any_courtier and random_courtier) (also I've simplified the event and deleted parts to save space):
Code:#Dancing Monkey character_event = { id = 74000 desc = "EVTDESC74000" picture = GFX_evt_jugglers min_age = 20 capable_only = yes prisoner = no only_rulers = yes trigger = { has_character_modifier = holding_summer_fair any_vassal = { OR = { trait = kind trait = charitable trait = honest } } } mean_time_to_happen = { days = 180 } option = { name = "EVTOPTE74000" tooltip_info = charitable trigger = { trait = charitable } random_vassal = { limit = { OR = { trait = kind trait = charitable trait = honest } } opinion = { modifier = opinion_approves who = ROOT years = 2 } } } }
What I did to teach myself was to copy the code of events like that exactly and then change it to suit my needs.
Yes indeed.
How would I design an event to impregnate any married female characters of a certain religion?
character_event = {
id = xxxx
desc = "EVTDESCxxxx"
is_triggered_only = yes
trigger = {
is_female = yes
is_married = yes
is_pregnant = no
NOT = { age = 45 } #I assume you don't want post-menopause pregnancies
religion = fertility_cult #or whatever your religion is
}
option = {
name = "EVTOPTAxxxx"
spouse = {
ROOT = {
impregnate = PREV
}
}
}
}
Which part of the vanilla code deals with helping your vassals press their ducal claims? Need to do some cut and paste from there.