• 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.
does the job action events = {} function like the on_action events = {} ? Can I set an event called by the events block as triggered only? And is there a way to make sure if it has a mtth of 1 will the event fire immediately?
 
How do I start a game off with an alliance between the Ayyubids and Ortokids is it like this how its described in the CK2wiki ?

add_alliance = { who = x days/months/years = y }

Haven't tried but found this post with code sample: https://forum.paradoxplaza.com/foru...uick-questions.589686/page-1398#post-21847136

Code:
effect = {
           d_brittany = { #Any title you want ROOT to ally with
                holder_scope = {
                    opinion = {
                        modifier = in_non_aggression_pact
                        who = ROOT
                        years = 10 #Set duration
                    }
                    reverse_opinion = {
                        modifier = in_non_aggression_pact
                        who = ROOT
                        years = 10 #Set duration
                    }
                    add_alliance = { who = ROOT years = 10 } #Set duration
                }
            }
        }

does the job action events = {} function like the on_action events = {} ? Can I set an event called by the events block as triggered only? And is there a way to make sure if it has a mtth of 1 will the event fire immediately?

Don't think so, the comment at the top of 00_job_actions.txt says it's only informative:
Code:
# Events that can trigger off this action. This info is only used by the GUI.

MTTH of 1 will depend on frequency:
Code:
EVENT_PROCESS_OFFSET = 20,     -- Events are checked every X day per character or province (1 is ideal, but CPU heavy)
 
does the job action events = {} function like the on_action events = {} ? Can I set an event called by the events block as triggered only? And is there a way to make sure if it has a mtth of 1 will the event fire immediately?
No. job_events is just so the UI will tell you which events it can fire, and how likely they are. It has no actual gameplay effect.
 
No. job_events is just so the UI will tell you which events it can fire, and how likely they are. It has no actual gameplay effect.
Is that changing at all with the new DLC? Or will it remain the same?
 
Is that changing at all with the new DLC? Or will it remain the same?
At the time of writing, that's remaining unchanged.
If it ends up being changed that'll be in the changelog in the User Modding section.
 
Im curious to know why all the characters start the game off soooo broke? Is that just the valuation of the currency of the times?

I think that (barring a few exceptions, like William the soon-to-be-Conqueror, who needs extra money to support his event troops) all characters start with X months (I believe I have heard 13 months) of piety/prestige/gold income, presumably because we don't know how much money/etc. someone had or how that would translate to in-game money. From my experience, giving people some starting money isn't really worth it anyway as the AI will spend it ASAP on retinues/buildings/holdings/titles/etc.
 
I am reading about the battle of Hattin Saladin allegedly had 30,000 men how am I supposed to show up in Tiberius (which is where Hattin is) on July 4 1187 7 months after the start with 30,000 men when I can't afford any mercenaries and take Jerusalem 3 months after that ?
 
I am reading about the battle of Hattin Saladin allegedly had 30,000 men how am I supposed to show up in Tiberius (which is where Hattin is) on July 4 1187 7 months after the start with 30,000 men when I can't afford any mercenaries and take Jerusalem 3 months after that ?

Recreating historical events that precisely in CK2 isn't really doable unless you cheat a lot with event troops (and the AI is very unlikely to use them intelligently) or money (which the AI will waste as well). Just try to become king of England by the 25th of December 1066 as William (barring a fluke like Harold getting imprisoned)...
 
Is there a way to change at which age characters visibly get older or is that hard coded?
If you can't, is there a way to completely overwrite the oldest age stage with the middle age graphics?
 
Is there a way to change at which age characters visibly get older or is that hard coded?
If you can't, is there a way to completely overwrite the oldest age stage with the middle age graphics?
There are a set of defines for it PORTRAIT_OLD_AGE_THRESHOLD. There are also ones for PORTRAIT_MID_AGE_THRESHOLD, PORTRAIT_ADULT_MALE_AGE_THRESHOLD and PORTRAIT_ADULT_FEMALE_AGE_THRESHOLD.
 
How would I write a decision allow that checks if the capital province has a building in any of the cities? I've tried any_province_holding but in game the tooltip always shows it checking the palace.

So I want this code to work:
Code:
allow = {
            capital_holding = {

                has_building = ct_ratcatchers_1
               
            }
        }
 
How would I write a decision allow that checks if the capital province has a building in any of the cities? I've tried any_province_holding but in game the tooltip always shows it checking the palace.

So I want this code to work:
Code:
allow = {
            capital_holding = {

                has_building = ct_ratcatchers_1
              
            }
        }

Silly mayfly. This should work for you:

Code:
allow = {
   ROOT = {
       capital_scope = {
           any_province_holding = {
               has_building = ct_ratcatchers_1
           }
       }
   }
}

capital_holding targets the main holding of the capital province, capital_scope targets the entire capital province.
 
Silly mayfly. This should work for you:

capital_holding targets the main holding of the capital province, capital_scope targets the entire capital province.

Ha, thanks, I actually did try that before and yeah, the decision works, but the tooltip is weird with a big fat X about the building not being in the palace.

Mad props for Geheimnisnacht, I'm actually trying to make a small submod for it, and from first looks modding this game doesn't seem to be easy at all.
 
Ha, thanks, I actually did try that before and yeah, the decision works, but the tooltip is weird with a big fat X about the building not being in the palace.

Mad props for Geheimnisnacht, I'm actually trying to make a small submod for it, and from first looks modding this game doesn't seem to be easy at all.

Yeah, the whole scoping thing is hard to get used to. And tooltips don't always display correctly or intuitively. I usually end up just having this up every time I'm modding: http://www.ckiiwiki.com/Scopes
 
  • 3
Reactions:
I'm trying to write a targeted decision that allows me to grant vice-royalties to republics. I've been able to tweak existing files in the "governments" and "laws" folder that allow republics to grant vice-royalties, but only to feudal rulers. I think I have all the scopes and conditions down, but I don't know what to put as the effect.

Code:
targetted_decisions = {
    
    Grant_Viceroyalty = {   
      filter = sub_realm
      ai_target_filter = sub_realm
      from_potential = {           
            OR = {
                has_law = vice_royalty_2
                has_law = vice_royalty_1
            }                   
     }
      potential = {
        is_vassal_or_below = FROM
      }
      allow = {
        any_demesne_title = {
                can_be_given_away = yes
                higher_tier_than = COUNT
                is_titular = no
                is_landless_type_title = no
      }
      effect = {
        
      }
      revoke_allowed = {
        always = no
      }
      ai_will_do = {
                factor = 0
      }
}

This is my first time trying to write a targeted decision, so if you notice any mistakes I would appreciate if you could point them out, thanks!