There are a few defines and that's it.Is papal/cardinal election score hardcoded? I was hoping to alter it
There are a few defines and that's it.Is papal/cardinal election score hardcoded? I was hoping to alter it
I believe MR Patricians are blocked from fighting against their Doge under any circumstances. (Because, if they became independent of the Doge they would spawn a new MR. And/or the original MR's succession would be broken. And/or a new family would be autogenerated for the original MR, so there would be no room for the rebel family once the war was over.)Also, are there any hard-coded restrictions for Merchant Republic Patricians to create a faction?
I believe MR Patricians are blocked from fighting against their Doge under any circumstances. (Because, if they became independent of the Doge they would spawn a new MR. And/or the original MR's succession would be broken. And/or a new family would be autogenerated for the original MR, so there would be no room for the rebel family once the war was over.)
If I'm correct about Patricians being blocked from wars, I wouldn't be surprised if Patricians are hard-blocked from joining factions. (Because you have to be able to fight your liege to enforce your faction demands.)
How does Patrician revolts work? Wouldn't being in revolt means you have a temporary title, and it'll cause problems having a merchant republic government and temporarily separate from your merchant republic?Revolting against your liege doesn't make you independent. Independence means being your own liege and not being in revolt. In addition, the merchant republic government accounts for patricians revolting. I don't see why patricians couldn't in principle join factions and be involved in faction revolt wars.
How does Patrician revolts work? Wouldn't being in revolt means you have a temporary title, and it'll cause problems having a merchant republic government and temporarily separate from your merchant republic?
I thought that might not work, so I was only trying to add a patrician faction that just fires events, no revolt wars. From the code, it looks like you can have factions without triggering revolt wars, the war is triggered by your code. I just wasn't sure if there are hard-blocks in the source code or not, even though the vanilla faction code does have checks for it.
My problem was that I couldn't get it to show up in the list at all, wasn't sure what I was missing. Plots I added in common/objectives shows up no problem, but the faction I added did not. It doesn't need interface stuff or localisation to show up does it?
Interestingly there aren't any hard blocks for Patricians warring against their Doge liege. If you somehow gained a claim on the MR, you're allowed to declare war on the Doge, but it's jank because your game ends immediately, due to the loss of your palace and government change.EDIT: Apparently my belief was incorrect - see next post.
I believe MR Patricians are blocked from fighting against their Doge under any circumstances. (Because, if they became independent of the Doge they would spawn a new MR. And/or the original MR's succession would be broken. And/or a new family would be autogenerated for the original MR, so there would be no room for the rebel family once the war was over.)
If I'm correct about Patricians being blocked from wars, I wouldn't be surprised if Patricians are hard-blocked from joining factions. (Because you have to be able to fight your liege to enforce your faction demands.)
I could test it myself too if I could get the faction to show up.The game tracks a 'liege before war' for revolting rulers, so simply going into revolt doesn't separate a patrician from his merchant republic realm.
Anyway, it looks like I'll have to look into patricians and factions for myself.
When you say "the faction", do you mean "only my modded faction" or "any faction". Because I think non-patrician vassals of a MR should be able to join factions. (Although, obviously, you can only test this directly with count+ tier tribal/feudal characters.)I could test it myself too if I could get the faction to show up.
But looks like the faction doesn't show up even for feudal vassals after I removed the conditions, so something else is missing.
Is there a specific way this needs to be coded for the revolt?The game tracks a 'liege before war' for revolting rulers, so simply going into revolt doesn't separate a patrician from his merchant republic realm.
Anyway, it looks like I'll have to look into patricians and factions for myself.
That was kinda my original point: I don't think Patricians can go to war with their Doge. @Whizzer pointed out that they technically can... but the ways he tried gave an instant game over due to loss of Patrician status.Is there a specific way this needs to be coded for the revolt?
I tried triggering a faction revolt war as a Patrician, basing it on vanilla faction revolt code, and that didn't work as you described. I lose the merchant republic government, and switched government based on what primary holding I had while in revolt. So if I only have the palace, then my game ends becoming unlanded.
relative_power
condition measures?suzerain
and any_suzerain
exist as valid scopes? Is this the source of my issue somehow? Surely a character can only have one suzerain? (I've tried both suzerain
and any_suzerain
, but it doesn't seem to make a difference.)relative_power
is less than 0.8" trigger is still invalid:decisions = {
expd_t_protectorate_independence_normal = {
...
allow = {
...
# Suzerain has fewer troops than you and/or less prestige than you.
# (Because you become the suzerain by having more troops or significantly more prestige.)
any_suzerain = {
relative_power = {
who = ROOT
power < 0.25
}
}
AND = {
any_suzerain = {
relative_power = {
who = ROOT
power < 0.5
}
}
expd_t_this_characters_suzerain_has_less_prestige_than_this_character = yes
}
AND = {
any_suzerain = {
relative_power = {
who = ROOT
power < 0.8
}
}
expd_t_this_characters_suzerain_has_less_than_half_the_prestige_of_this_character = yes
}
I'm aware of the lack of modability of a lot of aspects of MRs, was told by another modder that certain ideas of mine weren't possible, but I did find some workarounds. I was expecting MR revolts to not work though, had the same thought as you, so I wasn't planning on implementing them. It was worth a shot though to test it out. And even if a revolt was possible, based on some posts I found, it would likely be a pain for the player to fight, because Patricians may not have holdings besides the palace and trade posts, and it might be a pain to gain warscore.That was kinda my original point: I don't think Patricians can go to war with their Doge. @Whizzer pointed out that they technically can... but the ways he tried gave an instant game over due to loss of Patrician status.
MRs are a well-known pit of hardcoded jankiness; you need to take this into account if you're modding MRs.
So, before spending too much more time writing your mod, it might be a good idea to do your own testing to figure out if there is any way a Patrician can go to war with his Doge and then rejoin the republic. If you find a way, you need to make sure your mod follows that path. If you don't find a way, you need to build that into your mod too - either give up on the idea of factions, or find some way to ensure that the faction will never fire and use events to effect the changes.
Yes, everything you can't find in decisions is nearly 100% hardcoded. Most of the fun stuff can't be modded in any meaningful way.Another question:
Is restricting certain diplomatic actions such as Resigning from council hard-coded to be global? I can't find it in the decisions folder, in minor_titles I can prevent revokes but I don't see one for retire/resign, and I found parameters for it in Defines but that's global.
1. It's on the wiki.1. Does anyone know what exactly therelative_power
condition measures?
2. Can anyone suggest a good way to measure whether another character has a larger army?
3. (Slight tangent) Is there a reason why bothsuzerain
andany_suzerain
exist as valid scopes? Is this the source of my issue somehow? Surely a character can only have one suzerain? (I've tried bothsuzerain
andany_suzerain
, but it doesn't seem to make a difference.)
Context: I'm trying to put together a decision which allows someone to stop being a tributary if their suzerain is less powerful than they are, and the condition is not valid when it seems like it really should be.
3. It may be possible to have multiple suzerains, although vanilla pretty much ensures it will never happen by always removing all current suzerains before creating a new tributary relationship.
Yes, everything you can't find in decisions is nearly 100% hardcoded. Most of the fun stuff can't be modded in any meaningful way.
I know, that's why I started using1. It's on the wiki.
relative_power
;-)FYI, based on some further experimentation,However, as it isn't the intended behavior it could be buggy in different ways depending on what happens under the hood, it's unclear how the suzerain scope is determined (last suzerain? first suzerain? highest charid? lowest charid?), and vanilla does -- as mentioned -- remove all suzerains when a new tributary relationship is set up (which presumably would need to be changed), so I would recommend further testing to ensure that it actually works as desired (and, if anyone does said testing, I'd be interested in hearing about the result).
any_suzerain
works for effects but not for triggers. (Switching triggers from any_suzerain = { whatever }
to suzerain = { whatever }
changes them from completely nonfunctional to working properly.)