• 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.
Can anyone (probably jordarkelf or Veld) tell me if it's usual for the primary_heir condition not to work with the first inheritance type (the one France uses in DVIP) because despite the king of france meeting all the conditions for my trait event, it seems to be sure they don't have a primary heir when I know they do....
 
I might be mistaken (not at home right now), but I don't think you can use primary heir as a trigger inside any_child, it only works as a content switch.
If you rewrite your trigger as follows it should work:
Code:
		condition = { type = primary_heir
			condition = { type = not value = { type = trait value = bastard } }
			condition = { type = save_target }
		}
		condition = { type = has_target }

The event is slightly bugged by the way, since you have it fire for the ruler, but it sets the trait on the primary heir. You ought to add the following check inside the primary_heir check to prevent it from firing for the same character more than once:
Code:
condition = { type = not value = { type = trait value = user_defined_a } }

I'd also add the following trigger, to prevent it from firing for republics, bishoprics, or knight orders:
Code:
condition = { type = form_of_goverment value = feudal }
This eliminates the need to check and exclude the Papacy:
Code:
condition = { type = not value = { type = title value = PAPA } }

Keep in mind that primary heir means primary heir according to the succession laws of the realm, this is not necessarily a ruler child. You can use the is_receiver trigger inside the primary heir check to make sure this fires for the right person:
Code:
		condition = { type = primary_heir
			condition = { type = not value = { type = trait value = bastard } }
			condition = { type = not value = { type = trait value = user_defined_a } }
			condition = { type = father 
				condition = { type = is_receiver }
			}
			condition = { type = save_target }
		}
		condition = { type = has_target }
Of course this means that there is a chance that the king's son may not get the trait if the realm is using elective law, and the son is not the most powerful vassal. To take care of this requires more rewriting than I can do now for you.

Hope this helps. I'll try to check this later from home if I find the time, there's a few other suggestions I can make.
 
Last edited:
I can see what your saying but I don't think you have all my intentions right::

Primary_heir is both a csc AND a family condition if you look inside eventeffects.txt. I am using it as the latter.


Also my plan is to have it fire for the Ruler but only if he has a son as a primary heir. it will then give the trait to both the ruler and primary heir. It does check to see if the ruler has the trait but it can't check the primary_heir because they might already have received it from their mother.

I don't actually need to give it to the primary_heir because the other event in the mod will do that eventually I was just trying to speed
that process up a bit without wasting event cycles.



And it does work, just not for france. I'll check it on other countries with the same inheritance laws to see if the conditions a bit buggy.

Good idea about the government type though.
 
Last edited: