• 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.
Hello! I don't know much about modding CKII at all, so I need some help! I'm playing Dawn of Kingdoms, where every county is independent. My question: is there a way to grant x amount of money to every count at game start? Or grant x amount of money at date y to every count? I'm guessing some sort of one-time global event, but I have no idea on how to actually do it... :glare:

I know how you can give each character money individually,just put add_money="500" into their slot of the character files.
Not sure how to make it a global event though...
 
I know how you can give each character money individually,just put add_money="500" into their slot of the character files.
Not sure how to make it a global event though...

That sounds like it could work, except DoK randomly generates every character apart from the player-controlled one... Maybe an event that triggers for every character holding a title a day after game start (for example) giving them money? Since there's no baronies, dukes, etc, the only title holders are counts and also courtiers wouldn't get anything. Is that possible?
 
You could make a simple global event, like this:

Code:
namespace = gold

character_event = {
         id = gold.0

trigger = {
         is_ruler = yes
         year = 1065
         NOT = { year = 1067 }
         NOT = { has_character_flag = golden }
}

option = {
         name = "OK"
         wealth = 500
         set_character_flag = golden
}

}

I think that should work. Someone please check my work. It should give every ruler 500 additional gold at game start.
 
Does any_realm_character always scope to the independent realm? Like, if I have k_kingdom that's a vassal of e_empire, will the following apply to realm characters in k_kingdom or e_empire?
Code:
e_empire = {
	k_kingdom = {
		any_realm_character = {
		
		}
	}
}

If you specifically place any_realm_character under the k_kingdom title, like you have here, I have to think it would indeed restrict the scope to that kingdom. (Put another way: I can't imagine why the game would ignore the intuitive reading of that syntax and keep any_realm_character's scope at the empire level.)

Can anyone confirm this?
 
You could make a simple global event, like this:

Code:

namespace = gold

character_event = {
id = gold.0

trigger = {
is_ruler = yes
year = 1065
NOT = { year = 1067 }
NOT = { has_character_flag = golden }
}

option = {
name = "OK"
wealth = 500
set_character_flag = golden
}

}

I think that should work. Someone please check my work. It should give every ruler 500 additional gold at game start.

That looks promising! A few questions, bear with me :p
1. year = 1065 can be changed to match the starting date in the mod and it'll work fine, yes?

2. what is the purpose of the NOT = { year = 1067 } line? Since the previous line already specifies it must be in 1065, or so I assume.

3. I also assume that this event will trigger when the year is 1065 and the ruler has 0 gold (I have no idea what has_character_flag = golden means), but wouldn't that mean anytime a ruler goes bankrupt that year the event would trigger?

4. Where would I place this code?

Thank you very much for your time and help :happy:
 
Is it possible to change the dynasties displayed for the scoreboard whatsit when a player resigns? If so, how can I change which dynasties are displayed?
 
That looks promising! A few questions, bear with me :p
1. year = 1065 can be changed to match the starting date in the mod and it'll work fine, yes?

2. what is the purpose of the NOT = { year = 1067 } line? Since the previous line already specifies it must be in 1065, or so I assume.

3. I also assume that this event will trigger when the year is 1065 and the ruler has 0 gold (I have no idea what has_character_flag = golden means), but wouldn't that mean anytime a ruler goes bankrupt that year the event would trigger?

4. Where would I place this code?

Thank you very much for your time and help :happy:

Alright Temp.

#1: You can put whatever year you need to. This means that the year needs to be 1065 or later (actually according to my limited testing, it needs to be later than 1065 in this example). But if you mod starts in the year 4000, put in year = 3999.

#2: The year cannot be larger than 1066.

#3: golden is the character flag that I created for the event. You will notice that in the 'option' section (where the event's effects are listed, i.e., what the event 'does') that I have set_character_flag = golden. This is a bit of code that marks the character as having already had the event. Without a character flag, the event will keep firing every time the game checks for events for that character. is_ruler = yes should be self-explanatory.

#4 create a new text file in /events and name it whatever you like. Then copy and paste everything from the code I wrote for you, making sure that all the closing brackets are there.

So this is what happens in English:

1. A character is a ruler and does not have the character flag 'golden' so he or she gets the event. The event will fire only for characters who are rulers, does not have the character flag, and when it is the starting year 1066. There is a small window of error, if you start with a character who dies before the year is 1067 (or whatever year your mod starts in): his or her successor will get the same event. In vanilla CK2, for example, the Count of Asturias is 60 years old (or so), so he could die between September 1066 and January 1067 and so his son will get another 500 gold with this event. You could throw in the trigger condition:

Code:
NOT = { wealth = 1000 }

Or whatever you think is appropriate. Some characters start with over 100 gold, but this might not be the case in your mod.

2. You click on the response "OK" and your character gets 500 gold and a hidden character flag so that he or she does not get the same event again.

This is what we call a startup event: some things cannot be set in the history files, so you can add gold, prestige, piety; or some character or province modifiers; or potentially any other effects that you could imagine.

Hope the event works. Good luck with your future modding.
 
Is it possible to change the dynasties displayed for the scoreboard whatsit when a player resigns? If so, how can I change which dynasties are displayed?

Yeah, the dynasties displayed are in the localisation files. There is no correlation between what happens in your game and what is displayed there. You can change the prestige displayed for each dynasty in defines.lua, IIRC. So for a total overhaul, you could assign as much dynastic prestige as you wanted to the Houses of Lannister, Atreus, or whichever way your wind blows. :)
 
Yeah, the dynasties displayed are in the localisation files. There is no correlation between what happens in your game and what is displayed there. You can change the prestige displayed for each dynasty in defines.lua, IIRC.
Ah, many thanks! I found the entries and, by golly, they do look pretty straightforward.

So for a total overhaul, you could assign as much dynastic prestige as you wanted to the Houses of Lannister, Atreus, or whichever way your wind blows. :)
Or Flavius, Amaling and Meroving, in my case.
 
main questions
can I make a title never changes its succession law ?
can I change the succession law for papal state / papacy ?


The idea behind it
my idea is to try a simple mechanic for papal elections.

details :
-de jure papacy in Rome.
-de jure one province archbishopric spreaded in the catholic world
-set papacy to feudal elective
-those prince archibishops votes for papal succesion among themselves

problems :
-switch papacy to feudal elective
-set this law in stone
-de jure drift of the archbishopric
-think about possible exploits
-do electors need to be also de facto vassals ?

Thanks !
 
main questions
can I make a title never changes its succession law ? Theoretically yes, add an exclusion to all other succession laws for that title.
can I change the succession law for papal state / papacy ? Theoretically again yes, through it's history file. I'm unsure of the consequences.


The idea behind it
my idea is to try a simple mechanic for papal elections.

details :
-de jure papacy in Rome.
-de jure one province archbishopric spreaded in the catholic world
-set papacy to feudal elective
-those prince archibishops votes for papal succesion among themselves

problems :
-switch papacy to feudal elective
-set this law in stone
-de jure drift of the archbishopric
-think about possible exploits
-do electors need to be also de facto vassals ? No.
-Papal States may declare war to get their de jure vassal. (You forgot this one).

Thanks !

I like the idea, alot to be honest, but the "winning" archbishopric will become a territory of the papal states when it succeeds to the throne of st peter, unless you have some way to make the bishopric get a new bishop and remains with it's de facto liege. If you do manage to get around that somehow, maybe add a "Papal Controller" trait/opinion boosts too? (although not all popes liked their former temporal overlords).
 
I like the idea, alot to be honest, but the "winning" archbishopric will become a territory of the papal states when it succeeds to the throne of st peter, unless you have some way to make the bishopric get a new bishop and remains with it's de facto liege. If you do manage to get around that somehow, maybe add a "Papal Controller" trait/opinion boosts too? (although not all popes liked their former temporal overlords).

ok thanks for answers. problems is if archbishops are de facto vassals of the pope any king lose control on them, which was a big part of the interest.

can I make a title never changes its succession law ? Theoretically yes, add an exclusion to all other succession laws for that title.

how can I do that ?


maybe making those archbishops "landless = yes" would help ?
 
That means they always exist (like with mercenaries), not sure how that works with de jure titles, only used it with titular ones.

You'd add
Code:
NOT = { has_landed_title = k_papalstates-or-whatever-it-is }
To the potential for each succ you don't want the papal states to have.
 
I have one character holding a single emperor-tier title. Due to the nature of the setting, the default emperor-tier title is (quite) unsuitable in this case: I wish for him to instead wear one of the king-tier crowns, or permanently associate one of those crowns with the title he holds. Whichever is more feasible.