Skip to content

Commit

Permalink
Partially fix random Muslim and Christian characters being spawned in…
Browse files Browse the repository at this point in the history
… AEP (#2454)

"Partially" because it seems the equivalent vanilla file is actually
used in AEP.
  • Loading branch information
IhateTrains authored Jan 21, 2025
1 parent 9bd5581 commit a799614
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 0 deletions.
100 changes: 100 additions & 0 deletions ImperatorToCK3/Data_Files/configurables/removable_file_blocks_aep.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# This file contains blocks from the Asia Expansion Project files that can be removed.
# The structure is as follows:

# <file name> = {
# {
# # comments are supported inside
# some = code
# }
# {
# some code
# some code with other indent
# }
# }

# INDENTATION IS IMPORTANT!
# ASIDE FROM THE CURLY BRACKETS SURROUNDING THE BLOCK, IT MUST MATCH THE ORIGINAL FILE.
# OTHERWISE THE BLOCK WON'T BE REMOVED!


"common/scripted_character_templates/AEP_pool_repopulate_local_flavor.txt" = {
# Prevent random Muslim characters being generated.
{
else_if = {
limit = {
OR = {
culture = culture:butr
culture = culture:zaghawa
}
}
random_list = {
10 = {
set_character_faith = faith:ibadi
}
10 = {
set_character_faith = faith:sufri
}
}
}
}
{
else_if = {
limit = {
OR = {
culture = culture:bolghar
culture = culture:somali
}
}
set_character_faith = faith:ashari
if = {
limit = {
root.capital_county.faith = {
religion_tag = islam_religion
}
}
set_character_faith = root.capital_county.faith
}
}
}

# Prevent random Christian characters being generated.
{
2 = {
trigger = {
root.capital_province.faith = {
religion_tag = christianity_religion
}
root.capital_province = {
geographical_region = world_europe_west_iberia
}
}
set_character_faith = faith:conversos
}
}
{
else_if = {
limit = {
culture = culture:greek
}
random_list = {
10 = {
set_character_faith = faith:iconoclast
}
10 = {
set_character_faith = faith:paulician
}
10 = {
set_character_faith = faith:bogomilist
}
}
}
}
{
else_if = {
limit = {
culture = culture:assyrian
}
set_character_faith = faith:nestorian
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file contains blocks from the Asia Expansion Project files that can be replaced with new ones.
# The structure is as follows:

# <file name> = {
# replace = {
# before = {
# some original code
# }
# after = {
# some modified code
# }
# }
#
# replace = {
# before = {
# some original code 2
# }
# after = {
# some modified code 2
# }
# }
# }

# INDENTATION IS IMPORTANT INSIDE the before BLOCK!
# ASIDE FROM THE CURLY BRACKETS SURROUNDING THE BLOCK, IT MUST MATCH THE ORIGINAL FILE.
# OTHERWISE THE BLOCKS WON'T BE MODIFIED!

8 changes: 8 additions & 0 deletions ImperatorToCK3/Outputter/FileTweaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ public static async Task ModifyAndRemovePartsOfFiles(ModFilesystem ck3ModFS, str
Logger.Info("Reading unneeded parts of Rajas of Asia files...");
ReadPartsOfFileToRemove(partsToModifyPerFile, "configurables/removable_file_blocks_roa.txt", warnIfNotFound: true);
}

if (config.AsiaExpansionProjectEnabled) {
Logger.Info("Reading unneeded parts of Rajas of Asia files...");
ReadPartsOfFileToRemove(partsToModifyPerFile, "configurables/removable_file_blocks_aep.txt", warnIfNotFound: true);

Logger.Info("Reading parts of Asia Expansion Project files to modify...");
ReadPartsOfFileToReplace(partsToModifyPerFile, "configurables/replaceable_file_blocks_aep.txt", warnIfNotFound: true);
}

bool isVanilla = config.GetCK3ModFlags()["vanilla"];
Logger.Info("Reading unneeded parts of vanilla files...");
Expand Down

0 comments on commit a799614

Please sign in to comment.