• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
It was mentioned in the Captain's Log somewhere, when Captain Gars coded it. Example:
Code:
# The husband suspects something ain't right
character_event = {
	id = 404
	picture = GFX_evt_pregnancy
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
[COLOR="#FF0000"]	desc = {
		text = EVTDESC404_KF
		trigger = {
			FROM = {
				father_of_unborn_known = yes
				father_of_unborn = {
					NOT = { character = ROOT }
				}
			}
		}
	}
	
	desc = {
		text = EVTDESC404
		trigger = {
			NOT = { random = 50 }
			FROM = {
				OR = {
					father_of_unborn_known = no
					father_of_unborn = { character = ROOT }
				}
			}
		}
	}
	
	desc = {
		text = EVTDESC404_2
		trigger = {
			random = 50
			FROM = {
				OR = {
					father_of_unborn_known = no
					father_of_unborn = { character = ROOT }
				}
			}
		}
	}
[/COLOR]	
	option = {
		name = EVTOPTA404 # Doubt besets me...
		trigger = {
			FROM = {
				OR = {
					father_of_unborn_known = no
					father_of_unborn = { character = ROOT }
				}
			}
		}
		if = {
			limit = {
				NOT = { trait = trusting }
				OR = {
					trait = paranoid
					intrigue = 10
					random = 25 # 75% chance
				}
			}
			hidden_tooltip = {
				FROM = { character_event = { id = 21000 days = 7 random = 16 } } # Investigate this further
			}
		}
	}
	
	option = {
		name = EVTOPTB404 # Denounce them both as traitors!
		trigger = {
			FROM = {
				father_of_unborn_known = yes
				father_of_unborn = {
					NOT = { character = ROOT }
				}
			}
		}
		
		hidden_tooltip = {
			FROM = {
				father_of_unborn = {
					save_event_target_as = target_adulterer
				}
				character_event = { id = 20 } # Adultery fallout
			}
		}
		
		FROM = {
			father_of_unborn = {
				hidden_tooltip = {
					character_event = { id = 21006 }
				}
			}
			
			hidden_tooltip = {
				character_event = { id = 21005 }
			}
		}
	}
}
You can do the same for event title and option name text, as well.
 
It was mentioned in the Captain's Log somewhere, when Captain Gars coded it. Example:
Code:
# The husband suspects something ain't right
character_event = {
	id = 404
	picture = GFX_evt_pregnancy
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
[COLOR="#FF0000"]	desc = {
		text = EVTDESC404_KF
		trigger = {
			FROM = {
				father_of_unborn_known = yes
				father_of_unborn = {
					NOT = { character = ROOT }
				}
			}
		}
	}
	
	desc = {
		text = EVTDESC404
		trigger = {
			NOT = { random = 50 }
			FROM = {
				OR = {
					father_of_unborn_known = no
					father_of_unborn = { character = ROOT }
				}
			}
		}
	}
	
	desc = {
		text = EVTDESC404_2
		trigger = {
			random = 50
			FROM = {
				OR = {
					father_of_unborn_known = no
					father_of_unborn = { character = ROOT }
				}
			}
		}
	}
[/COLOR]	
	option = {
		name = EVTOPTA404 # Doubt besets me...
		trigger = {
			FROM = {
				OR = {
					father_of_unborn_known = no
					father_of_unborn = { character = ROOT }
				}
			}
		}
		if = {
			limit = {
				NOT = { trait = trusting }
				OR = {
					trait = paranoid
					intrigue = 10
					random = 25 # 75% chance
				}
			}
			hidden_tooltip = {
				FROM = { character_event = { id = 21000 days = 7 random = 16 } } # Investigate this further
			}
		}
	}
	
	option = {
		name = EVTOPTB404 # Denounce them both as traitors!
		trigger = {
			FROM = {
				father_of_unborn_known = yes
				father_of_unborn = {
					NOT = { character = ROOT }
				}
			}
		}
		
		hidden_tooltip = {
			FROM = {
				father_of_unborn = {
					save_event_target_as = target_adulterer
				}
				character_event = { id = 20 } # Adultery fallout
			}
		}
		
		FROM = {
			father_of_unborn = {
				hidden_tooltip = {
					character_event = { id = 21006 }
				}
			}
			
			hidden_tooltip = {
				character_event = { id = 21005 }
			}
		}
	}
}
You can do the same for event title and option name text, as well.

good stuff thanks for the info.
 
interesting, the random = 50 I assume that just means theres a 50% chance that particular text will 'fire' but what does the NOT = { random = 50 } imply? if you dont want there to be a random element for the text to occur you would just not bother writing it, would you not?
 
Beats the heck out of they'd have NOT = { random = 50 }, all I can think of is that it fires if the RNG fires in the upper 50 percentile rather than the lower one. Practically speaking, I don't see the difference.
 
Can I ask, how exactly do we use these targeted decisions? How do we acquire the target to be effected? For example, in the past I have used the plot system to target a character then used event codes to trigger effects. With these new target decisions, would I be able to use a single plot to define a target then use a targeted decision to carry out my code? Or would I need to do something else. Also can we get an example code of a targeted decision so we can see how the decision is coded?
 
All the decisions in dynasty_decisions, vassal_decisions and sunset_invasion are now targetted_decisions. You select the target, go to the diplomacy menu, and the targetted_decisions that are available for that target are listed there.
 
Thank you Rich....

AND OMFG, PARADOX HAVE MY BABIES! This single change has simplified so much of my modding... My sorcery mod is now back from the bloody grave and it looks so much more pleasing to the eye to have all the spells hidden away in the diplomacy menu.... I can just imagine what modders like the AGOT team could do with this!
 
edit was a mistake on my end...


And magic is so much easier to mod in with the targeted decisions LD, I already have all sorts of wonderful things.
 
Last edited:
Found another bug with title variables, the effect change_variable does not work with titles. This is true for both values and scopes. The tooltip does display, but it seems the change is not applied or saved to the title.
 
Found another bug with title variables, the effect change_variable does not work with titles. This is true for both values and scopes. The tooltip does display, but it seems the change is not applied or saved to the title.

Found the problem. Will fix.
 
It was mentioned in the Captain's Log somewhere, when Captain Gars coded it. Example:
Code:
# The husband suspects something ain't right
character_event = {
	id = 404
	picture = GFX_evt_pregnancy
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
[COLOR="#FF0000"]	desc = {
		text = EVTDESC404_KF
		trigger = {
			FROM = {
				father_of_unborn_known = yes
				father_of_unborn = {
					NOT = { character = ROOT }
				}
			}
		}
	}
	
	desc = {
		text = EVTDESC404
		trigger = {
			NOT = { random = 50 }
			FROM = {
				OR = {
					father_of_unborn_known = no
					father_of_unborn = { character = ROOT }
				}
			}
		}
	}
	
	desc = {
		text = EVTDESC404_2
		trigger = {
			random = 50
			FROM = {
				OR = {
					father_of_unborn_known = no
					father_of_unborn = { character = ROOT }
				}
			}
		}
	}
[/COLOR]	
	option = {
		name = EVTOPTA404 # Doubt besets me...
		trigger = {
			FROM = {
				OR = {
					father_of_unborn_known = no
					father_of_unborn = { character = ROOT }
				}
			}
		}
		if = {
			limit = {
				NOT = { trait = trusting }
				OR = {
					trait = paranoid
					intrigue = 10
					random = 25 # 75% chance
				}
			}
			hidden_tooltip = {
				FROM = { character_event = { id = 21000 days = 7 random = 16 } } # Investigate this further
			}
		}
	}
	
	option = {
		name = EVTOPTB404 # Denounce them both as traitors!
		trigger = {
			FROM = {
				father_of_unborn_known = yes
				father_of_unborn = {
					NOT = { character = ROOT }
				}
			}
		}
		
		hidden_tooltip = {
			FROM = {
				father_of_unborn = {
					save_event_target_as = target_adulterer
				}
				character_event = { id = 20 } # Adultery fallout
			}
		}
		
		FROM = {
			father_of_unborn = {
				hidden_tooltip = {
					character_event = { id = 21006 }
				}
			}
			
			hidden_tooltip = {
				character_event = { id = 21005 }
			}
		}
	}
}
You can do the same for event title and option name text, as well.

are there any examples of how to do this within the events options section? as I tried it and its giving me the old blank event error due to fault scope (i.e. the desc = { is a faulty scope)

EDIT: OK i figured it out: for all those wondering you must use name = { instead of desc = {.

it worked in game and then i searched for it in the files and that is what the devs use :)
 
Last edited:
How exactly does one go about displaying a variable's value via localization? The patch notes just mention that variables can now be displayed but doesn't give syntax or any sort of example. I haven't found any examples of its usage in the game's localisation either.
 
How exactly does one go about displaying a variable's value via localization? The patch notes just mention that variables can now be displayed but doesn't give syntax or any sort of example. I haven't found any examples of its usage in the game's localisation either.

I tested the following, and it's working:

Code:
some_variable;Variable Name;;;;;;;;;;;;;x;;
TEST_VARIABLE_LOC;[Root.some_variable.GetName] value is : [Root.some_variable.GetValue].;;;;;;;;;;;;;x;;
 
Has anyone managed to add new focus icons?