Skip to content

Compatibility with CK3 1.18, Invictus 1.7 and Invictus 1.11#2820

Merged
IhateTrains merged 169 commits intomasterfrom
feat/ck3-1.18
Mar 10, 2026
Merged

Compatibility with CK3 1.18, Invictus 1.7 and Invictus 1.11#2820
IhateTrains merged 169 commits intomasterfrom
feat/ck3-1.18

Conversation

@IhateTrains
Copy link
Copy Markdown
Member

@IhateTrains IhateTrains commented Nov 15, 2025

closes #2784
closes #2799
closes #2862

IhateTrains and others added 27 commits November 1, 2025 22:20
CHANGES
- Modified removable/replaceable_files_blocks to get no errors on
conversion (there is still more to add to it that was added in AUH, but
there are at least no errors for now)
- Added a check to make sure faiths have a theism doctrine (adding
polytheism as a fallback if they don't)
- Added new Baiyue, Mohism, and Shenic faiths
- Redid and organized `religion_map.txt` for most of the Terra-Indomita
religions so it is easier to read and hopefully have the proper faiths
get chosen
- Added new Dongyi, Baiyue, and Bashu cultures
- Redid and organized `culture_map.txt` for most of the Terra-Indomita
cultures so it is easier to read and hopefully have the proper cultures
get chosen
- Added culture House COA frames to converter cultures
- Modified the following base game cultures:
- Made `tujia` have Lolo Heritage (new heritage alongside Bashu), and
its own language
- Made `bai` have Lolo Heritage (new heritage alongside Bashu), and its
own language
- Made `yi` have Lolo Heritage (new heritage alongside Bashu), and its
own language
- Added some heritage empire mappings for new heritages and empire
titles
- Added some title mappings for the Korean kingdom titles to ones that
made sense (will still likely need to add a new decision that allows
Silla/Baekje/Goguryeo to be formed by their relevant cultures, or modify
the "Unite Husamguk" decision to not require those titles)
- Changed some of the references of `e_western_roman_empire` to
`h_western_roman_empire` to get ready for those changes
IhateTrains and others added 30 commits March 8, 2026 11:29
Benchmark results:
Allocated: 1532.69 KB -> 892.96 KB (-41.74%)
GenerateSuccessorsPartition: about 1.93 ms to 0.59 ms, allocations 1091 KB to 577 KB.
SelectOldestLivingMaleChild: about 449 ns to 57 ns.
DistributeCountriesGold: about 6.27 ms to 1.92 ms, allocations 6328 KB to 691 KB.
SetCharacterCastes guarded candidate: about 7.01 ms to 0.43 ms, allocations 9796 KB to 119 KB.
LoadOptionalLocFileCollection: about 2244 ns to 441 ns, allocations 44.7 KB to 8.0 KB.
GetImpassableProvincesToColor: about 2.64 ms to 23.4 us, allocations 9762 KB to 46 KB.
The new batch:

Reused the projected removed-character IDs in CharacterCollection.cs inside the purge loop instead of projecting them twice.
Runtime changed from 5.41 ms to 5.13 ms, and allocations dropped from 3.79 MB to 2.94 MB, so this qualified on allocations.

Replaced the LINQ filter in CharacterCollection.cs for RemoveEmployerIdFromLandedCharacters with a direct single pass.
Runtime changed from 551.2 us to 494.3 us, and allocations dropped from 144 B to 0.

Pre-sized the output list and removed the redundant null check in CK3LocDB.cs for GetLocLinesToOutputForLanguage.
Runtime changed from 7.01 ms to 6.52 ms, and allocations dropped from 2.33 MB to 2.05 MB, so this qualified on allocations.
# Changes
- Made a game_start on_action that makes sure empires under the hegemony
Rome titles are properly treated as Praetorian Prefectures at game start
- Made it so setting up out-of-scope Indonesia faiths can be triggered
for TFE
- Made it so that any hegemonies at game start that are ruled by a
Chinese heritage character and in some way connected to `h_china` have
their de jure empires set to be under `h_china`
- Made it so that specific references to the base game Chinese empire
titles in various effects are now based on geographical_regions, so they
should still work even if the de jure empires change
- Setup a gamestart on_action so that if someone holds one of the Rome
hegemony titles at game start, they properly get the Augustus trait and
the flag for them to use the "Imperator Caesar Augustus" name flavor
- Made it so the rulers who are vassals of a Rome hegemony title, and
that have a title that is a de jure vassal of one of the hegemonies, use
custom naming flavor where:
  - Empires = Prefectures
  - Kingdoms = Diocese
  - Duchies = Provinces
- Fixed some issues with weird cultures/faiths appearing in
Terra-Indomita conversions because of province mappings
- Changed `baltic_pagan` mappings to use specific cultures as conditions
instead of specific provinces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment