unmerged(175287)

Swordless Knight
3 Badges
Oct 25, 2009
253
1
  • Cities in Motion
  • Crusader Kings II
  • Deus Vult
So, since there's no way to trigger a province event from a character event, I suppose there's no way to change noble_loyalty from a character event either, or is there?
 

Veldmaarschalk

Very old guard
Super Moderator
Moderator
149 Badges
Apr 20, 2003
30.027
1.263
  • Europa Universalis IV
  • 200k Club
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • 500k Club
Try this

Code:
character_event = {
id = 20100

picture = "event_education"

trigger = {
condition = { type = ruler }
condition = { type = not value = { type = trait value = honest } }
}

mean_time_to_happen = {
months = 60
}


action_a = {
effect = { type = add_trait value = honest }
}
}
 

Veldmaarschalk

Very old guard
Super Moderator
Moderator
149 Badges
Apr 20, 2003
30.027
1.263
  • Europa Universalis IV
  • 200k Club
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • 500k Club
thank a lot, but why says unknown string wanted?

Because you only have added an event, you will also have to add an event text, something like this


Code:
EVT_20100_NAME;I am an honest person.;;;;;;;;;;;;;X
ACTIONNAME20100A;OK;;;;;;;;;;;;;X
To either config/event_text.csv or if you have an event mod installed already to config/modtext.csv
 

faboj

Second Lieutenant
6 Badges
Sep 15, 2008
151
0
  • Cities in Motion
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis IV
  • Victoria 2
  • 500k Club
thank you; would you tell me where this is wrong
character_event = {
id = 20100

picture = "event_child"

trigger = {
condition = { type = worst_son }
condition = { type = age_value = 16 }
condition = { type = not value = { type = trait value = bastard } }
condition = { type = diplomatic_value < 5 }
or
condition = { type = martial_value < 5 }
or
condition = { type = intrigue_value < 5 }
or
condition = { type = stewardship_value < 5 }

}

action_a = {
effect = { type = random_chance = 75 }
effect = { type = add_trait value = bastard }
effect = { type = loyalty_value = -0.5 }

}

action_b = {
effect = { type = loyalty_value = 0.5 }

}

}
 

jordarkelf

01_TITLE_STRING
156 Badges
Jul 13, 2005
8.040
635
erbkaiser.nl
  • Impire
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Galactic Assault
  • Gettysburg
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III Complete
  • Iron Cross
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Legio
  • Leviathan: Warships
  • The Kings Crusade
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Island Bound
  • Crusader Kings II: Sons of Abraham
  • Ancient Space
  • Hearts of Iron Anthology
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • 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
  • A Game of Dwarves
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • Dungeonland
  • East India Company
  • East India Company Collection
  • Europa Universalis III
< is not a supported operator, and age_value and diplomatic_value do not exist.
Where did you get these from :confused:

You will have to use condition = { type = not value = { type = diplomatic value = 5 } }

//Edit: I see what you did there. You cannot combine type and value with underscores...
 

faboj

Second Lieutenant
6 Badges
Sep 15, 2008
151
0
  • Cities in Motion
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis IV
  • Victoria 2
  • 500k Club
it doesn't recognize the conditions worst son and age value, i had changed in
character_event = {
id = 20100

picture = "event_child"

trigger = {
condition = { type = worst_son }
condition = { type = age_value = 16 }
condition = { type = value = { type = trait value = bastard } }
condition = { type = value = { type = diplomatic value = 5 } }
or
condition = { type = value = { type = martial value = 5 } }
or
condition = { type = value = { type = intrigue value = 5 } }
or
condition = { type = value = { type = stewardship value = 5 } }

}
action_a = {
effect = { type = ai chance = 8
effect = { type = add_trait value = bastard }}
effect = { type = loyalty for = worst_son value = -0.5 }
}
action_b = {
effect = { type = loyalty_value = 0.5 }

}

}
 
Last edited:

jordarkelf

01_TITLE_STRING
156 Badges
Jul 13, 2005
8.040
635
erbkaiser.nl
  • Impire
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Galactic Assault
  • Gettysburg
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III Complete
  • Iron Cross
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Legio
  • Leviathan: Warships
  • The Kings Crusade
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Island Bound
  • Crusader Kings II: Sons of Abraham
  • Ancient Space
  • Hearts of Iron Anthology
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • 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
  • A Game of Dwarves
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • Dungeonland
  • East India Company
  • East India Company Collection
  • Europa Universalis III
age_value does not exist. Did you mean condition = { type = age value = 16 } ?
Likewise there is no loyalty_value. Did you mean effect = { type = loyalty value = 0.5 } ?

worst_son is not a valid trigger condition, it is a target.

Please refer to event effects.txt for valid triggers, targets, and syntax.
 

faboj

Second Lieutenant
6 Badges
Sep 15, 2008
151
0
  • Cities in Motion
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis IV
  • Victoria 2
  • 500k Club
Of course it will. Your entire event is invalid. Just use an existing event as your basis, and do not invent new invalid triggers/actions etc., and it should work.
I explain, from
character_event = { #Your spymaster advises you that there is evidence that your newborn babe could not have been sired by you.

id = 8630
picture = "event_spymaster"

trigger = {
condition = { type = not value = { type = age value = 2 } }
condition = { type = ruler_child }
condition = { type = gender value = male }
condition = { type = not value = { type = trait value = bastard } }
condition = { type = not value = { type = trait value = inbred } }
condition = { type = father
condition = { type = and
condition = { type = is_alive }
condition = { type = is_married }
condition = { type = ruler }
}
}
condition = { type = mother
condition = { type = and
condition = { type = is_alive }
condition = { type = not value = { type = trait value = chaste } }
condition = { type = not value = { type = spymaster } }
}
}
}

mean_time_to_happen = {
months = 1500

modifier = {
condition = { type = father
condition = { type = command }
}
factor = 0.1
}
modifier = {
condition = { type = father
condition = { type = siege }
}
factor = 0.5
}
modifier = {
condition = { type = father
condition = { type = or
condition = { type = on_crusade }
condition = { type = and
condition = { type = atwar }
condition = { type = not value = { type = enemy_same_religion } }
}
}
}
factor = 0.5
}
modifier = {
condition = { type = spymaster_csc
condition = { type = or
condition = { type = trait value = flamboyant_schemer }
condition = { type = trait value = intricate_webweaver }
condition = { type = and
condition = { type = trait value = deceitful }
condition = { type = intrigue value = 10 }
}
}
}
factor = 0.5
}
modifier = {
condition = { type = spymaster_csc
condition = { type = or
condition = { type = trait value = naive_wirepuller }
condition = { type = trait value = illusive_shadow }
condition = { type = and
condition = { type = trait value = honest }
condition = { type = intrigue value = 10 }
}
}
}
factor = 2
}
modifier = {
condition = { type = father
condition = { type = any_child
condition = { type = and
condition = { type = trait value = bastard }
condition = { type = ruler_child } #must be living at home
condition = { type = age value = 12 }
condition = { type = not value = { type = trait value = honest } }
condition = { type = or
condition = { type = trait value = deceitful }
condition = { type = trait value = suspicious }
}
}
}
}
factor = 0.1
}
modifier = {
condition = { type = father
condition = { type = any_child
condition = { type = and
condition = { type = trait value = bastard }
condition = { type = ruler_child } #must be living at home
condition = { type = age value = 12 }
condition = { type = not value = { type = trait value = honest } }
condition = { type = not value = { type = trait value = deceitful } }
condition = { type = not value = { type = trait value = suspicious } }
}
}
}
factor = 0.75
}
modifier = {
condition = { type = mother
condition = { type = trait value = deceitful }
}
factor = 0.5
}
modifier = {
condition = { type = mother
condition = { type = trait value = honest }
}
factor = 2
}
modifier = {
condition = { type = mother
condition = { type = trait value = lustful }
}
factor = 0.5
}
modifier = {
condition = { type = father
condition = { type = trait value = chaste }
}
factor = 0.5
}
modifier = {
condition = { type = father
condition = { type = trait value = lustful }
}
factor = 3
}
}

action_a = { #Sadly, I'm sure he's right.
effect = { type = add_trait value = bastard }
effect = { type = add_trait value = vengeful }
effect = { type = loyalty value = -0.6 }
effect = { type = trigger for = father value = 8631 } #Your son is revealed as bastard!
effect = { type = trigger for = mother value = 8632 } #Your infidelity has been discovered!
}
Action_b = { #I refuse to believe it!
effect = { type = prestige value = -15 }
effect = { type = trigger for = father value = 8633 } #Ruler disbelieves his spymaster's evidence of his wife's infidelity
}
}




I MADE THIS WITH SOME MODIFICATIONS
character_event = {

id = 20100
picture = "event_spymaster"

trigger = {
condition = { type = age_value = 15 }
condition = { type = ruler_child }
condition = { type = gender_value = male }
condition = { type = not value = { type = trait value = bastard } }
condition = { type = value = { type = diplomatic value = 5 } }
or
condition = { type = value = { type = martial value = 5 } }
or
condition = { type = value = { type = intrigue value = 5 } }
or
condition = { type = value = { type = stewardship value = 5 } }
condition = { type = father
condition = { type = and
condition = { type = is_alive }
condition = { type = ruler }
}
}

}

mean_time_to_happen = {
months = 60


}

action_a = {
effect = { type = add_trait value = bastard }
effect = { type = add_trait value = vengeful }
effect = { type = loyalty value = -0.6 }

}
Action_b = {
effect = { type = prestige value = -15 }
}
}
what's wrong
 
Nov 26, 2009
20
0
Dear faboj,

I have modified your event to suit the game. Please compare this and your script.

Code:
character_event = { 

id = 20100

picture = "event_spymaster"

trigger = {
	condition = { type = age value = 15 }
	condition = { type = ruler_child }
	condition = { type = gender value = male }
	condition = { type = not value = { type = trait value = bastard } }
	condition = { type = or 
		condition = { type = not value = { type = diplomacy value = 5 } }
		condition = { type = not value = { type = martial value = 5 } }
		condition = { type = not value = { type = intrigue value = 5 } }
		condition = { type = not value = { type = stewardship value = 5 } }
		}
	condition = { type = father
		condition = { type = and
			condition = { type = is_alive }
			condition = { type = ruler }
			}
		}
	}

mean_time_to_happen = {
months = 60
}

action_a = { 
	effect = { type = add_trait value = bastard }
	effect = { type = add_trait value = vengeful }
	effect = { type = loyalty value = -0.6 }
	}
action_b = { 
	effect = { type = prestige value = -15 }
	}
}

If your target character is the ruler's "fool" son, whose values are all less than 4, please change "type = or" to "type = and".
 

faboj

Second Lieutenant
6 Badges
Sep 15, 2008
151
0
  • Cities in Motion
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis IV
  • Victoria 2
  • 500k Club
thank so much, you're my salvation, but i don't understand why
condition = { type = not value = { type = diplomacy value = 5 } }
condition = { type = not value = { type = martial value = 5 } }
condition = { type = not value = { type = intrigue value = 5 } }
condition = { type = not value = { type = stewardship value = 5 } }
not value? I want values under those, and why happen UNKNOWN STRING WANTED, i put the description in config\event_text?
 
Last edited: