Update:
- Added on action on_create_title
- Added history command disallow_random_traits
- Added on action on_create_title
- Added history command disallow_random_traits
Great!Update:
- Added on action on_create_title
- Added history command disallow_random_traits
Great!
I assume you can scope to the title itself in an event happening via on_create_title?
Great. I've clarified that on the suggestion list.Yes, the FROM scope will point to the created title.
Great. I've clarified that on the suggestion list.
Was there already one for Judaism? It wasn't mentioned in the earlier post either.
Ah, thanks. My bad.
Also, is there a list somewhere of all the various commands and triggers and scopes? Last I checked, the lists on the wiki were rather incomplete.
Consdiering laws work in character scope, and demense size is presumably a character scoped modifier, than yes, it should work in laws.
If there were also a condition to see if this happened via inheritance or usurpation would also be nice.- Added on action on_new_holder
I imagine it would keep CK2 from generating random traits for a character on starting at a bookmark.
If there were also a condition to see if this happened via inheritance or usurpation would also be nice.
That does not sound very hopeful, does it mean that you will not do it?
I did test it not that long ago and the results of that testing is that most, if not all of the character modifiers are valid for titles. Given, most of my knowlege on CK2 modding is based off of observation since there is not much in the way of documentation.
on_new_holder triggers for either, I take it? Which is great; some events definitely don't care how you got the title.Split it into three separate: on_new_holder_inheritance, on_new_holder_usurpation and on_new_holder. FROMFROM is the old holder (if there was a valid one).
on_new_holder triggers for either, I take it? Which is great; some events definitely don't care how you got the title.
Okay. As long as the lack of overlap is entirely consistent that's fineActually no, it triggers if none of the other are valid. So if you want an event to always trigger, no matter what, then add that event to all three on actions.
The command "on_create_title" could be used for titles as "The Roman Empire" that is it could be shown as creatable in the normal title interface (with all the usual requirements) and then after the creation the event that destroy the original title make it de jure and so on would be called with "on_create_title = { e_roman_empire }" or similar?
I've always seen the fact that some titles needed to be created via decision as a sort of ... mistake.
You are working on alliances I see, could do I make a question to you? How much could be difficult to add a command to create an alliance without marriage? The alliance could broke on one of the characters death as usually and have the same game limitations (lost opinion if called in war and so on).
In PB, we currently use this block of code a number of places to check for alliances:Update:
- Added trigger is_allied_with
- Added trigger scope any_allied_character
- Added effect scope any_allied_character
- Added effect scope random_allied_character
NOTE: the reson allies have been absent as triggers is that it is an expensive calculation. So these triggers should be used with care.
custom_tooltip = {
text = is_not_allied
hidden_tooltip = {
ROOT = {
NOT = { dynasty = FROM }
NOT = { is_close_relative = FROM }
NOT = { any_spouse = { character = FROM } }
NOT = { any_spouse = { is_close_relative = FROM } }
NOT = { FROM = { any_spouse = { is_close_relative = ROOT } } }
}
}
}
In PB, we currently use this block of code a number of places to check for alliances:
Compared to this, roughly how expensive is is_allied_with?Code:custom_tooltip = { text = is_not_allied hidden_tooltip = { ROOT = { NOT = { dynasty = FROM } NOT = { is_close_relative = FROM } NOT = { any_spouse = { character = FROM } } NOT = { any_spouse = { is_close_relative = FROM } } NOT = { FROM = { any_spouse = { is_close_relative = ROOT } } } } } }
As long as it is roughly comparable we on the PB team are rather happy. Simplifying it down to one line instead of the current ~10 will make the code a lot more compact at the very least, and ensure that all alliances are covered.I can't say. That would have to be tested. My guess is that is_close_relative is somewhat expensive as well.