• 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.
CleanSlate issues:

- The allowed_to_hold block for Commanders appears to prevent Kshatriyas from being Commanders if they're Hindu (if I'm reading it correctly), which seems wrong.

- Despite all of the title tag renaming, there are some leftovers that don't match the base name of the title, e.g. d_castilla, d_sevilla, d_toscana.

- The become_saoshyant decision only adds saoshyant_descendant to ROOT's children, then propagantes to their children by event... meaning grandchildren/etc. of dead children don't get the trait. Seems unintended.

- TOG.6001 checks any_close_relative; according to the wiki that only covers living characters, meaning the saoshyant_descendant trait won't pass on to children of dead fathers or grandchildren/etc. through a dead child/etc. of the Saoshyant.

- restore_pope_in_rome checks only_independent = yes and has independent = yes in the potential, which feels redundant.


Vanilla oddities:

- Event LoR.800 should probably have is_feudal = yes.

- Event LoR.901 should probably potentially involve women if they can fight.

- The Roman borders used for Imperial Reconquest and the "The Imperial Borders Are Restored" event don't match the historical borders particularly well, both to the detriment and the advantage of Rome in different areas. Assuming Trajan's borders, the following (in 1066) would be quite a bit closer than vanilla's setup (though possibly not perfect):
- Britannia: d_northumberland minus c_lindisfarne, d_cumbria, d_york, d_lancaster, d_gwynedd, d_powys, d_deheubarth, d_gwent, d_mercia, d_east_anglia, d_essex, d_hwicce, d_kent, d_wessex, d_cornwall.

- Francia: All, i.e. d_flanders, d_picardie, d_normandy, d_upper_brittany, d_penthievre, d_brittany, d_anjou, d_blois, d_paris, d_champagne, d_burgundy, d_berry, d_poitou, d_aquitaine, d_gascogne, d_tolouse, d_auvergne, d_bourbon, d_dauphine, d_provence, d_savoie, d_franche_comte, d_transjurania.

- Hispania: All, i.e. d_galicia, d_portucale, d_lisboa, d_beja, d_algarve, d_sevilla, d_badajoz, d_leon, d_asturias, d_castilla, d_navarra, d_aragon, d_toledo, d_cordoba, d_granada, d_murcia, d_valencia, d_barcelona, d_mallorca.

- Germania/HRE: c_zeeland, d_brabant, d_lower_lorraine, c_koln, d_upper_lorraine, d_alsace, d_trier, d_rhine, d_baden, d_swabia, d_thurgau, d_raetia, d_tyrol, c_freising, c_regensburg, d_salzburg, d_austria minus c_freistadt and c_krems, d_styria, d_carithia, d_carniola, d_friuli.

- Italia: All, i.e. d_venice, d_verona, d_milano, d_susa, d_genoa, d_modena, d_ferrara, d_toscana, d_ancona, d_spoleto, d_pisa, d_latium, d_corsica, d_sardinia.

- Carpathia: c_sopron, d_balaton, d_slavonia, d_croatia, d_hum, d_bosnia, d_styrmia, c_temes, c_bihar, c_feher, d_oltenia. If client states count, c_pest, c_csanad, d_temes, d_muntenia.

- ERE: All, i.e. d_abruzzo, d_benevento, d_capua, d_amalfi, d_apulia, d_salerno, d_calabria, d_sicily, d_ragusa, d_dioclea, d_rashka, d_vidin, d_moesia, d_karvuna, d_thrace, d_adrianopolis, d_strymon, d_ohrid, d_dyrrachion, d_thessalonika, d_hellas, d_epirus, d_cephalonia, d_achaia, d_aegean_islands, d_krete, d_cyprus, d_abydos, d_samos, d_cibyrrhaeot, d_thracesia, d_opsikion, d_optomatoi, d_bokellarian, d_anatolia, d_cilicia, d_cappadocia, d_charsianon, d_paphlagonia, d_armenaicon, d_trebizond, d_coloneia, d_edessa, d_mesopotamia, d_armenia, d_tao, d_abkhazia, d_kartli, d_kakheti.

- Pontic Steppe: If client states count, d_cherson.

- Persia: d_azerbaijan, d_jazira, d_mosul, d_mudar, d_baghdad, d_basra, d_samarra, possibly c_sus, possibly c_khozistan.

- Arabian Empire: d_palmyra, d_aleppo, d_antioch, d_tripoli, d_damascus, d_galilee, d_jerusalem, d_ascalon, d_oultrejourdain, d_arabia, d_sinai, d_damietta, d_cairo, d_aswan, d_asyut, d_faiyum, d_alexandria, d_paraetonium, d_cyrenaica minus c_senoussi.

- Maghreb: d_syrte minus c_tadjrift, d_tripolitania minus c_nafusa and c_nalut, d_jerid minus c_suf, d_tunis, d_kabylia minus c_biskra, d_alger, c_tahert, c_yalala, d_tlemcen minus c_tendrara, d_tangier, d_fes minus c_muluja

- Roman province borders also don't match well; for example, c_trent and c_bolzano should be part of the province of Italia (despite not being in de jure e_italia).

- Thanks to randomness, the Ramandan event chain can potentially result in a different amount of Decadence depending on the order in which events fire if you're at or close to 0 or 100. For example, if you have 0 Decadence, refuse to release all of your prisoners (+1 Decadence), and then give money to charity (-1 Decadence), you'll be back at 0 Decadence, but if the order is reversed you'll be at 1 Decadence. Maybe the individual gains should be tooltips and you should get/lose a lump sum at the end of the event chain.

- While it's been that way since SoI's release, the rewards/costs/penalties for several Ramadan events are weirdly balanced; for example "Release every single prisoner for +15 piety and -1 Decadence" vs. "-15 piety and +1 Decadence" is -- assuming any prisoners you don't care to release -- not much of a choice, since the piety is inconsequential and chances are you'd be willing to eat +1 Decadence even though that mechanic is horrible.

- While consistent with vanilla, there's no AI logic for any of the Ramadan stuff except "Do you want to come to the Eid celebration?", meaning e.g. a Greedy AI is as willing to give to charity as a Charitable one. Probably outside the scope of CleanSlate, but silly.

- Event 91204 makes no sense for Celibate characters.

- Event 91204 is blocked for Homosexual characters, which makes sense under the assumption that ROOT is male, but the event isn't restricted to men. Presumably, it should check if ROOT is attracted to women regardless of ROOT's gender. Alternatively, the localization should be reworked.

- I find it notable that the AI can't get any of the Decadence flavour events. It's of course quite bad at handling that horrible mechanic, which probably explains it, but it effectively means that the player randomly gets rewards and penalties the AI doesn't.

- Event 91220 requires you to be both a Scholar and a Muslim. As currently implemented, the Scholar trait is unavailable for all Muslims; as I mentioned in a previous bug report, making that trait available for Muslims would solve several issues.

- Event 91300 -- the event that hands out the Decadent trait -- can only fire for men. Considering that there both are playable historical female Muslims and that the SoW laws (and certain other approaches) cna result in the player playing as a female Muslim, that's a flawed implementation; I suggest OR = { is_female = no is_landed = yes gender_equality_trigger = yes }.

- Event 91360 can result in both Qarmatians and random religion worshippers (should any use Decadence; I don't think they do with the vanilla implementation) going on the Hajj, which is unavailable for either normally.

- Event 91365 option E has ROOT seduce FROM's primary spouse. Regardless of whether it should be the primary spouse (as opposed to any spouse), this poses several problems; the event doesn't check for compatibility, it doesn't check for the parties being rivals, already being lovers, or the spouse being in love with FROM, or incapacity, or celibacy.

- Events 88270 and 88450 have only_men = yes, which might break down with gender equality.

- Event 88294 increases Decadence when the Furusiyya is prematurely ended due to war. This is a problem if you had less than five Decadence when you started it, as it means you get more Decadence than you lost for hosting it. I suggest moving the Decadence loss to the normal end and cutting the Decadence gain on a premature end.

- The "Interesting Muslims" events spawn characters with a dynasty... and can spawn them more than once, likely resulting in disconnected dynasties. Perhaps they should only trigger once, globally.

- Event 105151's second option doesn't set a killer for FROM's execution; ROOT is the killer.

- Event 105251's second option doesn't set a killer for FROM's execution; ROOT is the killer.

- Event 105005 targets spouse, but the character instigating the whole thing (FROMFROM) is not necessarily the primary spouse.

- Event 105034 should probably use random_spouse.

- TOG.6001 affects Sunni and Shiite MA. It potentially fires for a lot of characters, so the MA effects should probably be in TOG.6000 instead.

- The Zoroastrian holy pets events should probably not fire with random religions, or the localization should be majorly overhauled.

- Event TOG.4001 should probably not fire if the top liege isn't Norse, seeing as a hostile holy order setting up shop is generalyl not conductive to your realm's health.

- Event TOG.1200 only allows for female adventurers under gender equality, not under Enatic Clans; should probably be changed to check if ROOT has the proper gender to be a commander. Ditto for TOG.1210.

- The Holmgang events assume only men can fight. They really should account for Equal/Enatic.

- TOG.5016 doesn't check pratical_age for the fellow vassal, unlike TOG.5015 for the liege.

- TOG.5017 doesn't check pratical_age for your vassal, unlike TOG.5015 for the liege.

- The Holmgang events can fire even if you reform (or random into) Pacifist, which is fairly weird.

- TOG.644 can set up event TOG.658 to fire for Celibate or Homosexual men, which doesn't make much sense based on said event's desc.

- TOG.644 can set up event TOG.664 to fire for Celibate characters, which doesn't make much sense.

- TOG.664 can pick a celibate character, which makes little sense.

- TOG.164 checks for India and Persia in one condition, but only India in the other. Seems inconsistent.

- TOG.172 can set up event TOG.208 to fire for Celibate or Homosexual men, which doesn't make much sense based on said event's desc.

- TOG.172 can set up event TOG.214 to fire for Celibate characters, which doesn't make much sense.

- TOG.214 can pick a celibate character, which makes little sense.

- TOG.158 creates a male soldier at all times. Should probably not be the case under Enatic or Equal.

- TOG.100 only invites men, regardless of Equal/Enatic. Seems rather weird.

- TOG.709, TOG.759, TOG.809 have similar celibacy/homosexuality issues as TOH 172 and TOG.644.

- TOG.734, TOG.784, TOG.834 should probably not select celibate characters.

- SoA.4000 has a lower chance of heresies popping up in Thrake. Presumably, that's meant to be Constantinople, since that's one province ID off in vanilla.

- SoA.4100 can fire for any religion with a religion head, but the following events are largely written under the assumption that the involved rel head is Christian.

- The Demon Spawn murder target logic in SoA.3019 assumes male-preference succession and a preference towards the oldest child, seeing as the DS will seek to murder older male siblings (with some BitP logic attached). It should probably instead check for either parent's heir being the DS's sibling and then seek to murder said sibling regardless of gender or birth order.

- SoA.3053 should probably check pratical_age.

- SoA.5062 doesn't result in ROOT no longer being Celibate even if ROOT is sleeping with someone. Seems wrong.

- SoA.5018 and SoA.5019 assume certain Catholic sites (the western ones) get cathedrals on schedule regardless of when you start. Considering how alt history CK2 can become, this could be quite weird, so maybe it should check for global flags set in title history.

- The "Holy order near holy site" events during a pilgrimage don't really make sense if the pilgrimage isn't in friendly hands, seeing as that should make the locals frown on said holy order's presence.

- SoA.5242 has ROOT sleep around, but SoA.5243 impregnates her with her husband's bioligical child. Regardless of what the husband believes, it's not his.

- The Cluny (SoA.5340, SoA.5341, SoA.5342) and Mount Athos (SoA.5344, SoA.5345, SoA.5346) events don't make much sense with random religions.

- SoA.5357 option D potentially removes Celibate from Jeanne and sets ROOT as her lover. However, ROOT remains Celibate if ROOT is Celibate (and isn't blocked from the event), and there's no tumbling, neither of which makes sense if Jeanne stops being Celibate.

- Plenty of events in soa_misc_religious_events.txt involve the finger_of_st_john, which doesn't make sense if religions are random.

- SoA.5208 is limited to Catholics. Fraticelli probably makes sense, at the very least.

- SoA.5240 makes no sense with random religions.

- SoA.5241 makes no sense with random religions.

- SoA.5243, and therefore SoA.5242, makes no sense with random religions.

- Based on the localization, SoA.5301 and SoA.5302 make little sense with random religions. Other Wicked Priest versions might also get weird.

- SoA.5306 (the Cadaver Synod) should probably not fire with random religions.

- SoA.5353 (Jeanne d'Arc) can fire with random religions. This gets pretty werid with Equal or Enatic, seeing as a woman fighting isn't so weird then.

- As written, SoA.5400 is not sensible with random religions.

- SoA.5410-5414 get weird with random religions due to the explicit localization.

- RoI.1007 doesn't check orientation properly.

- RoI.1144 involves ROOT sleeping with a random singer, but lets ROOT remain Celibate if ROOT is Celibate. This makes no sense.

- RoI.1141 involves ROOT sleeping with a random dancer, but lets ROOT remain Celibate if ROOT is Celibate. This makes no sense.

- RoI.215 does not check for compatible orientation.

- Hindu and Jain ascetics can come to visit Buddhist characters anywhere on the map. This is pretty nonsensical for Buddhists in many parts of the map, considering neither of the other two religions spread far outside India (on the vanilla map) historically, unlike Buddhism.

- CM.15001 can potentially make rel heads convert to the (host's version of the) Zunist religion, which feels unintended.

- CM.2000's desc refers to the created character as male, but the created character has no set gender (and presumably should match gender triggers).

- CM.2020 requires ROOT to not be incapable or imprisoned... which really should have absolutely no bearing on how well the hero knight educates ROOT's child.

- CM.1192 doesn't check the orientation of the mother or the spouse.

- CM.1192 can send the mother and spouse to a convent and adds monk/nun... but doesn't properly check that the mother or spouse are Christian everywhere.

- CM.6124 doesn't check religion, and can thus "add" Scholar to Muslims that instantly lose it on religious grounds.

- WoL.7060 should probably not fire for rel heads.

- WoL.3010 does not check the orientation of either party.

- WoL.5065 really should come with a pregnancy risk where relevant, so maybe the character created in WoL.5066 should be created there and unprotected_sex_effect_event_target should be used.

- WoL.5231 requires ROOT to neither be imprisoned nor incapable... which really should have no bearing on ROOT's dog's ability to hurt someone.

- The hunter in WoL.5040 should probably have their gender depend on your view of gender, as opposed to always being male.

- WoL.10102 option A sets a flag for the trade route being overland if ROOT's capital is in the steppes or Persia. Considering these areas aren't fully landlocked and that other capitals could be, this check is rather odd.

- The localization in WoL.10114 option A is religion group-locked, potentially resulting in very weird cases where e.g. a Buddhist far from India offers an elephant or a Muslim far from any desert offers a camel.

- The regions checked to determine if the trade route is naval in WoL.10130 don't match the regions checked in WoL.10102.

- Several wol_lover_events use spouse but could really use random_spouse and an event target.

- Spear throwing contests only affect male courtier opinion, which doesn't make sense if women can fight.

- Spear throwing contests only pick male opponents if you lose, which doesn't make sense if women can fight.

- War Focus sparring partners can only be male, which doesn't make sense if women get to fight.

- WoL.60 and WoL.61 have separate treatment for Christian priests/ascetics but fails to consider random religions.

- WoL.500 might not make sense with random religions.

- WoL.520 assumes male guards are a thing, so it gets weird with Enatic Clans.

- WoL.580 should really not fire for Homosexual women.

- WoL.580 makes little sense with Enatic Clans, seeing as the guards presumably are female in that case.

- WoL.580 is restricted to women, but follow-up WoL.585 needlessly checks if ROOT is female.

- WoL.55 checks for gender_equality_trigger when deciding if opinion_unfaithful_husband_crime is to be handed out. Enatic Clans is not gender_equality_trigger = yes, but presumably should still make it criminal for men to cheat.

- HL.7000 does not account for Equal/Enatic.

- HL.6020 can select a spouse that shouldn't realistically be at much risk of drowning, e.g. a Strong non-maimed spouse with high PCS. This is pretty weird.

- HL.6020 is guaranteed to kill the spouse in option B, making it a free and no-risk divorce.

- HL.6020 has no AI logic, meaning the AI might opt to save a rival spouse or opt to let a spouse that's a lover/friend die. Quite odd.

- HL.6021 does not check orientation properly for ROOT or the spouse.

- HL.6010 could potentially fire multiple times for the same child if their guardian changes. I suggest a character flag for the child.

- HL.6010 could potentially select an incapable child, which would be weird.

- HL.6520 assumes ROOT's spouse is female in the desc, but isn't limited to men.

- HL.6520 could probably use an event target spouse.

- HL.6990 could probably use an event target spouse.

- Minor clan revolters and their children are always male, which gets weird if they follow an Equal or Enatic religion.

- HLF.9000/HLF.9001 is restricted to men and male opponents, which gets weird with Equal/Enatic.

- Lovers in HLF.9003/HLF.9004 don't actually tumble, despite the description in the former event making it clear that tumbling happens.

- Raiding Adventurers can only be men, unlike regular Adventurers. Seems inconsistent.

- HL.10400 checks the merc's primary title's capital's religion. Shouldn't that be the mercenary_employer's capital?

- HL.10500 checks the merc's primary capital. Shouldn't that be the mercenary_employer's capital?

- HL.10510 checks the merc's primary capital. Shouldn't that be the mercenary_employer's capital?

- HL.10510 can only result in a duel between the merc and their band's employer's son. Under Equal/Enatic, maybe daughters should get to duel.

- HL.10510 only potentially results in a rivalry with the father of the son being fought. The employer could be female, and the mother could be angered in general.

- It feels rather weird that the events applying the mercenary_traditions modifier don't make use of a bloodline, seeing as a generic mercenary_traditions bloodline would work better than character modifiers.

- hl_mercenary_events assume a male merc in some places in the loc ("You always knew him as a coward", etc.) and in a few places (inheriting mercenary_traditions from father, only male children doing this), but the merc could be female based on the decision's conditions.

- The HL merc decision only permits women under Enatic Clans or Full SoW. It should probably allow women under Equal too (SoW is Conclave only, Equal isn't).


Localization:
- The Fatwa event localization references Allah, and the line "(glorified and exalted be He)" makes Root.Religion.GetHighGodName break down since "HighGod is singular and male". Causes problems for Yazidis and random religions.

- The Ramadan event localization explicitly references Allah, the Qur'an and the like. The decision is unavailable with random religions, but Yazidis still have some issues thanks to vanilla's setup for them.

- The Decadence event localization references Islam, Muslims, etc. by name. It also has "Quran" and "Koran", inconsistent with "Qur'an" found elsewhere.

- EVTDESC91211 assumes ROOT is male, as does EVTDESC91230, EVTDESC91224.

- EVTDESC91369 assumes FROM is male, as does EVTDESC_91377.

- EVTOPTC91360 refers to the Hashashin (named as such), but actually involves the Feyadeen.

- EVTTOOLTIP91351 assumes THIS is male.

- EVTDESC88277 and EVTDESC88278 refers to "bedouins"; cneeds a capital "B", breaks with random cultures, and this and "desert" gets nonsensical if the Furusiyya is being held far away from where there are deserts or Bedouins.

- The Muslim honorary titles event localization have strings such as "Muslim", "Quranic".

- Golden Qur'ans are named as such even with random religions and even for Yazidis.

- The Jomsviking founding events refer to Thor, Odin, and the Norse gods as such. Random religions would make this weird.

- The Holmgang events speak of Valhalla, which gets weird with random religions.

- Assorted SOA41XY localization is written assuming a male rel head and a baseline Christian religion.

- EVTDESC_SoA_5050 mentions "the tomb of the martyr Thomas Becket", which is nonsensical if you start before said turbulent priest's murder.

- EVTDESC_WoL_7080_MUSLIM speaks of the Prophet; weird for Yazidis and with random religions.

- While strange things happening when the Necronomicon is involved is somewhat reasonable, the WoL Scholarship stuff involving said book mentions an Arab, which perhaps is weird with random religions.

- WOL_6170_OPINION_EFFECT "priests".

- The localization for WoL.12010 references pigs, making it rather weird for Muslims.

- EVTDESC_WoL_5230 and EVTOPTA_WoL_5290 assume you live in a castle.

- EVTOPTA_WOL_11304 "Hell"; weird for many religions.

- EVTOPTD_WOL_11304_MUSLIM doesn't work with random religions (or Yazidis...).

- The War Focus Wargame events assume a male opponent in some places.

- EVTDESC_WOL_11140_WIN6 speaks of "side flanks" and "center flank". Flanks are of course on the side, but the centre is not a flank.

- EVTDESC_WOL_2300, EVTDESC_WOL_2302, and EVTDESC_WOL_2304 have "spymaster" rather than [Root.GetSpymasterName].

- EVTDESC_WOL_2110 to EVTDESC_WOL_2117 refer to a male soldier/guard/armsman of the plot target; potentially not sensible if the plot target has a Matriarchal realm.

- EVTOPTD_HL_9004 is a pretty odd way of saying "Let's tumble!"/"Let's become lovers!", which is what that event option involves.
 
Something I think I've only seen in Cleanslate games - when playing as a Muslim, give my preferred heir a mosque holding to bump him up the inheritance rankings, then when i die the county capitals of my demesne all switch where possible. Bit odd.
 
Because of the way the ‘Embrace Outremer Culture’ decision is coded, the religious & cultural restrictions only apply to characters in the Arabic or Latin culture groups; the decision was available for me as a Zoroastrian Persian.
 
Some more stuff:

Vanilla oddities:

- ZE.8110 can only involve the primary spouse of the vassal, which feels overly restrictive.

- ZE.10000 does not check if the mercenary commander is incapable, imprisoned, or the like. Seems like an oversight.

- ZE.10000 fails to check if ROOT really would be interested in marriage when triggering ZE.11000. Celibate and Homosexual should perhaps be blockers.

- ZE.11000 only checks the band creator's child not being a sibling of the mercenary asking for marriage, potentially resulting in the merc asking to marry their child or parent. Likely unintentional.

- ZE.11000 does not check for consanguinity in general, meaning the merc could ask for a marriage that all parties involved would consider illegal.

- ZE.11000 does not check if the band creator's child is incapable, inaccessible, or in a different court from the band creator. Pretty weird.

- ZE.8000 can only incolve the primary spouse, which feels a bit restrictive.

- ZE.8001's AI logic is pretty poor; as written, the AI might turn down an NAP from a friend/lover but accept one from a rival, might accept from people it should want to press claims on, and might refuse even if the other party is a clear threat (has CBs, is considerably stronger, etc.).

- ZE.9000 has no AI logic, meaning the AI might elect to keep an ally that it hates or might elect to dump an ally it rather likes. Rather weird.

- I don't really see why ZE.4010 is blocked for the AI.

- ZE.5000 does not check if ROOT's religion is proselytizing; it just checks if ROOT is non-pagan. This means it doesn't work for Proselytizing pagans, and that it could get weird with random religions (and for anyone that has non-pagan religions that don't proselytize, which is the case in Tianxia).

- I don't really see why ZE.5020 is blocked for the AI.

- ZE.5000 does not check that the Lord Spiritual has the same religion as ROOT, but the _desc has the Lord Spiritual reference ROOT's religion. Inconsistent.

- ZE.5010 does not check that the Lord Spiritual has the same religion as ROOT, but the _desc has the Lord Spiritual reference ROOT's religion. Inconsistent.

- ZE.3000 involves loans from Jewish merchants, but does not check if religions are standard.

- ZE.3004 and its outcomes are a bit inconsistent with some other events; for example, there's event 91210 increasing your Decadence because of a statue.

- It feels a bit weird that the dog in ZE.2077 only can bite your sisters and not your brothers.

- ZE.22909 can fire even if the male heir is homosexual, which makes little sense.

- The lover added in ZE.1101 can be Celibate (and Chaste + married...); seems unintended.

- ZE.22300 always creates a male noble; weird with Equal, useless with Enatic.

- ZE.22300 has ROOT pass judgement on a noble from their throne, but is permitted for republics. Jumped-up peasants should perhaps be blocked.

- Some ze_childhoodl_events check for the Jain religion, which probably also should check for Peaceful religions.

- RIP.4501 can create pilgrims even for religions that don't have pilgrimages, seeing as it's not restricted to religions that have pilgrims. Pretty odd.

- RIP.4501 can create Qarmatian Hajjajs.

- RIP.4501 always creates a male pilgrim. Might get weird with Equal and Enatic.

- RIP.11704's desc contains the word "Jewish", but the event does not check if religions are random.

- RIP.13206 creates a lover for a character without checking the plausibility of having a lover; Celibate and probably Chaste should disqualify.

- RIP.4013 only checks your primary spouse, not any_spouse, and following events don't select random_spouse. Seems weird.

- RIP.4014 can have a Homosexual Court Physician seduce and impregnate your spouse, and/or your Homosexual spouse be seduced and impregnated by your Court Physician. Orientation checks should be added.

- RIP.4017 does utterly nonsensical things as far as orientation goes; ROOT gets a bunch of lovers that aren't checked for compatibility before or after ROOT gains the Homosexual trait.

- RIP.4017 does not respect the Celibate trait, which pretty much everything else respects (even someone taking an unwilling concubine!). The event targets' limits should account for it.

- RIP.4017 uses the impregnate command, thus bypassing fertility checks. All event targets can be Celibate as scripted.

- RIP.4018 uses the impregnate command, thus bypassing fertility checks. The spouse can be Celibate as scripted.

- RIP.4100 has rather poor triggers for the origin of the Physician-Missionary; not all reformed pagans are proselytizers, for one thing.

- RIP.4100 always creates a male Physician-Missionary; weird if the religion is Enatic.

- RIP.4101's logic is pretty different from 39601's logic. It feels like those should be similar.

- Discovered in Tianxia: RIP.4400 works weirdly with nokiller deaths, e.g. the knights killing you as a DW; you might get e.g. nick_the_titleslayer for your own death.

- RIP.29000 could use an event target random_spouse, rather than just spouse.

- RIP.29400 only checks if ROOT is attracted to the potential dance partner, not if said dance partner is attracted to ROOT. A follow-up event can thus add incompatible lovers.

- RIP.29507 does not check orientation, potentially resulting in incompatible lovers.

- Assorted RD disease announcements (RIP.5060; triggered from various rip_symptom_events) only happen for your children or spouses. Presumably, you should also care if your concubines come down with something.

- RIP.5061 can't fire for concubines. Considering it's the "My spouse/lover has syphilis! They must be cheating on me!" event, it probably should.

- RIP.12005 does not check if the two lovers already are married/consorts, which can make it rather nonsensical.

- RIP.12058 can fire even if ROOT is Celibate, and does not remove the Celibate trait if ROOT picks the option to sleep with the sneaker.

- MNM.10031 does not cover unreformed pagan SRSes except for Hellenic (possibly intended), reformed Aztecs (possibly intended), any (pre-"The X Faith Triumphant") heresies (very possibly not intentional), or the Nestorian/Miaphysite/Taoist/Ibadi religions (very possibly not intentional).

- The Dharmic MOs don't give society influence or currency for the indian_pilgrim trait, which feels like an oversight.

- The Stoics give society influence and currency for the Christian pilgrim trait, but not the indian_pilgrim one. Inconsistent, and possibly a mistake as it gives Christians an advantage over Hellenics...

- The Stoics give a lot of society influence and currency for the Brahmin trait, which is pretty odd as that puts the Hellenics at a bit of a disadvantage.

- The Lustful version of MNM.4406 has no impact on the Celibate trait even if you indulge in not-so-Celibate activities. Pretty weird.

- MNM.4441 has no impact on the Celibate trait even if you indulge in not-so-Celibate activities. Pretty odd.

- MNM.6920 can have you blackmail someone over a supposed lover even if they are Celibate, which seems quite weird.

- MNM.6920 checks has_lover = yes, with no restriction on said lover being a spouse or consort. Pretty weird.

- MNM.6920 creates a lover out of thin air if the target has no lover. This both creates an extra character (bad from a performance standpoint, even more so if they're female and get pregnant...) and causes a previously faithful character to cheat (annoying when infidelity isn't particularly sensibly coded in general...).

- MNM.1848 option B does not consider orientation.

- MNM.7017 (DW recruitment) option A does not have any effect on the Celibate trait, and does not roll on unprotected_sex_effect(_event_target), which is very strange.

- MNM.7507 (Unholy Impregnation) lets the mother remain Celibate, which is very odd. The decision is not blocked on Celibate targets.

- HFP.24014 potentially has Homosexual elders ask to get married, which feels pretty odd.

- HFP.24014 potentially has Celibate elders ask to get married, which feels pretty odd.

- The spouse selected in HFP.24015 can be Celibate or Homosexual; at least the former seems unintentional.

- HFP.42214 does not create a Homosexual character if ROOT is Homosexual, which is quite weird.

- HFP.42214 options B and C do not remove the Celibate trait despite ROOT most certainly not acting Celibate.

- HFP.42214 options B and C do not call unprotected_sex_effect_event_target. The former should really have the potential to result in a pregnancy if ROOT is female and the partner isn't, and the latter might as well call that effect.

- Some HFP_health_events use spouse where random_spouse and an event target would seem to be better.

- HFP.20576 fails to account for orientation in option A.

- I don't see why HFP.20003 option A's follow-up only is available to the main spouse.

- HFP.20003 option A's follow-up isn't sensible if ROOT's spouse is Homosexual.

- HFP.20004 option A removes Celibate from ROOT, but does not remove it from FROM. Given that ROOT tumbles FROM, that's quite strange.

- I don't really see why HFP.20041 only can fire for the main spouse.

- I don't really see why HFP.20005 only can fire for the main spouse.

- HFP.20573 supposedly only fires for the main spouse, but the comments speak about avoiding it happening for concubines.

- HFP.20061's logic is fairly weird; just because FROM is a known adulteress (incestuous or otherwise) doesn't mean that the aborted child wasn't ROOT's (even if there might be reason for ROOT to doubt its parentage...). It's probably better to flag FROM if the child's father is known to not be ROOT prior to the end of the pregnancy and then clearing said flag after the event.

- There's a sainthood/ancestor veneration mess covered here and here.

- HF.43300 option B outcome 3 always creates a male soldier; weird with Enatic, could use work with Equal.

- HF.50106 is never triggered in vanilla. I see you've commented it out, which is a possible fix, though I'm not sure that's more interesting than figuring out a way to trigger it.

- The "exotic" option in HF.41300 triggers off of somewhat weird regions; for example, India is apparently not "exotic" to (normally) European characters.

- The historical saints in HF.41300t should maybe be restricted based on religion; I don't think Miaphysites or Nestorians really care about St. Patrick, for example.

- Normal (non-saintly) pilgrimages don't allow visiting your capital, while pilgrimages to non-historical saints' tombs don't allow you to visit sites in your own realm and the pilgrimages to the historical saints' tombs don't have any restrictions related to your realm or capital. This is pretty inconsistent.

- I don't think HF.41412 should have ROOT as the killer if ROOT dies; it's not a suicide.

- The Byzantine prince(ss) selected in HF.49000/HF.49001 should presumably neither be incapable nor inaccessible, seeing as it's hard for them to run away and plot their revenge in that case.

- HF.49000 should probably not fire with random religions; alternatively, the localization needs a bunch of work as it e.g. speaks of "Crusaders".

- The Northern Crusade stuff is inconsistent. ask_teutonic_for_help_teutonic does not check if there's a pagan target around, nor does the northern_crusade_war CB restrict the target to a pagan, but the events check for pagan_group in some places. Given that Crusaders aren't necessarily the most discerning group when it comes to heathens, it would probably make sense to de-paganify the events.

- HF.15122 option B has ROOT arrange "unfortunate accidents", so the people that die should not have *actual* accident deaths and should be credited as ROOT's (hidden) kills.

- The Children's Crusade is currently unavailable for Fraticelli characters. Seems inconsistent.

- HF.221 always creates a male wise man, but the desc makes no assumption about gender, making me think the character should not necessarily be male.

- HF.25021 options A and B only adds spouse_slayer for the primary spouse, which seems weird.

- EVTOPTA_HF_42020_SOCIAL is a potentially *very* poorly implemented event option, as it doesn't check if the sway target is your spouse or consort or the spouse/consort of someone you care about (your own dynasty members, your friends, etc.) and effectively trying to help them be unfaithful thus could be very, very stupid or even counterproductive (as you e.g. might be swaying your wife hoping to make her your lover).

- EVTTOOLTIPA_HF_42025_SOCIAL results in you sleeping with someone, so it should not let you keep the Celibate trait.

- EVTOPTA_HF_42026_SOCIAL potentially results in ROOT sleeping with someone, so it should not let you keep the Celibate trait.

- EVTDESC_HF_42028_SOCIAL_SUCCESS has had ROOT and the event target sleep with some random people, but neither risks a pregnancy. This is very odd.

- HF.550 only checks spouse, not any_spouse. Odd.

- HF.25605 options C and D are not accidents, they are "accidents", and thus ROOT should be (secretly) credited for the kill; probably death_murder_unknown_arrow.

- HF.25615 has the hunting companion be killed in some options. ROOT is (secretly) the killer, and should (secretly) get credit.

- HFP.11017 potentially hands out the War Elephant Leader trait... to Dharmic characters. There are plenty of historical Dharmics that don't have access to War Elephants, potentially making it a useless trait.

- HFP.11019 option B2 has ROOT tumble a servant if you read between the lines. It should therefore not let ROOT remain Celibate if ROOT is, and it should really come with a pregnancy risk for non-Homosexual women.

- HF.22065 (and the tooltip in HF.22066) only affects the primary spouse's opinion; should probably be a random spouse's opinion.

- HF.23848 gives ROOT opinions towards ROOT; should be towards FROM.

- HF.20103 should probably use any_spouse (limited to Lucifer's Own members).

- HF.20036 always creates a male priest, meaning it does not respect the religion's clerical gender.

- warrior_lodge_summon_commander's potential could use >= in the society_rank check.

- HF.24157 does not appear to check orientation before add_lover.

- HF.24173 does not appear to check orientation before add_lover.

- HF.24153 gives opinion towards spouse; might not be the correct spouse with polygamy.

- HF.20237 option A very obviously has your character join an orgy, but lets them keep the Celibate trait. Very, very strange.

- HF.20237 option A very obviously has FROMFROMFROM join an orgy, but lets them keep the Celibate trait. Very, very strange, and FROMFROMFROM should probably lose the trait even if you turn them down.

- HF.20375 only involves the primary spouse; you could have several with random religions.

- HF.20379 should either not be available to Celibate characters or should cause them to lose the trait.

- The Lustful option in HF.21000 is very, very stupid if the sway target is someone that you care about the fidelity of, such as your spouse, your concubine/consort, or the spouse or consort of your heir or relatives.

- HF.21051 option C should remove Celibacy from ROOT; you're attempting to tumble someone.

- HF.21052 option A and B should remove Celibate; you're tumbling either FROM or the prostitutes FROM sent.

- HF.21052 option A should have unprotected_sex_effect if FROM goes (after removing Celibate).

- HF.21052 option A and B should come with an impregnate = 0 risk if FROM sent prostitutes and ROOT is female, not Homosexual, and could get pregnant (after removing Celibate).

- If FROM sends prostitutes, ROOT's attraction towards FROM should presumably not be a factor in HF.21052 option B; one would hope FROM picked suitable options.

- HF.21052 option A requires ROOT to be Lustful, but also potentially makes ROOT Lustful. Doesn't make sense.

- HF.23007 check for the religion_ritual_sacrifice Doctrine should probably include the religion_feature_aztec Doctrine, and maybe Aztecs in general.

- HF.23205 does not affect Christian or Muslim heresies, which is pretty odd.

- I believe HF.23207 should check for holding_type = tribal and holding_type = nomadic rather than is_tribal/is_nomadic; FROM is a holding.

- I believe HF.23209 should check for holding_type = tribal and holding_type = nomadic rather than is_tribal/is_nomadic; FROM is a holding.

- I believe HF.23210 should check for holding_type = tribal and holding_type = nomadic rather than is_tribal/is_nomadic; FROM is a holding.

- tooltip_synergic_education_ugrade should perhaps be changed to tooltip_synergic_education_upgrade

- HF.23003 checks spouse, not any_spouse. Feels odd.

- HF.23004 checks spouse, not any_spouse. Feels odd.

- HF.23751 checks spouse; should probably be the other parent of the child, which might not be the primary spouse.


Localization:


- EVTDESC_ZE_21300 "clergymen"; potentially weird with certain religions.

- EVTDESC_ZE_5000 "Pagan"; unnecessary capitalization, and weird if group names are randomized.

- EVTOPTA_ZE_5027 "Pagan"; unnecessary capitalization, and weird if group names are randomized.

- EVTDESC_ZE_2061A "Council Member"; excessive capitalization.

- EVTDESC_ZE_23106 assumes FROM is male in one place.

- EVTDESC_ZE_23152 assumes FROM is male in one place.

- While consistent with vanilla, the localization for rip_prosperity_events doesn't follow the usual DESC/TITLE/OPT tag naming scheme.

- EVTDESC_RIP_4100 could use some work.

- EVTDESC_RIP_11040 assumes a male Court Physician.

- EVTOPT_MNM_4090 "Praise God"; event is available for non-Christian MOs, and wouldn't work well with random religion "Christians".

- EVTOPT_MNM_4026 unnecessarily capitalizes the HighGodName.

- EVTDESC_MNM_6100_B, EVTDESC_MNM_6100_C, EVTDESC_MNM_6105_A explicitly reference Allah, and aren't blocked with random religions.

- GetRandomPlanetName can randomize Neptune and Pluto, neither of which was discovered before or during the CK2 era.

- EVTDESCHFPC30032 belongs in 15_HFP_random_flavor_events.csv, not 15_HFP_pregnancy_events.csv.

- EVTOPTAHFP30032 speaks of the Devil, which might not work with random religions.

- Assorted HFP localization refer to (Catholic-style) Crusades as such and refer to the Pope as the "Vicar of Crist". The events in question do not seem to acccount for random religions using the Catholic/Fraticelli tags.

- EVTDESCHFPA20061 "As if being infidel to me [...]". Unfaithful. Your wife was unfaithful, and engaged in infidelity, but she was quite possibly not an infidel.

- EVTOPTB_HF_46011 assume you have a male "captain" with you; weird with Enatic.

- EVTOPTE_HF_50104 assumes the sender is male, which might not be true.

- The HF_sainthood_events' localization mention the Holy See and the Vatican, and are not restricted to non-random religions.

- HF_233_DESC assumes a male Child of Destiny.

- EVTDESC_HF_12201_Z references a "spindly man" in one place, and the local ruler in another. Seems potentially weird.

- EVTDESCHF25047 refers to male shamans, which might not make sense with Enatic.

- Several HF_warrior_lodge_powers_events localization strings refer to shamans, which presumably should be [west_african_pagan.GetPriestTitle]s to account for random worlds where they don't have shamans.

- EVTTOOLTIPB_HF_42025_HUNT assumes FROM is male.

- EVTDESC_HF_42000_MARTIAL assumes the sway target is male in one place, and refers to their soldiers as "men" (potentially not the case with Enatic Clans).

- EVTDESC_HF_42001_MARTIAL refers to ROOT's soldiers as "men".

- EVTDESC_HF_42002_MARTIAL refers to ROOT's soldiers as "men".

- EVTDESC_HF_42005_MARTIAL refers to ROOT's soldiers as "men".

- EVTDESC_HF_42008_MARTIAL refers to ROOT's soldiers as "men".

- EVTDESC_HF_42001_MARTIAL refers to the person sent by FROM as a man, which might be strange with Enatic Clans.

- EVTDESC_HF_11027 assumes ROOT is fighting against someone fielding male soldiers. Might be weird with an Enatic foe.

- EVTDESC_HFP_11011_B_1 assumes ROOT is fighting against someone fielding male soldiers. Might be weird with an Enatic foe.

- EVTDESC_HFP_11012_B assumes male soldiers.

- EVTDESC_HFP_11013_A assumes male soldiers.

- EVTDESC_HFP_11001_C assumes male soldiers.

- EVTDESC_HFP_11025_fallback assumes male soldiers.

- EVTDESC_HFP_11037_A_2 assumes male soldiers.

- EVTDESC_HFP_11043_A assumes male soldiers.

- EVTDESC_HFP_11001_A assumes male soldiers.

- EVTDESC_HFP_11005_A assumes male soldiers.

- EVTDESC_HFP_11005_B assumes male soldiers.

- EVTDESC_HFP_11032 has the courtier "averting my eyes". That's impressive, and really should either be "averting HIS eyes" or "AVOIDING my eyes"...

- EVTDESCHFB22073 refers to the female courtesan as "him" in one place.

- EVTOPTCHF22051 "men" might not make sense if Enatic.

- Plenty of HF_baptism_events localization references priests/shamans/rabbis/imams rather than [<scope>.Religion.GetPriestTitle]s, references base religion names ("Germanic", "Hellenic"), references base scripture names, references base god names, and the like.

- Some HF_baptism_events localization assumes male priests, which might not be the case for the religion.

- EVTDESCHFA20003 checks for the Catholic tag's scripture name, which might not match some other random Christian religion's scripture name.

- Some HF_baptism_events localization involving Muslims really get weird for Yazidis.

- EVTOPTBHF24068 "priests", and "All the priests [Root.Religion.GetName] [...]" is weirdly phrased.

- EVTDESCHFB20300 "priest".

- EVTOPTCHF20200 "priest".

- EVTDESCHFA20232 "priest".

- EVTDESCHFA20232 "priest".

- EVTDESCHF20200 "priest".

- EVTOPTXHF23010 "priest".

- TOOLTIP_EVTOPTBHF23219 "priests".

- EVTDESCAHF23222 "priests".

- EVTDESCAHF23223 "priests".

- EVTDESCAHF23411 "priests".

- EVTDESCAHF23434 "priests".

- EVTDESCAHF23435 "priests".

- EVTDESCAHF23452 "priests".

- EVTDESCAHF23453 "priests".

- EVTDESCAHF23456 "priests".

- EVTDESCAHF23457 "priests".

- EVTDESCAHF23460 "priests".

- EVTDESCBHF23402 "priests".

- EVTDESCBHF23435 "priests".

- EVTDESCBHF23457 "priests".

- EVTDESCBHF23460 "priests".

- EVTDESCBHF23768 "priests".

- EVTDESCCHF23219 "priests".

- EVTDESCCHF23401 "priests".

- EVTDESCHF23001 "priests".

- EVTDESCHF23002 "priests".

- EVTDESCHF23002_B "priests".

- EVTDESCHF23002_C "priests".

- EVTDESCHF23002_D "priests".
 
Another small discovery yesterday having had a character become Grandmaster is that the assassin's 'mark for death' power doesn't seem to do anything.
 
CleanSlate issues:

- The Bön WL checks religion_openly_bon_or_reformed_trigger = no; should be = yes.

- CleanSlate has the Celibate trait flagged as a lifestyle; it isn't one in vanilla (and hasn't been since WoL's release), and it is strange and side-effecty to treat it as one, seeing as it'd not just affect the Hedonist and Master Seducer/Seductress traits.


Vanilla oddities:

- LT.40002 has rather poor sanity checks; it can happen even if one of the parents is Incapable, Celibate, or (in Yngvar/Igor's case) a Eunuch.

- LT.40002 fails to consider the possibility of Olga somehow ending up as a secondary wife, as it only checks the spouse scope.

- LT.41002 should probably check that b_geldern's holder's children and grandchildren aren't playable rulers (or at least players) before messing with their traits, culture, and religion.

- LT.41002 should probably have "I'm not a rival with the character I'm giving a county and duchy" added to the AI logic, to prevent it from shooting itself in the proverbial foot.

- LT.20010 options A and B checks ROOT's opinion of ROOT, rather than the emissary's opinion of ROOT, and also checks if ROOT is deceitful when it really should be the emissary.

- LT.20110 potentially adds a sword_tier_2_new artefact. This might be strange if such a sword isn't to be expected in that tomb; maybe the type of sword should depend on the religion of the province, like how the Saint's Fingerbone only spawns if the province is Christian?

- LT.20410 option B should not be available if ROOT isn't attracted to FROM, regardless of whether ROOT is an AI or not, so that check should not be in the ai_chance but in the overall trigger.

- LT.20410 option C: I concur with the comment about the lack of AI logic being concerning, and find it odd that you've decided against adding even very basic logic (e.g. "Don't kill your friends or lovers").

- LT.20431 option A and B: The orientation check belongs in a trigger, not just in the ai_chance.

- LT.20431 option A and B: Both ROOT and FROM are not being Celibate, and should thus lose that trait if they have it.

- LT.20431 option C: I concur with the comment about the lack of AI logic being concerning, and find it odd that you've decided against adding even very basic logic (e.g. "Don't kill your friends or lovers").

- LT.20455's death_murder should be credited to either FROM or FROMFROM, depending on whether ROOT is FROM or not.

- Several conversion_decisions check for not having the Chinese Imperial government. Given that said government type is limited by culture, this would appear to be superfluous.

- The roman_renaissance decision checks for not being Chinese Imperial. Given that that government isn't available for Latin or Byzantine characters, this would appear to be superfluous.

- The become_genghis_khan decision should presumably not be available for tributaries; paying tribute is for the not-so-Greatest of Khans!

- The become_genghis_khan decision does not check the decision-taker's gender when creating the bloodline. Chances are it should be matrilineal if you end up with a female Genghis (e.g. through an Enatic Clans reformation).

- The become_genghis_khan_tribal decision should presumably not be available for tributaries; paying tribute is for the not-so-Greatest of Khans!

- The become_genghis_khan_tribal decision does not check the decision-taker's gender when creating the bloodline. Chances are it should be matrilineal if you end up with a female Genghis (e.g. through an Enatic Clans reformation).

- vassal_castrate_decison, vassal_blinding_decision, and vassal_zun_judgement_decision do not have diplomatic_immunity = no in the allow block, which all rip_torture_decisions have. Possibly something to change, since these are roughly equivalent.

- use_secluded_upgrade should presumably not be possible to use on Incapable characters.

- The various indian_holy_order_decisions probably should alert the player if within diplo range even if their capital isn't in one of the named regions; for example.

- The various indian_holy_order_decisions probably should require that your liege (if you've got one) has the same religion (or a Dharmic religion, for the Dharmic ones), as setting up hostile holy orders would appear a mite treasonous.

- recruit_prisoner is available if the sender is imprisoned or Incapable, which seems a bit odd.

- HFP.20403 clears the flag_vatican_prince flag on_birth, which could cause issues with twins. It should probably be cleared in the follow-up event.

- While consistent with vanilla, it's pretty odd overall that holy orders always have male leaders and only get male recruits. It should perhaps respect the religion's view on gender.

- dissolve_factions_decision can be used even if incapble or otherwise under a regent; feels pretty odd.

- dissolve_factions_decision; I concur with the comments, and suggest adding the same modifier for all other factions.

- create_antioch: Concur on Catholic branch, or at least Catholic + Fraticelli due to Crusades.

- create_cyprus: Concur on Catholic branch, or at least Catholic + Fraticelli due to Crusades.

- restore_byzantine_empire presumably should require being independent.

- secret_religions_openly_adopt_faith forces every society member out into the public, which feels a bit weird since some potentially could be in other realms and really might not feel like going along with it. Notably, only player provinces in the same realm flip.

- It's a bit odd that you can't choose to secretly convert to a (default) heretic religion off of a holy site. Might be an oversight, and as the "Convert off of holy site" decisions are blocked for the AI it's just player freedom...

- create_hungary sets you to the feudal_government government, but the decision could be taken by a Muslim. Seems wrong.

- form_new_kingdom and form_new_empire should probably not be possible if your primary controls a religion; that can lead to silly "Kingdom of the Sunni Caliphate"-style titles, which of course can be usurped, be taken over by some other religion, or the like...

- Apparently the AI isn't allowed to observe Ramadan. Really, vanilla?

- Tiger Hunts are blocked for Jain rulers, but not for Peaceful religions. Seems like an oversight.

- Tiger Hunts are blocked for the jain tag, with no check for random religions that might not at all care about avoiding killing. Seems odd.

- secret_religions_openly_adopt_faith does not cover all religions everywhere; see e.g. hellenic_pagan in the first big community-related check.

- Assorted succession voting stuff has "Do not judge yourself" blocks. This makes a lot of sense for negatives, but unless the voter is Humble it's rather odd for positives as someone might vote for another character due to factors that they themselves live up to... or might ignore factors that *really* should make them prone to seeing themselves as the natural successor, e.g. Caesars of the ERE/RE "Not judging themselves" for being thee Caesar.

- Sayyid and Mirza do not show up anywhere in the succession voting logic; Muslims might not be Elective very often, but it feels rather strange that those are not seen as a positive.

- While rarely Elective, Dharmic (and Taoist, though those are modifiers in vanilla...) branch traits should probably impact succession voting scores; pagan branch traits impact them, after all. Ditto for Sunni branch traits.

- random_world_book_of_dev has the "chinese" flag for unknown reasons.

- The image_of_edessa artefact can be gifted to Iconoclasts, who can't use it. Seems inconsistent, and they'd probably not like it (and I don't think the AI knows to destroy it...).

- agnatic_succession's potential doesn't check for not having the Bön Doctrine.

- Horse, Cat, and Bear culture don't have the _culture suffix, and the former two share tags with traits.

Localization:

- tb_great_pillar_<religion>_empty and its _desc don't appear to be used anywhere, and might be possible to delete.

- secret_religious_society_samaritan_desc_REAL "tenants" should be "tenets".

- taoist_opinion does not have [taoist.GetName], and the Spanish loc does not match e.g. buddhist_opinion.

- zun_pagan does not have [zun_pagan.GetName], and the Spanish loc does not match e.g. buddhist_opinion.

- zun_pagan_reformed does not have [zun_pagan_reformed.GetName], and the Spanish loc does not match e.g. buddhist_opinion.


Possible improvements:

- 00_event_modifiers.txt is pretty large, and splitting off stuff that's easy to separate (e.g. secret religious communities) might be a good idea.

- The secret_<religion>_community modifiers aren't well sorted; e.g. some unreformed pagans are next to their reformed version, some are not. This includes the society event and decision files.

- 00_opinion_modifiers.txt is pretty large, and some stuff could perhaps be moved to separate files.

- 00_modifier_definitions isn't sorted; there's two religion-related sections, for one thing.

- The <culture>_opinion, <culture_group>_opinion, <religion>_opinion, <trait>_opinion, and opinion_of_<trait> modifier_definition setup only covers what vanilla covers. Potentially something to expand for ease of modding; I did it (excepting some traits, and excepting a bunch of translation) for Tianxia, and can share it if you want it.
 
CleanSlate issues:

- e_tartaria's capital is listed as "1031 # Kara Khorum". Kara Khorum's province id is 1013, not 1031.


Vanilla oddities:

- The Dogmatic nature makes the AI completely unwilling to entertain the notion of converting provinces belonging to another religion group. I consider this nonsensical, seeing as their whole thing is about enforcing their religion on others and "Heathens are okay!" seems quite incompatible with that mindset. It'd still be distinctive from Proselytizing in several ways.

- 62321 always creates a male character; potentially weird with Equal, and always weird with Enatic.

- create_hungary swaps you to the Feudal government, but fails to check your initial government and whether your culture/religion means you should some other feudal government.

- create_hungary does not check for being independent, meaning you theoretically could have some vassal that ends up with k_magyar and Hungarian culture use the decision to get some free event troops.

- The capital checks in 62933 and 62934 feel rather poor; if the title was usurped by someone that don't have c_kiev as their capital, they'll rename the title... and won't rename it back when changing their capital. Should probably check any_realm_title.

- It feels pretty strange that the Religious Tax Doctrine can be combined with the Cosmopolitan Nature, since one is about getting along with other religions and the other about penalizing them.

- I personally find Cosmopolitan having regular and Great Holy Wars fairly strange; it feels contradictory to tolerate other religions and not ever have revoke reasons on religious grounds but at the same time having the ability to declare war to usurp stuff on religious grounds (which also opens the door for "Release and holy war" exploits...), and (though it's not entirely official) the Wiki lists it as comparable to the Eastern religions, none of which have GHWs, two of which don't have holy wars, and one of which has fairly restrictive holy wars.

- Seafaring only unlocks raiding for specific pagans if not Peaceful. Maybe that should be for all religions, or at least all pagan religions, in random worlds, seeing as looting might be forbidden on setup there?

- The unique African Doctrine contains all of Monasticism except the stat boost, which feels a bit weird.

- The Aztec religion gets no stat boost from an Autonomous reformation. Giving them a Martial boost seems fitting.

- Several checks for religion_feature_equal in e.g. the law and faction files don't also check religion_feature_bon despite the latter including the former.

- check_if_ancestor_worship_worthy_effect doesn't check for unique Doctrines in some places, only non-unique Doctrines. It should probably check for comparable unique Doctrines.

- The matriarchal_/patriarchal_deposition_war CBs check for ROOT having the opposite feature in the ai_will_do (in addition to checking for the right features), which has no effect.

- obj_marry_ruler doesn't consider Equality.

- spawn_old_duelist_effect is inconsistent in its treatment of gender with/without Enatic.

- spawn_giant_duelist_effect is inconsistent in its treatment of gender with/without Enatic.

- spawn_creature_champion is inconsistent in its treatment of gender with/without Enatic.

- ask_for_divorce_chance does not consider the unique Zun doctrine.

- SSI.4 checks for not having a capital in India. This is both potentially not the only relevant region to check (I don't think e.g. Tibet cares noticeably more than India under normal conditions) and a flawed check since a player that has a very large realm or a realm that's spread out over a large part of the map still could care quite a bit if they have land close to the Atlantic. I'd suggest either checking if the player has any realm province in Europe or North Africa (i.e. might be affected), or always informing the player (it *is* a major event...).

- GBC.100 inconsistently checks for spouse and then randoms from any_spouse.

- GBC.100 potentially makes the lover Homosexual. It feels like restricting the character selection based on attraction is more sensible than changing it.

- GBC.104 targets spouse in option A; an event target random_spouse feels better.

- MNM.10043 does not check for the potential lover being close kin.

- All calls of MNM.6906 could really use an attraction check in the trigger to bring them in line with tumbling events that require suitable orientation.

- MNM.3502 should probably check the true religion's view of incest rather than the religion's view, seeing as the event involves two SRS members.

- Considering the coin flip nature of the murder attempt of 89005, it probably should be blocked against a landed target as getting randomly murdered by someone that really shouldn't be able to pull it off would be unfun for the player.

- 89006 has no AI logic, meaning a Kind husband might execute his lover for killing a former main spouse he didn't like. Might be something to polish up.

- 89006 checks for random_spouse with a character_flag, but said random spouse is always FROM. Simplification is possible.

- 89008 checks for random_spouse with a character_flag, but said random spouse is always FROMFROM. Simplification is possible.

- 89008 has no AI logic, again meaning the husband might act very much out of character.

- 89010 has no AI logic, meaning the husband might replace a lover with a rival.

- 89011's delay means FROM's primary spouse might have changed a second time, so sanity checking for FROMFROM would be good.

- 89011 doesn't check if ROOT is at all murdery.

- 89012 also doesn't check traits, again possibly resuilting in nonsense.

- 89012 adds 5 Decadence in option A, inconsistent with similar 89006.

- 89014/89015 assumes only sons might inherit; a flawed assumption. It should really check for gender laws and pick an appropriate son/daughter based on that.

- 89014 checks for polygamy, not for the spouse having turkish_succession, meaning the whole "Give my child more land as that'll make them the heir!" plan might be inherently flawed.

- 89019 checks if the wife has a son that isn't the primary heir and is a pretender, but doesn't check if said son is ROOT's current spouse's child, meaning there might be a murder attempt that won't further said son's chances of inheriting at all.

- 89019 has a possible edge case where the spouse's heir is landed and the would-be murderer is in their court rather than their spouse's. Considering the sloppy AI logic and the lack of intrigue checks, that means the player could get randomly murdered, so it should probably require an unlanded target.

- 89020 doesn't check if ROOT is at all murdery; the previous event doesn't have full blockers for e.g. Kind.

- 89022 has no AI logic, again possibly resulting in silly things.

- 89025 has no AI logic, again possibly resulting in silly things.

- 89029 only involves the murder of sons; "Only sons might inherit" is a flawed assumption considering SoW laws, Equality, the Daura bloodline, and the like.

- 89029 checks if the wife has a son, but doesn't check if said son is ROOT's current spouse's child, meaning there might be a murder attempt on a son that's not really a threat to ROOT's own son.

- 89029 has a possible edge case where the spouse's heir is landed and the would-be murderer is in their court rather than their spouse's. Considering the sloppy AI logic and the lack of intrigue checks, that means the player could get randomly murdered, so it should probably require an unlanded target.

- 89030 has the same issues as 89020.

- 89032 has no AI logic, again possibly resulting in silly things.

- 89025 has no AI logic, again possibly resulting in silly things.

- I'm not sure how vanilla treats MRs post-HF, but I noticed the MR-related events assume male patricians, which at least is a flawed assumption with some mods. If vanilla allows female patricians, these events and their localization really could use a look.

- REP.400 and related events should perhaps not involve Homosexual characters, as they're quite possibly not looking for a spouse.

- REP.400 and related events doesn't check if the courtier/vassal dynasty member is a republic, only that they can marry. Setting up random marriages for potential feudal relatives of the patrician is pretty odd.

- The "foreign woman" branch triggered from REP.400 could perhaps be expanded to not be reliant on the Mandé culture.

- Event 85999 can potentially invite Qarmatians on the Hajj, which they normally can't go on.

- 86900 should not fire with random religions.

- 86900 can fire for Qarmatians, which is wrong.

- 86901 can fire for Qarmatians, which is wrong.

- 86160 options B and C assumes a male rival in the localization, but the event doesn't check for a male rival, only a rival.

- Events 7840 and 7841 makes no sense if the target is a nomad, and might not make sense if they're tribal.

- Events 7860 and 7861 make little sense for Pacifists.

- Events 7950 and 7951 might not need to check if ROOT uses Decadence, seeing as it's the target that's being Decadent.

- The "Regent tries to kill ruler event chain" (starting with event 61190) doesn't check if the liege is capable, which could result in weird things.

- The "Regent tries to kill ruler event chain" (starting with event 61190) doesn't check , which could result in weird things.

- Event 61237 can fire for non-incapable children, resulting in a weird "I have a wife?" option in the event after. Should probably just be incapable characters.

- The base_regency_events have fairly poor logic overall, with several "ai_chance = { factor = 0 }" blocks. This can potentially result in strange behaviour by regents that aren't quite as scheming as assumed (e.g. a parent that's prone to scheming but doesn't necessarily want to sabotage their own child).

- give_goldsmith_artifacts_tier_2_effect gives a circlet_of_the_heavens when it should be giving a circlet_of_the_sun.

- Artefact hunts can result in Iconoclasts finding the Image of Edessa... which they can't use. Probably not intended.

- The indian_group artefacts are highly questionable for Taoists; CleanSlate is consistent with vanilla, but vanilla's design is weird.

- The Hunting focus' is_female = yes-related check only considers being Enatic or having the Full SoW law, but not having Equality. Seems like an oversight.

- The War focus' is_female = yes-related check completely fails to consider Enatic or Equal setups.

- The Family focus' is_female = yes-related check completely fails to consider Enatic or Equal setups.

- It's a bit weird that husbands might seek to kill old/barren wives with plot_kill_spouse because of no sons if they've got an Equal or Enatic setup.

- It's a bit weird that the "No sons" check in plot_kill_spouse doesn't check if said son is legitimate/legitimized and able to inherit.

- It's a bit weird there's no "Kill Eunuch husband if you don't have a daughter" clause in plot_kill_spouse if you're Enatic.

- It's a bit weird that plot_kill_spouse is allowed off of your spouse having a lover that's not you with no check that it's not a secondary spouse or concubine (i.e. I think it makes more sense to have an infidelity check).

- Gujarati culture uses the "gujurati" tag. Given the renaming of other culture tags, this is a bit odd.


Localization:

- EVTDESC62910 speaks of "Magyar tribes", but ROOT might not have been tribal when taking the decision.

- EVTDESC62911 speaks of the "King of the Magyars", but the event could fire for a woman.

- EVTDESC62911 speaks of "settl[ing] down", but the decision is not restricted to tribal rulers.

- EVTDESC62920 speaks of "one crown and one king", but as the create_leon decision isn't restricted by culture or religion the "king" part is potentially very strange.

- EVTDESC_SSI_044 "Emperor", "himself", and "his" assume a male ruler for the Aztecs, but that might not be the case. Also, though the Old Worlders might refer to the Aztecs' ruler as an "Emperor" (it'd be on-brand, considering Europeans referred to the Tokugawa Shoguns as "emperors", which they were much weren't...), the title (assuming they've not somehow ended up as non-Feudal...) would be "Huetlatoani".

- EVTDESC_SSI_048 refers to "Aztec High Priests". Not sure that's the title to use, though again the Old Worlders might not know better.

- temple_baron_aztec and its _reformed version are apparently "Shaman". Most certainly *not* the title to use; vanilla uses it, but it should either be a generic "priest", Teopixqui, or Tlamacazqui (or versions of those).

- temple_baron_aztec and its _reformed version should be temple_baron_aztec_pagan<_reformed>, as the tags have been renamed.

- EVTDESC_REP_413 speaks of "a foreign land to the south", without checking if that's a sensible direction; with random starts, the mande tag might not be remotely close to the southern edge of the map.

- EVTDESC_ZE_6015 and EVTDESC_ZE_6015_B have excessibe capitalization ("My Liege").

- EVTTOOLTIP86167 "him"; the character might not be male.

- The Hajj localization is unsurprisingly very Muslim-centric. This isn't really a random world problem as it is (mostly) prevented from firing if religions aren't standard, but it naturally gets very strange for Yazidis (thanks to vanilla's "interesting" decision to make them Muslim and allowing the Hajj for them...).

- EVTDESC61205 speaks of "castle ramparts", but could potentially fire for non-feudals.

- EVTDESC61170 assumes a male liege.

- non_fancy_laboratory_books_tooltip: "[Root.GetFullName] will avoid spending money frivolously on books that tell [Root.GetHerHis] what he already knows." [Root.GetHerHim], and [Root.GetSheHe]

- 15_HFP_crusade_flavour.csv unsurprisingly has explicit references to Crusades and Crusaders, but crusade_flavor_event_tombola_effect (that triggers a ton of it) has no inherent blocker for random religions, potentially making the events very weird (unsure if the tombola only fires with standard religions, however).


Potential improvements:

- REP.400 has wonky indentation (" " after the tabs in places).

- base_plot_events have random spaces (" ") in front of some closing curly brackets.

- Since it's a large and somewhat messy file, I'd suggest moving assorted faction-related things from base_plot_events to a new base_faction_events, much how smith stuff was moved from mnm_artifact_events to mnm_smith_events.
 
  • 2
Reactions:
Unsure if this is a vanilla bug or Cleanslate's. My ruler got cancer, but I have been unable to get a court physician treatment for a couple years now. I do get the decision to show up every few months, but when I click it, no events happen. I tried changing my court physician, but it makes no difference. Here's a screenshot of the affected ruler:

View attachment 857443

Only mod I'm using is Cleanslate.
EDIT: If I run event RIP.11031 manually through the console, it appears that the trigger requiring an appointed physician is failed, even though I do have an appointed court physician. The title is also referred to as NO_TITLE in the console.
I'm having the same problem.
 
Further oddity, I've played around with a few Latin Empire bookmark starts where you get a Jihad and Crusade almost simultaneously, and as both Catholic and Muslim find if you join both for your side, once the Jihad ends (as it has first in most playthroughs), you're not part of the crusade mechanics any more and can't offer to join etc.
 
Some more assorted stuff.

Vanilla oddities:

- title_master_of_the_hunt cannot be granted to Jain characters, but other pacifists are apparently able to hold it. Feels inconsistent.

- The Reconqusta CBs don't cause you to lose Grace with China. It's probably unlikely that the WP will reach China, but should that happen attacking them should carry the normal penalty.

- dedicated_to_arthemis misspells the goddess' name.

- Enatic and Enatic-Cognatic succession are potentially available if Equal or Agnatic, inconsistent with Agnatic and Agnatic-Cognatic being unavailable if Equal or Enatic.

- Discovered playing AtEFF, but present in CleanSlate: RIP.12064 (Ruler kills character that snuck in through a tunnel during murder attempt) doesn't set ROOT as the killer of event_target:captured_sneaker, but it's very clear ROOT is the killer (and as it's death_duel it's not like it'd be a crime...).

- Discovered playing AtEFF, but present in CleanSlate: RIP.12032 (Child wants to leave seclusion due to peasant lover) can potentially fire for children on the same day as they become an adult (very much a rare edge case; I got "lucky"). Feels iffy, so perhaps age >= 17 should be used rather than is_adult = yes.

- Discovered playing AtEFF, but present in CleanSlate: MNM.70100 (Hunt Apostates: Court Chaplain finds a target) does not filter out the ruler's regent during a regency, potentially resulting in "My incapable liege, your regent is a heretic! Shall we burn them?". It probably makes sense to filter out the regent, or even to disable the event during a regency

- Discovered playing AtEFF, but present in CleanSlate: MNM.3222 (Attempt to blend in)'s desc overflows the event window. Should probably be changed to a long_character_event.

- WoL.3010 (Opinion of spouse improves) does not check for either party having the opinion_forced_consort towards the other. Presumably, you're not supposed to be able to imprison -> force consort -> promote to spouse -> become lovers without first getting rid that modifier (through the Seduction focus); alternatively, the event should clear that out prior to trying to improve opinion/making you lovers.

- Discovered playing AtEFF, but present in CleanSlate: MNM.3403 (the mission handout for Evoke Sympathy) can ask you to evoke sympathy from someone following a religion from the same rel group. The "Evoke Sympathy" decision is not allowed to target anyone following a same religion group religion (possibly because they can't get the sympathy trait). This seems to be due to an inconsistent check for religion rather than religion_group in ok_sr_sympathy_mission_target_trigger.

- TOG.7510 has a TODO that's not been taken care of.

- TOG.7512 can result in incompatible lovers. Should probably be checked in the triggering event.

- TOG.3257 has nokiller for the child; the killer is clearly event_target:exorcising_volva.

- TOG.3400 ignores the possibility of either party being Celibate, or of the husband being a eunuch.

- TOG.3400 can result in incompatible lovers.

- TOG.3400 can result in a venereal disease out of thin air, which is strange since it's two specific characters sleeping with each other rather than a "You sleep with a non-character" event.

- TOG.3400 fails to check that the wife's practical age is under 45.

- TOG.3400 fails to check that the wife is an adult; there's a potential edge case here for historical characters that have a scripted non-adult wife.

- TOG.3006 can only select a male character as berserker_target. Seems potentially bad, particularly if you go down an Equal or Enatic path.

- HFP.19102 should probably not have Homosexual children elect to get married (TOG.3111, TOG.3124).

- HFP.19102 should probably not check for not being married in the trigger for TOG.3114.

- HFP.19102 can fire TOG.3126/3127 even with random religions; the latter explicitly speaks of Christianity.

- HFP.19102 can only fire TOG.3126/3127 with an Orthodox liege for the Varangian Guard; it'd work with any Christian religion as written, so I don't really see why it has to be limited to a specific denomination.

- bon_tolerate_indians is available for Incapable characters, which seems odd.

- The lose_effects for various council positions check for the character being incapable, not for the character becoming ineligible. Seeing as you can disqualify yourself by e.g. being the Lord Spiritual and converting, it should probably check for eligibility so that the former councillor doesn't get "Fired me" towards their liege.


Localization issues:

- GetRandomUpgradeDesc has an OR with just two instances of upgrade_moat_water, which is probably unitentional; other moats should probably be there instead of the duplicate.

- uncrowned_2_desc, uncrowned_3_desc, and uncrowned_modifier_desc assume a male character.

- focused_on_monastic_studies_desc assumes a male character.

- masterless_dog_des, house_dog_desc, pet_masterless_dog_desc, pet_hedgehog_desc, pet_house_dog_desc all assume a male character.

- inspired_by_legends_desc "his" rather than "this".

- trader_desc assumes a male character.

- Discovered playing AtEFF, but present in CleanSlate as the localization matches (even if the tag doesn't): evt_534_desc_b (crusade invalidated because target lost the title) refers to the usurper as the overthrown character, which is incorrect.

- EVTDESC_TOG_3127 "him"; the event isn't restricted to male targets.

- CALIPH_FOA is "Your Imperial Majesty". Given that the actual caliphate titles aren't emperor tier, this feels pretty odd. Probably a relic from the pre-SoI days.

- bon_sympathy_eastern has excessive capitalization ("Eastern Religion").

- emperor_title_queen_mother_female_german doesn't match emperor_title_queen_mother_female's German localization, not even in its German localization, which is pretty strange.

- string_rp_crusading and string_rp_ghw only check for Catholics as "Crusading".


Possible improvements:


- 00_minor_titles.csv is pretty long and could probably be split into smaller files.

- 00_customizable_localisation.txt is a very long file, and splitting it seems warranted.
 
  • 1
  • 1Like
Reactions:
Looks like the events/HF_bloodline_events.txt file used for initial commit is incorrect, the bloodline forging events should be:
HF.24063 to HF.24064 (Theologian)
HF.24066 to HF.24067 (Technology)
HF.24070 to HF.24071 (Zealot) HF.24069 to HF.24070 (Zealot)
HF.24073 to HF.24074 (Ruthless) HF.24072 to HF.24073 (Ruthless)

But currently these 4 events all trigger HF.24061 (Family)

Edit: correct the event id
 
Last edited:
  • 1
Reactions:
Looks like the events/HF_bloodline_events.txt file used for initial commit is incorrect, the bloodline forging events should be:
HF.24063 to HF.24064 (Theologian)
HF.24066 to HF.24067 (Technology)
HF.24070 to HF.24071 (Zealot)
HF.24073 to HF.24074 (Ruthless)

But currently these 4 events all trigger HF.24061 (Family)

Looking at the script, I can confirm that the above seems broken, though Zealot should be HF.24069 linking to HF.24070. Alternatively, HF.24061 should be updated to have the correct title, desc, and outcome depending on flags or the like... but that feels slightly more complicated.
 
  • 2
Reactions:
Some more assorted stuff:

CleanSlate issues:

- error.log is reporting issues with assorted "religion = capital_scope"/"culture = capital_scope"/"religion = <title>" triggers. I don't think it's incorrect, but it's a noticeable source of false positives if it isn't.

- Can't tell the exact cause, but William the Bastard died in battle against himself during an observer game (with Tianxia stuff active, but I rather doubt he got killed by a Tianxia event). Presumably, some instance of death_battle scopes to the wrong killer.

- HF_sway_antagonize_decisions.txt is spamming error.log with the "is_adult = yes" on line 161 and line 55 from time to time. Those conditions are in vanilla (on different line numbers), and I've never noticed something wrong with the decisions, so I'm really not sure what's up with that. Possibly it only shows up in observer mode when you select a character.

- The CB list at the top of faction_cbs.txt is missing powerful_vassal_takeover_war.

- The AI creation weight for the Independence faction does not appear to match vanilla's conditions. The below is the first trigger_if in the "chance" block's trigger in CleanSlate (comment mine):

Code:
trigger_if = {
    limit = {
        religion = liege
        culture = liege
    }

    OR = { # Evaluates to true if either beyond a certain distance OR non-de jure OR king tier.
        trigger_if = {
            limit = { is_unreformed_pagan_trigger = yes }

            distance = {
                who = liege
                value >= 100
            }
        }

        trigger_else = {
            distance = {
                who = liege
                value >= 200
            }
        }

        NAND = {
            de_jure_liege_or_above = liege
            lower_real_tier_than = KING
        }                     
    }
}

while the below is found in vanilla's Independence faction definition's "chance" block (comment again mine)

Code:
modifier = {
    factor = 0
    liege = {
        religion = ROOT
        culture = ROOT
        OR = { # Evaluates to true if close enough OR a de jure vassal below the tier of king
            NOT = { distance = { who = ROOT distance = 100 } }
            AND = {
                NOT = { distance = { who = ROOT distance = 200 } }
                ROOT = {
                    OR = {
                        NOT = { religion_group = pagan_group }
                        is_reformed_religion = yes
                    }
                }
                OR = {
                    NOT = { ROOT = { religion_group = pagan_group } }
                    ROOT = { is_reformed_religion = yes }
                }
            }
            AND = {
                de_jure_vassal_or_below = ROOT
                NOT = { ROOT = { tier = KING } }
            }
        }
    }
}

As a result, the CleanSlate setup appears to let non-king de jure vassals beyond a certain distance join even with matching culture and religion. The discrepancy can also be noticed by looking at the scheming requirement for the membership block, where the distance and tier/de jure checks are in an AND block, as in vanilla.

- In general, the Independence faction seems to be acting weirdly; it's modded a bit in Tianxia, which potentially might cause issues (though I can't spot any errors), but I see de jure same religion same culture counts eagerly start and join it for no explainable reason (other than "Hate their liege", which is insufficient on its own) even after dealing with the above issue.

- special_cbs.txt doesn't list roman_christian_revolt or abrahamic_antihellenic_revolt at the top.

- pagan_holy_war's is_valid block fails to check for unreformed Aztec attackers.

- pagan_holy_war's is_valid block fails to check for the attacker converting to a Peaceful pagan religion mid-war.

- other_cbs.txt doesn't list the CBs at the top.


Vanilla oddities:

- HF.41360 option A should presumably come with a pregnancy risk for non-homosexual women.

- HFP.10119 option A should probably have unprotected_sex_effect alongside add_lover.

- k_orthodox's holder is forbidden from joining the Independence faction even if their liege is a heathen or heretic, which seems rather strange.

- Various succession law faction CBs don't check is_law_potential in is_valid_title, which potentially could result in issues if the attacker wins (if memory serves, this sort of thing would result in the invalid law being applied, instantly invalidating, and a fallback (usually Gavelkind) being applied).

- powerful_vassal_takeover_war's is_valid block does not check if the defender somehow has become a rel head despite the faction being unavailable against rel heads; potentially an edge case to look at.

- bon_tolerate_indians is available for children, which is odd.

- bon_tolerate_indians checks for not having the Incapable trait, not is_incapable = no.

- Heretic and Religious revolts get reinforced by other heretic/religious rebels from the same religion no matter where in the realm they revolt, unlike other rebels. This is a bit odd, as it potentially can result in reinforcements rising up on the far side of a huge realm and thus being in no position to help out. Personally, I feel that having these wars independent of each other on a duchy level is rather more sane.

- MNM.3948 (character picks up random secret religion) is not blocked for Zealous characters, which is extremely nonsensical.

- MNM.3948 can fire for rel heads, which feels quite weird.

- tributary_permanent_cb has different requirements if your capital is in the world_europe region, which is pretty arbitrary as the situation might not be remotely historical. Surely there are saner triggers, such as culture/religion triggers.

- caliphal_subjugation does not check for the attacker remaining the caliph and the defender remaining a co-religionist in the is_valid block, which is quite odd.

- decadence_usurpation does not check for the attacker remaining a Muslim, which is fairly odd.

- pagan_subjugation does not check that the attacker remains a pagan; rather odd.

- The Aztec emperor requires 500 prestige to keep launching tribal_invasions, which potentially results in them sitting around doing nothing for long periods of time if the realm is inherited by someone that lacks the prestige and hasn't yet grown to a point where they'll get the prestige, so perhaps the Aztec emperor should be allowed to continue even if they don't have that amount of prestige.


Localization issues:

- baptism_sponsor_pagan might get weird with random religions.


Possible improvements:

- There are opinion modifiers in 00_opinion_modifiers.txt that are completely unused, e.g. proud_parent. It might be worth cutting these.
 
Some more assorted stuff

CleanSlate file comments:

- There's a "TODO: Add Dharmic holy orders" in SoA.1030. This has not been done, though it should be noted that it'd change vanilla, and as the Dharmic holy orders aren't tied to SoA it might be intentional for them to not have the joining events.

- SoA.1052 has a comment about Teutonic castle construction being disabled for unknown reasons. I suspect it has to do with the Teutons potentially establishing their own realm.

Vanilla oddities:

- negotiate_with_adventurer should probably be blocked if FROM is at war, and should probably not be allowed to pick the county of a vassal that's at war.

- negotiate_with_adventurer might not make sense if FROM has a regent or is inaccessible.

- The Insane Zealot physician does not come with a Monk trait if the religion is Monastic or Dharmic, only if they're Christian. Should probably use add_ascetic_trait_effect.

- The Cynical Clergyman physician does not come with a Monk trait if the religion is Monastic or Dharmic, only if they're Christian. Should probably use add_ascetic_trait_effect.

- The Well-travelled pilgrim physician can be a Hajjaj even if Qarmatian (or Yazidi). The event also tries to add the Pilgrim trait regardless of religion group, and has the same Monk issue.

- Event 39220 (imprisoned bishop tries to contact the Pope to be released) is part of an event chain that doesn't properly account for random religions in the localization (e.g. it assumes the priest is male), and whether the bishop asks depends on a character flag rather than an opinion modifier towards the Pope, which would seem rather more reasonable (i.e. don't try the same Pope, but if there's a new Pope you should perhaps try again).

- Event 39270 (firing for the Pope) and its follow-ups (firing for playable rulers) fail to account for random worlds, and the localization somewhat assume baseline Catholics (e.g. male priests, "God").

- Event 39300 (Orthodox icons) should really not fire with random religions, at least not with the current localization.

- Events 39310 and 39311 can only fire for men, but aside from the localization they should really be possible for women if they can be commanders... and should not be possible for men if they can't.

- Events 39310 and 39311 should probably not be firing for imprisoned characters.

- The "Preacher arrives" event chain starting with event 39600 assumes a male preacher (not even a valid assumption with vanilla Christians...), and aside from "Strong tribals want to pick up a better government!" the conversion logic has probably not been touched since tOG; for example, offensive pagans don't have a malus against converting to the Jain religion despite its pacifism. The conversion logic should probably also check if cultures/religions are standard where it checks the historical weights, as it could get pretty weird with random religions.

- RIP.4101 checks for being a pagan in the conversion logic, not for being an unreformed pagan. Seems wrong. Also, there's the same historical bias as above, with the same random world issue, and the same "Doesn't really account for religions added after tOG" issue.

- The conversion logic in RIP.4101 and in 39601 are fairly different; they should likely be more consistent.

- Event 39617 has the same issues as 39601.

- I find it odd that event 39640 checks for >= 10 % Decadence rather than >= 25 % Decadence, seeing as 25 % is the neutral point on the scale and a ruler at 10 % therefore should be seen as someone that's doing pretty well and thus not someone that should get their realm attacked by a random Shia pretender caliph uprising.

- Event 39660 checks for the Catholic Pope specifically. If the Fraticelli heresy has taken over, the Fraticelli Pope should probably be the one to announce the start of the Crusades. Ditto for the other events that unlock the crusades.

- Events 39812 and 39820 fail to check if the vassal is inaccessible. In the former case, the follow-up event checks it, but not in the latter case.

- HO.100's region checks are pretty poor; the human player would presumably care about a hostile holy order nearby even if their capital happens to be in a different region.

- HO.110, HO.120, and HO.130's options checks for indian_group despite has_dharmic_religion_trigger being rather more sane (Taoists have little reason to care for Jain or Hindu holy orders, and even Buddhist ones is a stretch).

- I believe I mentioned it in the past, but it's pretty weird that holy orders only ask for sons to join and that only men can join them regardless of the religion. Some localization tweaks and checks for relevant Doctrines and the game rule about gender equality would seem like an improvement.

- SoA.1030 checks max_age; practical_age seems like a better check.

- The coastal province check in SoA.1052 should perhaps include the Aztec holy order due to being invaders from the other side of the Atlantic, as well as possibly Sea-Bound reformers.

- The region checks in SoA.1052 should probably not be active with random worlds; the holy orders' parent religions might not be anywhere close to their historical focus.

- form_st_anthony, form_st_addai, and organize_army_light should probably require independence, similar to founding e.g. the Brotherhood of the Holy Sepulchre.

Localization issues:

- EVTDESC_MNM_3205 has ROOT unsuccessfully (judging by context...) quote the Bible ("Ezekiel 25:17") when attempting to blend in as a totally true believer. There's just one massive problem with this: There's nothing in the event chain checking whether ROOT is a) pretending to be a Christian or b) is a secret Christian, meaning e.g. an Aztec character pretending to be a Taoist would screw up in the form of misquoting the Bible. Notably, the preceding event (MNM.3202) does not make any assumptions about the holy book in the localization.

- EVTDESC_MNM_3225_N references "God", with no random world check in the event chain. Should likely be replaced with Root.Religion.GetHighGodName.

- EVTDESC_MNM_3226_N references "Tengri" and "the Sky God's followers" by name, with no random world check in the event chain. Should likely be replaced with Root.Religion.GetHighGodName and a small rewrite.

- EVTDESC_MNM_3228_G references "Vishnu" by name, with no random world check in the event chain. Should likely be replaced with Root.Religion.GetRandomGodName.

- The Kowtow traits' _desc entries (and potentially other pieces of localization) translate "[the] Dragon Throne" as "[translated the] Dragon Throne" in all translations. I doubt that's correct.

- 00_events.csv contains strings found in other files, e.g. EVTDESC89032. Cleanup would seem warranted, to avoid unwanted overrides.

- EVTOPTA62300 refers to "Odin" by name. A HighGod reference would seem much better.

- EVTOPTA62310 "Raven God". Similar issue.

- EVTOPTB62951 fails to check for a random start, and its reference to Odin is thus a problem.

- EVTOPTC62951 has "Ravens" with a capital "R". Again a random world problem.

- EVTOPTC62951 "Four balls for the Ravens", referencing blinding and castration. The event fails to check if Aelle has been blinded/has lost an eye/has been castrated previously...

- EVTDESC39230 has excessive capitalization in "Bishop", and assumes standard religions ("God").

- EVTDESC39240 refers to Christendom, though the ebent only fires for the unplayable rel head.

- EVTDESC39241 doesn't properly account for random religions.

- EVTDESC39251 doesn't properly account for random religions.

- EVTDESC39271 "[The Pope] asks us to replace [a bishop] with a bishop". Should probably not have the "with a bishop", or should perhaps have "with another bishop".

- EVTDESC39310 "Church" and "her [the Church's] enemies" might look weird with random religions.

- EVTDESC39410 doesn't account for random religions, though the event only fires for a Christian rel head.

- EVTDESC39500 explicitly refers to Islam; weird with random religions and Yazidis.

- Consistency issue: EVTDESC_39617 has an underscore unlike other strings in the file. Potentially annoying if you're searching for the whole tag and don't get hits for tags for adjacent events due to the underscore.

- EVTDESC39617 has excessive capitalization in "Liege".

- EVTDESC39680 claims that all pagan heads of religion will be able to declare GHWs, which isn't true with HF.

- EVTDESC39680 "[Root.Religion.GetName] Pagan response". I don't think the "Pagan" is needed here, and it might be weird with some religion names.

- EVTDESC39680 "Cruasdes and Jihads"; only one of them needs to be active for the event to fire.

- EVTDESC39680 "Heathen aggression"; very weird from a pagan perspective, particularly the perspective of the relevant religion.

- EVTOPTA39021 "Faith" is excessively capitalized.

- EVTOPTA39201 "Ave Maria!"; event can fire with random religions.

- EVTOPTA39211 "saying Ave Maria's"; event can fire with random religions.

- EVTOPTA39223 "man" and "God".

- EVTOPTA39226 "I bend my knee for the Throne of St. Peter"; random religion issue.

- EVTOPTA39271 "Papal Demands" has excessive capitalization.

- EVTOPTA39310 "I am Galahad!"; I don't know if the Arthurian legends would make sense in a random world.

- EVTOPTA39311 "God".

- EVTOPTA39500 "Allah"; weird with Yazidis as well as random religions.

- EVTOPTA39501 "Lost Souls!" has excessive capitalization.

- EVTOPTB39222 "God".

- EVTOPTB39400 "Accursed Heathens!" is excessively capitalized.

- EVTOPTB39660 "Foolish Posturing!" is excessively capitalized.

- EVTOPTB39670 "Disturbing News!" is excessively capitalized.

- EVTOPTB39680 "Mighty" feels excessively capitalized.

- The Festival of the Sun localization refers to the Sun as male, which might be odd if the Zunist faith goes Enatic.

- EVTDESC_HO_110 and EVTDESC_HO_120 seem inconsistently random world-proofed; for example, the latter refers to the Buddha by name, but not Ashoka by name.

- EVTDESC_HO_130 speak of "men", which might be weird if the equal gender rule is used.

- EVTOPTB_HO_100 "They might be necessary if we are to defend our faith"... is said by the ruler of another Eastern religion than the one whose holy order just spawned.

- EVTDESC_CM_4006 assumes the zun_pagan_reformed tag worships a male god. I suppose that's theoretically possible even if Enatic, but it feels weird.

- EVTDESC_CM_4303 "Allah".

- EVTOPTB_SOA_1209 "Mystic Soldiers? Pah!"; excessive capitalization.
 
  • 1
Reactions:
I've all but finished up the CleanSlate-ing of Tianxia at this point, so this will likely be the last bug report in the foreseeable future

Independence faction stuff:

As mentioned previously, the behaviour of this faction does not seem to match vanilla. I've slowly been reconstructing it by re-implementing the vanilla faction and slowly adding back CleanSlate's setup (with some Tianxia tweaks that should not have any impact on whether it works as expected in a vanilla context).

- There's a "liege = { pacifist = yes }" in the Independence faction's chance block. In vanilla, this is "FROM = { pacifist = yes }", which is rather more consistent with other factions and generally makes more sense (i.e. the vassal is less uppity if a Pacifist, but vassals aren't necessarily less uppity just because the liege is a Pacifist).

- Possible vanilla bug: In the "Try to exclude people who should rather support a claimant" part of the logic, there's a "is_primary_holder_title = yes". I think this probably was meant to be a "is_primary_holder_title_tier = yes", considering that if Harald wins in 1066 he'll quite possibly (read: I saw it in an observer game) get an Anglo-Saxon independence faction because his primary holder title -- Norway -- lacks Anglo-Saxon claimants while a primary holder tier title -- England -- has such claimants, which seems unintended.

- The "culture = liege", "culture_group = liege", "religion = liege" and "religion_group = liege" conditions in the Independence faction don't really seem to work, based on who joins the faction. Putting e.g. "religion = ROOT" inside the liege scope seems to result in the expected behaviour. Maybe "<something> = liege" doesn't work, while LIEGE (as in some places in vanilla's faction setup) works? I went with the former.

- Weird things seem to happen once the modifier = { factor = 0 <...> } blocks related to culture/religion/de jure liege/tier are changed into trigger_ifs/etc. inside the triggers. I don't know why; I doubt I messed up negations or anything like that when I tried.

- Rewriting the trigger_if stuff (modifier = { factor = 0 <...> } in vanilla) as OR blocks in the trigger seems to work fine. See spoiler below for a slightly Tianxia-ified (e.g. offmap_china stuff commented out) Independence faction that seems to match vanilla behaviour regarding culture/religion/de jure liege/tier where relevant, in case it is of interest. Indentation likely messed up by the forums.

Code:
# Independence
faction_independence = {
    type = character
    
    warning_level = 0.7 # At this level of faction power we give player an alert. Set to 0 for no alerts.
    
    # Plotter scope
    potential = {
        is_landed = yes
        higher_real_tier_than = BARON
        is_adult = yes
        independent = no
        prisoner = no
        is_incapable = no # Works fine here
        mercenary = no
        holy_order = no

        NOR = {
            has_character_modifier = faction_independence_ultimatum_timer
            
            AND = {
                has_landed_title = k_orthodox
                liege = {
                    religion = orthodox
                }
            }
            
            AND = {
                OR = {
                    is_the_tenno_trigger = yes
                    is_ryukyuan_tenno_trigger = yes
                }
                
                liege = {
                    has_japanese_government_trigger = yes
                }
            }
            
            AND = {
                has_japanese_government_trigger = yes
                liege = {
                    OR = {
                        is_the_tenno_trigger = yes
                        is_ryukyuan_tenno_trigger = yes
                        AND = {
                            has_japanese_government_trigger = yes
                            any_realm_lord = {
                                OR = {
                                    is_the_tenno_trigger = yes
                                    is_ryukyuan_tenno_trigger = yes
                                }
                            }
                        }
                    }
                }
            }
            
            i_am_appropriate_regent_trigger = yes

            has_opinion_modifier = {
                modifier = opinion_coerced_into_leaving_faction
                who = LIEGE
            }

            has_opinion_modifier = {
                modifier = opinion_intimidated_out_of_factions
                who = LIEGE
            }
            
            trait = treasure_fleet_preparation
            trait = treasure_fleet_voyage
        }

        trigger_if = {
            limit = { ai = no }

            OR = {
                is_feudal = yes
                is_tribal = yes
                is_nomadic = yes
                higher_real_tier_than = COUNT
            }
        }

        liege = {
            independent = yes

            NOT = {
                any_war = {
                    using_cb = cb_faction_independence
                }
            }

            ## Hordes should have less problems with this type of faction until ca 1350
            #trigger_if = {
            #    limit = { has_horde_culture = yes }
            #
            #    NAND = {
            #        year < 1350
            #        culture = ROOT
            #        religion = ROOT
            #    }
            #}
            
            trigger_if = {
                limit = {
                    has_landed_title = e_mongol_empire
                    culture = mongol
                }
                
                NAND = {
                    religion = ROOT
                    culture = ROOT
                    year < 1350
                }
            }
            
            trigger_else_if = {
                limit = {
                    has_landed_title = e_aztec_empire
                    culture = nahua
                }
                
                NAND = {
                    religion = ROOT
                    culture = ROOT
                    year < 1350
                }
            }
            
            trigger_else_if = {
                limit = {
                    has_landed_title = e_inca_empire
                    culture = quechua
                }
                
                NAND = {
                    religion = ROOT
                    culture = ROOT
                    year < 1350
                }
            }

            # Not allowed to start factions like this if our capital borders the liege's capital
            capital_scope = {
                any_neighbor_province = {
                    ROOT = {
                        capital_scope = {
                            NOT = { province = PREVPREV }
                        }
                    }
                }
            }

            NOT = {
                any_demesne_title = {
                    temporary = yes
                }
            }
        }

        trigger_if = {
            limit = { has_dlc = "Conclave" }

            OR = {
                is_voter = no
                is_nomadic = yes
                is_tribal = yes

                liege = {
                    OR = {
                        is_council_content = no
                        #has_landed_title = e_china_west_governor
                        NOT = { has_law = war_voting_power_1 }
                        
                        is_under_regency_trigger = yes
                        
                        has_character_modifier = mandate_of_heaven_2
                        has_character_modifier = mandate_of_heaven_1
                        
                        AND = {
                            has_religion_feature = religion_feature_ryukyuan_three_mountains
                            ROOT = {
                                has_religion_feature = religion_feature_ryukyuan_three_mountains
                            }
                        }
                        
                        AND = {
                            has_law = grand_chancellor_law_2
                            ROOT = {
                                has_minor_title = title_grand_chancellor
                            }
                        }
                    }
                }
            }
        }

        # Can't join factions when in blood oath with liege
        trigger_if = {
            limit = { is_nomadic = yes }

            NOT = { has_blood_oath_with = liege }

            clan_opinion = {
                who = LIEGE
                value < 0
            }
        }

        # No independence factions in merchant republics
        trigger_if = {
            limit = { is_patrician = yes }

            liege = {
                is_merchant_republic = no
            }
        }
    }
    
    # Target scope
    allow = {
        prisoner = no
        
        NOT = {
            has_opinion_modifier = {
                who = LIEGE
                modifier = opinion_coerced_into_leaving_faction
            }
        }

        trigger_if = {
            limit = { is_nomadic = yes }

            clan_opinion = {
                who = LIEGE
                value < 0
            }

            NOT = { has_blood_oath_with = liege }
        }
    }
    
    # Faction member scope (ROOT = joiner, FROM = target)
    allow_join = {
        ROOT = {
            is_landed = yes
            is_adult = yes
            independent = no
            prisoner = no
            mercenary = no
            is_incapable = no # Works fine here

            NOR = {
                has_character_modifier = faction_independence_ultimatum_timer
                
                AND = {
                    has_landed_title = k_orthodox
                    liege = {
                        religion = orthodox
                    }
                }
                
                AND = {
                    OR = {
                        is_the_tenno_trigger = yes
                        is_ryukyuan_tenno_trigger = yes
                    }
                    
                    liege = {
                        has_japanese_government_trigger = yes
                    }
                }
            
                AND = {
                    has_japanese_government_trigger = yes
                    
                    liege = {
                        OR = {
                            is_the_tenno_trigger = yes
                            is_ryukyuan_tenno_trigger = yes
                            
                            AND = {
                                has_japanese_government_trigger = yes
                                
                                any_vassal = {
                                    OR = {
                                        is_the_tenno_trigger = yes
                                        is_ryukyuan_tenno_trigger = yes
                                    }
                                }
                            }
                        }
                    }
                }
                
                i_am_appropriate_regent_trigger = yes

                has_opinion_modifier = {
                    modifier = opinion_coerced_into_leaving_faction
                    who = LIEGE
                }

                has_opinion_modifier = {
                    modifier = opinion_intimidated_out_of_factions
                    who = LIEGE
                }
            
                trait = treasure_fleet_preparation
                trait = treasure_fleet_voyage
            }

            trigger_if = {
                limit = { has_dlc = "Conclave" }

                OR = {
                    is_voter = no
                    is_nomadic = yes
                    is_tribal = yes

                    liege = {
                        OR = {
                            is_council_content = no
                            #has_landed_title = e_china_west_governor
                            NOT = { has_law = war_voting_power_1 }
                        
                            is_under_regency_trigger = yes
                            
                            has_character_modifier = mandate_of_heaven_2
                            has_character_modifier = mandate_of_heaven_1
                            
                            AND = {
                                has_religion_feature = religion_feature_ryukyuan_three_mountains
                                PREV = {
                                    has_religion_feature = religion_feature_ryukyuan_three_mountains
                                }
                            }
                            
                            AND = {
                                has_law = grand_chancellor_law_2
                                PREV = {
                                    has_minor_title = title_grand_chancellor
                                }
                            }
                        }
                    }
                }
            }

            trigger_if = {
                limit = { is_nomadic = yes }

                clan_opinion = {
                    who = LIEGE
                    value < 0
                }

                NOT = { has_blood_oath_with = liege }
            }

            # No independence factions in merchant republics
            trigger_if = {
                limit = { is_patrician = yes }

                liege = {
                    is_merchant_republic = no
                }
            }
        }
    }
    
    # AI creation weight
    chance = {
        factor = 4
        
        trigger = {
            in_seclusion = no
            war = no
            preparing_invasion = no
            liege = {
                current_heir = {
                    NOT = {
                        character = ROOT
                    }
                }
            }

            # To keep leading the faction
            trigger_if = {
                limit = { leads_faction = faction_independence }

                opinion = {
                    who = LIEGE
                    value < 80
                }
            }
            
            # To start the faction
            trigger_else = {
                opinion = {
                    who = LIEGE
                    value < 60
                }
            }
            
            # Japan shouldn't experience independence factions when the would-be faction member should seek to become the Shogun/restore imperial authority
            OR = {
                has_japanese_government_trigger = no
                liege = {
                    has_japanese_government_trigger = no
                }
            }
            
            # Try to exclude people who should rather support a claimant
            OR = {
                real_tier = king
                liege = {
                    NAND = {
                        culture = ROOT
                        religion = ROOT
                        any_demesne_title = {
                            is_primary_holder_title_tier = yes # Vanilla has is_primary_holder_title, which seems wrong
                            higher_tier_than = DUKE
                            ROOT = {
                                primary_title = {
                                    de_jure_liege_or_above = PREVPREV
                                }
                            }
                            any_claimant = {
                                culture = ROOT
                                religion = ROOT
                            }
                        }
                    }
                }
                
                liege = {
                    OR = {
                        has_character_modifier = mandate_of_heaven_2
                        has_character_modifier = mandate_of_heaven_1
                        AND = {
                            primary_title = {
                                has_law = grand_chancellor_law_2
                            }
                            ROOT = {
                                has_minor_title = title_grand_chancellor
                            }
                        }
                    }
                }
            }
            
            OR = {
                NOT = {
                    liege = {
                        religion = ROOT
                        culture = ROOT
                        OR = {
                            distance = {
                                who = ROOT
                                distance < 100
                            }
                            AND = {
                                distance = {
                                    who = ROOT
                                    distance < 200
                                }
                                ROOT = {
                                    is_unreformed_pagan_trigger = no
                                }
                                is_unreformed_pagan_trigger = no
                            }
                            AND = {
                                de_jure_vassal_or_below = ROOT
                                ROOT = {
                                    lower_real_tier_than = KING
                                }
                            }
                        }
                    }
                }
                
                liege = {
                    OR = {
                        has_character_modifier = mandate_of_heaven_2
                        has_character_modifier = mandate_of_heaven_1
                        AND = {
                            primary_title = {
                                has_law = grand_chancellor_law_2
                            }
                            ROOT = {
                                has_minor_title = title_grand_chancellor
                            }
                        }
                    }
                }
            }
            
            OR = {
                NAND = {
                    lower_tier_than = KING
                    is_unreformed_pagan_trigger = no
                    liege = {
                        culture_group = ROOT
                        religion_group = ROOT
                        OR = {
                            religion = ROOT
                            culture = ROOT
                        }
                        distance = {
                            who = ROOT
                            distance < 200
                        }
                    }
                }
                
                liege = {
                    OR = {
                        has_character_modifier = mandate_of_heaven_2
                        has_character_modifier = mandate_of_heaven_1
                        AND = {
                            primary_title = {
                                has_law = grand_chancellor_law_2
                            }
                            ROOT = {
                                has_minor_title = title_grand_chancellor
                            }
                        }
                    }
                }
            }
        }
        
        mult_modifier = {
            factor = 0.5

            liege = {
                any_owned_bloodline = {
                    has_bloodline_flag = bloodline_less_factions
                    bloodline_is_active_for = PREV
                }
            }
        }
        
        mult_modifier = {
            factor = 0.2
            FROM = { pacifist = yes }
        }
        
        mult_modifier = {
            factor = 0.1
            OR = {
                NOT = { religion_group = pagan_group }
                is_reformed_religion = yes
            }
            liege = {
                NOT = { distance = { who = ROOT distance = 200 } }
            }
        }

        mult_modifier = {
            factor = 0.1

            is_not_unreformed_pagan_trigger = yes

            liege = {
                distance = {
                    who = ROOT
                    value < 200
                }
            }
        }

        mult_modifier = {
            factor = 0.25
            
            liege = {
                religion = ROOT
                culture = liege
            }
        }

        mult_modifier = {
            factor = 1.5

            liege = {
                distance = {
                    who = ROOT
                    value >= 300
                }
            }
        }

        mult_modifier = {
            factor = 2.0

            liege = {
                distance = {
                    who = ROOT
                    value >= 400
                }
            }
        }
        
        mult_modifier = {
            factor = 2.0
            is_unreformed_pagan_trigger = yes
        }

        mult_modifier = {
            factor = 2.0
            liege = {
                NOT = {
                    religion_group = ROOT
                }
            }
        }

        mult_modifier = {
            factor = 1.5
            liege = {
                NOT = {
                    culture_group = ROOT
                }
            }
        }

        mult_modifier = {
            factor = 0.5

            opinion = {
                who = LIEGE
                value >= 20
            }
        }

        mult_modifier = {
            factor = 1.5

            opinion = {
                who = LIEGE
                value < -20
            }
        }

        mult_modifier = {
            factor = 2.0

            opinion = {
                who = LIEGE
                value < -50
            }
        }

        mult_modifier = {
            factor = 4.0

            opinion = {
                who = LIEGE
                value < -75
            }
        }

        mult_modifier = {
            factor = 0.025
            trait = content
        }

        mult_modifier = {
            factor = 0.025
            trait = imbecile
        }

        mult_modifier = {
            factor = 0.025
            trait = craven
        }

        mult_modifier = {
            factor = 0.1
            trait = inbred
        }

        mult_modifier = {
            factor = 0.1
            is_dumb_trigger = yes
        }

        mult_modifier = {
            factor = 0.5
            trait = kind
        }

        mult_modifier = {
            factor = 0.5
            trait = charitable
        }

        mult_modifier = {
            factor = 0.5
            trait = honest
        }

        mult_modifier = {
            factor = 0.75
            trait = humble
        }

        mult_modifier = {
            factor = 0.75
            trait = just
        }

        mult_modifier = {
            factor = 1.5
            trait = proud
        }

        mult_modifier = {
            factor = 1.5
            trait = brave
        }

        mult_modifier = {
            factor = 1.5
            trait = arbitrary
        }

        mult_modifier = {
            factor = 2.0
            trait = envious
        }

        mult_modifier = {
            factor = 2.0
            trait = greedy
        }

        mult_modifier = {
            factor = 2.0
            trait = impaler
        }

        mult_modifier = {
            factor = 2.0
            trait = deceitful
        }

        mult_modifier = {
            factor = 4.0
            trait = ambitious
        }
        
        mult_modifier = {
            factor = 1.5
            primary_title = {
                is_vice_royalty = yes
            }
            
            NOR = {
                AND = {
                    government = chinese_vassal_government
                    liege = {
                        has_chinese_government_trigger = yes
                    }
                }
                
                AND = {
                    has_japanese_government_trigger = yes
                    liege = {
                        has_japanese_government_trigger = yes
                    }
                }
            }
        }

        mult_modifier = {
            factor = 2

            OR = {
                has_opinion_modifier = {
                    modifier = opinion_evil_tyrant
                    who = LIEGE
                }

                has_opinion_modifier = {
                    modifier = opinion_tyrant
                    who = LIEGE
                }
            }
        }

        #mult_modifier = { # More likely to want to go independent from the WP if China is unstable
        #    factor = 10.0
        #
        #    liege = {
        #        government = confucian_bureaucracy
        #    }
        #
        #    offmap_china = {
        #        NOR = {
        #            has_status = china_stable
        #            has_status = china_golden_age
        #        }
        #    }
        #}
        
        mult_modifier = {
            factor = 0.5
            liege = {
                has_character_modifier = mandate_of_heaven_4
                ROOT = {
                    can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
                    culture_group = PREV
                }
            }
        }
        
        mult_modifier = {
            factor = 0.25
            liege = {
                has_character_modifier = mandate_of_heaven_5
                ROOT = {
                    can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
                    culture_group = PREV
                }
            }
        }
        
        mult_modifier = {
            factor = 1.2 # If the liege might have lost the Mandate of Heaven, start the interesting times!
            ROOT = {
                liege = {
                    has_character_modifier = mandate_of_heaven_2
                    NOT = {
                        dynasty = ROOT
                    }
                }
                can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
            }
        }
        
        mult_modifier = {
            factor = 5 # If the liege might have lost the Mandate of Heaven, start the interesting times!
            ROOT = {
                liege = {
                    has_character_modifier = mandate_of_heaven_1
                    NOT = {
                        dynasty = ROOT
                    }
                }
                can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
            }
        }
        
        mult_modifier = {
            factor = 1.2 # If the liege might have lost the Mandate of Heaven, start the interesting times!
            ROOT = {
                liege = {
                    has_character_modifier = mandate_of_heaven_2
                    NOT = {
                        dynasty = ROOT
                    }
                }
                can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
                tier = king
            }
        }
        
        mult_modifier = {
            factor = 5 # If the liege might have lost the Mandate of Heaven, start the interesting times!
            ROOT = {
                liege = {
                    has_character_modifier = mandate_of_heaven_1
                    NOT = {
                        dynasty = ROOT
                    }
                }
                can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
                tier = king
            }
        }
        
        mult_modifier = { # Let's not have China explode so easily...
            factor = 0.01
            ROOT = {
                primary_title = {
                    is_vice_royalty = yes
                }
                
                NOT = {
                    any_demesne_title = {
                        tier = PREV
                        is_vice_royalty = no
                    }
                }
                
                government = chinese_vassal_government
                
                liege = {
                    government = chinese_imperial_government
                    
                    OR = {
                        de_jure_vassal_or_below = ROOT
                        culture = ROOT
                    }
                    
                    NOR = {
                        has_character_modifier = mandate_of_heaven_2
                        has_character_modifier = mandate_of_heaven_1
                    }
                }
            }
        }
        
        mult_modifier = {
            factor = 5
            ROOT = {
                has_religion_feature = religion_feature_ryukyuan_three_mountains
            }
        }
        
        mult_modifier = {
            factor = 0.01 # Just take over the realm!
            liege = {
                has_chinese_government_trigger = yes
                dynasty = ROOT
            }
            
            ROOT = {
                government = chinese_vassal_government
            }
        }
        
        mult_modifier = {
            factor = 0.1 # If we can overthrow the imperial dynasty, that's likely better
            
            liege = {
                any_vassal = {
                    leads_faction = faction_powerful_vassal_takeover
                    government = chinese_vassal_government
                    culture_group = ROOT # No foreigners on the Dragon Throne!
                    NOR = {
                        is_rival = ROOT
                        lower_real_tier_than = ROOT
                    }
                }
                
                NOT = {
                    dynasty = ROOT
                }
            }
            
            ROOT = {
                government = chinese_vassal_government
            }
        }
        
        mult_modifier = {
            factor = 0.25
            
            ROOT = {
                liege = {
                    has_character_modifier = hwarang_faction_discouragement
                }
            }
        }
    }
    
    # AI membership weight: ROOT is the prospective member. FROM is the faction leader. FROMFROM is the target title or character.
    membership = {
        factor = 4
        
        trigger = {
            prisoner = no
            is_incapable = no # Works here!
            is_adult = yes
            is_landed = yes
            preparing_invasion = no
            NOT = {
                has_character_modifier = faction_independence_ultimatum_timer
            }
            
            trigger_if = {
                limit = {
                    has_landed_title = k_orthodox
                }
                
                liege = {
                    NOT = {
                        religion = orthodox
                    }
                }
            }
            
            trigger_if = {
                limit = {
                    liege = {
                        has_landed_title = e_mongol_empire
                        culture = mongol
                    }
                }
                
                NAND = {
                    liege = {
                        religion = ROOT
                        culture = ROOT
                    }
                    year < 1350
                }
            }
            
            trigger_else_if = {
                limit = {
                    liege = {
                        has_landed_title = e_aztec_empire
                        culture = nahua
                        religion_openly_aztec_or_reformed_trigger = yes
                    }
                }
                
                NAND = {
                    liege = {
                        religion = ROOT
                        culture = ROOT
                    }
                    year < 1350
                }
            }
            
            trigger_else_if = {
                limit = {
                    liege = {
                        has_landed_title = e_inca_empire
                        culture = quechua
                        religion_openly_inca_or_reformed_trigger = yes
                    }
                }
                
                NAND = {
                    liege = {
                        religion = ROOT
                        culture = ROOT
                    }
                    year < 1350
                }
            }
            
            NOT = {
                has_opinion_modifier = {
                    who = LIEGE
                    modifier = opinion_coerced_into_leaving_faction
                }
            }
            
            # Japan shouldn't experience independence factions when the would-be faction member should seek to become the Shogun/restore imperial authority
            OR = {
                has_japanese_government_trigger = no
                liege = {
                    has_japanese_government_trigger = no
                }
            }
            
            # Try to exclude people who should rather support a claimant
            OR = {
                real_tier = king
                liege = {
                    NAND = {
                        culture = ROOT
                        religion = ROOT
                        any_demesne_title = {
                            is_primary_holder_title_tier = yes # Vanilla has is_primary_holder_title, which seems wrong
                            higher_tier_than = DUKE
                            ROOT = {
                                primary_title = {
                                    de_jure_liege_or_above = PREVPREV
                                }
                            }
                            any_claimant = {
                                culture = ROOT
                                religion = ROOT
                            }
                        }
                    }
                }
                
                liege = {
                    OR = {
                        has_character_modifier = mandate_of_heaven_2
                        has_character_modifier = mandate_of_heaven_1
                        AND = {
                            primary_title = {
                                has_law = grand_chancellor_law_2
                            }
                            ROOT = {
                                has_minor_title = title_grand_chancellor
                            }
                        }
                    }
                }
                
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_coerced_into_joining_faction
                }
                
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_intimidated_into_factions
                }
            }
            
            # The current heir never joins willingly
            OR = {
                liege = {
                    NOT = {
                        current_heir = {
                            character = ROOT
                        }
                    }
                }
                
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_coerced_into_joining_faction
                }
                
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_intimidated_into_factions
                }
            }

            # If we like the liege too much, we only join if forced to
            OR = {
                opinion = {
                    who = LIEGE
                    value < 40
                }
            
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_coerced_into_joining_faction
                }
                
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_intimidated_into_factions
                }
            }
            
            OR = {
                NOT = {
                    liege = {
                        religion = ROOT
                        culture = ROOT
                        OR = {
                            distance = {
                                who = ROOT
                                distance < 100
                            }
                            AND = {
                                distance = {
                                    who = ROOT
                                    distance < 200
                                }
                                ROOT = {
                                    is_unreformed_pagan_trigger = no
                                }
                                is_unreformed_pagan_trigger = no
                            }
                            AND = {
                                de_jure_vassal_or_below = ROOT
                                ROOT = {
                                    lower_real_tier_than = KING
                                }
                            }
                        }
                    }
                }
                
                liege = {
                    OR = {
                        has_character_modifier = mandate_of_heaven_2
                        has_character_modifier = mandate_of_heaven_1
                        AND = {
                            primary_title = {
                                has_law = grand_chancellor_law_2
                            }
                            ROOT = {
                                has_minor_title = title_grand_chancellor
                            }
                        }
                    }
                }
            
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_coerced_into_joining_faction
                }
                
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_intimidated_into_factions
                }
            }
            
            OR = {
                NAND = {
                    lower_tier_than = KING
                    is_unreformed_pagan_trigger = no
                    liege = {
                        culture_group = ROOT
                        religion_group = ROOT
                        OR = {
                            religion = ROOT
                            culture = ROOT
                        }
                        distance = {
                            who = ROOT
                            distance < 200
                        }
                    }
                }
                
                liege = {
                    OR = {
                        has_character_modifier = mandate_of_heaven_2
                        has_character_modifier = mandate_of_heaven_1
                        AND = {
                            primary_title = {
                                has_law = grand_chancellor_law_2
                            }
                            ROOT = {
                                has_minor_title = title_grand_chancellor
                            }
                        }
                    }
                }
            
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_coerced_into_joining_faction
                }
                
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_intimidated_into_factions
                }
            }
            
            OR = {
                NOT = {
                    liege = {
                        capital_scope = {
                            any_neighbor_province = {
                                ROOT = {
                                    capital_scope = {
                                        province = PREVPREV
                                    }
                                }
                            }
                        }
                    }
                }
                
                liege = {
                    OR = {
                        has_character_modifier = mandate_of_heaven_2
                        has_character_modifier = mandate_of_heaven_1
                        AND = {
                            primary_title = {
                                has_law = grand_chancellor_law_2
                            }
                            ROOT = {
                                has_minor_title = title_grand_chancellor
                            }
                        }
                    }
                }
            
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_coerced_into_joining_faction
                }
                
                has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_intimidated_into_factions
                }
            }
        }

        mult_modifier = {
            factor = 0.5

            liege = {
                any_owned_bloodline = {
                    has_bloodline_flag = bloodline_less_factions
                    bloodline_is_active_for = PREV
                }
            }
        }

        mult_modifier = {
            factor = 0.2

            pacifist = yes
                
            NOR = {
                has_opinion_modifier = {
                    modifier = opinion_coerced_into_joining_faction
                    who = FROM
                }
                
                has_opinion_modifier = {
                    modifier = opinion_intimidated_into_factions
                    who = FROM
                }
            }
        }

        mult_modifier = {
            factor = 1000

            has_opinion_modifier = {
                modifier = opinion_coerced_into_joining_faction
                who = FROM
            }
        }

        mult_modifier = {
            factor = 1000

            has_opinion_modifier = {
                modifier = opinion_intimidated_into_factions
                who = FROM
            }
        }

        mult_modifier = {
            factor = 0.1

            is_not_unreformed_pagan_trigger = yes
            
            liege = {
                distance = {
                    who = ROOT
                    value < 200
                }
            }
            
            NOR = {
                has_opinion_modifier = {
                    modifier = opinion_coerced_into_joining_faction
                    who = FROM
                }
                
                has_opinion_modifier = {
                    modifier = opinion_intimidated_into_factions
                    who = FROM
                }
            }
        }

        # Clans are very unlikely to join Independence factions led by non-nomads
        mult_modifier = {
            factor = 0.01

            is_nomadic = yes
            FROM = { is_nomadic = no }
                
            NOR = {
                has_opinion_modifier = {
                    modifier = opinion_coerced_into_joining_faction
                    who = FROM
                }
                
                has_opinion_modifier = {
                    modifier = opinion_intimidated_into_factions
                    who = FROM
                }
            }
        }
        
        mult_modifier = {
            factor = 0.25
            liege = {
                religion = ROOT
                culture = ROOT
            }
            NOR = {
                has_opinion_modifier = {
                    modifier = opinion_coerced_into_joining_faction
                    who = FROM
                }
                
                has_opinion_modifier = {
                    modifier = opinion_intimidated_into_factions
                    who = FROM
                }
            }
        }
        
        mult_modifier = {
            factor = 1.5
            
            liege = {
                distance = {
                    who = ROOT
                    value >= 300
                }
            }
        }
        
        mult_modifier = {
            factor = 2.0
            
            liege = {
                distance = {
                    who = ROOT
                    value >= 400
                }
            }
        }

        mult_modifier = {
            factor = 2.0
            is_unreformed_pagan_trigger = yes
        }
        
        mult_modifier = {
            factor = 2.0
            liege = {
                NOT = {
                    religion_group = ROOT
                }
            }
        }
        
        mult_modifier = {
            factor = 1.5
            liege = {
                NOT = {
                    culture_group = ROOT
                }
            }
        }

        mult_modifier = {
            factor = 0.5

            opinion = {
                who = LIEGE
                value >= 20
            }
        }

        mult_modifier = {
            factor = 1.5

            opinion = {
                who = LIEGE
                value < -20
            }
        }

        mult_modifier = {
            factor = 2.0

            opinion = {
                who = LIEGE
                value < -50
            }
        }

        mult_modifier = {
            factor = 4.0

            opinion = {
                who = LIEGE
                value < -75
            }
        }

        mult_modifier = {
            factor = 0.025

            trait = content
                
            NOR = {
                has_opinion_modifier = {
                    modifier = opinion_coerced_into_joining_faction
                    who = FROM
                }
                
                has_opinion_modifier = {
                    modifier = opinion_intimidated_into_factions
                    who = FROM
                }
            }
        }

        mult_modifier = {
            factor = 0.025

            trait = imbecile
                
            NOR = {
                has_opinion_modifier = {
                    modifier = opinion_coerced_into_joining_faction
                    who = FROM
                }
                
                has_opinion_modifier = {
                    modifier = opinion_intimidated_into_factions
                    who = FROM
                }
            }
        }

        mult_modifier = {
            factor = 0.025

            trait = craven
                
            NOR = {
                has_opinion_modifier = {
                    modifier = opinion_coerced_into_joining_faction
                    who = FROM
                }
                
                has_opinion_modifier = {
                    modifier = opinion_intimidated_into_factions
                    who = FROM
                }
            }
        }

        mult_modifier = {
            factor = 0.1

            trait = inbred
                
            NOR = {
                has_opinion_modifier = {
                    modifier = opinion_coerced_into_joining_faction
                    who = FROM
                }
                
                has_opinion_modifier = {
                    modifier = opinion_intimidated_into_factions
                    who = FROM
                }
            }
        }

        mult_modifier = {
            factor = 0.1

            is_dumb_trigger = yes
                
            NOR = {
                has_opinion_modifier = {
                    modifier = opinion_coerced_into_joining_faction
                    who = FROM
                }
                
                has_opinion_modifier = {
                    modifier = opinion_intimidated_into_factions
                    who = FROM
                }
            }
        }

        mult_modifier = {
            factor = 0.5
            trait = kind
        }

        mult_modifier = {
            factor = 0.5
            trait = charitable
        }

        mult_modifier = {
            factor = 0.5
            trait = honest
        }

        mult_modifier = {
            factor = 0.75
            trait = humble
        }

        mult_modifier = {
            factor = 0.75
            trait = just
        }

        mult_modifier = {
            factor = 1.5
            trait = proud
        }

        mult_modifier = {
            factor = 1.5
            trait = brave
        }

        mult_modifier = {
            factor = 1.5
            trait = arbitrary
        }

        mult_modifier = {
            factor = 2.0
            trait = envious
        }

        mult_modifier = {
            factor = 2.0
            trait = greedy
        }

        mult_modifier = {
            factor = 2.0
            trait = impaler
        }

        mult_modifier = {
            factor = 2.0
            trait = deceitful
        }

        mult_modifier = {
            factor = 4.0
            trait = ambitious
        }

        mult_modifier = {
            factor = 2

            OR = {
                has_opinion_modifier = {
                    modifier = opinion_evil_tyrant
                    who = LIEGE
                }

                has_opinion_modifier = {
                    modifier = opinion_tyrant
                    who = LIEGE
                }
            }
        }

        #mult_modifier = { # More likely to want to go independent from the WP if China is unstable
        #    factor = 10.0
        #
        #    liege = {
        #        government = confucian_bureaucracy
        #    }
        #
        #    offmap_china = {
        #        NOR = {
        #            has_status = china_stable
        #            has_status = china_golden_age
        #        }
        #    }
        #}
        
        mult_modifier = {
            factor = 0.5
            liege = {
                has_character_modifier = mandate_of_heaven_4
                ROOT = {
                    can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
                    culture_group = PREV
                }
            }
        }
        
        mult_modifier = {
            factor = 0.25
            liege = {
                has_character_modifier = mandate_of_heaven_5
                ROOT = {
                    can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
                    culture_group = PREV
                }
            }
        }
        
        mult_modifier = {
            factor = 1.2 # If the liege might have lost the Mandate of Heaven, start the interesting times!
            liege = {
                has_character_modifier = mandate_of_heaven_2
                NOT = {
                    dynasty = ROOT
                }
            }
            can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
        }
        
        mult_modifier = {
            factor = 5 # If the liege might have lost the Mandate of Heaven, start the interesting times!
            liege = {
                has_character_modifier = mandate_of_heaven_1
                NOT = {
                    dynasty = ROOT
                }
            }
            can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
        }
        
        mult_modifier = {
            factor = 1.2 # If the liege might have lost the Mandate of Heaven, start the interesting times!
            liege = {
                has_character_modifier = mandate_of_heaven_2
                NOT = {
                    dynasty = ROOT
                }
            }
            can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
            tier = king
        }
        
        mult_modifier = {
            factor = 5 # If the liege might have lost the Mandate of Heaven, start the interesting times!
            liege = {
                has_character_modifier = mandate_of_heaven_1
                NOT = {
                    dynasty = ROOT
                }
            }
            can_have_confucian_bureaucracy_and_eastern_imperial_trigger = yes
            tier = king
        }
        
        mult_modifier = { # Let's not have China explode so easily...
            factor = 0.01
            primary_title = {
                is_vice_royalty = yes
            }
            
            NOT = {
                any_demesne_title = {
                    tier = PREV
                    is_vice_royalty = no
                }
            }
            
            government = chinese_vassal_government
            
            liege = {
                government = chinese_imperial_government
                OR = {
                    de_jure_vassal_or_below = PREV
                    culture = PREV
                }
                NOR = {
                    has_character_modifier = mandate_of_heaven_2
                    has_character_modifier = mandate_of_heaven_1
                }
            }
        }
        
        mult_modifier = {
            factor = 5
            ROOT = {
                has_religion_feature = religion_feature_ryukyuan_three_mountains
            }
        }
        
        mult_modifier = {
            factor = 0.01 # Just take over the realm!
            liege = {
                has_chinese_government_trigger = yes
                dynasty = ROOT
            }
            
            ROOT = {
                government = chinese_vassal_government
            }
        }
        
        mult_modifier = {
            factor = 0.01 # If we can overthrow the imperial dynasty, that's likely better
            
            liege = {
                any_vassal = {
                    leads_faction = faction_powerful_vassal_takeover
                    government = chinese_vassal_government
                    culture_group = FROM # No foreigners on the Dragon Throne!
                    NOR = {
                        is_rival = ROOT
                        lower_real_tier_than = ROOT
                    }
                }
                
                NOT = {
                    dynasty = ROOT
                }
            }
            
            ROOT = {
                government = chinese_vassal_government
            }
        }
        
        mult_modifier = {
            factor = 0.25
            
            ROOT = {
                liege = {
                    has_character_modifier = hwarang_faction_discouragement
                }
            }
        }
    }
    
    success = {
        independent = yes
    }
    
    effect = {
        FROM = {
            any_faction_backer = {
                faction = faction_independence
                reverse_opinion = {
                    modifier = opinion_grateful
                    who = FROM
                    years = 5
                }
            }
        }
    }
    
    abort = {
        always = no    # Factions will abort if the Potential or Allow trigger is no longer valid
    }
}


Vanilla oddities:

- JD.7010 should probably be blocked for inaccessible characters.

- JD.7010 is more likely to fire for characters with a Jewish saintly bloodline, but not for characters following a Jewish religion or belonging to the Israelite culture group, which seems like an oversight.

- Interesting Muslims are set to not spawn if the province's owner is on the Hajj. Sensible, yes, but there's no check for being unavailable for other reasons (imprisoned, in seclusion, in hiding, etc.), which is rather odd.

- Leaving aside my own preferences regarding historical railroading, the Manifest Destiny Invasion CB feels a bit odd with HF, seeing as "This dynsty can invade people!" is rather close to "Members of this bloodline can invade people!". Perhaps Seljuk and Timur's bloodlines should get one use of the Tribal Invasion CB (with some target logic in the ai_will_do) and the CB should be disabled with HF? It'd change vanilla, but arguably in a fashion making it more consistent with itself.

- exchange_land_for_hospital rules out the Teutonic Order, but allows all other Holy Orders, even those that don't normally engage in barony spam. Unsure if intended.


Possible improvements:

- Chinese character spawns from the Grace system and the Chinese diplomacy events could really use scripted_effects for the spawning so that changes don't have to be made in multiple places.


Localization:

This is probably not as exhaustive as it could be when it comes to 00_ui.csv; I skimmed some of those 6.7k lines...

- EVTOPTAHF22096 needs to start with [From.GetHerHisCap], not [From.GetHerHis].

- EVTDSC_RIP_21000 - all versions misspell "councillors" as "councilors"

- 12_rip_eternal_life_events.csv: All descriptions are "EVTDSC", not "EVTDESC"; it matches the setup in the event file, but is inconsistent with CK2 as a whole.

- ACCEPT_SECRETLY_WORSHIP_OLD_RELIGION "Accept, but secretly worship [Root.Religion.GetHighGodName]" gets rather weird if you've got the same HighGod. I'd change it to e.g. "[...] secretly remain true to the [Root.Religion.GetName] faith."

- AI_THIS_IS_GOOD_FOR_US and several of the AI_WE_ARE_<something> strings lack a starting single quotation mark.

- Several AIREASON_<something> strings have weird capitalization, e.g. AIREASON_LIEGE_REALM_ATTACKED "Realm under Foreign Attack" and AIREASON_NO_REASON "No Compelling Reason".

- The AIREASON_<something> strings don't consistently refer to the relevant character in first/third person (see e.g. AIREASON_HAS_CASUS_BELLI "Have Casus Belli" (first) vs. AIREASON_LIEGE_HATE "Hates their liege" (third)).

- ALLIANCETITLE has localization for a bunch of languages that aren't English/French/German/Spanish. Not sure what's up with that.

- ALREADY_IN_A_SOCIETY "Member" and "Society" don't need capitalization.

- ARMY_RECRUITMENTS has localization for a bunch of languages that aren't English/French/German/Spanish. Not sure what's up with that.

- ATTACHMENT_REQUIREMENTS_TOOLTIP "The target unit must have the Same Looter status, must be either your Vassal or Ally, and it's Owner must have the Same or Greater Feudal Ranking." Very weird capitalization.

- ATTACHMENT_REQUIREMENTS_TOOLTIP "it's Owner" -> "its owner".

- ATTACKER_CONTROL_HOLDINGS "The Attacker Controls all their Holdings"; capitalization.

- AUTO_INVITE_PLOTTERS "Auto Invite Plotters"; capitalization seems excessive, and it should probably be "Auto-invite" to match e.g. "Auto-assign Commanders".

- AVAILABLE_DUE_TO_OBSERVATORY and AVAILABLE_DUE_TO_OBSERVATORY_EQUIPMENT do not seem like UI strings.

- AZTEC_RELENTLESS_RELIGION "Eternal Riders"; not an UI string, and Eternal Riders has nothing to do with the Aztecs...

- best_candidate_title_cardinal and best_candidate_title_cardinal_fraticelli: "Best" probably doesn't need a capital "B".

- BISHOP_LOYALTY_DESC "[catholic.GetName]" might be a problem for Fraticelli.

- BUILD_PRESTIGE_OR_PIETY_TRADE_POST_DESC incorrectly claims that local rulers may build trade posts if a trade route passes through (it's only true if it's a trade post county along the trade route).

- CALL_ALL_<something>: Lots of odd capitalization.

- CANDIDATE_<something>: A bunch of odd capitalization.

- CANNOT_CHANGE_ANOTHER_DEJURE_LAW "crown Law" -> "Crown Law".

- CANNOT_PLAY_INDIAN_WITHOUT_DLC "Indian"; the group is "Eastern" in-game.

- CANT_BUILD_TRADEPOST_<something>: Capitalization is weird.

- CANT_LOOT_SHORT seems excessively capitalized.

- CAROUSING_FOCUS does not seem like it has anything to do with the UI.

- CHILDHOOD_FOCUS_<something> aren't really UI-related.

- COMBATEND_<something> have odd capitalization.

- COUNCIL_ELECTIVE and COUNCIL_ELECTIVE_DESC don't feel like UI strings.

- CROWN_LAW_CHANGE_TIMEOUT doesn't capitalize "crown law", which usually is the case.

- CRUSADE_<something> have some explicit reference to "Crusade"s and "His Holiness", which might not be great with random religions.

- "Dynasty" is inconsistently capitalized in assorted UI strings.

- "Demesne" is inconsistently capitalized in assorted UI strings.

- DEFENCE, and DEFENCE_COMBAT_MODIFIER spell "defense" as "defence" in the string itself; CK2 uses American English, so this would unfortunately be wrong.

- DEFENDER_PLEDGE_SUPPORT_TOOLTIP_DELAYED "Crusade".

- DEMAND_PEACE is "Demand Tribute". Unsure what's up with that.

- Considering CK2's difficulty calculation is very poor (i.e. it primarily goes off of number of vassals, where higher isn't necessarily better), maybe the DIFFRATING_<something> strings should be replaced/removed? It would change vanilla, but seeing as it's rather poor...

- I'm unsure if they're used, but DIP_DECLINE_IMPRISON and DIP_DECLINE_KILL refer to a male character, which potentially might be incorrect.

- DIPLO_USE_FAVOR: Small "F" in "favor"; Favors are usually referred to with a capital "F".

- Strings such as "duchy", "duchy_of", and "duke" feel more sensible to have with cultural titles than the UI strings.

- DYNATREE_NOHEAD_DYNA "This Dynasty does not have any living members, it does not have a head" feels a bit off.

- EDUCATION_FOCUS_<something> don't feel like they're UI strings.

- ENDGAME_TEXT_INDIAN and ENDGAME_TEXT_PAGAN are not quite correct regarding DLC unlocks, seeing as e.g. JD doesn't unlock most Eastern religions.

- Several FE_<something> strings are in more than four languages.

- FE_IRONMAN is translated in Spanish, but not in French. Not sure if intentional or which way it was meant to be (German is untranslated, if it matters).

- GAME_RULE_<something>_TOOLTIP d not feel like UI strings.

- GENDER_LAW_DESC2 "Gender Preference Laws are combined with the other succession laws, controlling whether or not women can inherit." They also control whether *men* can inherit...

- GENGHIS_KHAN is not an UI string; it's a character title.

- GOV_NO_GENDER_SUCC_LAWS_DESC "No Gender Succession Laws" *by default*; you can change the gender law if you increase SoW, right?

- GOVERNMENT_CANNOT_USURP_KINGDOMS_AND_EMPIRES "Merchant Republics and Patricians cannot usurp kingdoms or empires"; this is not exclusive to MRs, even in vanilla!

- GOVERNMENT_CANT_BUILD_HOLDINGS "§R$GOVERNMENT$ rulers Cannot Build new Holdings§!"; weird capitalization.

- heiroglyphics_AMMEND; what is this, and is it intentionally spelled incorrectly in the tag?

- There seems to be some bookmark/era stuff in 00_ui.csv, e.g. HIGH_MED and HIGH_MED_INFO. Seems like the wrong place for it.

- HINT_REL_VIEW_TEXT_3_INDIAN "Indian" rather than "Eastern".

- HINT_REL_VIEW_TEXT_3_INDIAN says that the "Indian" religions can subjugate each other; that's just for Dharmics (and just within the same culture group).

- HINT_REL_VIEW_TEXT_4_INDIAN "Indian".

- HINT_REL_VIEW_TEXT_4_INDIAN completely fails to mention Taoists. Vanilla sure spent a lot of time on integrating them properly...

- HINT_SPLASH_VICTORY claims the game ends in 1452. It ends early 1453.

- IMAM is presumably not a UI string.

- JIZYA_BONUS doesn't feel like a UI string.

- JOINED_WAR_CRUSADE_LOG "Crusade".

- law_female_chancellor, law_female_chancellor_desc, law_female_treasurer, and law_female_treasurer_desc don't feel like UI stuff.

- There's both a LEDGER_HEADER_BLOODLINE and a LEDGER_HEADER_BLOODLINES; are both used?

- LOADING_TIP_0 claims that a demesne consists of castles, cities and temples. Tribal holdings are pretty relevant to count, too, and family palaces and nomadic capitals might also count.

- LOADING_TIP_25 does not spell out "legitimate"; aren't bastards disqualified under Seniority?

- LOADING_TIP_26 fails to mention that an older child theoretically could be disqualified under Primogeniture for reasons other than being illegitimate, e.g. due to being a Blinded Greek.

- LOADING_TIP_43 says you can build improvements in the holdings of your direct vassals; can't you also do that in the holdings of indirect vassals?

- LOADING_TIP_49 tells you to carefully check the traits of your wife. "Spouse" would be more fitting, considering female rulers are a thing.

- MILORD appears to be untranslated in German and Spanish, but is translated in French. Inconsistent.

- There seem to be other HF reformation strings in 00_ui.csv, e.g. MONASTIC_ATTR_RELIGION. I think they'd work better with either modifiers or religion features, particularly as the UI file is quite large.

- Some of the NEWBORN_<something> strings are oddly capitalized, e.g. "Name after Random Ancestor".

- NOT_ALLOWED_PAGAN and NOT_ALLOWED_PAGAN_MP fail to note that Bön can be played with JD.

- NOT_ASKED_BAPTISM_RECENTLY and NOT_BEEN_ASKED_BAPTISM_RECENTLY are decision tooltips, and thus not really UI strings.

- "October" is localized in more than four languages.

- Considering most (all?) Papal actions have been moved to script the various POPE_AIREASON_MODIFIER_<something> strings don't feel like UI strings.

- POPE_AIREASON_MODIFIER_RULER_NO_PRIEST_EXCOMMUNICATION_DEMANDED has an explicit reference to being a "priest", which quite possibly is the wrong title for certain religions with excommunication (e.g. those with exclusively female temple holders).

- POPE_AIREASON_MODIFIER_WAGING_CRUSADE and POPE_AIREASON_MODIFIER_WAGING_CRUSADE_TARGET explicitly mention crusades; the string can show up for religions that call their GHWs something else.

- RD_NOT_PLAYABLE_WITHOUT_PAGAN_DLC fails to mention Bön being playable with JD.

- RD_NOT_PLAYABLE_WITHOUT_ROI_DLC only mentions Dharmic religions and only mentions RoI (Taoists are unlocked by JD); vanilla sure spent time on the Taoists...

- While some REL_<something> strings are about rel*ations* and make sense in the UI file, those that are about rel*igions*, such as REL_SECULAR_HEAD_DESC, probably don't.

- There's a bunch of junk in 00_ui.csv, e.g. RELEASE_D_WARNING. I can see some value in preserving that sort of thing, but not in that file.

- REWARD_NAME_1 "Wizards Beard" -> "Wizard's Beard".

- REWARD_NAME_4 "Jesters Hat" -> "Jester's Hat".

- SHEPHERDS_CRUSADE, SHIA_CALIPHATE_REVOLT, and similar strings don't feel like UI strings.

- STARTED_LOOTING_NAVAL_LOG and STARTED_LOOTING_NAVAL_SETUP mention Vikings and dragon longships, so if they can trigger off of e.g. Berbers raiding overseas there's an issue.

- STAT_PIETY_<something> might make more sense with religion stuff like priest titles.

- convert_to_feudalism_indep_desc changes between first and second person partway through. Ditto for convert_to_feudalism_vassal_desc.

- convert_to_french_desc: small "L" in "latin".

- convert_to_italian_desc: small "L" in "latinized".

- feast_0_desc "Kingdom" can be rather odd if it's not a kingdom, say due to being an empire or due to being a republic.

- For whatever reason form_the_hre_desc sees fit to translate Translatio Imperii in French. It's untranslated in all other languages.

- buy_indulgence_for_sins_desc "the Pope" should perhaps be [Root.RelHead.GetBestName], in case they don't go by "Pope".

- hold_a_epic_tournament_desc claims it's a once-per-lifetime decision; technically not true as the cooldown is a mere 100 years.

- raise_tribal_units_desc "Prestige and Influence"; there's nothing known as "Influence", so capitalizing it is rather weird.

- sadaqah_saddka_desc speaks of Allah and the Caliph, but the decision completely fails to check if the religion actually has Allah as a god (Yazidis, prominently), or call their rel head a Caliph (ditto); it doesn't even check for religions being standard.

- secret_religions_falsely_confess_faith_desc "This will allow you to join or found your secret faith's Society" sounds rather awkward.

- tributary_nomad_cb_desc switches between first and second person.

- viking_invasion_desc speaks of "Norse Pagans"; other religions are potentially eligible with HF... and the religion has been called "Germanic" in-game since CM's release.

- tribal_build_great_pillar_desc "shamans"; not all pagans would have shamans.

- convert_to_spouse_religion_desc "spouse or concubine"; male consorts would seem to be excluded according to the desc...

- release_tributary_desc "stop protecting Tributary Realms sworn to you"; tributaries don't necessarily come with a protection clause.

- nomad_adopt_feudalism, nomad_adopt_feudalism_desc, and nomad_adopt_feudalism_named include "Feudal" with a capital "F", potentially giving the impression that you will adopt *the* Feudal government type rather than *a* feudal government type.

- patrons_khu_desc "You can choose a personal patron from among the many lesser deities of Zarvanan faith": 1) the Khurmazta religion is not referred to as "Zarvanan", 2) there appears to be a missing "the".

- ask_wards_liege_to_allow_culture_religion_swap_desc, ask_wards_liege_to_allow_faith_focus_desc, change_wards_focus_to_faith_desc, and change_wards_focus_to_heritage_desc make it sound as if cultural and/or religious conversion is guaranteed; it's likely, but not guaranteed.

- convert_indian_branch_desc "A person following any of the [indian_group.GetGroupName] religions may convert [...]; false, as Taoists are Eastern and lack access to the decision. Dharmics only.

- borrow_money_assassins and borrow_money_assassins_desc speak of the Assassins; the holy order is the Feyadeen since quite some time ago.

- create_iconoclast_patriarchy_desc "icon worshipping" -> "icon-worshipping".

- donate_money_to_assassins and donate_money_to_assassins_desc speak of the Assassins; the holy order is the Feyadeen since quite some time ago.

- LOADING_TIP_42 "Allies might refuse to participate in a war against someone they like more than you."; hasn't been true since 2.5 as far as the AI goes...
 
  • 2
Reactions:
Found some more assorted stuff, quite a lot of it thanks to falling down a history rabbit hole.


CleanSlate bugs:

- Vijayabahu's (189029) event troops for the Sinhalese rebellion spawn in Kudalasangama (1279) rather than Rohana (1264); caused by the relevant province ID not being updated as part of the province ID adjustments.


Vanilla oddities:

- HF.20375 has a preferred_limit with a "count" that needs to be an "amount" wrapped in a calc_true_if.

- monastic_order_convert_county does not count for obj_strengthen_religion, which is rather odd.

- monastic_order_convert_county is allowed in heretic_stronghold provinces, and don't remove said modifier. Feels quite odd.

- SRS communities stick around if the province converts through any means other than the SRS going public, which feels rather weird; why would there be e.g. secret Catholics if the province is majority Catholic?

- The Sinhalese rebellion starts in 1066, while it historically started in 1055. Would presumably at least matter as far as ticking warscore and "Nobody has won a major battle" goes.

- Assorted Roman Emperors lack their nicknames (note: I'm not talking about their cognomina), including Constantine the Great, whose nickname definitely exists.

- Assorted Roman Emperors don't have causes of death listed, meaning some of them (and Shapur I...) don't get proper kill lists. Perhaps outside the scope of CleanSlate, but possibly something to look at as the death reasons generally exist (one or two very special ones might require additions).

- Excepting Augustus himself, various historical holders of e_byzantium that indisputably were the ROMAN Emperor lack the Augustus trait, and thus their laurels.

- Historical holders of e_byzantium that are dead at the start of the game lack the dead_crown_byzantine trait, and thus their diadem.

- Historical holders of e_hre dead that are at the start of the game lack the dead_crown_hre trait, and thus their crown.

- The capital of e_chagatai is scripted as Samarkand; it was historically Almaliq.

- The capital of e_ilkhanate is scripted as Esfahan; it was historically Tabriz/Maragheh/Soltaniyeh.

- The capital of e_timurids is scripted as Esfahan; it was historically Samarkand/Herat.

- Several Roman (e.g. "Trajan", "Hadrian", "Constantine") and Byzantine (e.g. "Justin" and "Justinian") have Anglicised names. Seeing as the Roman (and Greek...) namelist isn't Anglicised, this is pretty strange, and the names in question will stick out quite a bit in the title history if the Roman culture once more becomes a thing.

- e_nicaea's history contains a mention of "succ_byzantine_elective", which of course doesn't work since the title fails the potential. Unclear if vanilla intended for them to be counted as a successor state as far as government and laws goes but the government and law eligibility was forgotten, if you ask me, and switching the title away from Primogeniture removes the "Delay refounding the ERE to avoid having to deal with its succession law/government" option...

- The Nicene Emperors aren't counted as holders of e_byzantium, which will screw up later regnal numbers (no relevant rulers hold it prior to 1337, but...). I'd say adding an "insert_title_history" in the title history when e_byzantium is restored after the Fourth Crusade might be warranted.


Localization issues:

- has_liege_vassal_or_neighbor_of_baltic_religion_tt and its counterparts explicitly refer to the base religion names, thus breaking with random worlds.

- There's a bunch of <landed title>_adj strings localized as "dummy" in dummy.csv. This causes duplicate string errors in the Validator, and might potentially result in unwanted things in any cases where the adjective is referenced and there isn't a duplicate.

- k_ottoman is poorly localized; "Ottoman Turks" (need not remain Turkish) and especially "Imperio Otomano" (not an empire!).

- k_eretnid is "Emirato Erétnida" in Spanish; it's a kingdom-level title, the ruler isn't known as an Emir (I suppose an argument could be made for a custom ruler title, but...), and if someone uses it as the base for a custom empire it gets even weirder.
 
  • 1
  • 1Love
Reactions:
Just noticed (I got event 1008 with an Incapable character when playing with another mod, then checked if the issue was solely vanilla) that base_personality_trait_events.txt fails to check for incapacity, imprisonment, inaccessibility, and similar things in various places (some check one or more of these). At least some of the events don't make sense in such circumstances.
 
  • 1
Reactions:
Have noticed that if I create a prince-bishop, the succession seems to pick some random from his court rather than generating a cleric, so can end up with peasant rebels with a military education who fled to his court getting the nod. Would be nice if the rules generated a more likely successor, even if historically there were a few landed clerics of doubtful religiosity.
 
Have noticed that if I create a prince-bishop, the succession seems to pick some random from his court rather than generating a cleric, so can end up with peasant rebels with a military education who fled to his court getting the nod. Would be nice if the rules generated a more likely successor, even if historically there were a few landed clerics of doubtful religiosity.
Is this a cleanslate issue, or a general vanilla problem. It is possible that this behavior is hard coded (like generating new merchant prince houses) and any change would end up being way beyond cleanslate's stated mission.
 
Is this a cleanslate issue, or a general vanilla problem. It is possible that this behavior is hard coded (like generating new merchant prince houses) and any change would end up being way beyond cleanslate's stated mission.
I can't swear as haven't played vanilla in a while but seem to recall it at least generated a cleric, though with random stats and traits, certainly didn't notice it picking a courtier with a non-religious education. But not certain to be honest.