• 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.
Another death related question when character does is possible destroy the title in event, uncreatable, and then another event making it again?

Having trouble understanding you. Sorry. But yes, you can destroy a title. I made this little event for Rodrigo, still unimplemented and untested:

Code:
#Death of a vassal...
character_event = {
	id = allod.4
	desc = "As I lie dying"
	picture = GFX_evt_death
	
	only_rulers = yes
	
	is_triggered_only = yes
	
	trigger = {
		is_ruler = yes
		is_alive = yes
		independent = no
		has_character_flag = feudal_tenant
		any_demesne_province = {
			OR = {
				has_province_flag = church_rule
				has_province_flag = royal_rule
			}
		}
	}


	option = {
		name = "Hand it over"
		add_trait = royalist_dead
		any_demesne_title = {
			limit = { tier = duke }
			destroy_landed_title = ROOT 
		}
		random_child = {
			limit = {
				is_primary_heir = yes
			}
			prestige = 100
		}
	}
}

Well, actually, it worked when triggered by console, but I haven't 'let nature run its course' in a real game yet. In this character's case, the duchy that he held was indeed destroyed, and his liege recreated it. I have not figured out how to revert ducal titles yet while leaving at least one county for his heir to inherit.
 
Yeah, the syntax is grant_title = ROOT if you are the one receiving the title. Actually I think it's:

Code:
d_leon = {
    grant_title = ROOT
}

if you want to create the Duchy of Leon anew.
What if one wants to give the title to somebody else who's not 'root'? Say I want to destroy e_byzantium, but I want the previous byzantine emperor to receive in exchange for that the title e_nikaea. What should I write in place of ROOT?

And also, is it possible to assign a title as a de facto vassal via event or gain_effect = { }? Say I want to make k_orthodox a vassal of e_nikaea once the latter is created.

Thanks.
 
What if one wants to give the title to somebody else who's not 'root'? Say I want to destroy e_byzantium, but I want the previous byzantine emperor to receive in exchange for that the title e_nikaea. What should I write in place of ROOT?

And also, is it possible to assign a title as a de facto vassal via event or gain_effect = { }? Say I want to make k_orthodox a vassal of e_nikaea once the latter is created.

Thanks.

Set a tooltip that fires an event for the previous emperor granting him whatever title you wanna give him :)
 
What if one wants to give the title to somebody else who's not 'root'? Say I want to destroy e_byzantium, but I want the previous byzantine emperor to receive in exchange for that the title e_nikaea. What should I write in place of ROOT?

And also, is it possible to assign a title as a de facto vassal via event or gain_effect = { }? Say I want to make k_orthodox a vassal of e_nikaea once the latter is created.

Thanks.

That's a bit beyond me, but I'll try (ask one of the folks working on the titular title mods maybe):

ROOT is the person who gets the event, and the only other one is FROM, who sends you the event. I imagine that you would want it to be ROOT,

so that (and I'm speculating here):

Code:
option = {
      e_byzantium = {
              destroy_landed_title = ROOT
      }
      e_nikaea = {
              grant_title = ROOT
      }
      #Not sure about this part--might have to be a separate event
      k_orthodox = {
             set_defacto_liege = ROOT
      }
}

At least that's how I would set up the Fourth Crusade dissolution of the Byzantine Empire (which is what you're after I assume). Might need some debugging, but I hope that helps.

By the way, congrats on the DLC contest. Didn't make the cut myself, but happy for those who did.
 
That's a bit beyond me, but I'll try (ask one of the folks working on the titular title mods maybe):

ROOT is the person who gets the event, and the only other one is FROM, who sends you the event. I imagine that you would want it to be ROOT,

so that (and I'm speculating here):

Code:
option = {
      e_byzantium = {
              destroy_landed_title = ROOT
      }
      e_nikaea = {
              grant_title = ROOT
      }
      #Not sure about this part--might have to be a separate event
      k_orthodox = {
             set_defacto_liege = ROOT
      }
}

At least that's how I would set up the Fourth Crusade dissolution of the Byzantine Empire (which is what you're after I assume). Might need some debugging, but I hope that helps.

By the way, congrats on the DLC contest. Didn't make the cut myself, but happy for those who did.
Thanks for the congratulations!!! And for the suggestion too!!! The thing is, I am trying to set up a dissolution of the Byzantine Empire mechanics, as you argue, without using events but only the gain_effect = { } option of title creation from the landed_titles.txt file. I believe it's more elegant. Hence, the byzantine emperor cannot be ROOT, I guess, I have to set up who he is with something like this after the conditions to create the Latin Empire:
Code:
e_nikaea = { grant_title = { any_independent_ruler = { has_landed_title = e_byzantium } } }
e_byzantium = { destroy_landed_title = yes }
k_orthodox = { set_defacto_liege = e_nikaea }
and I'm unsure about both the first and the third line. The first looks a little bit too clumsy to me. As for the last one, thanks for letting me know about the set_defacto_liege command, I didn't know about it: but should it work with characters (e.g. ROOT) or titles (e.g. e_nikaea)?

Finally, I am not sure whether these three lines can go together, it might be that the destruction of the byzantine empire and the attribution of the empire of Nikaea to the last byzantine emperor would generate conflicts.
 
All I can say is that you have to run it, hope it doesn't crash, edit it some more, run it, and pray some more. I wish it was easier, but that's how it is. :) Or at least that's how it goes for me ;)

I have not used gain_effect = { } so I don't know what to advise. I was thinking more of an event where something happens to trigger a moment where you have to leave Byzantium for exile in Nikaea.

Wait, wait. So if you gain the title of e_nikaea to the Byzantine Emperor, then he loses his empire and takes the Patriarch with him. I'm starting to understand. That might work. The first line in your code does look like it would work. Try it, my friend, and see what happens. Good luck.

Btw, will you move the empire to Nikaea, abandoning Byzantium. That could be a second step in the process.
 
All I can say is that you have to run it, hope it doesn't crash, edit it some more, run it, and pray some more. I wish it was easier, but that's how it is. :) Or at least that's how it goes for me ;)

I have not used gain_effect = { } so I don't know what to advise. I was thinking more of an event where something happens to trigger a moment where you have to leave Byzantium for exile in Nikaea.

Wait, wait. So if you gain the title of e_nikaea to the Byzantine Emperor, then he loses his empire and takes the Patriarch with him. I'm starting to understand. That might work. The first line in your code does look like it would work. Try it, my friend, and see what happens. Good luck.

Btw, will you move the empire to Nikaea, abandoning Byzantium. That could be a second step in the process.
I will. Thank you for your suggestions. I'm looking forward to publish this mod on these boards. It won't include only this! ;)
 
I will. Thank you for your suggestions. I'm looking forward to publish this mod on these boards. It won't include only this! ;)
First and third line cause a CTD at game start. It must be done by event. Let's see what I can do!
 
Now will pull off fire another event change another character periceive.

Let ruler have event fire he click on his choice, that will fire off a event for AI bishop, that in turn once click on his event option fire off event that same ruler etc. How can they pull off?
 
I've added in a section describing general event syntax.

hello. Good job really. But i'm a problem with scripting. I'm ask how to have a matrilineare marriage ?
I'm not sure I've seen an event do that. I'd guess that either it can't be done or it depends on which character initates the add_spouse command.
 
At "Options which apply to characters":

set_father=
set_mother=
(problably works just at new_character scope)



I try out some others "set_ options without success, but maybe there are others.
father_even_if_dead appears to work fine, but mother_even_if_dead appears bugged.
random_ * scops appear to produce some kind of overhead at system.
 
I've added the set_father/set_mother to the main list, thanks.

I imagine that a random_* has to count each relevent person, working out if they are relevent and then roll a dice to work out which one to target.
 
I've added the set_father/set_mother to the main list, thanks.

I imagine that a random_* has to count each relevent person, working out if they are relevent and then roll a dice to work out which one to target.

Yep. Except I put in lots of limits (since we don't have province decisions) so that I get the province I want or something like it. ;) Viz:

Code:
random_demesne_province = {
       limit = { 
             province_id = 199 
             owner = {  
                   trait = hedonist 
                   has_minor_title = title_prince
             }
       }
       add_province_flag = lets_party_like_its_1299
       owner = { 
            prestige = 10 
            add_character_modifier = { 
                   name = party_animal 
                   duration = -1 
            } 
        }
}

that's what my events look like at 3:05AM. :wacko:
 
RedRooster, I wonder how limits are implemented in the game engine from an efficiency standpoint.

They could do it by assessing every demesne province to see if it was province 199, and what the owner is like, that shouldn't have too bad an impact though unless you have huge amounts of demesne provinces. However that could be bad with some of the other random_*s

Alternativly they could just select a random demesne province and if it doesn't fit the limit try again, and again, and again. They must have some protection from infinite loops but if you are hitting that limit then it would be inefficient.


Could you rewrite that code more like this?
Code:
199 = {
       add_province_flag = lets_party_like_its_1299
       owner = { 
            prestige = 10 
            add_character_modifier = { 
                   name = party_animal 
                   duration = -1 
            } 
        }
}

And put the limit on the owner into the trigger?
 
I don't know, Fawr. Does it work? If it does then great. But I haven't tried using that setup for province_events.

I am adding a lot of custom province modifiers for religion and economic status, so that would help a lot. I have done startup events that affect specific provinces, plus I want to have these change over time with the right triggers. So yes code efficiency is a big concern for me.

A lot of this would be solved by having EU3 style province decisions, though.