• Crusader Kings II Expansion Subscription

    Subscribe to the CK II Expansion and enjoy unlimited access to 13 major expansions and more!


  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning
Showing developer posts only. Show all posts in this thread.

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
The Captain is back on CK2 duty but before I start thinking about adding any new features I want to take some time to sort out any serious problems concerning modding.

I've read that scripted triggers/effects aren't working correctly due to initialization order.

I've also heard rumors about some mods (GoT?) having crashes from corrupt save games?

Please report any other issues here (preferably with save games/mods/steps to reproduce etc.)

Note: this thread is not for reporting general bugs, nor is it for requesting new features.
 
  • 18
  • 6
Reactions:

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
Fixed so far:

- Fixed initializing errors in scripted triggers/effects
- Bookmarks are now sorted in chronological order
- Fixed missing space in localization of special titles
- Morale effect now works in unit & character scope
- Troops effect now works in unit & character scope
- Now possible to switch to owner scope from unit scope
- Now possible to switch to leader scope from unit scope
- Now possible to switch to location scope from unit Scope
- Added missing localization for leader event target
 
  • 13
Reactions:

Silfae

Colonel
26 Badges
Nov 4, 2013
1.199
297
  • Crusader Kings II
  • Stellaris
  • Crusader Kings II: Holy Fury
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • PDXCon 2017 Awards Winner
  • BATTLETECH
  • Crusader Kings Complete
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Tyranny: Archon Edition
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Stellaris - Path to Destruction bundle
Finally, thanks, can't wait to have the scripted triggers/event working.
 

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
One thing about scripted_effects -- any chance the triggers can be displayed?

The commands used therein do take effect, but if a scripted_trigger is used in an event or decision none of the tooltips are actually displayed for the player to see.

Not sure I get what you mean here. As I said in the first post please include scripted examples with your error report.
 

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
No, that's not what I mean.

Let's say I make a scripted trigger like so:

Code:
change_religion_effect = {
   religion = bogomilist
   prestige = 10
}

And then use it an in an event like so:

Code:
character_event = {
   id = 730
   text = OK
   picture = GFX_evt_council

   trigger = {
     ai = no
   }

   mean_time_to_happen = {
     days = 1
   }

   option = {
     name = OK
     change_religion_effect = yes
   }
}

The scrripted_effect works insomuch that it changes the religion correctly and grants the prestige...but the event option shows no tooltips, it's blank. Nothing you put inside a scripted_effect will actually display -- unlike scripted_trigggers, which display the tooltips for everything inside them.

Now I understand. The problem in your last post (as well as in this one) is that you sometimes write scripted_trigger when you mean scripted_effect. BUt it's clearly a bug then, because the tooltip is supposed to be the same as if you had scripted those effects right into the event. Will look at it.
 

blackninja9939

Experienced Programmer - Crusader Kings 3
76 Badges
Aug 28, 2013
2.313
4.497
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Necroids
  • Europa Universalis 4: Emperor
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II: Conclave
  • Crusader Kings II: The Republic
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Stellaris
  • Mount & Blade: Warband
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sword of Islam
One that has been an issue for quite a while is that the add_betrothal command is broken
 

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
Another one - ai_will_do doesn't seem to be doing anything in cb_types (giving a factor of 0 if distance exceeds a certain value does not preclude a crusade, but putting the distance restriction in can_use does), despite being added to some of the new vanilla CBs, and crusade weights don't seem to have much of an effect, if any, at least in the fragmented world of Lux Invicta.

So scripted triggers and events won't be fully fixed until the next major patch? Has the ai_will_do for cbs been fixed?

I can't seem to reproduce this. Setting all CB's to use factor 0, the only wars started are revolts/plots/event wars.

If you can give me a save where this regularly happens I can look at it again, but otherwise I will treat this as can't reproduce/fixed.
 

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
All I really know on that one is that putting this in the crusade CB ai_will_do:
Code:
     modifier = {
       factor = 0
       ROOT = {
         distance = {
           who = FROM
           value = 1000
         }
       }
     }
does not keep a landed religion head in West Africa from declaring a crusade on a realm in Tibet, which is probably close to 2000 distance and definitely over 1000.

Using that code I get no long distance crusades - in fact I get no crusades at all in my game. So again, unless there is some reproduction case I can't do much about this.
 

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
Lux Invicta build 1079 which is where I noticed that distance in ai_will_do didn't seem to do anything. Start a new game and within a month or two there are over a half dozen crusades for either Tibet or Bengal, despite both distance and crusade weights.

What version/patch is this one compatible with?
 

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
Buildings in forts... several people have tried to make them available, no one has reported success.

Correct. Buildings in forts was definitely not coded to work. It took some time but it seems to work correctly now.
 

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
I've had some trouble with the any_de_jure_vassal scope and the any_direct_de_jure_vassal scope.

This is what the any_de_jure_vassal scope gets me

PSGmTj9RyJnxPnHrcUwiOsQ46dQ1fDv9Pib6EqLYZ46v=w375-h138-no

and this is any_direct_de_jure_vassal

J_cwGZegs4qwP0m7TVZbUB7nHBePD3OnF4QCtOrTAfwY=w462-h324-no

From what I can see this is what the game contains:

Triggers:
any_direct_de_jure_vassal_title

Effects:
any_de_jure_vassal
any_de_jure_vassal_title
any_direct_de_jure_vassal_title
 
  • 1
Reactions:

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
Why are they limited in such a way? And as you can see in the picture the any_direct_de_jure_vassal_title lacks localisation.

You write in your post that you use any_de_jure_vassal and any_direct_de_jure_vassal - and as you can see form my list there are no such triggers. I'm guessing you try to use a non-existing one in the first screenshot and maybe any_direct_de_jure_vassal_title in the second, and just miss-wrote it in the text? So I will check that one, but please make sure you write the correct info in your post so that I'm not sent off looking for other stuff.

Why the lack of consistent triggers/effects? Only the team can answer that. During my time on EU4 I enforced a number of rules regarding triggers and effects that later projects should follow but unfortunately CK2 works more in the "old way".
 
  • 1
Reactions:

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
Minor issue - localisation for custom government type duke is acting weird. It refuses to show in the character sheet but is seen in character finder:

UXef1dj.jpg


As seen in the screenshot - character sheet shows regular feudal title for that culture ("Doukas") while custom government title is seen in the character finder.

King level title for custom government works as intended.

Please add steps to reproduce or even better a zip file with the modification.
 

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
I will state this again: Please report issues with save games/mods/steps to reproduce etc.

I don't want to waste a lot of time just trying to figure out what you did instead of fixing the actual problem.

Don't assume that I instantly get what it is you're trying to do because I haven't worked on CK2 since its initial release in 2011.
 
  • 1
Reactions:

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
I think most conditions not working in government potential clause is probably a bug. For example flags and having laws enacted are not recognised ofr government potential.

Plus, the is_merchant_republic flag for governments seems to do actually nothing at all for custom governments (is not even recognised in the features screen)

Again, please be a little clearer. Are you talking about the merchant_republic property in governments or the trigger is_merchant_republic (I'm assuming the former)? merchant_republic seems to work ok - note though that you can only set it on a republic, not any other sort of government type - but I will check.

And it would be good if you explain what features it is that aren't working.
 

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
I'm using the ones you mentioned in your post, I just misswrote them in my post. But why is any_de_jure_vassal_title limited to effects only?

Did you read the second paragraph?
 
  • 2
Reactions:

blackninja9939

Experienced Programmer - Crusader Kings 3
76 Badges
Aug 28, 2013
2.313
4.497
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Necroids
  • Europa Universalis 4: Emperor
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II: Conclave
  • Crusader Kings II: The Republic
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Stellaris
  • Mount & Blade: Warband
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sword of Islam
Another issue, well not sure if there was a reason to do it, is that landless characters are longer selectable to play as on the start screen yet if you console switch to them in game you do not get a game over. Would it be possible to remove whatever limitation was added in the most recent patches which stops them from being selectable?
 
  • 2
Reactions:

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
Fixed title localisation for custom government type not working
 
  • 1
Reactions:

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
In addition, here are the relevant quotes from the governments modding discussion

I just tested and it is possible to set a government from a character history file with effect = { set_government_type = custom_government }. However, since it's an effect it won't be executed until start and thus not shown in the front end menu.
 

Captain Gars

Lead AI Programmer
Super Moderator
4 Badges
Oct 4, 2010
5.887
902
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
This sounds like the same problem is was reporting. Here is my modification.

You can build an abbey holding by calling event abbey.2, and then choosing the first option in the next event. This will make a new temple holding in the capital, which should have the new government type.

You use has_holding_modifier in your potential trigger. There is no such trigger. If you correct this, the government works.

I could even set it from a title file.
 
Last edited: