• 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.
If, instead, we had the religion-level flag(s) (and the respective trigger) analogous to the existing feminist = yes/no and female_temple_holders = yes/no flags (and triggers), this would be a lot easier to extend.

Relating to religion-level flags, something I was talking about a while back for compatibility was adding culture & religion flags that could be set and checked.

For example right now we have this for the "hold a blot" decision :
Code:
potential = {
   has_dlc = "The Old Gods"
   is_playable = yes
   age = 16
   prisoner = no
   OR = {
    religion = norse_pagan
    religion = norse_pagan_reformed
   }
   NOT = { has_character_modifier = held_blot_timer }
   NOT = { has_character_flag = holding_blot }
  }

with a religion flag, the OR block could be replaced with "has_religion_flag = Can_Hold_Blot", then any mods that added new religions that should be able to access the decision could just have the respective flag set. I've not looked into it too far, but when I was adding a few religions for my Mod, I did end up changing a couple of events; I'd expect there's more that I either missed/didn't think of. (And adding it to Cultures seems like a logical step)[/QUOTE][/QUOTE]
 
Relating to religion-level flags, something I was talking about a while back for compatibility was adding culture & religion flags that could be set and checked.

For example right now we have this for the "hold a blot" decision :
Code:
potential = {
   has_dlc = "The Old Gods"
   is_playable = yes
   age = 16
   prisoner = no
   OR = {
    religion = norse_pagan
    religion = norse_pagan_reformed
   }
   NOT = { has_character_modifier = held_blot_timer }
   NOT = { has_character_flag = holding_blot }
  }

with a religion flag, the OR block could be replaced with "has_religion_flag = Can_Hold_Blot", then any mods that added new religions that should be able to access the decision could just have the respective flag set. I've not looked into it too far, but when I was adding a few religions for my Mod, I did end up changing a couple of events; I'd expect there's more that I either missed/didn't think of. (And adding it to Cultures seems like a logical step)
Very much this. Frankly, every time I see the game checking hardcoded lists like that, I shudder as I have flashbacks to the "Never Ever Do This" examples of my software architecture/engineering classes...
 
Unlikely to be done purely as maintaining that from our end would be a right pain and whenever we show things in the UI having something say "can hold a blot" instead of "is norse or reformed norse" is bad and uninformative.

It is not that hard to win-merge or beyond compare your mod to the vanilla patches.

Sure it is still a bit hard on mod-mod compatibility but on that front this is the least of people's problems :oops:
 
Unlikely to be done purely as maintaining that from our end would be a right pain and whenever we show things in the UI having something say "can hold a blot" instead of "is norse or reformed norse" is bad and uninformative.

It is not that hard to win-merge or beyond compare your mod to the vanilla patches.

Sure it is still a bit hard on mod-mod compatibility but on that front this is the least of people's problems :oops:
Yeah, I understand that something like "Can hold a blot" way too much of a corner case.
But any comment on my post on the previous page? Those things are much more in line with existing functionality, and the current scripted implementation is an ugly hack at best.
 
Yeah, I understand that something like "Can hold a blot" way too much of a corner case.
But any comment on my post on the previous page? Those things are much more in line with existing functionality, and the current scripted implementation is an ugly hack at best.

Currently, the Cathar/Messalian "Women may hold all councillor positions" is hardcoded into the respective scripted triggers, which is horrible for extensibility. Any mod wishing to add/remove from that that list, or to add that function to a custom religion, will need to overwrite the entire 00_scripted_triggers.txt, which is obviously beyond terrible for compatibility.
If, instead, we had the religion-level flag(s) (and the respective trigger) analogous to the existing feminist = yes/noand female_temple_holders = yes/no flags (and triggers), this would be a lot easier to extend.

Likewise, the true cognatic succession law is hardcoded to check for Basque/Zhangzhung/Sumpa culture or Cathar/Messalian/Mazdaki religion, requiring overwriting of succession_laws.txt to extend it, which is obviously anything but ideal. Also likewise, having religion/culture level flags and triggers instead would be a major improvement.
By pure definition these things are not hardcoded. They are in the script so you can override them, yes that means you have to override the entire file as we do not have key name based overrides for most things.

Adding a toggle for this into the code makes no real sense to me, why move something into the code when it has no code interactions but just goes on in the script?

Sure you will need to do com-patches with other mods, but that is better than moving functionality and checks into the code when they can easily be done in the script itself in my view at least.
 
By pure definition these things are not hardcoded. They are in the script so you can override them, yes that means you have to override the entire file as we do not have key name based overrides for most things.

Adding a toggle for this into the code makes no real sense to me, why move something into the code when it has no code interactions but just goes on in the script?

Sure you will need to do com-patches with other mods, but that is better than moving functionality and checks into the code when they can easily be done in the script itself in my view at least.
I meant "hardcoded" as in "the script compares the religion scope to a fixed value" instead of some dynamic trigger.

And well, I just feel it would be a lot cleaner, for example, if we replaced the religion checks in can_be_marshal_trigger with a simple religion_allows_female_marshal = yes, to just do
Code:
my_custom_religion_group = {
my_custom_religion = {
    [...]
    allows_female_marshal = yes
    [...]
}
}
which would be compatible with pretty much anything ever, rather than mess with a vanilla file that might also be overridden by who-knows-how-many other mods, which is an annoyance to both the author as well as any potential user.

It would also allow me to check for this property (in an event, for example) in a way that is forward-compatible with any future or mod-added religions without even needing to know about their existence. If this flag could be set from a script, we could even easily make it a potential change in reforming or otherwise dynamically altering your religion.

But, well, if you feel that adding this feature would not be worthwhile, then I suppose there's not much I can do about that  ̄\_(ツ)_/ ̄
 
I meant "hardcoded" as in "the script compares the religion scope to a fixed value" instead of some dynamic trigger.

And well, I just feel it would be a lot cleaner, for example, if we replaced the religion checks in can_be_marshal_trigger with a simple religion_allows_female_marshal = yes, to just do
Code:
my_custom_religion_group = {
my_custom_religion = {
    [...]
    allows_female_marshal = yes
    [...]
}
}
which would be compatible with pretty much anything ever, rather than mess with a vanilla file that might also be overridden by who-knows-how-many other mods, which is an annoyance to both the author as well as any potential user.

It would also allow me to check for this property (in an event, for example) in a way that is forward-compatible with any future or mod-added religions without even needing to know about their existence. If this flag could be set from a script, we could even easily make it a potential change in reforming or otherwise dynamically altering your religion.

But, well, if you feel that adding this feature would not be worthwhile, then I suppose there's not much I can do about that  ̄\_(ツ)_/ ̄
Would also have to have us handle any modded in council positions and minor titles that can be voter titles. So not just a quick thing, but also not something I think would have that large a pay off either.
 
Would also have to have us handle any modded in council positions and minor titles that can be voter titles. So not just a quick thing, but also not something I think would have that large a pay off either.
Hum, admittedly I didn't really consider minor positions, I was only considering the "big five" (chancellor/marshal/treasurer/spymaster/spiritual), as they have the most direct influence on gameplay.
 
Can you apply generic flags to religions in general at the moment? Maybe also let modders define if a given flag also includes a tooltip in the religious description that gets added to the feature list? If not, then those could be something that isn't standard to the actual game, but could be used by modders as a framework to keep things compatible with one another. If all modders of a specific group agree to use flags like 'allows_cognatic_succession' or 'allows-female_marshal', that could dramatically simplify compatibility. This would be doubly useful if there's a sub-mod framework that includes all of these things like flag defines and localisations so nothing gets double loaded.
 
Would also have to have us handle any modded in council positions and minor titles that can be voter titles. So not just a quick thing, but also not something I think would have that large a pay off either.
Hum, admittedly I didn't really consider minor positions, I was only considering the "big five" (chancellor/marshal/treasurer/spymaster/spiritual), as they have the most direct influence on gameplay.
Though this discussion of council positions does remind me of a much more pressing issue, we don't have the ability to check if a character is feminist through a simple boolean check such as feminist = yes in triggers, something like is_allowed_to_loot = yes or pacifist = yes that returns true if they have the feminist flag through religion, culture or law would be amazing
 
Can you apply generic flags to religions in general at the moment? Maybe also let modders define if a given flag also includes a tooltip in the religious description that gets added to the feature list? If not, then those could be something that isn't standard to the actual game, but could be used by modders as a framework to keep things compatible with one another. If all modders of a specific group agree to use flags like 'allows_cognatic_succession' or 'allows-female_marshal', that could dramatically simplify compatibility. This would be doubly useful if there's a sub-mod framework that includes all of these things like flag defines and localisations so nothing gets double loaded.
As far as I know, you cannot apply flags to religions, only "authority" modifiers.
I suppose your suggestion could also work with a agreed-upon set of no-effect infinite-duration religion modifiers, but I'm not sure the merge behaviour of religion modifiers is known.

Edit: I just checked, and there does not seem to be a way to test if a religion has a given modifier. Bummer.
 
Last edited:
As far as I know, you cannot apply flags to religions, only "authority" modifiers.
I suppose your suggestion could also work with a agreed-upon set of no-effect infinite-duration religion modifiers, but I'm not sure the merge behaviour of religion modifiers is known.

Edit: I just checked, and there does not seem to be a way to test if a religion has a given modifier. Bummer.
Then that would work better as an improved moddability suggestion:

Allow religions to have and be tested for custom flags. These flags have optional localisation that's added to the religious description effect list.
 
Then that would work better as an improved moddability suggestion:

Allow religions to have and be tested for custom flags. These flags have optional localisation that's added to the religious description effect list.
I agree. This will require some coordination, but is a workable alternative. It would also open the door for a lot of other modding opportunities beyond the use cases I described.
The icing on the cake would be to have the same thing for cultures also, as currently we have very limited tools to dynamically script cultures.
 
Speaking od this, I womder how the modding scenw would have been if the game had encou
Then that would work better as an improved moddability suggestion:

Allow religions to have and be tested for custom flags. These flags have optional localisation that's added to the religious description effect list.

Variables would be better, since variable names can already be localised, I'd say.
 
For units/special units, being able to set a morale damage separate to their actual damage would be helpful.

Also, I want to make a religion have holy sites that are offmap. At the moment I've made some landless baronies holy sites of the religion however they only get 5% MA because they're unsettled (and there's sometimes a CTD when hovering over the 'this holy site is controlled by a member of the x faith' flag in the religion screen). A way to override the unsettled bonus for a barony or make a barony count as settled would be nice. Not sure how much work that'd be, though.
 
Could we get a "final_levy_size" modifier for use with Provinces? A Modifier which would be applied after every other modifier (Holding Type, Modifiers on Holding, Martial Skill, Capital, Other Modifiers, and free Slots)?

Code:
My_Province_Modifier = {
    final_levy_size = -0.50
}

So if a Holding's Buildings, Owner Martial, and Modifiers results in 500 Light Infantry, this Modifier could be applied to the Province that Holding belonged to, and reduce the total by 50% down to 250.

Edit :
As a practical example : My Mod adds about 80 Provinces to the Empire of Britannia. So far I've used a mixture of updating holding-modifiers and replacement Buildings to reduce the number of troops they provide. Being able to just specify a given Province as only having '20%' of the Troops it should normally produce would be a lot more efficient, however.

In fact, a final_tax_income version could also be useful, having the same effect except on the Tax after everything else is applied.
 
Could we get a "final_levy_size" modifier for use with Provinces? A Modifier which would be applied after every other modifier (Holding Type, Modifiers on Holding, Martial Skill, Capital, Other Modifiers, and free Slots)?

Code:
My_Province_Modifier = {
    final_levy_size = -0.50
}

So if a Holding's Buildings, Owner Martial, and Modifiers results in 500 Light Infantry, this Modifier could be applied to the Province that Holding belonged to, and reduce the total by 50% down to 250.

Edit :
As a practical example : My Mod adds about 80 Provinces to the Empire of Britannia. So far I've used a mixture of updating holding-modifiers and replacement Buildings to reduce the number of troops they provide. Being able to just specify a given Province as only having '20%' of the Troops it should normally produce would be a lot more efficient, however.

In fact, a final_tax_income version could also be useful, having the same effect except on the Tax after everything else is applied.

So like the multaplicative modifiers from autonomy in EUIV? That’d be quite useful.
 
The local_build_cost_modifier and local_build_time_modifier modifiers don't work within buildings, but it would be quite useful if they did (as then we could replicate e.g. things like the carpenters' guild as a building).
 
The local_build_cost_modifier and local_build_time_modifier modifiers don't work within buildings, but it would be quite useful if they did (as then we could replicate e.g. things like the carpenters' guild as a building).
A lot of stuff doesn't work in buildings currently, and I really wish more modifiers would be enabled there - building modding has a lot of spare potential.
The ones you named are particular useful examples, so I strongly support this.
 
Sorry for yet another suggestion so quickly, and maybe one that'll be too much trouble/too little return...

I was thinking about 'special' characters who use static images (at least I've used a few); maybe there's a better method, but I've been using alternate cultures for them. But what if we could have a 'set_occluded' command? It could take a yes/no state for add/remove, and a GFX name for the image to be applied?

Code:
some_character_scope = {
   set_occluded = { state = yes value = "GFX_My_Occlusion_GFX" }
}