View Full Version : Research - Possible Faction Heir/Leader Problem(s)
I think there may be a problem with the function of traits used for faction heir and faction leader. Here are the appropriate traits:
;------------------------------------------
Trait Factionleader
Characters family
AntiTraits Factionheir
Level Faction_Leader
Description Faction_Leader_desc
EffectsDescription Faction_Leader_effects_desc
Threshold 1
Effect Command 1
Effect Authority 2
Effect PersonalSecurity 3
;------------------------------------------
Trait Factionheir
Characters family
AntiTraits Exheir
Level Heir_Apparent
Description Heir_Apparent_desc
EffectsDescription Heir_Apparent_effects_desc
Threshold 1
Effect Command 1
Effect Authority 1
Effect PersonalSecurity 2
;------------------------------------------
Trait Exheir
Characters family
AntiTraits Factionheir
Level Former_Successor
Description Former_Successor_desc
EffectsDescription Former_Successor_effects_desc
Threshold 1
Effect Loyalty -3
and the related triggers:
;------------------------------------------
Trigger factionleader
WhenToTest BecomesFactionLeader
Affects Factionleader 1 Chance 100
;------------------------------------------
Trigger factionleader_pope
WhenToTest BecomesFactionLeader
Condition FactionType papal_states
Affects IAmPope 1 Chance 100
;------------------------------------------
Trigger reinherited
WhenToTest BecomesFactionHeir
Condition Trait Exheir = 1
Affects Factionheir 1 Chance 100
;------------------------------------------
Trigger disinherited
WhenToTest CeasedFactionHeir
Condition not Trait Exheir = 1
and not IsFactionLeader
Affects Exheir 2 Chance 100
;------------------------------------------
Trigger inherited
WhenToTest CeasedFactionHeir
Condition IsFactionLeader
Affects Exheir 1 Chance 100
;------------------------------------------
Trigger becomesheir
WhenToTest BecomesFactionHeir
Affects Factionheir 1 Chance 100
Note that it looks like the system is intended to give a guy 1 point in whichever thing he is, and leave the others at zero. Let's see what happens as a guy becomes faction heir, then faction leader. First he'll set off the last trigger, getting one Factionheir point. All is well.
From there, it seems like there are two options:
1. He becomes the faction leader, then loses his faction heir status. This would mean the first trigger fires and he gets a Factionleader point. This immediately cancels with its antitrait, his Factionheir point, leaving none of either. Then inherited triggers, giving him an Exheir point that he shouldn't have.
2. He loses his faction heir status, then becomes faction leader. In this case, disinherited fires and he gets 2 Exheir points, 1 of which should cancel his Factionheir point. He keeps 1. Then he triggers the first trigger and gets a Factionleader point.
Either way it seems like things don't turn out quite right: I think he should end up with just 1 point in Factionleader and none in the others. Yet if I'm reading the triggers correctly he will always get an erroneous Exheir point... and in #1's case he doesn't even correctly receive the bonuses for being the faction leader! This would be more or less consistent with what I've seen, as many of my leaders appear to have Exheir, yet I'm pretty sure they never were out of the inheritance line (I don't know if it's all of them, but I frequently look at them and wonder why it says they were an ex heir). It also seems too difficult to make leaders except your first one have enough authority, which may be because the leader trait is not correctly conferred to them.
Anyway I haven't had a chance yet to really look at this and see what happens to my leaders. Hopefully I will later. In the meantime, any comments or ideas are appreciated: maybe someone sees something I've overlooked!
Well, I just had a look at one of my saved games. Sure enough, King Henry the Chivalrous of England has no traits related to being the heir or the faction leader, and does have the Exheir trait. All his authority (4 points) is from non-related traits that he has, too, which means the Factionleader trait is not being hidden: he simply does not have it. So that confirms that the heir triggers do not work as intended, and seems to point to #1 (from previous post) as the method since no heir or leader trait appears on him.
I think fixed triggers should look like this:
;------------------------------------------
Trigger factionleader
WhenToTest BecomesFactionLeader
Affects Factionleader 2 Chance 100
;------------------------------------------
Trigger factionleader_pope
WhenToTest BecomesFactionLeader
Condition FactionType papal_states
Affects IAmPope 1 Chance 100
;------------------------------------------
Trigger reinherited
WhenToTest BecomesFactionHeir
Condition Trait Exheir = 1
Affects Factionheir 1 Chance 100
;------------------------------------------
Trigger disinherited
WhenToTest CeasedFactionHeir
Condition not Trait Exheir = 1
and not IsFactionLeader
Affects Exheir 2 Chance 100
;------------------------------------------
Trigger becomesheir
WhenToTest BecomesFactionHeir
Affects Factionheir 1 Chance 100
Note that I removed the "inherited" trigger, as it was granting an Exheir point to a newly crowned faction leader, but was not doing its job: it was supposed to remove the Factionheir point he'd have, but instead I think the Factionleader point was cancelling that and he'd just have Exheir. So instead of doing it that way, I now just give him 2 Factionleader points when he becomes leader, so one will kill his Factionheir point, and the other grants him the Factionleader bonuses.
I didn't touch the reinherited trigger that I previously speculated might be wrong too... because it isn't. I noticed that it gives a point if he's an ex-heir, but then another point is always given (ex-heir or not) in the becomesheir trigger, so the result should be correct.
Goofball
02-10-2007, 00:35
Well, I just had a look at one of my saved games. Sure enough, King Henry the Chivalrous of England has no traits related to being the heir or the faction leader, and does have the Exheir trait. All his authority (4 points) is from non-related traits that he has, too, which means the Factionleader trait is not being hidden: he simply does not have it. So that confirms that the heir triggers do not work as intended, and seems to point to #1 (from previous post) as the method since no heir or leader trait appears on him.
I think fixed triggers should look like this:
;------------------------------------------
Trigger factionleader
WhenToTest BecomesFactionLeader
Affects Factionleader 2 Chance 100
;------------------------------------------
Trigger factionleader_pope
WhenToTest BecomesFactionLeader
Condition FactionType papal_states
Affects IAmPope 1 Chance 100
;------------------------------------------
Trigger reinherited
WhenToTest BecomesFactionHeir
Condition Trait Exheir = 1
Affects Factionheir 1 Chance 100
;------------------------------------------
Trigger disinherited
WhenToTest CeasedFactionHeir
Condition not Trait Exheir = 1
and not IsFactionLeader
Affects Exheir 2 Chance 100
;------------------------------------------
Trigger becomesheir
WhenToTest BecomesFactionHeir
Affects Factionheir 1 Chance 100
Note that I removed the "inherited" trigger, as it was granting an Exheir point to a newly crowned faction leader, but was not doing its job: it was supposed to remove the Factionheir point he'd have, but instead I think the Factionleader point was cancelling that and he'd just have Exheir. So instead of doing it that way, I now just give him 2 Factionleader points when he becomes leader, so one will kill his Factionheir point, and the other grants him the Factionleader bonuses.
I didn't touch the reinherited trigger that I previously speculated might be wrong too... because it isn't. I noticed that it gives a point if he's an ex-heir, but then another point is always given (ex-heir or not) in the becomesheir trigger, so the result should be correct.
Hmmm. Interesting. Have you play tested this at all?
Another thing I'm wondering (I'm not at home right now or I'd test it myself): Is it possible to use the "give_trait: this" cheat in the MedeivalShell to give the "factionheir" trait? This might allow players a roundabout way to correct the half-assed way in which the game designates heirs and at least keep some form of dynastic continuity going.
Hmmm. Interesting. Have you play tested this at all?
Another thing I'm wondering (I'm not at home right now or I'd test it myself): Is it possible to use the "give_trait: this" cheat in the MedeivalShell to give the "factionheir" trait? This might allow players a roundabout way to correct the half-assed way in which the game designates heirs and at least keep some form of dynastic continuity going.
I just playtested it, so yes. With the changes, my new leader popped out having the Factionleader trait, and not having Exheir. Success!
As for using the shell to fix succession... yes, and no. No because you can't make the game recognize that a man IS your king or heir. Yes, because you can certainly keep track of your king and heir yourself, and give the correct man the trait, which will give him kingly or heirly attributes, but the game still won't call him the king/heir, it'll say the king and heir are whoever it wants to. This is because the traits don't actually control who is the king or heir, they only give the stat boosts associated with the posts.
However if you have kings you wish to fix after changing the triggers, you need 2 lines in the shell. Select your faction leader and then do this:
give_trait this Exheir 0
give_trait this Factionleader 1
That should get him back to what he's supposed to be.
I'm just going to do a Little summary here Foz to help clarify the triggers more cl;early for those who don't understand the data too well, no offense to your current summary intended, it's just a touch confusing until you read the triggers properly, (or was for me anyway).
Effects pone becoming Faction leader:
1. Grants Faction Leader trait and IAmPope trait if leader is head of the Papal_States
2. Upon ceasing to be the FactionHeir but becoming the FactionLeader he gains a point of ExHeir meaning he now loses his FactionHeir status. The Anti-Trait listing also causes it to make him lose FactionLeader.
Effects upon Becoming Faction Heir:
1. If the individual has the ExHeir Trait, it grants the Faction Heir Trait
2. If the individual does not have the ExHeir trait they gain the FactionHeir Trait twice, once to nullify FactionHeir, and another to actually grant the ExHeir trait.
Affects upon ceasing to be FactionHeir:
1. they gain a point of ExHeir trait.
I can't see a code problem Foz with the triggers, the issue is that factionLeader is listed as an anti-trait for Exheir when it is FactionHeir that should be, thats the only issue here.
Faction Leader and Faction Heir traits seem to be working fine, it's the ability of ExHeir to cancel FactionLeader thats the problem.
That a good roundup Foz..
Are you using mods? One of the VnV fixes messes up the exheir/heir traits, but it slips my mind right now which one it was.
Effects pone becoming Faction leader:
1. Grants Faction Leader trait and IAmPope trait if leader is head of the Papal_States
2. Upon ceasing to be the FactionHeir but becoming the FactionLeader he gains a point of ExHeir meaning he now loses his FactionHeir status. The Anti-Trait listing also causes it to make him lose FactionLeader.
1. Yes
2. Not quite. ExHeir is not an anti-trait of FactionLeader. I speculate that the 1 point of FactionLeader cancels (via anti-trait) the 1 FactionHeir point he has, and then ExHeir has nothing to cancel. He's left with only ExHeir.
Effects upon Becoming Faction Heir:
1. If the individual has the ExHeir Trait, it grants the Faction Heir Trait
2. If the individual does not have the ExHeir trait they gain the FactionHeir Trait twice, once to nullify FactionHeir, and another to actually grant the ExHeir trait.
1. Yes. That means they cancel each other.
2. What you put is very confusing. The individual will get 2 points of FactionHeir in total if he DOES have ExHeir to begin with - 1 to cancel ExHeir, and one to actually grant FactionHeir. The 1 FactionHeir point in the last trigger always fires and therefore always grants FactionHeir for real, where the earlier one's only purpose is to remove ExHeir if it exists.
Affects upon ceasing to be FactionHeir:
1. they gain a point of ExHeir trait.
Generally, no. They gain TWO points of ExHeir if they didn't leave heir status to become leader. Similarly to above, the first is strictly to cancel FactionHeir, while the second actually gives ExHeir. If he DID leave heir to be leader, then vanilla triggers give him 1 ExHeir point only (presumably) to cancel the FactionHeir point.
I can't see a code problem Foz with the triggers, the issue is that factionLeader is listed as an anti-trait for Exheir when it is FactionHeir that should be, thats the only issue here.
Faction Leader and Faction Heir traits seem to be working fine, it's the ability of ExHeir to cancel FactionLeader thats the problem.
I don't think you correctly understood what you read... ExHeir doesn't cancel FactionLeader, it's not its anti-trait. I think the problem is a logic or timing problem, not anything per se wrong with the code. That is, the mechanics work correctly as implemented, but do not do what was intended. My leaders keep having no FactionLeader trait but do have the ExHeir trait, and I think the only way it can happen is if the FactionLeader point given when he promotes cancels its anti-trait, the FactionHeir point. Then the ExHeir point setup by the "inherited" trigger can't cancel FactionHeir like it's supposed to, so it just sits there, and the guy is gypped out of his rightful FactionHeir point too.
I hope that helps Carl - if not, I can try to be clearer, but honestly it's ridiculous with the names and such being so similar.
Are you using mods? One of the VnV fixes messes up the exheir/heir traits, but it slips my mind right now which one it was.
The code I quoted is the vanilla code, and is identical to what I was running in my file. The difference, though, seems to be that I'm running the anti-trait workaround.
I just ran the vanilla game (yeah I know... it's been ages since I used the vanilla game icon, lol) for a while to see what would happen, and the problem didn't show up (at least on Rufus who was first to inherit the throne of England). I think the anti-trait workaround changes the timings here due to using the traits file instead of hardcode. What probably happens is that the FactionLeader, FactionHeir, and ExHeir points are probably on the guy at the same time before any anti-trait triggers can fire. Then when they do, I'm betting the first set encountered is FactionLeader cancels FactionHeir. In fact I know that's what my workaround does, because those would've been encountered earlier in the trait definitions, and therefore the anti-trait simulating triggers are generated earlier.
Even so, it'd be nice to have some people running unmodified games confirm that their faction heirs are correctly receiving FactionHeir and not ExHeir - I want to be sure I've correctly narrowed down the cause of this problem.
Thanks for the heads up hrvojej, it was helpful.
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.