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

Cniht

Sergeant
56 Badges
Jun 15, 2004
89
26
  • BATTLETECH
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Pre-order
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Stellaris: Ancient Relics
  • Stellaris: Necroids
  • Europa Universalis III: Chronicles
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • Divine Wind
  • Europa Universalis IV
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • March of the Eagles
  • Semper Fi
  • Sengoku
  • War of the Roses
I've got a quick question as I'm trying to add some marital events to spice the 'homefront' up a bit. Like letting your wife run things if you're a ruler and other things. Good and bad events. ;)

Yet I want to be sure on how to use the spouse condition correctly.

To get the even to fire with my Spouse as the target character it would look something like this?
Code:
##################################################
#Send your wife to the nunery! #
##################################################
character_event = {
	id = 11000

	picture = "event_intrigue"

	trigger = {
		condition = { type = religion value = catholic }
		condition = { type = gender value = male }
		condition = { type = kingdom }
		condition = { type = is_married }
		condition = { type = spouse }
		condition = { type = age value = 30 }
		condition = {
			type = not
			value = {
				type = age
				value = 100
			}
		}
PS: Ugh one of these days i'll figure out the button to put so I don't lose my indentation :p [EDIT: I figure out for you ;) ; Cat]

Ok I think I figured it out as a csc switcher, however I still have a question if once changed is it global, like I change it once and then never have to change it again? Or do I have to add 'for' infront of everything with spouse afterward when judging effects.
 
Last edited by a moderator:
How about this:

Code:
trigger = {
       condition = { type = spouse value = { type = ruler } }
       condition = { type = age value = 20 }
       condition = { type = not value = { type = age value = 60 } }
}

As this condition fires the event for the ruler's spouse, so any effects you put in affect the ruler's spouse if you don't put any targeting.
 
Thanks I just put an update of code above which I think I've gotten to work, but your method is much cleaner.

Scratch that Neither mine nor your's seem to give the desired result. Mine loads but it does not augment things correctly because it defaults back to the king as the main person not the spouse. What you presented I cannot get to load.
 
Last edited:
Cniht said:
PS: Ugh one of these days i'll figure out the button to put so I don't lose my indentation :p
It's the button with a #

It creates the tag
Code:
:)

  Cat
 
Code:
condition = { type = spouse value = { type = ruler } }
is not a valid syntax.

Code:
	trigger = {
		condition = { type = religion value = catholic }
		condition = { type = gender value = male }
		condition = { type = ruler }
		condition = { type = is_married }
		condition = {
			type = spouse
			condition = {
				type = and
				condition = { type = age value = 30 }
				condition = { type = not value = { type = age value = 100 } }
			}
		}
	}
This trigger will check you are a catholic male ruler, married, and your wife is between 30 and 100. ;)

Cat
 
Cat Lord said:
This trigger will check you are a catholic male ruler, married, and your wife is between 30 and 100. ;)
Which means that if she manages to get over 100 without this event firing, you won't be able to send her to the covent. You don't really need this check :D

Cat
 
Yes that I gather, however the problem is with the effects. I'm trying to make the spouse the primary target of the effects instead of labeling her constantly through the 'for =' part of most commands. It appears 'for =' doesn't work with a lot of the commands it is documented to work with.
 
Cniht said:
Yes that I gather, however the problem is with the effects. I'm trying to make the spouse the primary target of the effects instead of labeling her constantly through the 'for =' part of most commands. It appears 'for =' doesn't work with a lot of the commands it is documented to work with.
:confused: Like what ? I don't think it's true anymore.

In your case you want to use:

Code:
type = death value = spouse
as an effect for this event (to get rid of your spouse definitely).

Cat
 
Cat Lord said:
:confused: Like what ? I don't think it's true anymore.

In your case you want to use:

Code:
type = death value = spouse
as an effect for this event (to get rid of your spouse definitely).

Cat

Code:
effect = { type = fertility for = spouse value = -5 }
          effect = { type = piety for = spouse value = 100 }

Both of those two are giving me hell when I use them with the ruler as the main target.

type = fertility for = [target char] value = V Note: Additive

The above is from the events doc.
However now that I look at it, piety is not labeled that way. However, I was going to solve this by doing a work around of making the spouse the primary target.

perhaps a random courier event with the condition of her spouse being a king?

PS: The event wasn't really to get rid of her. It has a mean time of firing in 120 months. This would make it on average fire within a 10 year period. 30-50 being the benchmark. The 100 was just so i'm positive it will fire to check right now. Fertility lowered, piety up, chaste added, and a chance at various clerical based education traits. (martial priest etc) by 40-50 she's done with the baby times, so losing fertility isn't really that important, but I wanted to add it for a possible hit if the event fires pre 40. Also it lets me play with tags and know what works and what doesn't.
 
Last edited:
Cat Lord said:
Code:
condition = { type = spouse value = { type = ruler } }
is not a valid syntax.

Would this be a valid syntax if I change "value" after "type = spouse" to "condition"? Just want to know if I need to use things like that in my own scripting...
 
Byakhiam said:
Would this be a valid syntax if I change "value" after "type = spouse" to "condition"? Just want to know if I need to use things like that in my own scripting...
Code:
	trigger = {
		condition = { type = religion value = catholic }
		condition = { type = gender value = female }
		condition = { type = is_married }
		condition = { type = age value = 30 }
		condition = {
			type = spouse
			condition = { type = ruler }
		}
	}
This will trigger for catholic, female, married character, over 30, if they are the wife of a ruler. :)

Cat
 
Cat Lord said:
This will trigger for catholic, female, married character, over 30, if they are the wife of a ruler. :)

You could have said that changing value to condition was the correct fix, because it obviously was with a look at the script you gave. Besides isn't is_married somewhat pointless in that because if you have spouse you are married?
 
Byakhiam said:
You could have said that changing value to condition was the correct fix, because it obviously was with a look at the script you gave. Besides isn't is_married somewhat pointless in that because if you have spouse you are married?
Strictly speaking yes, but it may save you CPU time by not going any further checking for the CSC condition (I don't know how it is coded).

Cat
 
Byakhiam said:
You could have said that changing value to condition was the correct fix, because it obviously was with a look at the script you gave. Besides isn't is_married somewhat pointless in that because if you have spouse you are married?

Well I'm not sure how the CK code works but I'd be very scared to use the spouse command without checking the is_married first. Not sure how the variables are set up if someone is not married, but it could be just a junk value which would have some very strange results.