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

Madpainter

First Lieutenant
16 Badges
Sep 19, 2008
264
0
  • Europa Universalis III Complete
  • Europa Universalis: Rome
  • Victoria: Revolutions
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III
  • Deus Vult
  • Crusader Kings II
  • Cities in Motion
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Stellaris
  • Prison Architect
  • A Game of Dwarves
  • Cities in Motion 2
I'm trying to modify an event that fires when a character has a trait and the ruler has the opposite trait but it wasn't firing, so I removed the ruler part and just did a test run with a trait I know a character in my country has and mtth of one day and its still not firing in fact the only character events I can seem to get to work are the ones that directly control the ruler.
so now I'm thinking WTF is this normal or am I being stupid here.
Even vanilla character events don't seem to work properly, when I fire them manually they act on the ruler and not the charactor they're supposed to.
Can someone please enlighten me on where I must be going wrong because I'm pulling my hair out and getting nowhere:wacko:

edit-- Heres how the code stands so far, obviously some details will be changed but ATM iff I got it to fire at all it would be a bonus. I've substituted guileless for sarcastic so it should fire from a rome start
Code:
character_event = {
	
	id = 1234566

	trigger = {
		traits = sarcastic
		country = {
			ruler = {
				traits = crafty
			}
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	title = "Difference of opinion"
	desc = "$CHARACTERNAME$ thinks $SUBJECT$ ruler is an asshole"

	option = {
		name = "to do"
	}
}
 
Last edited:

Cheexsta

Veni, vidi, vici
60 Badges
Dec 22, 2005
2.894
59
  • Europa Universalis IV: Rights of Man
  • Rome: Vae Victis
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Victoria 2: Heart of Darkness
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Europa Universalis IV: Conquest of Paradise
  • 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
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Victoria 2
If you're trying to manually fire the events in the console, the events will always fire for the player's country (for country events), capital (for provinces events) or ruler (for character events) by default, even if they don't meet the trigger requirements. I know for province events you can add the province number to the command (so it'd be event [number] [province id]) and for country events you can add the country tags at the end (event [number] [tag]), so presumeably you could do the same with character events, though you'd probably have to include the name in double quotation marks.
 

Madpainter

First Lieutenant
16 Badges
Sep 19, 2008
264
0
  • Europa Universalis III Complete
  • Europa Universalis: Rome
  • Victoria: Revolutions
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III
  • Deus Vult
  • Crusader Kings II
  • Cities in Motion
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Stellaris
  • Prison Architect
  • A Game of Dwarves
  • Cities in Motion 2
oh so that explains why manually firing it doesn't help.
even so surely with mtth of one day it should fire within the first month or two.:wacko:
maybe I should copy a vanilla event and lower that to 1 day and let it run for a month to see what happens.:confused:

Is it possible that because I have no options set yet it perhaps fires but doesn't display the message???
 

Cheexsta

Veni, vidi, vici
60 Badges
Dec 22, 2005
2.894
59
  • Europa Universalis IV: Rights of Man
  • Rome: Vae Victis
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Victoria 2: Heart of Darkness
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Europa Universalis IV: Conquest of Paradise
  • 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
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Victoria 2
Since it's a character event, it won't show you a pop-up window unless it targets someone in your ruler's direct lineage. I suggest you turn on the event logger (the little triangular button next to the minimap) and see if your event fires within the desired timeframe.
 

Madpainter

First Lieutenant
16 Badges
Sep 19, 2008
264
0
  • Europa Universalis III Complete
  • Europa Universalis: Rome
  • Victoria: Revolutions
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III
  • Deus Vult
  • Crusader Kings II
  • Cities in Motion
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Stellaris
  • Prison Architect
  • A Game of Dwarves
  • Cities in Motion 2
OMG i'm waiting for a popup that isn't gonna appear.
Well since you haven't mentioned anything wrong with my code I'm assuming I'm going in the right direction.

Thanks for your help I'll get cracking tonight add some effects for the event and see what occurs.

On a side note does this mean multiple options will give me difficulty unless I programme them cleverly?
 

mate0815

Field Marshal
62 Badges
Feb 2, 2007
3.165
259
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Sengoku
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • 200k Club
  • 500k Club
  • Cities: Skylines
  • Europa Universalis III Complete
  • Europa Universalis IV: Pre-order
  • Pride of Nations
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Prison Architect
  • Europa Universalis III
  • 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
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • East India Company
  • Cities in Motion
  • Divine Wind
  • 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
  • Hearts of Iron III
  • Hearts of Iron III Collection
  • Heir to the Throne
On a side note does this mean multiple options will give me difficulty unless I programme them cleverly?

for multiple options you can take an option only for characters in the ruler-family. for others, the ai do.
if you want to prefer one of the options use the
Code:
ai_chance = { factor = xx }
commands for definitions (with how many percent choose the ai this option).
 

Madpainter

First Lieutenant
16 Badges
Sep 19, 2008
264
0
  • Europa Universalis III Complete
  • Europa Universalis: Rome
  • Victoria: Revolutions
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III
  • Deus Vult
  • Crusader Kings II
  • Cities in Motion
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Stellaris
  • Prison Architect
  • A Game of Dwarves
  • Cities in Motion 2
I think I've got this sussed now:)
Most of what I need can be done with titles, one of the effects of the titles is to fire an event with options for the ruler.
The only thing I cant seem to do is use those options to effect the original character but that can be a project for when I've got more experience:rolleyes:
Seems to be coming together sweet now, thanks again for all you help.
This time next year I may even start to call myself a modder. :rofl:
 

TheLoneGunman

NO STEP ON SNEK
Moderator
167 Badges
May 4, 2008
2.723
4.094
38
  • Europa Universalis IV
  • 200k Club
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Empire of Sin
  • Empire of Sin - Premium Edition
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • 500k Club
  • Paradox Order
  • Crusader Kings Complete
  • Deus Vult
  • Crusader Kings II: Holy Knight (pre-order)
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury Pre-order
  • Crusader Kings II: Holy Fury
  • Crusader Kings III Referal
  • Victoria 3 Sign Up
While there is no way that I know of to target a specific character in the game via event. You can set a list of specifications that a random character would have to meet in order to be affected by your event.

Included in this could be a title you can give to characters you want certain events to affect.

That's one way of doing it if you're already going the route of titles.

I think you could even use traits the same way.

Let us know how everything is going!
 

Hardradi

Lt. General
33 Badges
Apr 20, 2008
1.450
7
  • Crusader Kings II
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis: Rome
  • Semper Fi
  • Sengoku
  • Victoria 2
  • For the Motherland
  • Rome: Vae Victis
  • 500k Club
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Crusader Kings II: Holy Knight (pre-order)
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Divine Wind
  • Deus Vult
  • Europa Universalis III Complete
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Res Publica
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
If you're trying to manually fire the events in the console, the events will always fire for the player's country (for country events), capital (for provinces events) or ruler (for character events) by default, even if they don't meet the trigger requirements. I know for province events you can add the province number to the command (so it'd be event [number] [province id]) and for country events you can add the country tags at the end (event [number] [tag]), so presumeably you could do the same with character events, though you'd probably have to include the name in double quotation marks.

Cheexsta,

I noticed you used the double quotation marks in your Total Conquest Mod:

Code:
	add_province_modifier = { name = "tcm_province_kindness" duration = 3650 }

They are also seen in character files:

Code:
name = "Publius Valerius Laevinus"
family_name = "Decii"

From what you said above, would it be possible to use the name and family_name to trigger events ?
 

Cheexsta

Veni, vidi, vici
60 Badges
Dec 22, 2005
2.894
59
  • Europa Universalis IV: Rights of Man
  • Rome: Vae Victis
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Victoria 2: Heart of Darkness
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Europa Universalis IV: Conquest of Paradise
  • 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
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Victoria 2
The Modding Manual list of triggers doesn't mention family_name, but it seems to miss a couple of others so it's entirely possible.

You could try the "family" trigger, though, but the only instances of it I can find in the vanilla files have "THIS" and "father" as an argument. Adonys (another modder) pointed out that you can probably use a "WHICH" argument as well.

None of that really seems to help you, though. A quick check through the romegame.exe reveals "family_name" as being amongst event codes, but some of them are triggers and others effects so it doesn't really narrow anything down (though the character files seem to point to it being an effect rather than a trigger). I remember trying something with it before, but got nowhere quickly. You could give it a go, though; if you manually trigger it for your ruler, you'll be able to see if it checks the trigger as intended.

Sorry to not be of any more help than that.
 

Madpainter

First Lieutenant
16 Badges
Sep 19, 2008
264
0
  • Europa Universalis III Complete
  • Europa Universalis: Rome
  • Victoria: Revolutions
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis III
  • Deus Vult
  • Crusader Kings II
  • Cities in Motion
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Stellaris
  • Prison Architect
  • A Game of Dwarves
  • Cities in Motion 2
Let us know how everything is going!

Just finished the code and did a test run and I'm dead impressed with myself:)
Everything seems to be working a treat now, I can even choose an option from another character by giving the ruler the event then re-routing back through the titles as suggested. Thanks for that:).
My next project might be to alter the percentages on the omens so that different factors raise/lower the chances of different omens.
any suggestions.:p