• 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.
Showing developer posts only. Show all posts in this thread.
51% makes more sense, otherwise you can get 4-county duchies have constant back-and-forth usurptions.
To be honest, I don't think I've ever actually witnessed such a back-and forth except in 2-county duchies, and in SWMH all of those require you to hold both provinces in order to create the duchy.
 
I thought the percentage for creation and usurpation were different?

If not, THAT would be the better fix. 50% to Create, 60% to Usurp.
They are actually separate, yeah (though the first implementation wasn't IIRC).
But I kind of want to avoid the situation where the duke holds one county, another guy holds two, and the 4th is held by some random guy. The second can't usurp at 510% in that case, which is silly.
And it is definitely something I've seen more often than a 4-province duchy split 2-2.
 
What about zijistark's idea? Do you think it would work, that is if someone was willing to do it?
It is doable, but I would consider 50% better than that solution, as I try to keep changes to landed_titles to a minimum, as that makes it quite a bit simpler to maintain compatibility with CKII's patches.
 
Could you give me an example of what it would look like in a landed_title and I'll see if I can experiment with it myself?
I'm sadly blanking right now. If it were something I actually wanted to implement I could probably come up with the code for it, but right now I'm getting no divine inspiration.
 
FWIW:

My solution was to write a script which added a generic usurp trigger to every duchy with exactly 4 counties to implement what you described (which actually I may need to clarify if I'm to provide the correct trigger, but either way, it would be based upon the same nifty title trigger implemented in one of the patches). Duchies with exactly 2 counties should be under a dozen on the vanilla map, and 51% works for them. In other words, they're just given a trigger that says "has_landed_title = county1 has_landed_title = county2" (51% = 100% for 2 counties). Don't even have to use the nifty title trigger (as in, a script condition) for that case. Duchies with 6 counties can f**k off, 50% rule is fine for them; they're huge. Even so, the nifty title trigger would only require changing a single constant.

The script would also strip the landed_titles files of such triggers if asked to do so (leaves a comment to mark which triggers were its own and which were other custom-modded triggers), easing WinMerge with vanilla post-patch.

It would also parse the landed_titles structure in the Right Way, instead of the really-quick-job way that would be possible for this application. Indeed, the only reason I ever mentioned that I thought it was doable was because I saw a glimmer of a component to be used for automated SWMH title & title history verification that I'd meant to contribute to that team a long time ago after finding a number of bugs of a similar type.

Tee hee... Still not giving away the nifty trigger...

Odds of somebody successfully identifying the trigger condition I'm talking about in the next 20 minutes, anyone?
num_of_realm_counties = {
value = 2
title = THIS (or possibly the name)
}

(Competition brings out the inspiration in me)

Edit since you probably want the full code:
Code:
NOT = {
    holder_scope = {
        num_of_realm_counties = {
            value = 2
            title = PREV
        }
    }
}
 
Last edited:
I took way too long to post the full solution. Hehe. Didn't even notice your post. You took more than 20 minutes, but I'll give you the prize, because you provided a usage example, and I only asked for the name of the trigger to use.

EDIT:

Your full code was a little bit... out of context, FWIW. A title allow trigger is in character scope with FROM being the title scope, so calling holder_scope = { ... } as you did would not happen in an actual allow trigger. However, at least you demonstrated the arguments.

OK, quiz time's over boys and girls. Meneth, you get a free candy bar. Tune in next time for other ways to waste your time, but fun!
If you're to point our errors in my code, I'm gonna point out some in yours ;)
"num_of_realm_counties = { value = 2 title = FROM }" is completely unnecessary. The 50% requirement already covers that.
And FROM = { holder_scope = { } } is a lot more efficient than any_playable_ruler = { }.
 
Aww, I was just being comical. Obviously you were not intending for your code to be fully correct or even mostly correct in the details beyond using num_of_realm_counties. That's all I needed to see anyway.

However, if YOU'RE going to come back at my flawless, I assert (is there still room for comedy?), trigger, then... well, I guess then I'll defend it.

You're correct about the first num_of_realm_counties being unnecessary in this case due to targeting 50% as the baseline. It seemed incomplete for edification purposes to leave it out of the logic, though, since it relies on a define and hidden hardcoded conditions to supplement it if so (i.e., ain't true on its own).

Then you had to go besmirch yourself by saying this:

Yes and no.

Yes, in the sense that scoping to the title, which may or may not be held, and then its possibly undefined holder_scope, and then executing some trigger within that interesting scope is a lot more efficient than any_playable_ruler = { <the same or an effectively equal cost inner trigger> }. Like, in the sense that it would run faster if you benchmarked it. Efficiency toward what end, I don't know. Your code fragment did not solve the problem that my code fragment did, nor did it solve the basic problem, so I guess efficiency is subjective. ;)

Once there was a program named Apples and a different program named Bananas. Apples actually didn't accomplish its intended goal and miscalculated most of the time, but its benchmarks were excellent. Bananas, on the other hand, had very poor benchmarks. However, not only did it always calculate the right answer, but it actually answered an entirely different and much more sophisticated question. [ I implemented the "he who is the most powerful within the title and holds the minimum for creation/usurpation" rule that was suggested at one point, as I also mentioned. ]

In the end, the inane competition between the too-fast-to-be-right Apples and the correct-but-too-overloaded-to-compete Bananas led to Apples finally going bananas and Bananas just going nuts:

Obviously, if efficiency were the concern and 4-county was the optimization target (but with the goal of still being valid in the other cases and not hard-coded), the best trigger would have directly checked the direct de jure vassals of FROM twice, nested, to flexibly isolate the case where two different characters that aren't ROOT held counties in the duchy vs. whether only one character held the direct de jure vassal titles not owned by ROOT. That should just barely work for a 6-county case. For an 8-county title, then you'd need to hardcode title references or use any_playable_ruler again to solve the Bananas question. That is a way more confusing trigger for someone not versed in these dark arts to grok, though.
In practice though, the only guy you're at all likely to be competing with for usurpation is holder_scope. Thus that works just fine.
If it has no holder, it should always return false, thus letting the guy with 50% create the title anyway.

Two people who neither hold the title both having 50% of its dejure area is such an unlikely situation that I truly do not see the point in bothering to account for it.
 
Critical point. You are not only enabled but encouraged to do so whenever you damn well feel like it. Your playtesting of variations on the rules which govern the mod may lead to potential, informed feedback that you can more readily backup and critique the mod. Informed criticism gets you free toys and a tub of your favorite ice cream (or even qualifying non-dairy frozen dessert products!) around these parts. It helps make the mod better. Just because Meneth has been authoring a mod called Project Balance for so long doesn't ever mean he's automatically right about these matters, and I can attest that he knows that full well. ;)

The 50% issue is largely one of personal opinion it seems. Since a clear consensus around a reasonable argument for changing it away from 50% can't seem to be built, it's just simply not going to be changed by default, but if a consensus arrives and it's convincing, the define would be changed immediately.
Shh... you can't let the commoners know I'm fallible!