• 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.
Can anyone think of a reason why the following fails to identify a child of FROM residing at ROOT's court as being FROM's child?

Code:
        third_party_potential = {
            is_child_of = FROM
            NOT = { is_child_of = ROOT }
            prisoner = no
        }
The third_party_potential scope set up is ROOT = decision target, FROM = decisions taker and FROMFROM = the third party. You start off in the ROOT scope. So if you want to check the third party as being a child of FROM and not a child of ROOT you would need to wrap your current conditions in a FROMFORM = { } scope. As otherwise you are currently checking ROOT is a child of FROM and not a child of ROOT.
 
Code:
character_event = {
   id = aloha.3001 #Der neue Herrscher
    desc = aloha_event_3001
    hide_window = yes
    is_triggered_only = yes

    trigger = {
        FROMFROM = { trait = harem_chef }
    }

    immediate = {
        character_event = { id = aloha.3002 days = 2 }
    }
}
Seems to fire also, have tried it without the "hide window"-thing, but since my character is not the reciever...
Did you put aloha.3001 in both on_new_holder and on_new_holder_inheritance? Each on_action that applies fires events independently if I'm not mistaken, so you need to set a flag to block the others.
Code:
character_event = {
   id = aloha.3001 #Der neue Herrscher
    desc = aloha_event_3001
    hide_window = yes
    is_triggered_only = yes

    trigger = {
        FROMFROM = { trait = harem_chef }
        NOT = { has_character_flag = harem_dealt_with }
    }

    immediate = {
        set_character_flag = harem_dealt_with
        character_event = { id = aloha.3002 days = 2 }
    }
}
 
How would I stop a building being available if it already exists?

I thought it would have been :

Code:
potential = {
   OR = {
    FROMFROM = {
     has_building = my_building # Can only be built if it is already built in a Province, OR
    }
    any_province = {   # Can only be built if any Province in the world
     any_province_holding = {  # has any Province Holding
      NOT = {                         # Which does not have the building
       OR = {                          # Or for different 'types' of Building (Tribal, City, Castle, Temple)
        has_building = my_building
       }
      }
     }
    }
   }
  }

Instead, though, I am still able to build the building as many times as I like.
 
I have a particular event that is vexing me. I want an on_action , on_new_holder (and also on_yearly_pulse) to go through my custom emperor and king tier titles for AI. Then to match those titles against some requirements (such as traits). If a certain trait is lacking, I want the title to be destroyed. I can't seem to get it to work.

Code:
namespace = POD_special_title_maintenance
character_event = {
    id = POD_special_title_maintenance.1
    hide_window = yes  
    only_rulers = yes
    ai = yes
    is_triggered_only = yes
  
    trigger = {
        OR = {
                primary_title = { tier = KING }
                primary_title = { tier = EMPEROR }
            }
        }      
  
    immediate = {

        if = {
            limit = {
                any_demesne_title = {
                    title =  e_brujahcamarilla
                }          
                OR = {
                        NOT = { trait = vampire }
                        NOT = { religion = brujahcamarilla }
                        NOT = { realm_size = 20 }
                        NOT = { trait = brujah }
                }
            }
          
            any_demesne_title = {
                limit = {
                    e_brujahcamarilla
                }
                destroy_landed_title = THIS
            }
        }

      
     }
}
 
How would I stop a building being available if it already exists?

I thought it would have been :

Code:
potential = {
   OR = {
    FROMFROM = {
     has_building = my_building # Can only be built if it is already built in a Province, OR
    }
    any_province = {   # Can only be built if any Province in the world
     any_province_holding = {  # has any Province Holding
      NOT = {                         # Which does not have the building
       OR = {                          # Or for different 'types' of Building (Tribal, City, Castle, Temple)
        has_building = my_building
       }
      }
     }
    }
   }
  }

Instead, though, I am still able to build the building as many times as I like.

Currently your building can be built if there is any holding in the world that doesn't have the building. What you want is this:
Code:
potential = {
    OR = {
        FROMFROM = {
            has_building = my_building # Can only be built if it is already built in a Province, OR
        }
        NOT = {            # It is NOT true that
            any_province = {   # There is some province in the world
                any_province_holding = {  # which has some holding
                    OR = {                          # which has the building
                        has_building = my_building
                    }
                }
            }
        }
    }
}
 
Currently your building can be built if there is any holding in the world that doesn't have the building. What you want is this:
Code:
potential = {
    OR = {
        FROMFROM = {
            has_building = my_building # Can only be built if it is already built in a Province, OR
        }
        NOT = {            # It is NOT true that
            any_province = {   # There is some province in the world
                any_province_holding = {  # which has some holding
                    OR = {                          # which has the building
                        has_building = my_building
                    }
                }
            }
        }
    }
}

Ah, thank-you very much! :)
 
I have a particular event that is vexing me. I want an on_action , on_new_holder (and also on_yearly_pulse) to go through my custom emperor and king tier titles for AI. Then to match those titles against some requirements (such as traits). If a certain trait is lacking, I want the title to be destroyed. I can't seem to get it to work.

Code:
namespace = POD_special_title_maintenance
character_event = {
    id = POD_special_title_maintenance.1
    hide_window = yes
    only_rulers = yes
    ai = yes
    is_triggered_only = yes
 
    trigger = {
        OR = {
                primary_title = { tier = KING }
                primary_title = { tier = EMPEROR }
            }
        }    
 
    immediate = {

        if = {
            limit = {
                any_demesne_title = {
                    title =  e_brujahcamarilla
                }        
                OR = {
                        NOT = { trait = vampire }
                        NOT = { religion = brujahcamarilla }
                        NOT = { realm_size = 20 }
                        NOT = { trait = brujah }
                }
            }
        
            any_demesne_title = {
                limit = {
                    e_brujahcamarilla
                }
                destroy_landed_title = THIS
            }
        }

    
     }
}
I don't think limit = { e_brujahcamarilla } works. Try:
Code:
namespace = POD_special_title_maintenance
character_event = {
    id = POD_special_title_maintenance.1
    hide_window = yes
    only_rulers = yes
    ai = yes
    is_triggered_only = yes

trigger = {
     e_brujahcamarilla = {
          holder_scope = {
                OR = {
                        NOT = { trait = vampire }
                        NOT = { religion = brujahcamarilla }
                        NOT = { realm_size = 20 }
                        NOT = { trait = brujah }
                }
           }
     }
}

    immediate = {
        e_brujahcamarilla = {
              destroy_landed_title = THIS
        }   
     }
}

Also, sticking this in on_yearly_pulse runs it every year for every ruler, which seems unnecessary.
 
Does
Code:
remove_building
work in province history? I want to remove certain building from certain holding on certain date.
I tried
<holding_name> = { remove_building = <building_name> }
and
<holding_name> = effect = { remove_building = <building_name> } }
but they either break the holding or don't work at all :/
 
I don't think limit = { e_brujahcamarilla } works. Try:
Code:
trigger = {
     e_brujahcamarilla = {

Also, sticking this in on_yearly_pulse runs it every year for every ruler, which seems unnecessary.

Thanks for the feedback and suggestion!

I put my event down for showing it here to just show one title. I'm actually checking about a dozen empire/king titles. I was trying to avoid having a dozen different events. I may have to do it the way you suggest.

Code:
namespace = POD_special_title_maintenance
character_event = {
    id = POD_special_title_maintenance.1
    hide_window = yes  
    only_rulers = yes
    ai = yes
    is_triggered_only = yes
  
    trigger = {
        OR = {
                primary_title = { tier = KING }
                primary_title = { tier = EMPEROR }
            }
        }      
  
    immediate = {
      
        if = {
            limit = {
                any_demesne_title = {
                    title =  e_brujahcamarilla
                }          
                OR = {
                        NOT = { trait = vampire }
                        NOT = { religion = brujahcamarilla }
                        NOT = { realm_size = 20 }
                        NOT = { trait = brujah }
                }
            }
          
            any_demesne_title = {
                limit = {
                    e_brujahcamarilla
                }
                unsafe_destroy_title = THIS
            }
        }      
      
        if = {
            limit = {
                any_demesne_title = {
                    title =  e_gangrelcamarilla
                }          
                OR = {
                        NOT = { trait = vampire }
                        NOT = { religion = gangrelcamarilla }
                        NOT = { realm_size = 20 }
                        NOT = { trait = gangrel }
                }
            }
          
            any_demesne_title = {
                limit = {
                    e_gangrelcamarilla
                }
                unsafe_destroy_title = THIS
            }
        }      
}
}
 
Antipope mechanism and non-christians religion. Antipope have eampty place in interface. Anyone got an idea how to fix this?

654C7B27B4D8294E7450EE2B97D301DC665EC693
 
Hey, can anyone help me out with adding an Offmap decision? It's a bit tricky to find documentation for, considering how new it is. My Offmap Power I've got implemented and working correctly, and I've attempted creating a replication of the send gift decision from vanilla, but when I click on the gift button in the offmap menu, no decisions appear at all. I've attempted to cut down the decision as much as possible to identify a problem, but it's bare bones now and it's still not appearing in-game.

Here's the code for my decision.

Code:
#PAYING TRIBUTE DECISIONS (GAIN GRACE)
offmap_decisions = {

    spirit_grace_send_gift = {
        only_playable = yes
        button_name = offmap_gifts
        ai_check_interval = 12

        potential = {
            is_offmap_tag = offmap_spirit_world
        }

        from_potential = {
            mercenary = no
            holy_order = no
            is_landed = yes
        }

        allow = {
            FROM = {
                show_scope_change = no
                scaled_wealth = { value = 4 min = 500 }
                prisoner = no
                NOT = { trait = incapable }
                is_inaccessible_trigger = no
            }
        }
        effect = {
            FROM = {
                sound_effect = china_grace_gain
                scaled_wealth = { value = -4 min = -500 } #If this changes the ai chances should probably be adjusted
            }
        }

        revoke_allowed = {
            always = no
        }

        ai_will_do = {
            factor = 1
            modifier = {
                factor = 0.1 # slow down
            }
            modifier = {
                factor = 0.1
                FROM = { NOT = { monthly_income = 11 } } #I.e. it would take more than 4 years to collect the 500 gold
            }
        }
    }
   
}
 
I'm afraid it also breakes the holding (it doesn't appear in province view) :(
Province History only applies when starting a game, right? (Like AI provinces won't randomly gain a building once it ticks past a certain date during play). If so, why not just remove the building via an on_startup on_action? Check it is past the date, and remove it?
 
Province History only applies when starting a game, right? (Like AI provinces won't randomly gain a building once it ticks past a certain date during play). If so, why not just remove the building via an on_startup on_action? Check it is past the date, and remove it?
History effects are applied only when first starting a campaign, yes
 
So I'm basically technologically illiterate and have no idea about modding, but I've been trying to change the parent religion of a heresy due to where I want to play and interacting with the other religions there etc, but the changes just aren't happening in-game. I edited the 00_religions.txt file, which I thought would either make my changes work or break the game, but instead it just ignores it and carries on as if no changes were made at all, which seems strange to me.

Code:
messalian = {
        graphical_culture = westerngfx

        icon = 11
        heresy_icon = 13
       
        color = { 0.6 0.1 0.4 }
        parent = miaphysite
       
        crusade_name = CRUSADE
        scripture_name = THE_ASCETICUS
       
        god_names = {
            GOD_GOD THE_PANTOKRATOR GOD_JESUS LUCIFER
        }
       
        evil_god_names = {
            THE_DEMIURGE
        }

        can_retire_to_monastery = yes
        female_temple_holders = yes
        feminist = yes      # Nullifies the negative opinion modifier that vassals normally get if ruler is female or has female heir
       
        divine_blood = yes # Sacred close-kin marriage mechanics
        pc_marriage = yes
        bs_marriage = yes
       
        religious_clothing_head = 2
        religious_clothing_priest = 2
    }

It seemed to me that it would be a very simple change? Any idea why it won't work?
 
I put my event down for showing it here to just show one title. I'm actually checking about a dozen empire/king titles. I was trying to avoid having a dozen different events. I may have to do it the way you suggest.
Here's a thought: debug this event, and keep it for on_new_holder. For on_yearly_pulse, create another event with trigger = { controls_religion = yes religion = catholic } (the Pope is always around…), that just bounces to this event. Then this event will get fired once per year only, plus whenever anybody gets a title.

For the main event, keep the king/emperor trigger. For each title:
Code:
e_brujahcamarilla = {
    if = {
        holder_scope = {
            OR = {
                #check traits
            }
        }
        unsafe_destroy_title = THIS
    }
}
 
Is it possible to have a secondary landed titles file? I mean landed_title.txt is huge it would be really convenient to break it up into several files.
 
Is it possible to have a secondary landed titles file? I mean landed_title.txt is huge it would be really convenient to break it up into several files.
You can have as many files as you want. Note that if you want a title to be under another title, all titles involved need to be in the same file.