schwarherz

CKPlus Triumvirate
73 Badges
Jun 3, 2012
2.017
553
  • Crusader Kings II: Charlemagne
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Magicka
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines - Mass Transit
  • BATTLETECH
  • Surviving Mars
  • PDXCon 2017 Awards Winner
  • Surviving Mars: First Colony Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Distant Stars
  • Tyranny: Archon Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Stellaris: Necroids
  • 500k Club
  • Victoria 2
mod_cleanslate_cleanslate.jpg


GitHub [download] | Steam Workshop [workshop]​

GOAL
To provide a clean, stable, readable base from which other modders can "jump off" to create their own mods more easily and fix any bugs and oversights that Paradox has missed.


Features
- Modding Improvements
This is CleanSlate's original goal. All script has been updated to use newer script features where applicable, and inefficient and/or hard-to-comprehend script has been optimized, and where necessary, documented. Scripted triggers and effects have been properly put to use, and various new scripted triggers have been added, for modders to make use of. See the master changelog, typically included in the download, for more information.
- Bugfixes
CleanSlate is also a massive community patch, fixing nearly 500 bugs and countless minor issues. For details, see the master changelog, typically included in the download.).
- Better Tooltips
You'll no longer see 'Ruler: Spouse: Opinion of Ruler decreases by 10 for 5 years (Furious)'. Almost (*) all uninformative parts of tooltips have been cut, making it easier to see what happens.

In addition, various requirements to enact laws and take decisions has been made easier to read as well.

The game is now much better informing you about losing traits, when you gain a trait opposite to one your current traits, and should always send a notification if trait changes are a matter of chance, meaning you'll no longer have to check your character page to check if you did indeed get (un)lucky.

* Due to limitations in the game's source code, some tooltips could not be cleaned up entirely.
- Never-before-seen events
We have, of course, not added any new events. What you will finally see, for the first time, are various Paradox-developed events, some of which have been part of the game since its very first release, and others, added by various patches and expansions. Among these are siege events, guardian events and birth events.
- Inconsistencies Corrected
While working our way through all of the game's script files, we have smoothed over several inconsistencies. Not all older content properly accounts for various new features added over the years. Consider content that locks out women, without regard for religion features and game rules, or not properly considering various sexual dispositions characters can have towards each other.

Current release
Beta 2.8 - All base game script rewritten, most content reorganized for easier searching.


Future goals
Correct all localization, in all four languages.
Fixing bugs reported on the official forums.


Compatibility
Crusader Kings II version 3.3.4 highly recommended.
May work with versions back to 3.2.x.
Ironman compatible, not achievement compatible.

ui_scale: Include the following line in your scale_ui_xxxx.mod file:
dependencies = { "CleanSlate" }

CleanSlate is not and in most cases cannot be compatible with any mods that have not been built off CleanSlate. That is the downside of thoroughly overhauling the game's script.
We recommend anyone interesting in rebasing mods on CleanSlate to compare current mod files to vanilla files, and bring these changes over to CleanSlate's files. Reading CleanSlate's master changelog for additions and removals is highly recommended.
Authors of large mods are advised to wait until CleanSlate is stable, to avoid endless compatibility patching whenever CleanSlate is updated.


Feedback
CleanSlate is not yet finished. Efforts to squash more bugs is ongoing. New bugs may currently be part of CleanSlate. If you come across any, please report them, so that we can make CleanSlate even better.


Background
As I'm sure everyone in the CK2 Modding Community is aware, the vanilla script for the game is... well... it's a mess. There are myriad bugs, hardly any of the scripting itself is human readable, and the localization is scattered over a dozen or so files with no real organization to it. There have clearly been several batches of cooks on this particular broth. To resolve this, the CK2Plus mod team presents our new standalone community resource: CleanSlate.

To be clear, this mod/resource will (eventually) overwrite every. single. vanilla. file. It already overwrites the vast majority. It will not be compatible with any other mod that modifies vanilla files (unless it's specifically built off of CleanSlate) and vanilla saves are not compatible.

As of right now, the mod is in BETA. Save compatibility between versions is not guaranteed. Until we reach the first full release things are just changing too much between each version to guarantee that.


===Hall of Paradox Scripting Shame===
Location: Unknown (we forgot where we saw this)
Code:
trigger_if = {
    limit = { religion = FROM }
    religion = FROM
}

Location: Unknown (we forgot where we saw this)
Code:
ai_chance = {
  factor = 1

  modifier = {
    factor = 0
    ai = no
  }
}

Location: Scripted Triggers
Code:
#Have to be Christian denomination with potential Religious head, and have been singled out for Beatification
modifier = {
    factor = 0
    NOR = {
        NAND = {
            event_target:saint_person = {
                religion = catholic
            }
            event_target:saint_person = {
                religion = fraticelli
            }
            event_target:saint_person = {
                religion = orthodox
            }
            event_target:saint_person = {
                religion = iconoclast
            }
            event_target:saint_person = {
                religion = nestorian
            }
            event_target:saint_person = {
                religion = misphysite
            }
            event_target:saint_person = {
                religion = monophysite
            }
            event_target:saint_person = {
                religion = paulician
            }
            event_target:saint_person = {
                has_religion_feature = religion_beatification
            }
        }
        NOR = {
            event_target:saint_person = {
                has_character_flag = beatified
            }
            event_target_saint_person = {
                has_religion_feature = religion_beatification
            }
        }
    }
}

Location: Personality Traits Events
Code:
trigger = {
    trait = lustful
    personality_traits = 6
}

weight_multiplier = {
    days = 1

    modifier = {
        factor = 2
        personality_traits = 6
    }
}

Location: Succession Laws
Code:
OR = {
    AND = {
        tier = baron
        is_feudal = yes
    }
    holder_scope = { is_feudal = yes }
    holder_scope = { is_patrician = yes }
}

OR = {
    NOT = { tier = baron }
    holder_scope = { is_patrician = yes }
}

Location: Unknown (we forgot where we saw this)
Code:
random_list = {
    100 = {
        character_event = { id = ZE.11050}
    }
}

Location: CBs
Code:
OR = {
    OR = {
        is_female = no
        NOR = {
            religion_group = muslim
            ROOT = { succ_law_title = { has_law = agnatic_succession } }
            has_religion_feature = religion_patriarchal
        }
    }
    OR = {
        is_female = yes
        NOR = {
            religion_group = muslim
            ROOT = { succ_law_title = { has_law = enatic_succession } }
            has_religion_feature = religion_matriarchal
        }
    }
}

Location: CBs
Code:
ROOT = {
    OR = {
        NOT = { religion_group = pagan_group }
        is_reformed_religion = yes
    }
}
OR = {
    NOT = { ROOT = { religion_group = pagan_group } }
    ROOT = { is_reformed_religion = yes }
}

location: events
Code:
ROOT = {
    opinion = {
        who = ROOT
        value >= -20
    }
}

location: events
Code:
OR = {
    religion_group = zoroastrian_group

    NOR = {
        religion = manichean
        religion = mazdaki
    }
}

Dishonorable Mention:
Code:
2000+ references in 200+ files to "trait = incapable" instead of "is_incapable = yes"

Have you found a bug?
Bugs can be reported on our GitHub page here,
For multiple bugs, please submit reports individually for our ease of tracking. Thank you for your help!​
 
Last edited:
  • 14Like
  • 2Love
  • 1
Reactions:

Aerotinge

Gouverneur van Torkia
41 Badges
Aug 1, 2018
527
155
  • Battle for Bosporus
  • Surviving Mars
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Cradle of Civilization
  • Age of Wonders III
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings III Referal
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Pre-order
(check calendar) OK, not April 1 today....
AVE MARIA! May god bless you good guys.
Will you split every entries in some override-only files (for example "interface\coat_of_arms\coats_of_arms.txt") into separated files, to enhance modular compatibilities?
 
Last edited:

tsf4

General
54 Badges
May 31, 2012
2.231
545
29
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Mare Nostrum
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Imperator: Rome
  • Imperator: Rome - Magna Graecia
  • PDXCon 2017 Awards Winner
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Imperator: Rome Sign Up
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Crusader Kings III
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Victoria 2
Very neat idea. Needed this tool years ago lol when I started modding :)
 

Idhrendur

Keeper of the Converters
104 Badges
Feb 27, 2009
10.425
1.717
  • Crusader Kings II
  • Stellaris: Nemesis
  • Sengoku
  • Pillars of Eternity
  • Tyranny: Archon Edition
  • Europa Universalis IV
  • March of the Eagles
  • Victoria 2
  • 500k Club
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Colonel
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Crusader Kings III: Royal Edition
  • Commander: Conquest of the Americas
  • Darkest Hour
I'm not doing any CK2 modding right now, but this is amazing. Good work!
 
  • 1
Reactions:

schwarherz

CKPlus Triumvirate
73 Badges
Jun 3, 2012
2.017
553
  • Crusader Kings II: Charlemagne
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Magicka
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines - Mass Transit
  • BATTLETECH
  • Surviving Mars
  • PDXCon 2017 Awards Winner
  • Surviving Mars: First Colony Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Distant Stars
  • Tyranny: Archon Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Stellaris: Necroids
  • 500k Club
  • Victoria 2
(check calendar) OK, not April 1 today....
AVE MARIA! May god bless you good guys.
Will you spilt every entries in some override-only files (for example "interface\coat_of_arms\coats_of_arms.txt") into separated files, to enhance modular compatibilities?
Absolutely. Because this is intended, first and foremost, to be a platform for other mods to jump off of, we'll likely make several changes like that. For instance: common\religions\00_religions.txt will be split into individual files per religion group. We'll likely do the same with common\cultures\00_cultures.txt.
 

Whizzer

CKPlus Triumvirate
76 Badges
Jun 17, 2014
1.120
287
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
Well, you have my full support. Actually, do you need any extra pair of hand to contribute?

Also, seeing the commits is great to see how the progress advances, but it'd be nicer to keep a record of what files are done. something like "Y of Y event files done; W of Z decison files done; etc."

Any help is much appreciated. Most of the work is still ahead - events.

As for decisions and events, we've yet to start on those. We'll likely go through them alphabetically, just as we've done with the common folder, for the most part. Note that CleanSlate.mod contains which common folders are fully done. We could include individual decision and event files there, if you prefer.
 

schwarherz

CKPlus Triumvirate
73 Badges
Jun 3, 2012
2.017
553
  • Crusader Kings II: Charlemagne
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Magicka
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines - Mass Transit
  • BATTLETECH
  • Surviving Mars
  • PDXCon 2017 Awards Winner
  • Surviving Mars: First Colony Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Distant Stars
  • Tyranny: Archon Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Stellaris: Necroids
  • 500k Club
  • Victoria 2
This looks like a really cool idea. I may contribute too if I have time. Looking at messy code is always painful.
Any help is absolutely appreciated! Just send me a message later if you'd like to help and I can get the permissions set up.
 

Whizzer

CKPlus Triumvirate
76 Badges
Jun 17, 2014
1.120
287
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
Time for a progress update:

All script found in the common folder has been carefully rewritten and re-organised to be more readable, and more efficient in execution by reduced scoping, reduced use of triggers and usage of all additions to the scripting language that were barely used, if at all. In total, this entails over 400.000 lines of code processed. Any new bugs found during testing were also squashed and so far the game runs very smoothly with this maintenance work done.

Several large and unwieldy files have been split into smaller sizes, so that you can find what you're looking for much more quickly. Among these files are cultures, religions and all the scripted macros (triggers, effects and score values), as well as succession voting. Several more may follow at a later date. Of note is a particularly bad system of triggers and effects used in various religion conversion events. Over 4500 lines in total, it has been replaced by less than 100 lines in total. The new solution is both much easier to read and maintain, it should also be a lot faster in execution. It has been tested to work perfectly so far.

Additionally, almost all of the game's localisation files have been neatly sorted by category, instead of by DLC and patch number. It's now much easier to find something you want to change, instead of a directionless search through 123 files. The new files count roughly 100.

Work has started on decisions, with events to follow afterwards. This is the bulk of the workload and will take some time to process fully. Any help from experienced coders/scripters is appreciated.
 
Last edited:

Linred

First Lieutenant
45 Badges
Jun 23, 2012
285
179
  • Crusader Kings II
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Cities: Skylines Deluxe Edition
  • Rome: Vae Victis
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Ancient Space
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • For the Motherland
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Cities: Skylines - Parklife
  • Crusader Kings III
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Crusader Kings III: Royal Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Victoria 2
  • Europa Universalis IV
  • March of the Eagles
Time for a progress update:

All script found in the common folder has been carefully rewritten and re-organised to be more readable, and more efficient in execution by reduced scoping, reduced use of triggers and usage of all additions to the scripting language that were barely used, if at all. In total, this entails over 400.000 lines of code processed. Any new bugs found during testing were also squashed and so far the game runs very smoothly with this maintenance work done.

Several large and unwieldy files have been split into smaller sizes, so that you can find what you're looking for much more quickly. Among these files are cultures, religions and all the scripted macros (triggers, effects and score values), as well as succession voting. Several more may follow at a later date. Of note is a particularly bad system of triggers and effects used in various religion conversion events. Over 4500 lines in total, it has been replaced by less than 100 lines in total. The new solution is both much easier to read and maintain, it should also be a lot faster in execution. It has been tested to work perfectly so far.

Additionally, almost all of the game's localisation files have been neatly sorted by category, instead of by DLC and patch number. It's now much easier to find something you want to change, instead of a directionless search through 123 files. The new files count roughly 100.

Work has started on decisions, with events to follow afterwards. This is the bulk of the workload and will take some time to process fully. Any help from experienced coders/scripters is appreciated.

Jesus, talk about inefficiency... Your work is seen and appreciated :)
 

CFH1985

Second Lieutenant
26 Badges
Mar 6, 2018
113
7
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
"It will not be compatible with any other mod not explicitly made to build off of it"
Will it have any effect on mods which do not edit vanilla files? For example mine uses some vanilla triggers, events and localisation, amoungst others. So, are all the names remaining the same? Will there still be all the existing triggers/events/etc - just cleaned up?
 

Whizzer

CKPlus Triumvirate
76 Badges
Jun 17, 2014
1.120
287
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
"It will not be compatible with any other mod not explicitly made to build off of it"
Will it have any effect on mods which do not edit vanilla files? For example mine uses some vanilla triggers, events and localisation, amoungst others. So, are all the names remaining the same? Will there still be all the existing triggers/events/etc - just cleaned up?

Most names will remain the same, some effects and triggers will be removed. It should be easy to make it compatible. We will provide a full list of significant changes, which will of course include a list of removed or otherwise adjusted scripted triggers and effects.
 
Last edited:
  • 1
Reactions:

Nendur

Colonel
1 Badges
Dec 16, 2013
869
182
  • Crusader Kings II
As a modding hook, could you please change the graphical culture for the Eastern Christian religions to 'easterngfx'. This enables changes like adding Orthodox councillors to the other heresies and branches. The ability to make compatible overrides for religions got lost in the 3.x patch, so this will nice to settle in a central spot. The religion group will still fallback to westerngfx for normal use.
 

schwarherz

CKPlus Triumvirate
73 Badges
Jun 3, 2012
2.017
553
  • Crusader Kings II: Charlemagne
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Magicka
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines - Mass Transit
  • BATTLETECH
  • Surviving Mars
  • PDXCon 2017 Awards Winner
  • Surviving Mars: First Colony Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Distant Stars
  • Tyranny: Archon Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Stellaris: Necroids
  • 500k Club
  • Victoria 2
As a modding hook, could you please change the graphical culture for the Eastern Christian religions to 'easterngfx'. This enables changes like adding Orthodox councillors to the other heresies and branches. The ability to make compatible overrides for religions got lost in the 3.x patch, so this will nice to settle in a central spot. The religion group will still fallback to westerngfx for normal use.
I'll play around with it a bit. Might require more work than it sounds like but could be worth it.

EDIT: Done. In addition to this change, I also made Miaphysite (and monophysite) use africangfx and Nestorian (and Messalian) use persiangfx.
 
Last edited:
  • 1Like
Reactions:

Nendur

Colonel
1 Badges
Dec 16, 2013
869
182
  • Crusader Kings II
I'll play around with it a bit. Might require more work than it sounds like but could be worth it.

EDIT: Done. In addition to this change, I also made Miaphysite (and monophysite) use africangfx and Nestorian (and Messalian) use persiangfx.
Thanks for the inclusion. Though africangfx and persiangfx aren't great options, since these are used already for pagan and Zoroastrian religions.
 

schwarherz

CKPlus Triumvirate
73 Badges
Jun 3, 2012
2.017
553
  • Crusader Kings II: Charlemagne
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Magicka
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines - Mass Transit
  • BATTLETECH
  • Surviving Mars
  • PDXCon 2017 Awards Winner
  • Surviving Mars: First Colony Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Distant Stars
  • Tyranny: Archon Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Stellaris: Necroids
  • 500k Club
  • Victoria 2
Thanks for the inclusion. Though africangfx and persiangfx aren't great options, since these are used already for pagan and Zoroastrian religions.
You're thinking of westafricangfx africangfx isn't used in any religion (though I'll double check tomorrow). So far as persiangfx I did a little research and visually Zoroastrian architecture and Nestorian architecture are very similar so it shouldn't be a problem. Unless I'm missing a use for those gfx types other than the gfx files?
 

Nendur

Colonel
1 Badges
Dec 16, 2013
869
182
  • Crusader Kings II
You're thinking of westafricangfx africangfx isn't used in any religion (though I'll double check tomorrow). So far as persiangfx I did a little research and visually Zoroastrian architecture and Nestorian architecture are very similar so it shouldn't be a problem. Unless I'm missing a use for those gfx types other than the gfx files?
The religion graphical cultures are used for the map shields, the spiritual councillor and the temple icons, The other parts wouldn't match well. The mixup with Africans is an old error in the province icons file.