• 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.
Showing developer posts only. Show all posts in this thread.

Meneth

Crusader Kings 3 Programmer
153 Badges
Feb 9, 2011
10.056
5.405
www.paradoxwikis.com
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Holy Knight (pre-order)
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Hearts of Iron IV: Expansion Pass
  • Steel Division: Normand 44 Sign-up
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Way of Life
  • Mount & Blade: With Fire and Sword
  • Mount & Blade: Warband
  • Magicka: Wizard Wars Founder Wizard
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: El Dorado
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Surviving Mars: Digital Deluxe Edition
  • BATTLETECH: Flashpoint
  • Crusader Kings II: Conclave
  • Surviving Mars
  • Cities: Skylines Industries
  • Stellaris: Galaxy Edition
  • BATTLETECH
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Stellaris: Humanoids Species Pack
  • Prison Architect
  • Crusader Kings II: The Old Gods
  • Cities: Skylines - Campus
  • Hearts of Iron IV: No Step Back
  • BATTLETECH - Digital Deluxe Edition
  • Crusader Kings Complete
  • Cities: Skylines - Parklife
  • Europa Universalis IV
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Cradle of Civilization
  • 500k Club
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis III Complete
  • Cities: Skylines - Mass Transit
  • Europa Universalis III Complete
  • Cities: Skylines - Green Cities
  • Teleglitch: Die More Edition
  • Europa Universalis IV: Rule Britannia
Good afternoon. I’m Magne Skjæran, and I’m currently interning as a programmer on Crusader Kings 2. Some might also know me from administrating the Paradox Wikis. My internship is reaching its end, so it was decided that a good way to cap it off would be for me to write a dev diary about two of my favorite topics: optimization and modding.

As you all know, as the game goes on it has a tendency to get slower and slower, mainly due to the gradual increase in the number of characters around. This can be especially annoying for users on weaker computers, but anyone that runs speed 5 is likely to notice.
Beyond that, we’ve got a few points where the game will halt for several seconds. The biggest of these is autosaves, but there’s also a pause at the end of each year, and a smaller pause at the end of each month.

We’ve not only made the effort to reduce these pauses significantly but also to improve the speed of the game generally. This has been hugely successful.
With 2.6, late-game autosaves are in our tests over twice as quick as they used to be, while the year-end lag is now barely more noticeable than the month-end lag, which has also been reduced significantly.
General, daily performance is also significantly faster; the individual days take less time to process.
Overall, in our tests, the game will get 30-50% further in the same period of time. Thus, in the time 10 years would take on speed 5 in 2.5.2, you’ll now most likely get 13-15 years into the game, and with far smaller annoying pauses.

We’ve achieved this through a combination of many different optimizations:
  • Uncompressed saves are now smaller than they used to be, saving compression and write times
  • Saves are now saved in a more efficient manner
  • Almost everything that happened at the end of the year is now distributed across the year instead, so as to avoid the noticeable pause
  • We’ve made improvements to the rendering of the map to speed it up significantly
  • We’ve gone through cases where map modes, names, etc. were being marked as “outdated” on the map and in the UI, and ensured they’re actually only updated when truly in need of update. As an example, previously the occupation overlay would sometimes be marked as needing an update when no occupation status had actually changed, which of course would waste CPU cycles
  • Several computations that used to be single-threaded are now multi-threaded
  • Various improvements to a variety of performance-intensive computations
  • Fewer random characters are generated than previously, and the game more aggressively eliminates unnecessary characters
To illustrate the last point, here’s the number of living characters by year from one of my test games:
vMnckpc.png


I don’t have a similar chart from 2.5, but as a point of comparison, 400 years into an old 769 save we had lying around there were 30 000 living characters, almost twice the number my test save peaked at.

Finally, you don’t just have to take my word for this; here’s a video showing 2.5.2 and 2.6 running side by side:

Now, let’s move on to modding.

I used to mod Crusader Kings 2, being one of the founders of the excellent Historical Immersion Project, so modding is a topic that’s very dear to me.

I know from experience that often modders have to write convoluted workarounds because the information they need isn’t easily available. I’ve therefore spent time both at work and on my free time implementing useful triggers and effects, even in cases where we at PDS have had no immediate need for those triggers. Divine has also spent time implementing a variety of modding features suggested by users, and other members of the team have implemented features that have been needed for Reaper’s Due. A number of bugs that affect modders have also been fixed, and a handful of new console commands added.

All told, our modding changelog is a bit over a hundred items long, and a number of items consist of more than one new trigger or effect.

The full list of modding changes in 2.6:
- Added possibility to have major province modifiers
- Causes of death can now be customized
- Execution method can be chosen via a priority system similar to government flavors
- added "health_penalty", "fertility_penalty", "martial_penalty", "intrigue_penalty", "diplomacy_penalty", "stewardship_penalty", "learning_penalty"
- a set of modifiers whose sum for a given stat can never be positive (allows your giving bonuses that only offset maluses instead of bonus that are positive no matter what)​
- Added military_techpoints, economy_techpoints, culture_techpoints as generic modifiers (for province modifiers)
- Added "any_demesne_province" as an effect
- holdings/settlement modifiers can now be hidden
- Added "has_any_symptom" and "symptom=" triggers
- Added "num_of_symptoms" trigger
- Added "spawn_disease" effect which spawns a specific disease in a specific province
- Scope must be a province
- "spawn_disease=disease_name"​
- Added "start_outbreak" which forces an outbreak, but follows the scenarios set up in the disease.txt file
- "start_outbreak=disease_name"
- Scope is not used​
- Added "on_outbreak" OnAction which is called when a new outbreak starts
- scope is the province where the outbreak starts
- token_data is the disease name​
- Added "scenarios" to diseases: they exclude certain regions and determine possible starting provinces
- Added various defines for modifiers to contagiousness of disease when determining the spread. They are only used with The Reaper's Due DLC
- Added yearly "on_province_major_modifier" on_action
- Added "regional_percentage" trigger:
regional_percentage = {
region = andalusia
percentage = 0.5

has_province_flag = aztec_explorers​
}​
- Added hospital_level trigger that tests the hospital level in a province. Province scope
- Added disease_defence trigger that tests the disease defense in a province. Province scope
- Added "has_game_rule" trigger to test the value of a game rule:
has_game_rule = {
name = gender
value = all​
}​
- Added triggers:
any_hospital
num_of_hospitals
num_of_hospitals_diff
has_hospital
hospital_has_any_building
is_hospital_decision_allowed
is_hospital_decision_potential​
- Added Event scope:
hospital_owner​
- Added supported_checksum = yes/no trigger. Added supported_checksums = { ABCD EFGH } field in .mod files. When supported_checksum trigger is used in game it tries to match the current checksum of the game with the entries in all active mods mod-files. The trigger returns true if it finds at least one match.
- Fixed an issue for mods trying to remove localisation from the base game's localisation.
- targeted_decisions, is_targeted_decision_allowed and is_targeted_decision_potential are now considered aliases for targetted_decisions, is_targetted_decision_allowed and is_targetted_decision_potential respectively and are evaluated in the same way.
- Fixed a CTD that could happen for mods that allowed you to play characters with only titular titles.
- scaled_wealth and transfer_scaled_wealth now supports an additional max field to cap the maximum amount of wealth gained/lost.
- Added enatic trait attribute equivalent of the agnatic attribute (which allowed certain traits, eg Sayyid, to always be inherited from the father).
- Added define MERCHANT_REPUBLIC_MAX_PATRICIANS which determines the amount of merchant republic families the game will allow to exist in a merchant republic.
- Added triggers monthly_prestige and monthly_piety.
- Added effects scaled_prestige and scaled_piety.
- It is now possible to script council voting for targeted_decisions.
- The council interface should now support voter minor titles with a grant limit higher than one (1).
- Added set_pentarch_title = <title/none> effect.
- The pentarchy entry in landed titles can now be assigned to a specific religion rather than all religions with autocephaly.
- Using title_prefix in a government definition should no longer default all non-prefix defined title names to the default versions.
- Ambitions are now valid for the ai aggression modifier "aggression".
- add_character_modifier and add_holding_modifier now supports the stacking = yes parameter.
- Added has_holding_modifier = x trigger that returns true of the holding has modifier x.
- Added has_instances_of_character_modifier, has_instances_of_province_modifier, has_instances_of_holding_modifier = { modifier = x amount = y } trigger where y is the amount of current applications of modifier x that the character needs to currently hold for the trigger to return true.
- Added remove_character_modifiers, remove_province_modifiers, remove_holding_modifiers = { modifier = x amount = y } effects that removes y amount of modifier x from the current scope.
- Added on_trade_post_construction_completed, on_fort_construction_completed on_action entries.
- Added on_trade_post_construction_start, on_fort_construction_start on action entries.
- Fixed some issues with on_settlement_construction_start on_action events.
- Added GetHusbandWifeCap, GetHusbandWifeCapOpp, GetMasterMistressCap, GetMasterMistressOpp, GetMasterMistressCapOpp character localisation functions.
- any_character trigger should no longer exclude the ROOT scope in it's evaluation.
- Fixed a possible issue with hidden effects inside scripted effects.
- Added trigger 'leader_traits' (number of)
- Reactivated the on_action 'on_focus_pulse'
- Disease effects are now customizable through script per disease
- Silk Road modifier icon can now be set in the text file
- Added define AUTOMATICALLY_ACCEPTS_COALITION_CALLS to determine if defensive pacts members automatically join at the start of wars
- Converted the Family Focus events to on_action events
- Fixed a bug where the 'end_war' effect would incorrectly invalidate wars
- The 'regent' event target is now properly invalidated if there is no regent
- Added trigger 'any_player'
- Added effect 'any_player'
- Added effect 'random_player'
- Added define WAR_CONTRIBUTION_THEOCRACY_GHW_MULT
- Fixed era bookmarks ignoring their defined text keys. WARNING: This means that your mod's era names are likely now unlocalised
- Fixed buttons F9 through F12 not working as shortcuts
- Fixed a number of triggers functioning identically when set to "= no" as when set to "= yes"
- has_terrain_specialization now takes "yes" and "no" as parameters as well, in addition to "any" and specific terrains
- Added missing localisation for a handful of triggers
- Era screen characters can now be restricted based on dlc by adding 'dlc = "dlc name"' to their entry
- Fixed the time control buttons being inactive in 867.1.1 in mods starting on or before that date
- Opinion modifiers can now be scripted to be stacking (default) or not
- Added a give_birth console command (requires existing pregnancy; use pollinate/cuckoo to impregnate)
- Added on_action 'on_holding_building_start'
- Added has_assigned_minor_title trigger. Usage: "has_assigned_minor_title = title_master_of_the_horse" or "has_assigned_minor_title = { title = title_commander count = 2 }"
- Added has_children and has_living_children triggers
- The "loot" trigger will no longer crash the game if applied to a land unit. It will always return false for land units, but it won't crash
- has_minor_title now also accepts "yes" and "no", to check whether the character holds any minor titles at all
- Can now add and destroying buildings in extra holdings (trade posts, forts & hospitals) with the following effects:
add_to_extra_holding = {
type = hospital
building = leper_colony_1​
}

destroy_in_extra_holding = {
type = hospital
building = leper_colony_1​
}​
- The following effects have been added. They work the same as the equivalent for forts or trade posts:
create_hospital
destroy_hospital
any_hospital​
- Scripted effects in event options will now show the traits and characters they affect
- Added a war_participation trigger. Example: any_war = { war_participation = { who = ROOT score = 0.5 } }
- Added an is_landed_title_allowed trigger, which checks whether a character fulfills the "allow" section of a specific title. Example: is_landed_title_allowed = e_hre or is_landed_title_allowed = ROOT, where ROOT is a title
- Added a "force_host" effect that forcibly changes the host a character. Scope should be the character being moved, target should be the character's new host.
Shouldn't be used lightly
force_host = ROOT​
- Added join_faction, leave_faction and start_faction effects.
- Added faction_exists trigger.
- Added export_to_variable effect.
- Added while effect.
- Title prefix defined in landed_titles.txt should now support localisation variations dependent on the holder of the title.
- Added sound_effect effect.
- It should now be possible to make baronies independent through history editing.
- Added a "character_stats" console command that prints a variety of statistics to the console, such as the # of rulers of each tier, gender breakdown, and total wealth. This also gets written to stats.log
- Added a "dynasty_stats" console command that prints a variety of statistics to the console, such as the # of dynasties, number of single-person dynasties, and number of dynasties with only dead characters. This also gets written to stats.log
- Added a COURT_PRUNE_SIZE define, which defines when the game will try to find unneeded courtiers to kill off. Lowered to 10 from the original 20
- Added a "de_facto_liege_title" trigger, which checks that the defacto liege title of a character or title is the right-hand side. Example: ROOT = { de_facto_liege_title = e_hre }. Both sides can take a character or a title. If a character is provided, their primary title will be used. A defacto_liege_title scope already existed, but this should make some operations easier
- Added an "immortal" trigger, which checks if the character in the current scope is immortal
- Added an "is_incapable" trigger, which checks if the character in the current scope has an incapacitating trait
- Added an "is_pilgrim" trigger, which checks if the character in the current scope has a pilgrim trait
- Added a "same_regnal_name" trigger, which checks if the character in the current scope has the same regnal name as another character, meaning that they'll be considered the same name for the purpose of regnal numbering. Regnal names are currently defined as having the same first first name (E.G., "Gustav" and "Gustav Adolf" are the same regnal name), or the same cultural first first name (E.G., "Alfr_Alf" and "Alf_Alf" are the same regnal name)
- "monthly_income" and "yearly_income" can now be used in a holding scope. Before it could only take a character. Example: "b_constantinople = { yearly_income = 15 }"
- Added a "has_inheritance_blocker" trigger, which checks if the character in the current scope has a trait that blocks inheritance (cannot_inherit = yes)
- Added a "dynastic_prestige" trigger, which checks if the dynasty of the character in the current scope has a prestige of at least the given value. Example: "dynastic_prestige = 100"
- Added a "set_preferred_capital" effect, which sets the preferred capital of the title in the current scope (used for a variety of things, such as the AI to determine where to put their capital). Only works for dynamic titles, as static titles base their capital off of the landed_titles folder
- Added a "lacks_dlc" event pre-trigger. If the DLC is enabled, the event will not be evaluated
- Added a "has_dlc" event pre-trigger. If the DLC is disabled, the event will not be evaluated
- Added a "war" event pre-trigger, which takes "yes" or "no", and checks that the character is/isn't at war
- Added a "is_married" event pre-trigger, which takes "yes" or "no", and checks that the character is/isn't married
- Added a "friends" event pre-trigger, which takes "yes" or "no", and checks that the character does/doesn't have friends
- Added a "rivals" event pre-trigger, which takes "yes" or "no", and checks that the character does/doesn't have rivals
- Added a "has_global_flag" event pre-trigger, which checks that the given global flag has been set
- Added support for an after = { } - effect field in events. It works as a counterpart to immediate and executes after any option is executed.
- Replaced the COALITION_PROVINCE_THREAT_RATIO define with COALITION_SCARY_TROOP_STRENGTH_THREAT_RATIO. It is now actually used by the game
- Decisions now take the pre-triggers "only_rulers", "only_landed", and "only_independent". It is recommended that they be used when possible so as to reduce the time spent by the AI evaluating the decision. Note that the pre-trigger currently only applies to the AI, not to the player
- The "is_occupied" trigger now works in province scope, not just title scope
- The "is_occupied" trigger now works for county-level titles, not just baron-level titles
- "plot_decisions" are now only checked by characters that lead a plot or faction. Previously there was no functional difference between plot decisions and regular decisions
- Added "has_flag" as a quick trigger for province events. It works exactly like the "has_character_flag" quicktrigger, except the scope is the province for the event
- Added on_war_ended_invalid and on_crusade_invalid on_actions, that provide the same scopes as the other on_war_ended and on_crusade on_actions
- Added a CROWN_LAW_CHANGE_TIMER define. If set to 0, rulers will be restricted to MAX_CROWN_LAW_CHANGES. If set to 1, they'll have a CROWN_LAW_CHANGE_MONTHS cooldown
- Added a CROWN_LAW_CHANGE_MONTHS define
- Traits can now be hidden. Adding "hidden = yes" will make it invisible in all parts of the UI (except event options, where they can be hidden using hidden_tooltip)
- Added define "FAR_CRUSADES_WITHOUT_WEIGHT_MODIFIER" as a weight modifier to starting crusades on titles that are not adjacent to territory of our religion and don't have a crusade weight modifier. Default value is 75%

One of the biggest is likely the addition of game rules, as described in an earlier dev diary.
With game rules, you can add new settings that your users can use to configure your mod. No longer will you need day 1 events or decisions to handle that in a relatively unintuitive and inflexible way, but you can instead have the user configure it in the same way they configure vanilla rules.
Any number of game rules can be added, with any number of possible values. Want to give the option to have a Shattered World scenario for example? Put it in the game rules, and have a hidden startup event do the shattering based on the rule, rather than having the user fire a day 1 decision.
Game rules can be referenced anywhere in script, so they can be used for virtually any purpose where user configuration is relevant.

Finally, I’ve also written a post about things modders can do to make their mods faster. You can read it in the modding sub-forum. I’ve kept it separate so that modders can have a place to ask their questions, and get answers from an inside perspective, separately from this dev diary:
https://forum.paradoxplaza.com/forum/index.php?threads/official-mod-optimization-tips.962056/

That’s all for today. The Reaper’s Due and 2.6 will both be out on the 25th of August, so it won’t be long before you can experience all of these performance and modding improvements for yourself. I hope you’ll all enjoy the improvements made as much as I’ve enjoyed coding them!
 
  • 248
  • 80
  • 2
Reactions:
Will CK2 utilize more than 2 CPU cores now? I mean that will quad/hexa/octacore CPU owners get any benefits from optimization?
CK2 has pretty much always utilized all cores, the thing is that it switches back and forth between multi-threaded and single-threaded (generally several times a second), so it averages out to 2 to 2.5 cores
The average is likely slightly higher now, since much of what we optimized was single-threaded, and some was moved from single-threaded to multi-threaded.

Most of the machines we've tested on have had 4 physical cores, and 8 logical cores.
I've also seen much the same speed increase on my laptop, which has 2/4 rather than 4/8.

Congratulations on finishing you internship and thank you for a fascinating DD! It's fun to read about the technical stuff behind the game from time to time, and you explain it very clearly and precisely. Good luck with your career!
Thanks! I'll be heading back to Norway and university on Monday.
 
  • 48
  • 7
Reactions:
Gotta love that depopulation in the middle.
Take a wild guess at what event that was.

Sounds good but it makes me wonder what we were running at the end of the year and how it will affect game play.
The biggest thing was that AI independent rulers were updating their list of threatening characters. Spreading it out over the year instead should have little to no gameplay effect, but avoids the annoying pause it caused.

Through what methods, and by what criteria is a character defined as unnecessary?

And that is a question born from contention and annoyance at stealth game play mechanics that kill characters.

Will this be similar to the negative fertility modifier that is allegedly imposed for courts of over 30 people? (though I realize that you personally might not have worked on that)
I hate that mechanic, right because the court is to busy it gets harder to find a quiet place to make love, bullocks you guys finally realized every second son or daughter unmarried was a sucker who you could collect at your court through invitation, and you couldn't have me keeping people on shelves.

But yea plague aside are we talking lowborn people, or is there going to be some stealth script causing the prince I just invited to trip down the stairs?
Unnecessary characters are simply killed off.
Characters are considered unnecessary if none of the following are true:
  • They're a ruler
  • They're imprisoned
  • They've got parents
  • They've got a spouse
  • They've got children
  • They've got a council position
  • They've got a claim
  • They're under age 40
How large a court has to be for it to be checked for such characters can be modded in defines.lua. It is set to 10 in 2.6.

At what size the fertility modifier can also be modded.
What it does is simply set the max number of children someone can have 1 lower. It is only applied if the court is larger than the limit (30), and the character is unlanded and has no landed parents. Essentially this means they're limited to a single child.
 
  • 37
  • 5
Reactions:
What's been removed from the savefiles?
Some stuff where it was saving the default value; no need to save something that hasn't changed. (E.G., claims are in the code by default "weak", so there's no need to write in the save that they're weak).

And we've shortened the names for a lot of common tokens. E.G., instead of "birth_name" we now save "bn".
 
  • 22
  • 2
Reactions:
Could you add:
  • Has honorary title
  • Set as interesting character by player
I remember having several interesting event spawned characters just vanish into thin air less than a month after they appeared.
Probably a good idea, but probably won't be in 2.6 at least.

Will characters that have been set as commanders be immune? What about new characters that were just generated via those decisions that create new characters?
Looking at the code they're not currently immune, no.
 
  • 19
Reactions:
But more importantly are you saying it only affects unlanded characters? Because I swear I've had less children with certain landed gentlemen that had a fertility focus / ambition but an overcrowded court.
Yep, only unlanded characters, and only the number of children, not fertility:
Code:
    if ( HighestParentTier == UNLANDED && nCourtSize > NDefines::NCharacter::COURT_SIZE_CHILD_PENALTY_THRESHOLD )
        nLimit -= 1;
 
  • 8
Reactions:
Is it too late to add them in?
Probably, yeah.

Would it be possible for the list of auto-kill conditions to be made moddable?
Doubtful. It's checked pretty often, so the overhead of making it scriptable probably wouldn't be great for performance.
 
  • 5
  • 1
Reactions:
Hmm, this sounds like it lines up quite closely to the "Not in prison/not a ruler/not a great house/unmarried/is an adult" criteria that work so well in the character finder when choosing someone who would make a good new vassal. This may thin out the applicants a bit.
Also, if you're playing a mod like the Warhammer Geheimnisnacht mod where some of the longer lived races (e.g. Elves) can't get going / get married properly until they are 45 that might also cause some problems.
These conditions aren't new, it just applies it to courts 11+ characters large now rather than 21+.
 
  • 8
Reactions:
Does that include dead parents? Because I'm very fond of finding distant heirs to great dynasties, who may be considered "unnecessary" under all of the other criteria and restoring them to power. The only thing that would save them is having (dead) parents.
Yes, it includes dead parents (and children. Not 100% sure about spouses).

Is this for the player's court as well, or just for AI?

Overall, I'm a little concerned that it's going to nerf my "find old single ladies to marry after I have my heir" strategy but in general I like it...
Only AI courts.
 
  • 10
  • 4
Reactions:
How is it generating fewer random characters? Less event characters?
Characters get a court generated for them if they're new, and a few other situations. The # generated is now generally lower. We were generating more wife candidates for Muslims than needed for example.

Will they still update it only once a year? And how is it determined when they update it? Every anniversary of ascending the throne?
Generally they update it once a year, but more often if it has been marked as outdated for whatever reason.
The offset is based on character ID.
What if you are the grandson of a ruler, but your parents (who are heirs) aren't landed and you are over 40?
Then you've got parents, and thus aren't unnecessary.
So does that mean that unlanded characters without landed parents are limited at two children unless the cap is reached? Also what if they have a landed grandparent?
Yes.
It'll consider your grandparents if they're still alive.
I don't like that; it seems to make the save files harder to read. And as it only effects save time and not running time it is a thing I am sad seeing optimised since after all you don't save too often.
A ton of people have yearly autosaves.
 
  • 6
  • 3
Reactions:
In one of the diaries depopulation is mentioned. Is it possible for modders to have other non-disease-related events cause depopulation?

Sure, ultimately it's just a province modifier, and there's a scripted effect to handle removing prosperity at the same time.
 
  • 10
Reactions:
Why should the Black Death be Limited to Europe? You know the Black Death was coming from the Middle East?
I can say with certainty the black death does affect the Middle East and India, but not always.

Though I disagree with it being needed, since even the few times I tried ironman it didn't see that annoying. But YMMV obviously and people have different thresholds of toleration.
It was sorely needed when playing ironman games that lasted for a long time. After 300 years or so you could end up with situations where you spent more time watching the autosave message rather than actually playing.
It also affects normal autosave, of course, especially if your autosaves are compressed.

For the culling age being scriptable, i'm making the change right now, but it's not guaranteed to be in the next patch.
 
  • 16
  • 2
Reactions:
Did the Black Death kick off in 1275 in your test game?
The black death start is defined by game rules: "dynamic" has the start random, "delayed dynamic" has a random start that won't happen until 200 years after your game start, "historical" deserves its name, "deadly" has it happen randomly and more than once.
 
  • 13
Reactions:
Can developers confirm how the start game rules affect long-range diplomacy? Too many cross continental interactions.
There's a diplomatic range game rule: "standard" which leaves it unchanged, "off" which disable diplomatic range completely (and prevents achievements) or "restricted" that divides the distance by two.

Will the Black Death circumvent Poland? Or will plagues miraculously go around certain realms?

Is the best way to prevent plagues by building a lot of hospitals?

Will there be carriers who secretly have infection?
A few areas have been scripted to be avoided by the plague to fit history, and various "scenarios" avoid different regions so that you don't always end up with the same plague every game.
Building hospitals will reduce the chances the counties the hospitals are in get the plague but will not prevent the plague from spreading around it.
And finally, there are no secret carriers.

Will this fix the endless desyncs in multiplayer?
We have also been working hard on fixing all OOS we find. We've fixed a lot, including several from nomads and merchant republics that had been haunting us for a while.
 
  • 11
Reactions:
ARGH! I hate this already in it's 2.5.2 form! I RP and I hate how every time I lay aside a concubine or something they die of "poor health" the next month WITHOUT FAIL. Can you make this a game rule or something? My computer is pretty good, I'd appreciate the option.

Moah mentioned he's making the cull age definable (probably in the first patch), so you could set it to 99 etc to basically disable it.
 
  • 9
  • 3
Reactions:
The black death start is defined by game rules: "dynamic" has the start random, "delayed dynamic" has a random start that won't happen until 200 years after your game start, "historical" deserves its name, "deadly" has it happen randomly and more than once.
Not quite right:
Dynamic - Starts at random, though 200 years must have passed in-game (though if no plague has triggered by the 1300-1400's it'll trigger regardless)
Delayed Dynamic - Starts at random, though 25 years must have passed in-game, and the in-game year must be at least 1100 (this one was a forum suggestion back in an older DD)
Historical - Starts at the date of the historical black death (1345), and also follows the pattern of it (misses India, parts of Poland, etc)
Deadly - No restrictions at all, it can start anywhere and spread anywhere (not recommended for games you want to play until the end date...)

But that would mean modding, which would mean breaking ironman D:
It's unlikely that we'd add a gamerule for something directly affecting performance negatively, though it's not out of the question of course. Anyways, this culling is only active in AI courts, so if you feel like your concubines die as soon as you set them aside it might just be because they're old? :)
 
  • 16
  • 2
Reactions:
Will there be UI scaling? Because I want to play the game at my resolution in borderless window mode. Which is impossible currently.

@Meneth
2.6 does not have UI scaling.
Ah; thought it only made you immune if your parents were landed. So even unlanded parents are enough? But if unlanded they need to be alive?


What if the grandparents are dead?
And will distant dynasty members be culled if their branch is unlanded?
Which doesn't come around too often.
It doesn't care if they're dead.

Regarding the kill-off mechanic:

1)


How would i identify that line in defines ?
It's not in it already, right ?

2)
- How long has the character to exist, unitl the killing happens ?

Please let it be more than a few months.
I also wonder if the AI has actually short enough circles to choose the characters before they are killed.

3)
- Commanders really should be added to the list.
The AI has already problems with assigning commanders at all and properly.
Just like commanders shouldn't be killed on succession in my humble opinion.


Thanks for all the other optimisations.
I'm just getting a bit worried when performance increases happen by doing cuts in the actual game or even feature/mechanic cuts.
Thanks again.
1) COURT_PRUNE_SIZE. It's in the changelog.
2) There's no time limit at the moment
3) They probably should be, yes

Note that this culling isn't new; the only difference is that it happens at 11+ court size rather than 21+.

Could the minimum culling age of 40 be modified in defines.lua for fantasy mods with long-lived races, or is it completely hardcoded?
Hardcoded at the moment. Since my last day is Friday, I suggest you request Divine make it moddable.

Does being a lover or a concubine count for this? Also, do parents or children need to be alive for the protections to work?

(Also, would it be possible for you to edit your posts to mark them as dev posts? Not quite sure how that works on your end, but it would be really handy to be able to bring up your posts with the "Show all dev posts" button.)
No, only the conditions I listed.
They can be dead, yes.

I'll look into marking my previous posts as dev posts.
Is this an event that one can mod? For those of us who already have MODs with such events since years back, it would be sad if those conditions listed there are the only ones. There is much many more special cases to consider where you might want to keep someone alive.
It's done by code, not event, sorry.
 
  • 11
Reactions:
@Meneth Regarding hidden traits,Will their effects also be hidden in the tooltips?

Say I have a hidden trait that increase general opinion by 10. Will the opinion modifier show in the opinion breakdown tooltip?
Their effects will be shown.

Impossible. They can be 17, EVERY TIME I've done it (I've done it many times) they die of poor health the next month. Try it for yourself. According to reddit, when your court exceeds 50 people the game puts limits on it so couples have reduced fertility and can't have more than two kids
The cull only applies to characters above age 40, so that must be something different.

As a modder, I have two questions:

1.) You mentioned, "Traits can now be hidden. Adding 'hidden = yes.'" When you mean hidden, will there still be an empty vacuum space where the trait used to be on the character's trait screen? I assume you know what I'm talking about, lol. It looks awkward seeing that empty trait space.

2.) This wasn't discussed in the change log, but pertains to modding and expands on my first point: What will the introduction of the new disease masks have on property slots? As a modder who utilizes a static overlay portrait trait approach via property slots, I'm especially interested to know if you expanded the number of property slots we have to work with. Currently, I can only house 26 static portraits per property slot.

The dream would be having more property slots, and making the portrait trait icons go away AND eliminate any empty vacuum space left behind if I were to mask it:
http://images.akamai.steamuserconte...957/C0CE2CAEDACFAE146BE00893DC424CCB2029FEDE/
1) It'll be as if the trait never existed; no empty space.
2) No clue, sorry.
So simply at every check and checks for court size happen..once a month or so ?
Just asking for info and as i'm curious. It might be helpful for modders.
Once a month, yes.
 
  • 6
  • 1
Reactions:
How, if I may ask? Say I have a hidden "hidden_traitor" trait that grants 5 intrigue. I make it hidden so that the player can't track doen traitors. So what will the player see when he hovers over the character introgue value and the breakdown appears?

Will the +5 not appear in the breakdown but still added to the final value?
Will it appear under a generic "has a hidden effect" reason?
Or will perhaps be added to the base value?

This is very minor, but it might be worthwhile if we are really invested into making some nasty surprises for the player, hahaha.

Also, reposting a(nother fairly minor) question by another user: currently, if you don't assign a graphic asset for a trait a gap appears in the trait string in the character aheet. Will hiding the traits generate a similar gap or not?
They'll see the intrigue effect, yes. It'll appear under the name you've defined for the trait, if you've defined one.
You could name all your hidden traits "Unknown source" and it'd probably be tricky to figure out, but they wouldn't end up stacked together I'm afraid.

Like said further up, this does not result in a gap, no.
 
  • 6
Reactions:
Thank god that sounds good!!

Will the save be able to stay uncompressed on Ironman?
The checkbox was not taken into account because of cloud saves, has this been corrected?
This would for some of us be the biggest leap in terms of performance...
Ironman saves are still always compressed, I think. Not 100% sure.
 
  • 4
  • 1
Reactions: