If you are new to modding, best to follow this first:
https://ck2.paradoxwikis.com/Creating_a_mod
namespace = kyeaford
character_event = {
id = kyeaford.1 #Namespace.x
hide_window = yes #Doesn't show the event window
ai = no #Not triggered by AI
is_triggered_only = yes #Only triggered by command or on_action/other event if you want
immediate = { #Will do the following immediately
add_trait = TRAIT #Adds a trait
add_trait = TRAIT
add_trait = TRAIT
add_trait = TRAIT
}
}
Change TRAIT to the traits you want. Open command console in game and type: event kyeaford.1
The event will not show as hide_window is yes. If you want to have a window show up then use the code below. This will simply show a box with OK as a option to press.
namespace = kyeaford
character_event = {
id = kyeaford.1
ai = no
is_triggered_only = yes
immediate = {
add_trait = TRAIT
add_trait = TRAIT
add_trait = TRAIT
add_trait = TRAIT
}
option = {
name = OK
}
}