• 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.
You do know that you can just do 1066.1.1 if you don't know the month and day? I do that most of the time nonetheless.
This is for my New York mod, so I'm setting up characters from scratch.
 
Another question. Is it possible to grant fiefs smaller than baronies to your courtiers?

I'm trying to think of how I could put villages into the game or allow a favored courtier to get the income from a particular building.

In fact, I also am trying to figure out a better way to work out the moneylender event series: if you are in debt, you can mortgage a building to a certain character with money to spend. I know how to rig up mortgaging entire provinces (like the poor Kings of Denmark did to the merchants of Holstein), but I would like to get smaller than that or grant a monastery or a salt works to a younger son who will inherit nothing. All in modding of course.
 
Gentlemen my event is not fire off could tell me why

#coronation in Milan
character_event = {
id = 1.000.040.000
desc = "EVTDESC2002000"
picture = "GFX_evt_holy_emperor"
border = "GFX_event_narrative_frame_religion"

min_age = 16
only_men = yes
capable_only = yes
prisoner = no

trigger = {
has_landed_title = e_hre
location = { province_id = 235 }

option = {
name = "EVTDESC2002000" # Let it be done.
effect = {
k_italy = { gain_title = FROM }
prestige = 250
piety = 100
 
Another question. Is it possible to grant fiefs smaller than baronies to your courtiers?

I'm trying to think of how I could put villages into the game or allow a favored courtier to get the income from a particular building.

In fact, I also am trying to figure out a better way to work out the moneylender event series: if you are in debt, you can mortgage a building to a certain character with money to spend. I know how to rig up mortgaging entire provinces (like the poor Kings of Denmark did to the merchants of Holstein), but I would like to get smaller than that or grant a monastery or a salt works to a younger son who will inherit nothing. All in modding of course.
Look into how Wiz did castellans when they were still in CK2Plus.
 
Gentlemen my event is not fire off could tell me why

Your trigger is missing a closing bracket.
There are some missing at the end as well but those are probably lost in the copy&paste?

And I'm not sure event-ids should contain points.
Try if this works:

Code:
#coronation in Milan 
character_event = { 
	id = [COLOR="#FF0000"]1000040000[/COLOR] 
	desc = "EVTDESC2002000" 
	picture = "GFX_evt_holy_emperor"
	border = "GFX_event_narrative_frame_religion"
 	
	min_age =  16
	only_men = yes
	capable_only = yes
	prisoner = no 

	trigger = {
		has_landed_title = e_hre 
		location = { province_id = 235 }  
	[COLOR="#FF0000"]}[/COLOR]
   

	option = {
		name = "EVTDESC2002000"	# Let it be done. 
		effect = {
		k_italy = { gain_title = FROM }
        prestige = 250
        piety = 100
[COLOR="#FF0000"]		}
	}
}[/COLOR]
 
Your trigger is missing a closing bracket.
There are some missing at the end as well but those are probably lost in the copy&paste?

And I'm not sure event-ids should contain points.
Try if this works:

Code:
#coronation in Milan 
character_event = { 
    id = [COLOR=#FF0000]1000040000[/COLOR] 
    desc = "EVTDESC2002000" 
    picture = "GFX_evt_holy_emperor"
    border = "GFX_event_narrative_frame_religion"
     
    min_age =  16
    only_men = yes
    capable_only = yes
    prisoner = no 

    trigger = {
        has_landed_title = e_hre 
        location = { province_id = 235 }  
    [COLOR=#FF0000]}[/COLOR]
   

    option = {
        name = "EVTDESC2002000"    # Let it be done. 
        effect = {
        k_italy = { gain_title = FROM }
        prestige = 250
        piety = 100
[COLOR=#FF0000]        }
    }
}[/COLOR]
Namespace IDs should containt periods, but that isn't a namespace event, yeah.
Namespace is rather useful though; for example, every event I use is in the namespace meneth, so I have meneth.0, meneth.1, and so on. Ensures it won't ever conflict with other events.
 
Namespace IDs should containt periods, but that isn't a namespace event, yeah.
Namespace is rather useful though; for example, every event I use is in the namespace meneth, so I have meneth.0, meneth.1, and so on. Ensures it won't ever conflict with other events.

Well, that ruins my event series meneth that periodically informs the player 'Meneth is really cool' and takes away five gold for the privilege. ;)

How's the event coming, Joel?
 
Well as previously suggested I am trying to make an event (never made one before) to trigger the creation of the Most Serene Republic of Genoa and wanted to see if you guys think the event code looks ok. The event should only trigger for the AI when it is a republic and hold the ducal title of Genoa and at least one other. Additionally it requires 800g and 100 piety. If all these conditions are true, the title of k_genoa is given to that AI and it loses 800g and 100 piety. Should I also put a mtth in there too to keep it from spamming it everyday (and slowing it down?)

Code:
#Formation of the Most Serene Republic of Genoa
character_event = {
				id = 999999001

				min_age = 16
				only_men = yes
				culture = italian
				ai = yes
				is_republic = yes
                                independent = yes
								
				trigger = {
						has_landed_title = d_genoa
						OR = {
							num_of_duke_titles = 2
							num_of_duke_titles = 3 #In case AI makes multiple ducal titles at the same time
						}
						piety = 100
						wealth = 800
				}

				effect = {
					k_genoa = { gain_title = ROOT }
					prestige = 250
					piety = -100
					wealth = -800
				}
}
 
It is similar to the decisions to add courtiers (debutante, etc.): you have an event fire for a ruler, then in effects add:

Code:
	option = {
		name = "EVTOPTE4150"
		create_character = {
			learning = 8
			random_traits = yes
			dynasty = random
			age = 65
			female = no
			has_nickname = nick_the_clueless
		}
	}

(I took this from feudal_life_events, the event for an old noble claiming to have returned from Elfland.)

You can adjust whatever you want, setting a particular dynasty, age, gender, attribute.

Thanks :)







Is there any way to make the AI enforce a courtiers claim?
 
Well as previously suggested I am trying to make an event (never made one before) to trigger the creation of the Most Serene Republic of Genoa and wanted to see if you guys think the event code looks ok. The event should only trigger for the AI when it is a republic and hold the ducal title of Genoa and at least one other. Additionally it requires 800g and 100 piety. If all these conditions are true, the title of k_genoa is given to that AI and it loses 800g and 100 piety. Should I also put a mtth in there too to keep it from spamming it everyday (and slowing it down?)

Code:
#Formation of the Most Serene Republic of Genoa
character_event = {
                id = 999999001

                min_age = 16
                only_men = yes
                culture = italian
                ai = yes
                is_republic = yes
                                independent = yes
                                
                trigger = {
                        has_landed_title = d_genoa
                        OR = {
                            num_of_duke_titles = 2
                            num_of_duke_titles = 3 #In case AI makes multiple ducal titles at the same time
                        }
                        piety = 100
                        wealth = 800
                }

                effect = {
                    k_genoa = { gain_title = ROOT }
                    prestige = 250
                    piety = -100
                    wealth = -800
                }
}
"num_of_duke_titles = 2" This means 2 or above, so "num_of_duke_titles = 3" is redundant.
Beyond that, I don't think most conditions can be defined where you've defined them. You should all of them (except min_age = 16 and only_men = yes) in the trigger.
Every event except those marked as is_triggered_only needs an MTTH.
 
Well as previously suggested I am trying to make an event (never made one before) to trigger the creation of the Most Serene Republic of Genoa and wanted to see if you guys think the event code looks ok. The event should only trigger for the AI when it is a republic and hold the ducal title of Genoa and at least one other. Additionally it requires 800g and 100 piety. If all these conditions are true, the title of k_genoa is given to that AI and it loses 800g and 100 piety. Should I also put a mtth in there too to keep it from spamming it everyday (and slowing it down?)
Event structure is the following:
Code:
character_event = {
	id = ...
	name = ... #optional
	desc = ...
	
	#conditions like min_age = 16 etc (optional)
	
	trigger = {
		...
	}
	
	is_triggered_only = yes #optional
	hide_from = yes #optional
	
	mean_time_to_happen = { #if not triggered_only
		...
	}
	option = { #multiple options possible, but at least one
		...
	}
}
Mistakes in your code:
1. Since event is not triggered_only, there must be mean_time_to_happen
2. You want to change "effect" to "option"'
3. You will also want to add name = "..." line inside option brackets. I`m not sure whether it will work without name.

You may also want to use decision instead of event... :)
 
Will it autotrigger for the AI as a decision? (The reason I am making this is because the AI seems to be coded to not form Serene Republics on its' own). How would the code differ as a decision?

Sorry for my ignorance and thanks for the help :) Couldn't find a whole lot of explained info on how to code the event itself on the forums, aside from the variables.

Revised Code

Code:
#Formation of the Most Serene Republic of Genoa
character_event = {
				id = 999999001
				min_age = 16
				only_men = yes
				
				trigger = {
						culture = italian
						ai = yes
						is_republic = yes
						independent = yes
						has_landed_title = d_genoa
						num_of_duke_titles = 2
						piety = 100
						wealth = 800
				}
				
				mean_time_to_happen = {
									months = 6
									modifier = {
											factor = 0.25
											trait = ambitious
									}
									
				}

				option = {
					name = "Creation"
					k_genoa = { gain_title = ROOT }
					prestige = 250
					piety = -100
					wealth = -800
				}
}
 
So like this?

Code:
#Formation of the Most Serene Republic of Genoa
decision = {
				id = 999999001
				min_age = 16
				only_men = yes
				trigger = {
                                                ai_will_do = 1
						culture = italian
						ai = yes
etc.

And decisions don't use MTTH?
 
So like this?

Code:
#Formation of the Most Serene Republic of Genoa
decision = {
                id = 999999001
                min_age = 16
                only_men = yes
                trigger = {
                                                ai_will_do = 1
                        culture = italian
                        ai = yes
etc.

And decisions don't use MTTH?
Just stick this in a new file in the decisions folder, and add localization.
Code:
decisions = {
    serene_republic_of_genoa = {
        potential = {
            ai = yes
            is_republic = yes
            independent = yes
            has_landed_title = d_genoa
            num_of_duke_titles = 2
            piety = 100
            wealth = 800
        }
        effect = {
            k_genoa = { gain_title = ROOT }
            prestige = 250
            piety = -100
            wealth = -800
        }
        revoke_allowed = {
            always = no
        }
        ai_will_do = {
            factor = 1                    
        }
    }
}
 
[EDIT] Got everything working fine.. just some typo issues, will leave here for posterity :D

--------------------------------------------

I'm trying to trigger an event post siege based upon the siege location. For example, how would I trigger an event following a successful siege of a city? I've added a character event in the on_siege_won section of the on_events file, and created a corresponding event in a custom events file.

Code:
...
on_siege_won_leader = {
	events = {
		8330  # Conquers the crusade target
		93030 # CUSTOM EVENT pillage city
	}
...

Code:
character_event = {
	id = 93030
	title = "Spoils of War"
	desc = "Shall we sack this fat and rich city?"
	
	picture = "GFX_evt_siege"
	border = "GFX_event_normal_frame_war"
	
[B]	is_triggered_only = yes

	trigger = { 
            FROM = { is_republic = yes }
	}[/B]

	option = {
		name = "Pillage"		
	}
	
	option = {
		name = "Don't Pillage"		
	}
}

However the event doesn't not trigger with the is_triggered_only = yes ... is_republic = yes } line in there. It works fine without it, but of course the event would trigger after every siege, and not just those of cities.
 
Last edited:
There's a little something that's been niggling me lately. I haven't seen a plot started by the AI in my mod for quite some time. All plots do seem to be available to the different noble ranks however. I linked it to the AI being able to chose lots of ambitions as well. To be sure however, plotting chance should be only affected through plot_decisions.txt and objectives.txt, right?