• 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.
There is any_province_lord (look in rebel_events.txt) and to give any of your baronies a building, I use this little number:

Code:
random_demesne_title = {
    limit = {
        location = {
            province_id = 157
        }
        tier = baron
        }
    add_building = ca_priory_cluniac_1
    add_building = ca_priory_santiago_1
    }

would that cause every baron in the province 157 to then receive the buildings in there holding?
 
There is any_province_lord (look in rebel_events.txt) and to give any of your baronies a building, I use this little number:

Code:
random_demesne_title = {
    limit = {
        location = {
            province_id = 157
        }
        tier = baron
        }
    add_building = ca_priory_cluniac_1
    add_building = ca_priory_santiago_1
    }
You could probably use province_id = ROOT, no? Or PREV, depending on how you call the province.
 
You could probably use province_id = ROOT, no? Or PREV, depending on how you call the province.

There are a few ways to do it, depending first on whether it is a province or character event. Using province_id = ROOT seems to cause the event to fire at that character's current location, so if you are at peace in your own court, no problem, but if you are leading your army through neutral or enemy territory, well you could have an unexpected result. That is my understanding at least.
 
There are a few ways to do it, depending first on whether it is a province or character event. Using province_id = ROOT seems to cause the event to fire at that character's current location, so if you are at peace in your own court, no problem, but if you are leading your army through neutral or enemy territory, well you could have an unexpected result. That is my understanding at least.
For a character event I'd do this instead:
random_demesne_province = { ROOT = { random_demesne_title = { limit = { location = { province_id = PREVPREVPREV }}}}}
 
Is there any way to get to the death causes for characters?

The *.txt files are filled with lines such as "death_reason = death_dungeon" but I cannot find the file containing the death_reason(s). Have become mighty curious.
 
For a character event I'd do this instead:
random_demesne_province = { ROOT = { random_demesne_title = { limit = { location = { province_id = PREVPREVPREV }}}}}

thats interesting, iv never used PREV before, so as it says PREVPREVPREV - that refers to the original random_demesne_province, yes!? i.e. our very first scope?
 
Has there been some change in the way character modifier effects are handled in the recent patches?

I've got the following event:

Code:
# Grail King automatically becomes an esoteric master, if he has the trait at game start
character_event = {
	id = 101007
	desc = "EVTDESC101007"
	picture = "GFX_evt_shadowy_cabal"

	min_age = 16
	only_capable = yes
	only_men = yes

	trigger = {
		trait = grail_king
		NOT = { has_character_modifier = esoteric_initiate }
		NOT = { has_character_modifier = esoteric_adept }
		NOT = { has_character_modifier = esoteric_master }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA101007"

		set_global_flag = the_grail_king
		add_character_modifier = {
			name = esoteric_master
			duration = -1
		}
	}
}

The idea here is that a character may have the "Grail King" trait at the start of the game (this is the case for one of the bookmarks in the mod I'm working on). If this happens, that character should get the "Esoteric Master" modifier at once.

This worked just fine last time I was working on my mod, which was still under patch 1.04. Now under 1.05e the event fires over and over again for the appropriate character and the modifier never gets assigned. I deduce that the event triggers are working properly, but the add_character_modifier effect is failing to work. Can't find anything wrong with the syntax. This code doesn't look any different from lots of other events in the core game. Any insight?
 
This worked just fine last time I was working on my mod, which was still under patch 1.04. Now under 1.05e the event fires over and over again for the appropriate character and the modifier never gets assigned. I deduce that the event triggers are working properly, but the add_character_modifier effect is failing to work. Can't find anything wrong with the syntax. This code doesn't look any different from lots of other events in the core game. Any insight?

event_modifiers.txt is now located inside a folder in the common folder.
The problem you have is that your event_modifier's are not properly set in the mod. You have to make a new txt file with the modifiers your mod uses, and place it in the common/event_modifiers/ folder.
 
event_modifiers.txt is now located inside a folder in the common folder.
The problem you have is that your event_modifier's are not properly set in the mod. You have to make a new txt file with the modifiers your mod uses, and place it in the common/event_modifiers/ folder.

Aha! That would explain it. I know Paradox has been using that approach for more files to make it easier for modders, but I hadn't noticed that they moved the event_modifiers file.

A quick test reveals that the event works perfectly again. Many thanks.
 
So I had a realization: If I created a titular "k_norman_england" and had an event that swapped it out for k_england when William took over, replaced all claims to k_england with claims to k_norman_england, and changed the de jure liege of all of k_england's de jure vassals to k_norman_england, I could effectively have William change England's CoA and reset the ordinal numbers on its kings after the Conquest, without changing anything else!

So far, all of this works perfectly, with one exception. I can't get all the de jure vassals to change their de jure liege:
1i1uub.jpg

It looks like, no matter what I do, I can only access titles that are currently actually held by someone, even if I want to alter their de jure properties. Is this just an oversight by Paradox or is there some way around it that I can't see?
 
@Galle: I reported this bug a week or two ago. A Paradox employee said he'd pass it on.
As a workaround I think you should be able to to it less elegantly by scoping to each individual duchy and doing the dejure changes from there rather than using any_de_jure_vassal_title.
 
Why do new events sometimes fire without the option button? Here is my event:

Code:
province_event = {
    id = stgo.1
    desc = "Defend the line"
    picture = "GFX_evt_large_army"
    
    #is_triggered_only = yes
    
    trigger = {
        random_realm_province = {
            check_variable = {
                which = frontier
                value = 1
            }
            NOT = { has_province_modifier = frontier_1 }
        }
    }
    
    option = {
        name = "EVTOPTAstgo.1"
        remove_province_modifier = frontier_0
        add_province_modifier = {
            name = frontier_1
            duration = -1
        }
    }
}

eventfail.jpg



EDIT2: Figured it out myself. I was mixing character and province effects together. :)
 
Last edited:
@Galle: I reported this bug a week or two ago. A Paradox employee said he'd pass it on.
As a workaround I think you should be able to to it less elegantly by scoping to each individual duchy and doing the dejure changes from there rather than using any_de_jure_vassal_title.

I've tried that, too. Same problem.

I suppose I'll have to wait for a patch until I can implement this, I guess.
 
Is marriage hardcoded, or the determination of marriage?
What I mean by determination is, when you offer marriage to the AI currently you get the + and the - pips (like + positive opinion, ---------------recurring- wants a better alliance) is it possible to include new +/- factors?
I'm asking as I'd like to impliment something along the lines of "regional" marriage, I find it curious that in one or two of my earlier games the AI in Ireland or Iceland married an ethiopian baron's daughter (even prior to my NAE mod), I also find it curious that you can marry a muslim as a christian and visa versa. While I'm positive this occurs in modern life, are there any instances of it occuring during the medieval period when both religions were struggling for dominance?
I'd like to restrict christians to marrying other christians (and perhaps pagans), and muslims to marrying other muslims (and perhaps pagans), as well as including a distance factor, though I'm guessing that's something that's more than likely hardcoded.
 
Is marriage hardcoded, or the determination of marriage?
What I mean by determination is, when you offer marriage to the AI currently you get the + and the - pips (like + positive opinion, ---------------recurring- wants a better alliance) is it possible to include new +/- factors?
I'm asking as I'd like to impliment something along the lines of "regional" marriage, I find it curious that in one or two of my earlier games the AI in Ireland or Iceland married an ethiopian baron's daughter (even prior to my NAE mod), I also find it curious that you can marry a muslim as a christian and visa versa. While I'm positive this occurs in modern life, are there any instances of it occuring during the medieval period when both religions were struggling for dominance?
I'd like to restrict christians to marrying other christians (and perhaps pagans), and muslims to marrying other muslims (and perhaps pagans), as well as including a distance factor, though I'm guessing that's something that's more than likely hardcoded.

yes i think your right when you say marriage is hardcoded, iv not seen any files that deal with it..... im sure someone else will be able to clarify.


Question of my own .... (again lol)

is it possible to make events that fire for the player but are totally hidden from view? so you never actually see the event box pop up.