• 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.
Just a quickie, does anybody have the idea where the icons appearing as provincial or realm modifiers are present? I searched for hours all gfx files, but couldn't find them...
 
Hi,

I started playing around with modding, and am trying to create a new CB that independent counts can use to declare war on other adjacent independent counts, at the cost of a relations hit with other neighboring rulers. So far I managed to have counts declare war on other counts using:


Code:
tribal_invasion2 = {
	name = CB_NAME_INVASION
	war_name = WAR_NAME_INVASION
	sprite = 8
	truce_days = 365
	hostile_against_others = yes
	is_permanent = yes

	can_use = {
		ROOT = {
				primary_title = { tier = COUNT }
				
				#any_neighbor_province = {
				#	owner = FROM
				#}
			
		}
	}
...

on_success = {
		ROOT = {
			prestige = 50
			occupy_minors_of_occupied_settlements = FROM
			gain_all_occupied_titles = FROM
			FROM = { set_defacto_liege = ROOT }
			
			opinion = {
				modifier = conquered_neighbor 
				who = owner = { any_neighbor_province }
			}
...

but I couldn't get "any_neighbor_province" to work or find any relevant uses of it. I was wondering if someone could help me out with the proper use of "any_neighbor_province" or a related tag that would accomplish what I'm looking for.
 
but I couldn't get "any_neighbor_province" to work or find any relevant uses of it. I was wondering if someone could help me out with the proper use of "any_neighbor_province" or a related tag that would accomplish what I'm looking for.

Any neighbor province needs to be inside a province scope. So you need something like this:
Code:
any_demesne_province = {
					any_neighbor_province = {
						owner = {
							top_liege = { 
								character = FROM
							}
						}
					}
				}
			}
 
Is there some way to affect random outcomes by traits?
like a modifier to a random list or something like that. is it possible?

AFAIK, not directly, but if you don't mind huge mumbojumbos (see below) it is doable.

Code:
			if ={
				limit = {
					NOT = { martial = 19 }
				}
				random_list = {
					1 = { # flawless victory
						character_event = {
							id = 1020037
						}
					}
					44 = { # victory, with prize
						character_event = {
							id = 1020038
						}
					}
					95 = { # defeat
						character_event = {
							id = 1020039
						}
					}
				}
			}
			if ={
				limit = {
					martial = 19
					NOT = { martial = 24 }
				}
				random_list = {
					5 = { # flawless victory
						character_event = {
							id = 1020037
						}
					}
					20 = { # victory, with prize
						character_event = {
							id = 1020038
						}
					}
					75 = { # defeat
						character_event = {
							id = 1020039
						}
					}
				}
			}
			if ={
				limit = {
					martial = 24
					NOT = { martial = 29 }
				}
				random_list = {
					10 = { # flawless victory
						character_event = {
							id = 1020037
						}
					}
					35 = { # victory, with prize
						character_event = {
							id = 1020038
						}
					}
					55 = { # defeat
						character_event = {
							id = 1020039
						}
					}
				}
			}
			if ={
				limit = {
					martial = 29
					NOT = { martial = 34 }
				}
				random_list = {
					20 = { # flawless victory
						character_event = {
							id = 1020037
						}
					}
					45 = { # victory, with prize
						character_event = {
							id = 1020038
						}
					}
					35 = { # defeat
						character_event = {
							id = 1020039
						}
					}
				}
			}
			if ={
				limit = {
					martial = 34
					NOT = { martial = 39 }
				}
				random_list = {
					30 = { # flawless victory
						character_event = {
							id = 1020037
						}
					}
					55 = { # victory, with prize
						character_event = {
							id = 1020038
						}
					}
					15 = { # defeat
						character_event = {
							id = 1020039
						}
					}
				}
			}
			if ={
				limit = {
					martial = 39
				}
				random_list = {
					50 = { # flawless victory
						character_event = {
							id = 1020037
						}
					}
					45 = { # victory, with prize
						character_event = {
							id = 1020038
						}
					}
					5 = { # defeat
						character_event = {
							id = 1020039
						}
					}
				}
			}
		}
 
Defines.lua. It is based on four different groups; muslim, catholic, byzantine, and other.
Search for START_MIL_CATHOLIC to find it.

Ok, now I'm really confused. Looking at the defines, it seems like every province in a given group would either be the same as every other province in the group, or they would vary based on how close they are to province 320 (cremona--defined as the center of the renaissance).

But this doesn't seem to be the case at all. For example, in 1066 some catholic provinces have construction 1, others 0, and many of the ones with level 1 are further away from cremona than ones with tech 0. What causes these variations?
 
Ok, now I'm really confused. Looking at the defines, it seems like every province in a given group would either be the same as every other province in the group, or they would vary based on how close they are to province 320 (cremona--defined as the center of the renaissance).

But this doesn't seem to be the case at all. For example, in 1066 some catholic provinces have construction 1, others 0, and many of the ones with level 1 are further away from cremona than ones with tech 0. What causes these variations?
There's a little bit of randomization.
 
There's a little bit of randomization.
It doesn't seem random, though. In every game where I've looked at it, Kyzikos is the only province in western Anatolia with construction 1 instead of 2, and Euboia always has city infrastructure 3, while Athens has level 1. It's been so consistent, I thought there has to be something in the province hiistories over-riding the defines, but it doesn't seem that way.
 
It doesn't seem random, though. In every game where I've looked at it, Kyzikos is the only province in western Anatolia with construction 1 instead of 2, and Euboia always has city infrastructure 3, while Athens has level 1. It's been so consistent, I thought there has to be something in the province hiistories over-riding the defines, but it doesn't seem that way.
Might be random based on some sort of seed, which could lead to tech always being distributed the same.
 
Is it possible to make the effects of events, traits, etc, different depending on the culture or religion of the character involved?
 
Is it possible to make the effects of events, traits, etc, different depending on the culture or religion of the character involved?
Yes for events, no for traits. Events can use if = { limit = { religion = x } effects } to do different things for different religions. With traits, you could make multiple versions with one set for each religion, but you can't put an if clause inside a modifier.