• 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:
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.
 
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???
 
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.
 
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?
 
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).
 
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:
 
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!
 
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 ?
 
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.
 
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