Giter Site home page Giter Site logo

paradoxgameconverters / ck2toeu4 Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 15.0 155.39 MB

Converts Crusader Kings 2 Saves into Europa Universalis 4 mods

License: MIT License

CMake 1.24% Batchfile 0.28% Shell 0.19% C++ 97.95% Lua 0.01% C 0.03% Inno Setup 0.30%

ck2toeu4's Introduction

The old master repository for the converters. All development has been moved to the other repositories here.

ck2toeu4's People

Contributors

carbony26 avatar codacy-badger avatar dependabot[bot] avatar dlbuunk avatar drdudelsack avatar elfangor567 avatar grave461 avatar idhrendur avatar ihatetrains avatar iohannesiohannium avatar klorpa avatar mrkinich avatar osariusz avatar theosza avatar zemurin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ck2toeu4's Issues

Check religions

CK2 has a higher religion variety than EU4. Some of them may be worth keeping around.

PAP/FAP primary culture

Confirm PAP/FAP get their ideas correctly regardless of ruler culture, same as primary culture.

(Reminder) Diplomacy creation

Holy Roman Emperor
Sets the current Holy Roman Emperor

<year>.<month>.<day> = {
    emperor = <tag>
}
Celestial Emperor
Sets the current Celestial Emperor

<year>.<month>.<day> = {
    celestial_emperor = <tag>
}
Relations
All relations follow this format:

<type> = {
    first = <tag>       # The overlord, if the relation is a overlord-subject relation
    second = <tag>      # The subject, if the relation is a overlord-subject relation
    start_date = <date> # When to start applying the relationship
    end_date = <date>   # When to stop applying the relationship
}
These are the following valid relations:

alliance
royal_marriage
guarantee
warning
vassal
march
union
Dependency
For custom subject types, you can use the dependency effect, which allows to specify subject_type:

dependency = {
    subject_type = "<subject type>"
    first = <tag>       # The overlord, if the relation is a overlord-subject relation
    second = <tag>      # The subject, if the relation is a overlord-subject relation
    start_date = <date> # When to start applying the relationship
    end_date = <date>   # When to stop applying the relationship
}

Papal States vs Papacy.

Correct this by dropping papal states everywhere and replacing every pope mention with papacy.
If pope holds no land, PAP should not exist.

accepted Cultures same as Primary cultures

Converter adds accepted culture lines for countries without a second culture, adding an accepted culture for its primary culture, such as north France having primary culture of cosmopolitan French, and accepting culture of cosmopolitan french, affecting about more than half the countries from the converter. Pls add a toggle for accepted culture or fix the feature ty.

On China

CK2 has different Chinas, according to the Emperor's dynasty. If possible, every out-of-CK2-map owned by Ming and the subsequent celestial emperor history file should be updated with whoever is the Emperor of China.

A mapping of tags could be used.

Support for Tianxia

(Self-assigned) As the CK3->EU4 is getting support for their own Asian mod, I'm thinking we could have support for CK2's Asia mod, Tianxia.

National Cores

See what cultures have a defined primary and if we have dead nations of that primary. If so, distribute dead nation cores in provinces where they have culture.

On the HRE

Currently, nothing is done besides splitting the Empire.

All provinces held by the Empire should get the line hre = yes inside.
All the history files of the Electors should get the line elector = yes inside.
history/diplomacy/hre.txt should have this line as content: 500.1.1 = { emperor = [Emperor's Tag] }

How to determine the Electors?
Search among the generated vassals of the HRE (and the Emperor himself).
Find the three theocracies whose rulers hold the highest piety and add them as electors.
Then find the four non-theocracies whose rulers hold the highest amount of prestige and add them as electors.

Gold conversion

Through add_treasury

Take CK2 wealth (gold) and divide by 2.27948793172 (assuming CK2 gold is measured in pennyweights and using the Venetian florin)

Tajik culture

Also, the Persians in Afghanistan should become Tajiks

(Reminder) Country history creation

technology_group = <group>      # The technology group of the country. Will set the unit type to this technology group as well.
unit_type = <group>             # Used if you want a different unit group from the defined technology group

government = <government>       # The government form of the country
government_rank = <rank>        # Current government rank: 1, 2 or 3

primary_culture = <culture>     # The primary culture of the country
religion = <religion>           # The religion of the country

add_accepted_culture = <culture>    # Add an accepted culture
remove_accepted_culture = <culture> # Remove an accepted culture

historical_friend = <tag>        # Adds a historical friend
historical_rival = <tag>        # Adds a historical rival

mercantilism = <int>            # Starting mercantilism value
religious_school = <school>     # For countries that have a religion that use Religious Schools, assigns initial school

add_army_professionalism = <value> # Army professionalism to start with

capital = <id>                  # The province that is the default capital
fixed_capital = <id>            # Forces the AI to never move their capital from the specified id, they will seek to move it back there as well if moved.

# Defines a ruler for the country. Normally used within a history entry
monarch = {
    name = <string>             # Name of the ruler
    dynasty = <string>          # Dynasty of the ruler
    adm = <int>                 # ADM skill of the ruler
    dip = <int>                 # DIP skill of the ruler
    mil = <int>                 # MIL skill of the ruler
    birth_date = <date>         # Used to set the age of the ruler. Derived from the date of the history entry the monarch scope is found in.
    female = yes                # Whether the ruler is female
    regent = yes                # Whether the ruler is considered a regency
    religion = <religion>       # The religion of the ruler
    culture = <culture>         # The culture of the ruler
    
    # Makes the defined ruler a leader
    leader = {
        name = <string>     # Name of the leader
        type = <type>       # Type of leader: general, admiral, explorer, conquistidor
        fire = <int>        # Fire value of the leader
        shock = <int>       # Shock value of the leader
        manuever = <int>    # Manuever value of the leader
        siege = <int>       # Siege value of the leader
    }
}

# Defines a heir for the country. Normally used within a history entry
heir = {
    name = <string>             # Name of heir
    monarch_name = <string>     # Name of heir if they become a ruler
    dynasty = <string>          # Dynasty of heir
    birth_date = <date>         # Used to set the age of the heir. Derived from the date of the history entry the monarch scope is found in.
    death_date = <date>         # When the heir should be removed. 
    claim = <int>               # Strength of claim for heir
    adm = <int>                 # ADM skill of the heir
    dip = <int>                 # DIP skill of the heir
    mil = <int>                 # MIL skill of the heir
    female = yes                # Whether the heir is female
    religion = <religion>       # The religion of the heir
    culture = <culture>         # The culture of the heir
}

# Defines a consort for the country. Normally used within a history entry
queen = {
    name = <string>             # Name of consort
    dynasty = <string>          # Dynasty of consort
    birth_date = <date>         # Used to set the age of the consort. Derived from the date of the history entry the monarch scope is found in.
    death_date = <date>         # When the consort should be removed. 
    adm = <int>                 # ADM skill of the consort
    dip = <int>                 # DIP skill of the consort
    mil = <int>                 # MIL skill of the consort
    female = yes                # Whether the consort is female
    country_of_origin = <tag>   # Which country the consort is from
    religion = <religion>       # The religion of the consort
    culture = <culture>         # The culture of the consort
}

# History entry, can contain any of the values above as well as normal country effects
<year>.<month>.<day> = {
    <country effects>
}

Splitting cultures

(A reminder for me)
German, French, Italian, Spanish, Latin-Roman, Jewish need to be split accordingly.

Peasent republics for peasent leaders

See if a peasent revolt leader holds an indep title and swap that tag into a peasent republic. Do not do that for protected tags (ROM, BYZ, PAP, HRE etc)

Eliminate global configuration instance

The existing extern Configuration theConfiguration; was a patch to work around removing the Configuration class's singleton status. It causes a lot of shared state issues, particularly with tests.

Make sure to delete the actual instance (at the top of the cpp file) while you're at it.

(Reminder) Advisor creation

advisor = {
    advisor_id = <id>           # The advisor's unique id
    name = <string>             # The advisor's full name
    location = <province id>    # The province that the advisor is linked to.
    skill = <int>               # The skill of the advisor
    type = <advisortype>        # The type of advisor
    discount = yes              # Whether to apply SCRIPTED_ADVISOR_DISCOUNT defined value to the advisor's monthly cost
    date = <year>.<month>.<day>         # When this advisor starts appearing
    death_date = <year>.<month>.<day>   # When this advisor stops appearing
    culture = <culture>         # The advisor's culture
    religion = <religion>       # The advisor's religion
}

Council conversion

Councillors may be converted into advisors.

define_advisor will be used.

(Reminder) Province history creation

owner = <tag>           # Who is the current owner of the province
controller = <tag>      # Who is the current controller of the province
add_core = <tag>        # Adds a core for the specified tag
is_city = yes / no      # Whether this province is a proper city, i.e. not a colony. 

culture = <culture>     # The culture of the province
religion = <culture>    # The religion of the province

base_tax = <int>        # The base tax of the province
base_production = <int> # The base production of the province
base_manpower = <int>   # The base manpower of the province

trade_goods = <goods>   # The tradegood assigned to this province, from 00_tradegoods.txt
estate = <estate>       # Adds this estate to the province
hre = yes / no          # Whether this province is in the HRE or not
capital = "<string>"    # The capital name to use for the province, otherwise the province name is used as the capital name.

discovered_by = <technology group>  # Grants the specified technology group vision of this province
reformation_center = <religion>     # Sets this province as a reformation center for the specified religion
unrest = <int>                      # Adds base unrest
<building> = yes / no               # Adds or removes the specified building

# Adds a revolt
revolt = {
    type = <rebel type>
    size = <int>
    leader = <string>
}

# History entry, can contain any of the values above as well as normal province effects
<year>.<month>.<day> = {
    <province effects>
}

Configurables to check

(Reminder for me)
Still to check:

  • culture_map.txt
  • government_map.txt
  • religion_map.txt
  • tag_mappings.txt
  • version.txt

Tributary support

We need it. Also:

@slothinator

Hi!
I already wrote on the steam workshop but I'm posting the code here as requested.
To recap, I wrote the Twilight of Empires mod and I've been asked if you could turn a specific type of tributary that my mod includes into EU4 vassals (the HRE might need some ad-hoc treatment for this).
Here I'm posting once such tributary relation as written in a ck2 save file.
Code:

3069155=
{
can_call_to_war=yes
tributary=
{
tributary_type="autonomous_tributary"
tributary=3083153
income_tribute_percentage=0.39999
reinforce_tribute_percentage=0.100
}
}

Let me know if I can be of any further help!
Keep up the great work!

On rebellions

The converter currently doesn't output anything of the CK2 revolts.

(Reminder) War creation

name = "<string>"           # Name of the war in the war screen
war_goal = {
    type = <wargoal>        # The wargoal to use from 00_wargoals.txt
    casus_belli = <cb>      # The cb to use from 00_cb_types.txt
}

# Used to start the war at the specified date
<year>.<month>.<day> = {
    add_attacker = <tag>    # Adds a country to the attackers side
    add_defender = <tag>    # Adds a country to the defenders side
}

# Used to add ongoing battles 
<year>.<month>.<day> = {
    batle = { 
        name = "<string>"   # Name of province
        location = <id>     # Province the battle is in
        
        attacker = {
            commander = "<string>"  # Leader of the attacker's army
            infantry = <int>        # Number of infantry. 1 equals 1 soldier
            cavalry = <int>         # Number of cavalry
            artillery = <int>       # Number of artillery
            losses = <float>        # How many of the forces are already dead
            country = <tag>         # The country that is attacking
        }
        
        defender = {
            commander = "<string>"  # Leader of the defender's army
            infantry = <int>        # Number of infantry. 1 equals 1 soldier
            cavalry = <int>         # Number of cavalry
            artillery = <int>       # Number of artillery
            losses = <float>        # How many of the forces are already dead
            country = <tag>         # The country that is defending
        }
        
        result = yes    # Show result
    }
}

# Used to end the war at the specified date
<year>.<month>.<day> = {
    rem_attacker = <tag>    # Removes a country to the attackers side
    rem_defender = <tag>    # Removes a country to the defenders side
}

Clear saharan passes

if not owned by sub-saharan nation (check capital), the passes:
(1127, 1128), (2474, 2475) and (2932, 774, 1219) should be sterilized (Province::sterilize).
This would prevent northern powers from rapidly conquering african tribes at game start.

Women in history

See if it's possible to increase chance of female advisor generation for countries that have tolerance laws. Maybe this won't be possible if it's hardcoded globally.

Monarch names

See if it's possible to do a common names register from cultures (Constantinus_Constantine), and use those common names (with appropriate current culture) when building monarch name database.

Config: Shatter Empires

HRE appointee is shattered automatically, but allow for a config setting to shatter any empire into kingdoms or duchies.

Forts

Where do we take them from?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.