• 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.
So I have a bug in my mod, the added Casus Belli ends instantly with the reason that the CB is no longer valid, what causes it?

Check the is_valid and is_valid_title blocks of your cb code.
 
I had identified that the problem is in the block, but couldn't find the concrete problem. As work around I simply left the block empty. It isn't a war for land so it should work well enough.
For testing purposes, you could just put
Code:
always = yes
inside both blocks or whichever one you know is giving you trouble.
 
Hello there, I was looking for a way to allow feudal realms to grant king-level titles (and maybe more than one duchy) to bishops and mayors. I have seen a line called

can_be_granted_kingdoms_and_empires_by_other_government = no

in the theocracy_governments.txt file, but setting it to yes bugs the game and doesn't seem to change anything. Have I to comment it out? Does it even work?

(sorry, I opened an independent thread before seeing this one).
 
Quic question: is there an easy way to compare the stats of two characters, in knowing which are better? I know there is the the attribute_diff condition, but they have not in account which character is better.

The normal way to check:

AND = {
martial = 10
FROM = {
NOT = {
learning = 10
}
}
}

But in this case, I also have to check "12 ... NOT 12" ... "20 ... NOT 20" and so on. Perhaps someone knows a workaround.
 
Quic question: is there an easy way to compare the stats of two characters, in knowing which are better? I know there is the the attribute_diff condition, but they have not in account which character is better.

The normal way to check:

AND = {
martial = 10
FROM = {
NOT = {
learning = 10
}
}
}

But in this case, I also have to check "12 ... NOT 12" ... "20 ... NOT 20" and so on. Perhaps someone knows a workaround.

You can export the attributes into variables and then do all the arithmetic you want in that - the only downside being that you'll have to have some sort of event to calculate the variables first.
 
For a mod I am working on, we have a few questions. First, how do we deal with adding a new religion? We do not need a pope, but does the papacy title need to have an actual character to tie events and such to, or is having just the title fine? Second, how do we remove certain non epidemic diseases? Not all of them need to be removed, but some definitely do. In our world they have cured common things like that, and we want to represent that. But preferably not just setting our game rule to none for them each and every time we load the mod up.
 
How do I modify global marriage conditions in this game? That is, when you ask someone to arrange a marriage, they will say yes or no depending on some conditions, and I wish to edit these.
 
For a mod I am working on, we have a few questions. First, how do we deal with adding a new religion? We do not need a pope, but does the papacy title need to have an actual character to tie events and such to, or is having just the title fine? Second, how do we remove certain non epidemic diseases? Not all of them need to be removed, but some definitely do. In our world they have cured common things like that, and we want to represent that. But preferably not just setting our game rule to none for them each and every time we load the mod up.

I can't answer the second, but when it comes to creating a religion you don't need a rel head unless you want there to be one. Looking at http://www.ckiiwiki.com/Religion_modding and the exiting religions should help you get started, but if there are specific questions someone here can probably help you.

However, when it comes to the Pope himself, he gets some events and removing k_papal_state will create issues if you want to keep those events working. However, as it has "landless = yes" a new holder will be generated if it lacks a holder (unless the title is deactivated), so there should never be no Pope.

How do I modify global marriage conditions in this game? That is, when you ask someone to arrange a marriage, they will say yes or no depending on some conditions, and I wish to edit these.

Unless it is something that is moddable in the defines (such as the importance of prestige), you'd have to disable the regular marriage system and script your own if you want to do that, which can be done but will require a lot of work as you'd have to recreate the marriage logic from scratch and try to make the AI use the new system sensibly without causing severe performance issues.
 
@Silversweeeper - is deactivating the papal states title going to cause problems? I have "active = no" at 500, and my mod starts at 2350ish. If it does, then what do I do to make sure it doesn't show in game?
 
Just search for all instances of k_papal_states (or whatever the name is in the code) in the events and decisions (think only events though) and replace all the relevant ones (i.e. the ones that aren't obviously supposed to be Pope-related) with some other title that you know is always going to exist.
 
@Silversweeeper - is deactivating the papal states title going to cause problems? I have "active = no" at 500, and my mod starts at 2350ish. If it does, then what do I do to make sure it doesn't show in game?

Almost certainly, though it is very hard to tell how bad it will be. The base game operates under the assumption that the Pope always exists for a number of checks (either checking for "has_landed_title = k_papal_state" or "religion = catholic" and "controls_religion = yes"), so all of those events can never fire because the Pope isn't around unless you change them, but if you start the mod in 2350 you will already be well past the date for e.g. the Viking Age event and thus won't notice some of the potential issues.
 
Ok. If I remove the papal state entirely from my files, as well as events (once I add them in), and add an empire tier title which will hardly never be created, and put that empire in the places where the papal states are referenced in events, will that work for the mod? I just do not want ctds. And sorry for the run-on sentence :)
 
Ok. If I remove the papal state entirely from my files, as well as events (once I add them in), and add an empire tier title which will hardly never be created, and put that empire in the places where the papal states are referenced in events, will that work for the mod? I just do not want ctds. And sorry for the run-on sentence :)

That should work for when the empire exists. However, you may want to consider keeping the pope around just to make sure those events will ALWAYS work. If you remove or comment out the capital =... line for k_papal_states, then the pope will exist but won't be in any place and I think that will prevent him from interacting with anyone.

In CK2+ there is a deity like character that is (or at least was last time I played) an immortal emperor but doesn't have a location so cannot be interacted with. You could also do something like that.

tl;dr I would strongly considered using a title that has
Code:
landless = yes
so that any events will always occur, not just 99% of the time.
 
Code:
trigger = {
            random_courtier = {
                limit = {
                    NOT = {
                        character = ROOT
                        family = ROOT
                        has_character_modifier = fed_on
                        trait = vampire
                        trait = turned
                        trait = vampirehunter
                    }
                }
            }
        }
Anyone know why this is returning "Invalid node in scope CharTrigger"?
I'm using random courtier elsewhere where it works. Here it is being used as a trigger for an event option. When it works its being used as a scope does that have something to do with it?
 
So I've set RAISED_TROOPS_VASSAL_OPINION_DAYS = 32850 but I'm still getting a -1 every 61 days... Is it broken?
I've also edited MIN_PREP_INV_TARGET_HOLDINGS ;MAX_PREP_INV_TARGET_HOLDINGS = 150 to see if there was a problem with the defines.lua, but these changes are reflected in game, while the raised levies opinion isn't. Any ideas?
 
Is there a way to scope to a society's heir? Alternatively, a way to scope to the character with the highest member score would suffice.

I'm looking through the provided Paradox note files and I see nothing resembling what I need. I want to make an event where the grandmaster rewards the heir for their services, but the only thing I see is grandmaster scopes.
 
I currently have two unresolved problems invloving my 900AD scenario/bookmark:
  1. There is this dude Mozaffar Mozaffrid who appears every time I load this scenario as a Persian ruler in some part of Persia. I would like to be able to give him an emirate but I have been unable to find him or his char id in any of the game files (I have searched in most of the folders, ex. interface is one of the few game folders I have not searched for him). Could someone explain this?
  2. Also in this start date, I would like to change certain provinces' religion from Jewish to tengri: Tana, Sarpa, Don-Portage, and Sharukan. However, whenever I go into the province history files I see only that they start out as Tengri provinces in 769, and later switch over to Sunni. What is it that makes this provinces Jewish? I would like to know so I can make them not Jewish for my start dates and purposes.
In addition, I need some more longterm help with events, if anyone is interested