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.
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
I've not been a modder for long but I sometimes hear of the "requesting thread". I've been searching it in this jungle of thread, 2 hours at the very least.
Does it exist ? Do we have a way to ask developpers for hardcoded things ?
I tried with cost of 9999 for castles, and 10 for cities, but still no change. I guess I will just do it manually in the building list, though it's likelier to have a few miscalculation or typo here and there.
I tried with cost of 9999 for castles, and 10 for cities, but still no change. I guess I will just do it manually in the building list, though it's likelier to have a few miscalculation or typo here and there.
The file you want is <main CK2 folder>\events\job_chancellor.txt
The successful fabricated claims event is down at event 913. This is the bit you want to change to make it faster. The months = 360 talks about the average time, the modifier = {}... bits are saying that if the chancellor has good diplomacy you should lower that and rasie it if its bad. The two tricks are that each modifier gets used multiplicativly, so 12 diplomacy results in a modifer of (0.75)^3, and that diplomacy = 12 means 12 or higher.
The game will occasionally check if the chancellor creates a claim. If it checks every month then the event will have a 1/24 ~ 4% chance of happening each time. Resulting in a mean time to happen of 24 months. Of course thats assuming none of the "modifiers" to that mean time to happen occur.
So it could happen in a few weeks (unlikely) or it could take a generation (also very unlikely), but the average would be 2 years.
When altering costs related to some decisions (increase, say, piety cost for imprisonning, or, even, alter prestige/piety/MA effects of the several outcomes of a war), will AI be automaticaly aware of it? Will it also takes in account new effects (just as a prestige cost for imprisonning)? Or does it needs some more modding so that it weights accordingly the changes? I have noticed a weight for AI likelihood to accept a victory or a deafeat, though I don't understand much how these works (only the -1 is obvious to me).
When altering costs related to some decisions (increase, say, piety cost for imprisonning, or, even, alter prestige/piety/MA effects of the several outcomes of a war), will AI be automaticaly aware of it? Will it also takes in account new effects (just as a prestige cost for imprisonning)? Or does it needs some more modding so that it weights accordingly the changes? I have noticed a weight for AI likelihood to accept a victory or a deafeat, though I don't understand much how these works (only the -1 is obvious to me).
For decisions, you'll have to mod the weights to make the AI use them properly. If it has a weigh that isn't 0, and the AI is eligible to take the decision, it will always take the decision.
I've got a new map and completed the definition.csv file, and have created a "province names" localisation file. My problem is that all my provinces (the only things in my new override) only display one of the words from the name, leaving me with many areas named simply "sea" or "northern" etc. I currently have each cell with one word and an "x" in the following cell. What am I doing wrong? I haven't translated yet, and so only have "word,word,word,x" for example, with "," standing for a cell change.
in cb_types, has anyone tried to use "check_de_jure_tier = COUNT"?
I've copied the religious war and changed that line from DUKE to COUNT (and also the names). My new war's name comes up, but I'm still selecting duchies rather than counties.
How do the opinion modifiers that are not explicitly applied by events, like "Too many held duchies" and "Desires X", work?
I'd like to add new negative opinion modifiers to destabilise blobs, like "Not my de jure liege" or "Liege is decadent", but I haven't manage to figure out if there is a proper way to do this. I could of course just make events that give these modifiers, but I think things like "Too many held duchies" appear also on the player characters without any visible events triggering? Or is there a way to make events happen without notification to the player?
How do the opinion modifiers that are not explicitly applied by events, like "Too many held duchies" and "Desires X", work?
I'd like to add new negative opinion modifiers to destabilise blobs, like "Not my de jure liege" or "Liege is decadent", but I haven't manage to figure out if there is a proper way to do this. I could of course just make events that give these modifiers, but I think things like "Too many held duchies" appear also on the player characters without any visible events triggering? Or is there a way to make events happen without notification to the player?
Those ones which aren't applied via events, traits or character modifiers are hard-coded.
Obviously you can change the numbers behind the existing reasons, but I don't think thats what you were looking for. If you wanted to add a new reason, have you considered using a triggered_modifier? The only triggered modifier in the game so far is the bankrupt one for when you have -ve cash, but you could create a new one which gave -ve vassal_opinion. Just keep an eye out for performance implications.
Those ones which aren't applied via events, traits or character modifiers are hard-coded.
Obviously you can change the numbers behind the existing reasons, but I don't think thats what you were looking for. If you wanted to add a new reason, have you considered using a triggered_modifier? The only triggered modifier in the game so far is the bankrupt one for when you have -ve cash, but you could create a new one which gave -ve vassal_opinion. Just keep an eye out for performance implications.
Right, triggered modifiers seem to do about exactly what I want. Thanks!
A couple of further questions:
1. What's the difference between 'potential' and 'trigger' for triggered_modifiers?
2. Can I make a triggered modifier 'invisible', so that it won't show up in the list on the character sheet? The idea here is that if I just want to use it to apply some opinion modifiers, those modifiers will anyway be visible in the opinion tooltip. (I suppose the answer is 'no', and it doesn't really matter that much, but I'll ask anyway.)
Does anyone here now how to mod the conditions for an invasion request? What file would those be in? I've tried a whole bunch, including cb_types, but I didn't recognize anything that looked like the conditions displayed in the actual game. Halp plz?
I don't think it is what you exactly want, but the piety part is in defines.
Edit:
in cb_types, has anyone tried to use "check_de_jure_tier = COUNT"?
I've copied the religious war and changed that line from DUKE to COUNT (and also the names). My new war's name comes up, but I'm still selecting duchies rather than counties.
I had the very same idea in mind, and the very same issue. You can do it amost as easily: change "check_de_jure_tier = DUKE" to "check_all_titles = yes"
Then, add:
Code:
can_use_title = {
tier = count
OR = {
FROM = {
has_landed_title = PREV
}
holder_scope = {
is_liege_or_above = FROM
NOT = { same_realm = ROOT }
}
}
}
And you're done.
Now, my question:
First, I'm trying to understand coding as of now. I wanted to restrict holy wars to higher or equivalent tiers only (an emperor could only use it against an emperor, a king against a king or an emperor,... and a count against anybody). So, I picked the part that part, which I believe says something a bit close to what I want (basically, this is taken from a "change the succession law CB", which to my understanding says that you can use it against your own liege)
Code:
is_valid_title = {
NOT = {
has_law = succ_feudal_elective
}
OR = {
tier = emperor
is_primary_holder_title = yes
AND = {
is_primary_holder_title = no
is_primary_holder_title_tier = yes
is_titular = no
holder_scope = {
overlord_of = ROOT
}
ROOT = {
primary_title = {
kingdom = {
title = PREVPREVPREV
}
}
}
}
}
OR = {
AND = {
tier = emperor
OR = {
ROOT = { tier = king }
ROOT = { tier = duke }
}
}
AND = {
tier = king
ROOT = { tier = duke }
}
AND = {
tier = duke
ROOT = { tier = count }
}
}
}[/spoiler]
removed what I thought is useless:
Code:
is_valid_title = {
OR = {
AND = {
tier = emperor
OR = {
ROOT = { tier = king }
ROOT = { tier = duke }
}
}
AND = {
tier = king
ROOT = { tier = duke }
}
AND = {
tier = duke
ROOT = { tier = count }
}
}
}
And then, I have adaptated the tiers, and added this to the religious CB:
Code:
is_valid_title = {
OR = {
AND = {
tier = emperor
OR = {
ROOT = { tier = emperor }
ROOT = { tier = king }
ROOT = { tier = duke }
ROOT = { tier = count }
}
}
AND = {
tier = king
OR = {
ROOT = { tier = king }
ROOT = { tier = duke }
ROOT = { tier = count }
}
}
AND = {
tier = duke
OR = {
ROOT = { tier = duke }
ROOT = { tier = count }
}
}
AND = {
tier = count
ROOT = { tier = count }
}
}
}
Of course, I would have not bothered you if it was working - the HRE Emperor can still use the holy war CB against a duke. A bit of help on understanding what's wrong would be great. As I found no real tutorial about scripting, and as I only understand part of what is written (I fail to see the difference beetween, say, is_valid and is_valid_title, and don't undertsand what PREV can actually refers to), I simply stick to search and destroy alter mod(e).
If it could matter, whole code for the CB (with my addition(s) (I also added the part that prevents to claim duchies)) is :
Code:
religious = {
name = CB_NAME_RELIGIOUS
war_name = WAR_NAME_RELIGIOUS
sprite = 9
truce_days = 10950
is_permanent = yes
check_all_titles = yes # if permanent, setting this to true will check against all of someones titles, including vassal held titles
can_use = {
ROOT = {
NOT = { religion_group = pagan_group }
NOT = { same_realm = FROM }
OR = {
NOT = { religion_group = FROM }
is_heresy_of = FROM
is_parent_religion = FROM
AND = {
religion_group = muslim
NOT = { religion = FROM }
}
}
top_liege = {
religion_group = ROOT
NOT = { religion = FROM }
OR = {
religion = ROOT
AND = {
is_heretic = no
ROOT = { is_heretic = no }
}
}
}
}
}
can_use_title = {
tier = count
OR = {
FROM = {
has_landed_title = PREV
}
holder_scope = {
is_liege_or_above = FROM
NOT = { same_realm = ROOT }
}
}
}
is_valid = {
ROOT = {
NOT = { religion_group = pagan_group }
NOT = { same_realm = FROM }
OR = {
NOT = { religion_group = FROM }
is_heresy_of = FROM
is_parent_religion = FROM
AND = {
religion_group = muslim
NOT = { religion = FROM }
}
}
top_liege = {
NOT = { religion = FROM }
}
}
}
is_valid_title = {
OR = {
AND = {
tier = emperor
OR = {
ROOT = { tier = emperor }
ROOT = { tier = king }
ROOT = { tier = duke }
ROOT = { tier = count }
}
}
AND = {
tier = king
OR = {
ROOT = { tier = king }
ROOT = { tier = duke }
ROOT = { tier = count }
}
}
AND = {
tier = duke
OR = {
ROOT = { tier = duke }
ROOT = { tier = count }
}
}
AND = {
tier = count
ROOT = { tier = count }
}
}
}
on_success = {
any_attacker = {
limit = { character = ROOT }
participation_scaled_piety = 100
participation_scaled_prestige = 50
}
any_attacker = {
limit = { NOT = { character = ROOT } }
hidden_tooltip = {
participation_scaled_piety = 100
participation_scaled_prestige = 50
}
}
ROOT = { religion_authority = 0.01 }
FROM = { religion_authority = -0.01 }
FROM = { piety = -100 }
FROM = { prestige = -50 }
}
on_success_title = {
ROOT = {
gain_settlements_under_title = {
title = PREV
enemy = FROM
}
}
}
on_fail = {
ROOT = { piety = -50 }
ROOT = { prestige = -100 }
}
on_reverse_demand = {
ROOT = {
transfer_scaled_wealth = {
to = FROM
value = 4.0
}
}
any_defender = {
limit = { character = FROM }
participation_scaled_piety = 200
participation_scaled_prestige = 100
}
any_defender = {
limit = { NOT = { character = FROM } }
hidden_tooltip = {
participation_scaled_piety = 200
participation_scaled_prestige = 100
}
}
FROM = { religion_authority = 0.01 }
ROOT = { religion_authority = -0.01 }
}
attacker_ai_victory_worth = {
factor = -1 # always accept
}
attacker_ai_defeat_worth = {
factor = 100
}
defender_ai_victory_worth = {
factor = -1 # always accept
}
defender_ai_defeat_worth = {
factor = 100
}
}
Does anyone here now how to mod the conditions for an invasion request? What file would those be in? I've tried a whole bunch, including cb_types, but I didn't recognize anything that looked like the conditions displayed in the actual game. Halp plz?
The war is in cb_types. Certinaly the muslim invasion (which I've been looking at) is there entierly. However I'm not sure if all the mucking around that Christians have to do first is in there though (getting the pople to agree, only working on larger kingdoms, etc).