Skip to content

Commit 20f2c6a

Browse files
authored
TFE: prevent cultures from being in the Iron Age era at bookmark date (#2737) #patch
Culture history output now includes a check for the Fallen Eagle mod. If enabled, cultures are set to join the Classical Antiquity era at -599.1.1 to prevent them from being in the Iron Age at the bookmark date. Related forum posts: https://forum.paradoxplaza.com/forum/threads/imperator-to-ck3-release-thread.1415172/post-30748509 https://forum.paradoxplaza.com/forum/threads/imperator-to-ck3-release-thread.1415172/post-30748574
1 parent 9860c4f commit 20f2c6a

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

ImperatorToCK3/CK3/Cultures/Culture.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,20 @@ public string Serialize(string indent, bool withBraces) {
7878
return sb.ToString();
7979
}
8080

81-
public async Task OutputHistory(string outputModPath, Date date) {
82-
if (innovationsFromImperator.Count == 0 && innovationProgressesFromImperator.Count == 0) {
81+
public async Task OutputHistory(string outputModPath, Configuration config, Date date) {
82+
if (!config.FallenEagleEnabled && innovationsFromImperator.Count == 0 && innovationProgressesFromImperator.Count == 0) {
8383
// Nothing to output.
8484
return;
8585
}
8686

8787
var historyStrBuilder = new StringBuilder();
8888
historyStrBuilder.AppendLine("# This file was generated by the IRToCK3 converter.");
8989

90+
// Fix for TFE: prevent cultures from being in the Iron Age era at the bookmark date.
91+
if (config.FallenEagleEnabled) {
92+
historyStrBuilder.AppendLine("-599.1.1 = { join_era = culture_era_classical_antiquity }");
93+
}
94+
9095
historyStrBuilder.AppendLine($"{date} = {{");
9196
foreach (var innovationId in innovationsFromImperator) {
9297
historyStrBuilder.AppendLine($"\tdiscover_innovation = {innovationId}");

ImperatorToCK3/Outputter/CulturesOutputter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ public static async Task OutputCultures(string outputModPath, CultureCollection
5151
await output.WriteAsync(sb.ToString());
5252
}
5353

54-
await OutputCultureHistory(outputModPath, cultures, date);
54+
await OutputCultureHistory(outputModPath, cultures, config, date);
5555

5656
if (config.OutputCCUParameters) {
5757
OutputCCUParameters(outputModPath, ck3ModFS, config.GetCK3ModFlags());
5858
}
5959
}
6060

61-
private static async Task OutputCultureHistory(string outputModPath, CultureCollection cultures, Date date) {
61+
private static async Task OutputCultureHistory(string outputModPath, CultureCollection cultures, Configuration config, Date date) {
6262
Logger.Info("Outputting cultures history...");
6363

6464
foreach (var culture in cultures) {
65-
await culture.OutputHistory(outputModPath, date);
65+
await culture.OutputHistory(outputModPath, config, date);
6666
}
6767
}
6868

0 commit comments

Comments
 (0)