Jump to content
Mr_Treason

CK2 Modding Quick Question Thread

Recommended Posts

3 hours ago, lockeslylcrit said:

Change

modifier = modifier_levytest

to

name = modifier_levytest

 

Oh, that wasn't really the thing, either one of those works it seems. :) The issue is  that the modifier gets applied ok, and the tool-tip displays, but it just doesn't seem to have any effect on available levies at all.

https://i.imgur.com/aqRvbB0.png

 

Thanks for info on dds vs tga, all my pics got reduced by about 90%!! 😮

Link to post
2 hours ago, dwjlien said:

Oh, that wasn't really the thing, either one of those works it seems. :) The issue is  that the modifier gets applied ok, and the tool-tip displays, but it just doesn't seem to have any effect on available levies at all.

https://i.imgur.com/aqRvbB0.png

 

Thanks for info on dds vs tga, all my pics got reduced by about 90%!!

Try global_levy_size instead in the modifier

Link to post
2 hours ago, AlexWyrmin said:

I'm building a modpack for my next playthrough and I want to make Cannibal Kings work together with the EMF module of HIP.

 

I know that there's no true compatibility problem between the two, but HIP has this in every bloodine:


	active = {
		culture = X
		religion = Y
	}

What should I input to activate a cannibalized bloodline, both in the original man eater and in their descendants?

I wasn't quite sure what you were asking until I downloaded Cannibal Kings and looked at it.

 

Even though it's literally just one event, it's also one of the worst pieces of code I've ever seen.

 

After wracking my brain over it, I thought of a solution that may work. No promises.

 

Cannibal Kings event:
 

	immediate = {
		killer = { save_event_target_as = hannibal_lecter }
		any_owned_bloodline = {
			add_bloodline_member = event_target:hannibal_lecter
		}
		set_character_flag = hannibal_lecter
		if = {
			limit = { immortal = yes }
			event_target:hannibal_lecter = { health = 5 }
		}
	}

 

The active block of the bloodlines:

allow = {
	FROM = {
		any_bloodline_member = {
			has_character_flag = hannibal_lecter
			ROOT = {
				is_descendant_of = PREV
			}
		}
	}
	#
	# Other conditions here
	#
}

 

Link to post
9 hours ago, lockeslylcrit said:

Try global_levy_size instead in the modifier

doesn't even provide a tooltip, nor does national or local( i was throwing ideas at the wall) . Honestly This feels like a game-bug, just no rhyme or reason to it.

 

Its not my event I dont care was just trying to help the original guy that asked, but it's super weird that it doesnt seem to work at all.

Link to post
2 hours ago, AlexWyrmin said:

Do the religion-specific syncretic doctrines introduced by HIP actually work both ways in preventing holy wars from being declared? By their description It seems so, but I want to be sure before ending up shooting my dynasty in the foot.

I'm looking at the HIP files now and I'm not seeing any religion-specific syncretic doctrine except for the standard vanilla Hellenic religion doctrine.

Link to post
6 minutes ago, lockeslylcrit said:

I'm looking at the HIP files now and I'm not seeing any religion-specific syncretic doctrine except for the standard vanilla Hellenic religion doctrine.

Here's the christian one:

	religion_syncretic_christian = {
		picture = GFX_religion_feature_syncretic_christian
		trigger = {
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
			NOR = {
				religion_group = christian
				has_selected_religion_feature = religion_monastic
				has_selected_religion_feature = religion_jizya
				# Human sacrifice is too drastic to allow for syncretism
				has_selected_religion_feature = religion_ritual_sacrifice
				has_selected_religion_feature = religion_feature_aztec
			}
			OR = {
				any_playable_ruler = { 
					NOT = { distance_from_realm = { who = FROM value = 200 } }
					religion_group = christian
				}
				FROM = {
					character = yes
					OR = {
						top_liege = {
							OR = {
								religion_group = christian
								any_realm_lord = {
									religion_group = christian
								}
								any_neighbor_independent_ruler = {
									religion_group = christian
								}
							}
						}
						any_realm_title = {
							OR = {
								is_holy_site = adoptionist
								is_holy_site = apostolic
								is_holy_site = arian
								is_holy_site = bogomilist
								is_holy_site = cathar
								is_holy_site = catholic
								is_holy_site = fraticelli
								is_holy_site = iconoclast
								is_holy_site = lollard
								is_holy_site = maronite
								is_holy_site = messalian
								is_holy_site = miaphysite
								is_holy_site = monophysite
								is_holy_site = monothelite
								is_holy_site = nestorian
								is_holy_site = orthodox
								is_holy_site = paulician
								is_holy_site = syriac
								is_holy_site = tondrakian
								is_holy_site = waldensian
							}
						}
					}
				}
			}
		}
		effect = {
			custom_tooltip = { text = tooltip_religion_feature_christian_tolerance }
			if = {
				limit = { NOT = { has_selected_religion_feature = religion_no_leader } }
				custom_tooltip = { text = tooltip_religion_feature_beatification }
			}
			custom_tooltip = { text = tooltip_religion_feature_monastic }
			custom_tooltip = { text = tooltip_religion_feature_celibate_priests }
			custom_tooltip = { text = tooltip_religion_feature_faster_christian_conversion }
			custom_tooltip = { text = tooltip_religion_feature_no_holy_war_against_christian }
			hidden_tooltip = { 
				set_can_retire_to_monastery = yes
				set_priests_can_marry = no
				set_priests_can_inherit = no
			}
		}
		ai_will_do = {
			factor = 1
			modifier = { 	
				factor = 0.5
				FROM = { 
					character = yes 
					OR = { 
						religion = aztec
						religion = baltic_pagan
						religion = finnish_pagan
					}
				}
			}
			modifier = { #Handles feature randomization in AltStart to make unreformed pagans still have "paganish" features.
				factor = 0
				has_game_started = no
				religion_group = pagan_group
			}
		}
	}

 

Link to post

Ok, I found the problem. I was on Furry7, not Bastard2.

 

I had to go down a rabbit hole, but I found the answer. All religious wars use either emf_syncretized_religion_with_FROM/ROOT/PREV

Meaning that if you are syncretic with the other religion, they cant declare war on you or vice versa

Link to post
2 minutes ago, lockeslylcrit said:

Ok, I found the problem. I was on Furry7, not Bastard2.

 

I had to go down a rabbit hole, but I found the answer. All religious wars use either emf_syncretized_religion_with_FROM/ROOT/PREV

Meaning that if you are syncretic with the other religion, they cant declare war on you or vice versa

Yes! Now I can use it in conjunction with the Nine Doctrines Reformation and epically troll both Christianity and Islam by taking the KIngdom of Jerusalem with a simple prepared invasion. 🤣

 

Thank you!

Link to post

Is there a way to make an event chain where a new character is created and also used in a scope in a later event in the chain?

 

To make it a bit clearer, I've got an event chain that should go like this:

 

event 1 (create character, first character gets event 2) -> event 2 (first character in the event gets an opinion modifier of the created character, first character gets event 3) -> event 3 ( first character gets chance to be impregnated by the created character, event chain ends)

 

but currently goes like:

event 1 (create character, first character gets event 2) -> event 2 (first character in the event gets an opinion modifier of themselves, first character gets event 3)  -> event 3 ( first character gets chance to be impregnated by themselves , event chain ends)

 

The major problem is my main character is still both the FROM and ROOT scope in the second and third events, and since the created character didn't exist until after the first event, to my limited understanding, FROMFROM won't work.

Link to post
35 minutes ago, failmuseum said:

Is there a way to make an event chain where a new character is created and also used in a scope in a later event in the chain?

 

To make it a bit clearer, I've got an event chain that should go like this:

 

event 1 (create character, first character gets event 2) -> event 2 (first character in the event gets an opinion modifier of the created character, first character gets event 3) -> event 3 ( first character gets chance to be impregnated by the created character, event chain ends)

 

but currently goes like:

event 1 (create character, first character gets event 2) -> event 2 (first character in the event gets an opinion modifier of themselves, first character gets event 3)  -> event 3 ( first character gets chance to be impregnated by themselves , event chain ends)

 

The major problem is my main character is still both the FROM and ROOT scope in the second and third events, and since the created character didn't exist until after the first event, to my limited understanding, FROMFROM won't work.

immediate = {
	create_character = {
		#
		# blah blah blah
		#
	}
	new_character = {
		save_event_target_as = your_created_character
	}
}

save_event_target_as assigns a temporary (ends when the event chain ends) variable to something, allowing you to use it as a scope. For example:
 

event_target:your_created_character = {
	impregnate_cuckoo = ROOT
}

You can also use save_global_event_target_as to save it globally, and isn't erased after the event chain ends and will forever remain.

 

Using save_persistent_event_target = { name = my_persistent_character scope = THIS } to save an event target that functions exactly like a global event target, but is cleared when the character dies.

Link to post
1 hour ago, failmuseum said:

That works thank you! One other quick question though, what do you mean exactly by "save it globally" in regards to "save_global_event_target_as"?

Like I said, an event target is cleared automatically if the event chain ends. save_global_event_target_as saves the scope globally so that it can be called from at any time, even if the character is dead, and long after the event chain has ended.

Link to post

Can someone give me a few pointers on how to make a prestige-style variable? I've read through a few mods and the variable framework really is complex. I hope that one day, I could just type add_monthly_variable and the thing it is attached to (artifact, modifier etc.) just works. 

Link to post
mod_modifiername = {
icon=8	
	monthly_character_prestige = 3.5
}

and in the event that's added by:


      add_character_modifier = {    modifier = mod_modifiername years = 1 } 

 

 

That would be a modifier that adds 1 prestige monthly, is that what you meant, or was it more you want that  3.5 to be a variable amount, depending on X? Because yeah, there's no simple way to achieve wild variation with that - that my basic knowledge is aware of at least.

Link to post
1 hour ago, dwjlien said:

mod_modifiername = {
icon=8	
	monthly_character_prestige = 3.5
}

and in the event that's added by:



      add_character_modifier = {    modifier = mod_modifiername years = 1 } 

 

 

That would be a modifier that adds 1 prestige monthly, is that what you meant, or was it more you want that  3.5 to be a variable amount, depending on X? Because yeah, there's no simple way to achieve wild variation with that - that my basic knowledge is aware of at least.

Say that I want to create a "berserk meter", with the appropriate variable "berserk level".

Then what I want to do is

mod_modifiername = {

icon=8

monthly_character_berserklevel = 3.5 }

Is there any way of achieving this? 

Link to post

I'm coming back to something I failed to get working in the past. I have a prisoner in my torture chamber. During a session he progressively losses willpower and health. If his willpower descends below a certain level he breaks and submits. However, if his health gets to low he dies. In the event of his death  I would like an event to be triggered.

 

I tried using the on_action trigger on_death (the wiki states that this is used for succession events but does that exclude character events?)

 

Spoiler

on_death = {   #ROOT is the dead character
       events = {
               RSLCourt.5500   #death under torture
        }
}   

 

The event is as follows

 

Spoiler

## death under torture
narrative_event = {
    id = RSLCourt.5500
    hide_window = yes
    is_triggered_only = yes # on action on_death
    trigger = {
            OR = {
                has_character_flag = in_torture_chamber
                has_character_flag = resisting_slave
                had_character_flag = { flag = in_torture_chamber days = 14 }
            }
            OR = {
                is_alive = no
                is_dying = yes
            }
            
    }
    immediate = {
        save_event_target_as = rsl_victim_target
        
#        FROM = {
#            any_courtier_or_vassal = {
#                                has_minor_title = title_court_torturer                                                
#            }
#            save_event_target_as = rsl_torturer_target
#        }
        
        host = { narrative_event = { id = RSLCourt.5501 }}
        
                            
    }    
}

I neutralized the FROM because validator had a problem with it specifically the minor_title condition, but that doesn't change anything.

 

Can  on_death be used for this type of events or is it limited to special types of events or scopes?

 

I have also tried on_release_from_prison assuming that if the character dies while in prison he is considered released but that doesn't  work either. Probably he looses the character flags on dying.

 

Anybody have an idea?

Link to post
7 hours ago, sataniccatholic said:

Say that I want to create a "berserk meter", with the appropriate variable "berserk level".

Then what I want to do is

mod_modifiername = {

icon=8

monthly_character_berserklevel = 3.5 }

Is there any way of achieving this? 

You could do it similar to how Holy Fury does dueling experience. Each time you gain dueling experience, you're given a small, stacking modifier.

Link to post

Can adding positive traits to a character via history editing make their direct vassals crappier on average? I'm asking because what's happening with my starting character seems to either prove it can happen or I'm going through the most unlikely string of coincidences I've ever seen.

Link to post
6 hours ago, kioo said:

Is there a way to make a character hidden and unreachable so that he can't be interacted with in any way and then make him appear later?

Not that I know off in a mod.

Being as the HIP team have their god characters visible and clickable.,I would assume there's no way to hide it, otherwise they'd know and do so

6 hours ago, AlexWyrmin said:

Can adding positive traits to a character via history editing make their direct vassals crappier on average? I'm asking because what's happening with my starting character seems to either prove it can happen or I'm going through the most unlikely string of coincidences I've ever seen.

I anecdotally feel the same. It'd be quite easy to achieve as well, so it is possible they put in some caveats.

 If player stat is >X, then max stat for vassals  = Y.

But I assume it'd be hard coded not in the files.

Link to post
7 hours ago, AlexWyrmin said:

Can adding positive traits to a character via history editing make their direct vassals crappier on average? I'm asking because what's happening with my starting character seems to either prove it can happen or I'm going through the most unlikely string of coincidences I've ever seen.

No, you've just hit a string of bad RNG.

 

6 hours ago, kioo said:

Is there a way to make a character hidden and unreachable so that he can't be interacted with in any way and then make him appear later?

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.

Of note:

 

diplomatic_immunity = yes

set_character_flag = no_court_invites

add_character_modifier = { name = mother_minor_rest hidden = yes duration = -1 }

set_character_flag = do_not_disturb

set_character_flag = society_join_block

 

There may be more, but those are the major action-blocking effects.

Link to post
On 11/16/2019 at 2:13 PM, lockeslylcrit said:

You can probably solve that by using create_character for the father, doing the impregnate command, and then silently killing him off afterwards.

So after some issues, I'd like to try this method. How would I go about it?

Link to post
11 hours ago, manicpixxxie said:

So after some issues, I'd like to try this method. How would I go about it?

ಠ_ಠ

 

create_character = {
	age = 16
	female = no
	dynasty = random
	culture = ROOT
	religion = ROOT
}
new_character = {
	ROOT = {
		impregnate = PREV
	}
	death = { death_reason = death_missing }
}

 

Link to post

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...