Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace ImperatorToCK3.UnitTests.CK3.Titles;

public class TitleRankUtilsTests {
[Theory]
[InlineData('h', TitleRank.hegemony)]
[InlineData('e', TitleRank.empire)]
[InlineData('k', TitleRank.kingdom)]
[InlineData('d', TitleRank.duchy)]
Expand Down
2 changes: 1 addition & 1 deletion ImperatorToCK3/CK3/Regexes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ namespace ImperatorToCK3.CK3;
public static partial class Regexes {
public static Regex TitleId => TitleIdRegex();

[GeneratedRegex(@"^(e|k|d|c|b)_[A-Za-z0-9_\-\']+$")]
[GeneratedRegex(@"^(h|e|k|d|c|b)_[A-Za-z0-9_\-\']+$")]
private static partial Regex TitleIdRegex();
}
16 changes: 16 additions & 0 deletions ImperatorToCK3/CK3/Religions/ReligionCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,22 @@ public void LoadConverterFaiths(string converterFaithsPath, ColorFactory colorFa
}
}
}

// Validation: every faith should have a theism doctrine.
string? theismFallback = DoctrineCategories.TryGetValue("doctrine_theism", out var theismCategory)
? theismCategory.DoctrineIds.FirstOrDefault(d => d == "doctrine_polytheist")
: null;
foreach (var converterFaith in loadedConverterFaiths) {
var theismDoctrine = converterFaith.GetDoctrineIdsForDoctrineCategoryId("doctrine_theism");
if (theismDoctrine.Count == 0) {
if (theismFallback is not null) {
Logger.Warn($"Faith {converterFaith.Id} has no theism doctrine! Setting {theismFallback}");
converterFaith.DoctrineIds.Add(theismFallback);
} else {
Logger.Warn($"Faith {converterFaith.Id} has no theism doctrine!");
}
}
}
}

public void RemoveChristianAndIslamicSyncretismFromAllFaiths() {
Expand Down
5 changes: 3 additions & 2 deletions ImperatorToCK3/CK3/Titles/Title.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ public void SetDeFactoLiege(Title? newLiege, Date date) {
private readonly TitleCollection deJureVassals = [];
[SerializeOnlyValue] public IReadOnlyTitleCollection DeJureVassals => deJureVassals; // DIRECT de jure vassals
public Dictionary<string, Title> GetDeJureVassalsAndBelow() {
return GetDeJureVassalsAndBelow("bcdke");
return GetDeJureVassalsAndBelow("bcdkeh");
}
public Dictionary<string, Title> GetDeJureVassalsAndBelow(string rankFilter) {
var rankFilterAsArray = rankFilter.ToCharArray();
Expand All @@ -1031,7 +1031,7 @@ public Dictionary<string, Title> GetDeFactoVassals(Date date) { // DIRECT de fac
.ToDictionary(t => t.Id, t => t);
}
public Dictionary<string, Title> GetDeFactoVassalsAndBelow(Date date) {
return GetDeFactoVassalsAndBelow(date, "bcdke");
return GetDeFactoVassalsAndBelow(date, "bcdkeh");
}
public Dictionary<string, Title> GetDeFactoVassalsAndBelow(Date date, string rankFilter) {
var rankFilterAsArray = rankFilter.ToCharArray();
Expand Down Expand Up @@ -1354,6 +1354,7 @@ public static TitleRank GetRankForId(string titleId) {
'd' => TitleRank.duchy,
'k' => TitleRank.kingdom,
'e' => TitleRank.empire,
'h' => TitleRank.hegemony,
_ => throw new FormatException($"Title {titleId}: unknown rank!")
};
}
Expand Down
2 changes: 1 addition & 1 deletion ImperatorToCK3/CK3/Titles/TitleRank.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
namespace ImperatorToCK3.CK3.Titles;

public enum TitleRank { barony, county, duchy, kingdom, empire }
public enum TitleRank { barony, county, duchy, kingdom, empire, hegemony }
9 changes: 5 additions & 4 deletions ImperatorToCK3/CK3/Titles/TitleRankUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ namespace ImperatorToCK3.CK3.Titles;
public static class TitleRankUtils {
public static TitleRank CharToTitleRank(char rankChar) {
return rankChar switch {
'e' => TitleRank.empire,
'k' => TitleRank.kingdom,
'd' => TitleRank.duchy,
'c' => TitleRank.county,
'b' => TitleRank.barony,
'c' => TitleRank.county,
'd' => TitleRank.duchy,
'k' => TitleRank.kingdom,
'e' => TitleRank.empire,
'h' => TitleRank.hegemony,
_ => throw new ArgumentOutOfRangeException(nameof(rankChar), $"Unknown title rank character: {rankChar}")
};
}
Expand Down
1 change: 1 addition & 0 deletions ImperatorToCK3/CK3/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,7 @@ private void DetermineCK3Dlcs(Configuration config) {
{"dlc019.dlc", "crowns_of_the_world"},
{"dlc020.dlc", "khans_of_the_steppe"},
{"dlc021.dlc", "coronations"},
{"dlc022.dlc", "all_under_heaven"},
};

var dlcFiles = Directory.GetFiles(dlcFolderPath, "*.dlc", SearchOption.AllDirectories);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ purple_coa = {
color2 = "purple"
}

e_western_roman_empire = {
h_western_roman_empire = {
pattern = "pattern_solid.tga"
color1 = "roman_red"
color2 = "roman_gold"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
capital = c_arrajan # IRToCK3: adjusted for vanilla CK3 map
}

e_western_roman_empire = {
h_western_roman_empire = {
color = hsv { 0 0.91 0.55 }

capital = c_roma # Rome
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ irtock3_confederation_setup_effect = {
ordered_in_list = {
limit = {
CL_uses_leagues = yes
NOT = { this = scope:actor }
this != scope:actor
}
alternative_limit = { # Incase somehow this was chosen and no one is actually capable of using leagues, need to make sure someone is chosen
NOT = { this = scope:actor }
this != scope:actor
}
list = irtock3_confederation_members
order_by = max_military_strength
Expand Down Expand Up @@ -106,10 +106,10 @@ irtock3_confederation_setup_effect = {
ordered_in_list = {
limit = {
CL_uses_confederations = yes
NOT = { this = scope:actor }
this != scope:actor
}
alternative_limit = { # Incase somehow this was chosen an no one is actually capable of using confederations, need to make sure someone is chosen
NOT = { this = scope:actor }
this != scope:actor
}
list = irtock3_confederation_members
order_by = max_military_strength
Expand Down Expand Up @@ -193,7 +193,7 @@ irtock3_confederation_setup_effect = {
# Get second member, for the 'recipient' scope
ordered_in_list = {
limit = {
NOT = { this = scope:actor }
this != scope:actor
}
list = irtock3_confederation_members
order_by = max_military_strength
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ For Nhialacism icons:
Ask B7E7, the author of Africa Plus mod for CK3.


For Shenic icon:
https://www.flaticon.com/free-icons/chinese-dragon by cube29

For Baiyue icon:
https://www.flaticon.com/free-icons/chinese-dragon by Iconic Artisan


For every other icon:

Use these wherever you want, just credit me as the contributor whenever you upload something containing these.
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
k_betique: "Baetica"
k_contestania: "Contestania"
k_tarragonaise: "Tarragonaise"
e_western_roman_empire_article: "the "
e_western_roman_empire: "Western Roman Empire"
e_western_roman_empire_adj: "Western Roman"
h_western_roman_empire_article: "the "
h_western_roman_empire: "Western Roman Empire"
h_western_roman_empire_adj: "Western Roman"
k_north_italy: "North Italy"
k_central_italy: "Central Italy"
k_magna_graecia: "Greater Greece"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
k_betique: "Bétique"
k_contestania: "Contestanie"
k_tarragonaise: "Tarragonaise"
e_western_roman_empire: "Empire Romain d'Occident"
h_western_roman_empire: "Empire Romain d'Occident"
k_north_italy: "Italie du Nord"
k_central_italy: "Italie Centrale"
k_magna_graecia: "Grande Grèce"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
k_betique: "Betisch"
k_contestania: "Contestanien"
k_tarragonaise: "Tarragoneser"
e_western_roman_empire: "Weströmisches Reich"
h_western_roman_empire: "Weströmisches Reich"
k_north_italy: "Norditalien"
k_central_italy: "Mittelitalien"
k_magna_graecia: "Groß Griechenland"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
k_betique: "베틱"
k_contestania: "콘테스타니아"
k_tarragonaise: "타라고네즈"
e_western_roman_empire: "서로마 제국"
h_western_roman_empire: "서로마 제국"
k_north_italy: "북부 이탈리아"
k_central_italy: "중부 이탈리아"
k_magna_graecia: "대그리스"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,8 @@
# "Albanian" heritage now used for more than just Albanians
heritage_albanian: "Illyrian"
heritage_albanian_name: "Illyrian"
heritage_albanian_collective_noun: "Illyrians"
heritage_albanian_collective_noun: "Illyrians"

converter_custom_hindustan_region: "Hindustan Core"
hindustan_control_3_kingdoms: "Hold at least 3 [kingdoms|E] with 80% of its land in [GetGeographicalRegion('world_india_rajastan').GetName]"
hindustan_control_rajastan: "Control at least 80% of [GetGeographicalRegion('world_india_rajastan').GetName]"
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
k_betique: "Бетик"
k_contestania: "Контестания"
k_tarragonaise: "Таррагонез"
e_western_roman_empire: "Западная Римская империя"
h_western_roman_empire: "Западная Римская империя"
k_north_italy: "Северная Италия"
k_central_italy: "Центральная Италия"
k_magna_graecia: "Великая Греция"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
k_betique: "贝蒂奇"
k_contestania: "大赛尼亚"
k_tarragonaise: "龙蒿"
e_western_roman_empire: "西罗马帝国"
h_western_roman_empire: "西罗马帝国"
k_north_italy: "意大利北部"
k_central_italy: "意大利中部"
k_magna_graecia: "大希腊"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
k_betique: "Bética"
k_contestania: "Contestanía"
k_tarragonaise: "Tarragonesa"
e_western_roman_empire: "Imperio Romano Occidental"
h_western_roman_empire: "Imperio Romano Occidental"
k_north_italy: "Norte de Italia"
k_central_italy: "Italia central"
k_magna_graecia: "Gran Grecia"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{% if tfe %}
###############################
### Regions based on used mods
###############################
{% if tfe %}

{% elsif roa %}
# For limiting the RoA stateless government assignment to regions out of scope of Terra-Indomita
Expand All @@ -17,4 +20,41 @@ converter_roa_out_of_scope_region = {
}
{% elsif wtwsms %}

{% endif %}
{% endif %}

###############################
### Regions to have always have
###############################
# This is mainly to better split up e_byzantium for the split_byzantine_empire_effect scripted effect
converter_custom_macedonia_region = {
regions = {
ghw_region_greece ghw_region_thessalonika
}
duchies = {
d_krete

# Bulgaria
d_vidin d_turnovo d_dobrudja d_bulgaria d_philippopolis
}
}

# This is mainly to better split up e_byzantium for the split_byzantine_empire_effect scripted effect
converter_custom_anatolia_region = {
regions = {
ghw_region_anatolia
}
duchies = {
d_cyprus d_aegean_islands
}
}

# The form Hindustan decision depends on titles that might not exist. This region is made to account for that.
converter_custom_hindustan_region = {
duchies = {
# Punjab
d_lahore d_multan d_gandhara

# Delhi
d_kuru d_vodamayutja d_haritanaka d_mathura
}
}
Loading
Loading