Jump to content

CK2 Modding Quick Question Thread


Recommended Posts

On 12/2/2019 at 10:28 PM, lockeslylcrit said:

Create a landed title without a capital. This will make whoever owns the title into a landless character that isn't on any specific province (ala mercenaries).

Then you'll need to give that character a variety of flags/effects that prevents interaction.

Ah, this is smart. Thank you!

Link to comment

Nature

				set_max_consorts = 3
				set_women_can_take_consorts = yes
				set_men_can_take_consorts = no		
				set_priests_can_marry = yes
				set_priests_can_inherit = no
				set_allow_looting = yes
				set_feminist = yes
				set_female_temple_holders = yes
				set_male_temple_holders = no

+ Doctrine 1

				set_can_retire_to_monastery = yes
				set_priests_can_marry = no
				set_priests_can_inherit = no

+ Doctrine 2

				set_men_can_take_consorts = no
				set_max_consorts = 3 # For women, since set_max_wives only applies to men
				set_women_can_take_consorts = yes
				set_max_wives = 4

= Religion with an all-female clergy who could be shagging up to three men at once, but can't take one to the altar?

Link to comment
37 minutes ago, lockeslylcrit said:

Sorry for the lack of response.

No problem, I was pretty much just thinking out loud there. I was almost sure of the answer already, but reforming a religion as lilithian in nature and end up with priestesses under a full blown chastity vow, rather than simply being forbidden to marry, would have been irony at its finest, so any confirmation of the contrary is very welcome. ?

Link to comment
11 minutes ago, AlexWyrmin said:

No problem, I was pretty much just thinking out loud there. I was almost sure of the answer already, but reforming a religion as lilithian in nature and end up with priestesses under a full blown chastity vow, rather than simply being forbidden to marry, would have been irony at its finest, so any confirmation of the contrary is very welcome. 

The above pic was done using Luxuria Fantasia with the Custom Religion, but your idea is exactly the same (mechanically speaking). Polygamy and concubinage are mutually exclusive to each other for men, but inclusive for women. You can have both polygamy for men and consorts for women. The only real problem is that if a woman isn't married, she still suffers from the unmarried pregnancy vanilla event regardless of how many consorts she has.

Link to comment
28 minutes ago, lockeslylcrit said:

The only real problem is that if a woman isn't married, she still suffers from the unmarried pregnancy vanilla event regardless of how many consorts she has.

Can't really do much if it's hardcoded. I just wanted to make sure I wasn't going to have Lilith worshiped by, essentially, pagan nuns. After going through the decadence events file for her branch of Islam, I know she wouldn't have appreciated that one bit. ?

Link to comment
4 minutes ago, AlexWyrmin said:

Can't really do much if it's hardcoded. I just wanted to make sure I wasn't going to have Lilith worshiped by, essentially, pagan nuns. After going through the decadence events file for her branch of Islam, I know she wouldn't have appreciated that one bit. 

It's not hardcoded. In fact, I just uploaded an update to LF a few minutes ago that includes this fix, inspired by this very conversation.

 

EDIT: Feel free to use this in your own mod too.

zzz_LF_vanilla_overwrite_events.txt

 

Link to comment

Dont know 1 sorry, but doubt it.

2, would be very hard, because sometime you'll have [FromFromFromFrom.GetBestName] and it will out put "John".

Other times [From.GetName] will out put "Jukirikkiiliey" or whatever. The length can vary massively depending on characters involved.

 

Plus people have different font mods, which leads to them having it look completely different to the next person. Just from making a few events you'll get an appreciable feel for what fits in your text boxes, and from there I like to leave at least a full line free to account for the above incongruities.

Link to comment
1 hour ago, AlexWyrmin said:

	active = {
		OR = {
			religion = catholic
			has_selected_religion_feature = religion_syncretic_christian
		}
	}

Is this kind of condition valid for a bloodline's activation?

No, it's not.

 

has_selected_religion_feature is only for reformation. You want has_religion_feature

Link to comment

Firstly, thanks for the responses; looks like 1-1.3k printed characters is about the sweet spot for Bigger Events, relative to linebreaks.

 

Second, I'm trying to narrow down the syntax of a conditional statement. I'm having trouble finding enough information/performing the mental gymnastics to cover it:

Religion of Councillor's Location = Liege's religion

 

Additionally, is there a full list of has_job_action arguments somewhere(the wiki looked a bit scant)?

Link to comment
1 hour ago, Darsel said:

Firstly, thanks for the responses; looks like 1-1.3k printed characters is about the sweet spot for Bigger Events, relative to linebreaks.

 

Second, I'm trying to narrow down the syntax of a conditional statement. I'm having trouble finding enough information/performing the mental gymnastics to cover it:

Religion of Councillor's Location = Liege's religion

 

Additionally, is there a full list of has_job_action arguments somewhere(the wiki looked a bit scant)?

job_chancellor = { # Chancellor scope
	liege = { # Chancellor's liege scope
		PREV = { # Goes back to the Chancellor
			location = { # Chancellor's location
				religion = PREVPREV # Goes back to the liege's scope
			}
		}
	}
}

It's done in this order because it first needs to define the chancellor scope, then the chancellor's liege scope. Once both are defined, you need to go back to the chancellor scope before defining the location scope. Otherwise you're likely to define a location's liege (which will break the script and likely the game).

 

As for the has_job_action, just look in the /common/job_actions/ file. There is no set list because jobs are fully moddable instead of being hardcoded. It's possible that a mod may add or remove job actions.

Link to comment

Wow, that's an interesting approach. I figured some of the scopes had to be like that, but I didn't consider a structure that flowed in that order. Excellent; that should be quite flexible for cleanly outlining additional conditions.

 

Also, thank you for the heads up on the jobs. I do appreciate all the help!

Link to comment
On 11/28/2019 at 7:35 AM, kioo said:

Ah, lemme ask one. Is there a way to reduce player's levy with by a certain number or a percentage after an event choice? 

Figured it out now @kioo

add_character_modifier = {    modifier = modifier_levytest years = 1 }  

common > event_modifiers

 modifier_levytest = { 
	icon = 105
	global_levy_size = -0.5
}

 

global is the key. Global attaches to character, without it, only for provinces.

 

 

 

 

Thank you for the commander clarification above  lockesly as well :)

 

Ok found another question <_<

 

How do I localise the missing text? Normally it says the title there -King Of France, Chancellor of Burgundy or whatever. As you can see I've given the character the minor title of Court Fuck Toy, but some localisation is missing in the  court list.

 

 

 

ck2_24.png

Also called on these search boxes too.

ck2_25.png

Link to comment
7 hours ago, dwjlien said:

How do I localise the missing text? Normally it says the title there -King Of France, Chancellor of Burgundy or whatever. As you can see I've given the character the minor title of Court Fuck Toy, but some localisation is missing in the  court list.

Sounds to me like something got borked in the minor titles or localisation files. Share the files and I'll take a look.

Link to comment
11 hours ago, lockeslylcrit said:

Sounds to me like something got borked in the minor titles or localisation files. Share the files and I'll take a look.

Reading this told me it wasn't dumb and obvious - which my problems normally are lol. So I just rebuilt the title step by step n tested each line.

Turns out while "dignity = X" is a valid condition for a minor title,' X' can not be a negative number. I didn't think the position of court fuck toy sounded very dignified at all was all :P

Thanks again!

Edit: that was when it was in the opening part of the title, adding dignity = -0.10 into the  gain_effect = { } scope doesn't break anything (but dunno if it applies in reality).

Link to comment

Oh boy, I'm probably getting in over my head, but I've got a scoping/logic nightmare I've been trying to figure out/probably trying to over-complicate.

 

Objective: Targeted decision to "encourage a landed vassal to produce an heir"(by copulating with their spouse).

The main issue I'm having is scoping the targeted vassal(s) and their spouse(if they have one) - so I can offload them to some temporary variables for easier condition management(and tie into existing impregnation calculation infrastructure).

 

 

I suppose I have a loaded secondary question, but it's potentially a bit more subjective: What is the best way to handle same-sex marriage and maintain dynasty? For women, I am presuming temporarily gender-swapping the partner to male and forcing a matrilineal marriage before reverting their gender would work? For Males, I confess I really have no idea how the game handles that situation(but it would be nice to get it correct for potential gender-bending situations). I'm a bit reluctant to assign dynasties directly for a myriad of reasons.

Link to comment
1 hour ago, Darsel said:

Objective: Targeted decision to "encourage a landed vassal to produce an heir"(by copulating with their spouse).

The main issue I'm having is scoping the targeted vassal(s) and their spouse(if they have one) - so I can offload them to some temporary variables for easier condition management(and tie into existing impregnation calculation infrastructure).

You'll want a third party decision. Set it up like a normal targeted decision, then add the third party filter and block.

https://ck2.paradoxwikis.com/Decision_modding#Third_Parties

 

1 hour ago, Darsel said:

I suppose I have a loaded secondary question, but it's potentially a bit more subjective: What is the best way to handle same-sex marriage and maintain dynasty? For women, I am presuming temporarily gender-swapping the partner to male and forcing a matrilineal marriage before reverting their gender would work? For Males, I confess I really have no idea how the game handles that situation(but it would be nice to get it correct for potential gender-bending situations). I'm a bit reluctant to assign dynasties directly for a myriad of reasons.

You could try an on_marriage event where the senior party in a marriage will get a character flag. Then you can check for the flag on the parent on an on_birth event and assign the dynasty as normal. Be sure to make an on_divorce and on_death event to clear the flag.

Link to comment
44 minutes ago, lockeslylcrit said:

You'll want a third party decision. Set it up like a normal targeted decision, then add the third party filter and block.

https://ck2.paradoxwikis.com/Decision_modding#Third_Parties

Oh, that's interesting. So if I'm understanding correctly, the third party is basically just a way to tag on an additional character. So I would only need to do something along the lines of:

filter = vassals
potential = {
	#check for landed title and other conditions
}
third_party_filter = all
third_party_potential = {
	any_spouse = { character = ROOT }			# Select Character who is married to the Target
	#additional conditions
}
allow {
	#blah blah
}
effect = {
	#ignoring gender/trait logic for the sake of simplicity
	ROOT = { save_event_target_as = ModVarDad }		# Target is the potential Father
	FROMFROM = { save_event_target_as = ModVarMom }		# Third Party is the potential Mother

	narrative_event { id = ModEventNameForSale.0 }		# Trigger Event
}

That's pretty awesome and way less trouble than I was expecting. Thank you!

 

44 minutes ago, lockeslylcrit said:

You could try an on_marriage event where the senior party in a marriage will get a character flag. Then you can check for the flag on the parent on an on_birth event and assign the dynasty as normal. Be sure to make an on_divorce and on_death event to clear the flag.

Hmm.. that seems a bit more messy than I was hoping for. I might have to chew on this one some more.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use