Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion of technology #163

Open
IohannesIohannium opened this issue Mar 15, 2021 · 8 comments
Open

Conversion of technology #163

IohannesIohannium opened this issue Mar 15, 2021 · 8 comments
Labels
enhancement New feature or request

Comments

@IohannesIohannium
Copy link
Collaborator

Considering the absurd timegap, I suggest we recycle the system of EU4Vic2, where we check out the lowest and highest number of total inventions, divided by field, discovered by tags on map.
Then, we would check where does each tag stay in this scale.
At this point, an average would be calculated for all countries whose leader has the same CK3 culture.
From this number, we will then calculate an output:
e.g. All leaders of Etruscan culture have a Civic score of 50%, which means they'll get the innovation X

Innovations are output in /history/cultures/[culture].txt, with this syntax:

[yyyy.mm.dd] = { # A date, we'll use 100.1.1 and call it a day
	discover_innovation = [innovation] # One for each line
}

An innovation configurable file will need to be supplied. I propose for it the following syntax:

link = { type = [imp type] score = [number from 0 to 1] innovation = [CK3 innovation] }

imp type can only be any of the following: civic, martial, oratory, religious

We need to also define, as well, for which cultures this must not be calculated/output (those that are outside I:R and, thus, should have no I:R input)

@IhateTrains IhateTrains added the enhancement New feature or request label Mar 15, 2021
@IohannesIohannium
Copy link
Collaborator Author

Initial proposed tech mapping file

# These are only TRIBAL ERA innovations (476-900 AD)
# Adapted from CK3, which has only 867 AD defined techs
# Initially used formula: 1 - (percentage of cultures that unlocked it at 867 ) + 10%

# Martial Innovations (IMP martial)
link = { type = martial score = 0.85 innovation = innovation_bannus }
link = { type = martial score = 0.88 innovation = innovation_barracks }
link = { type = martial score = 0.75 innovation = innovation_motte }
link = { type = martial score = 0.68 innovation = innovation_mustering_grounds }
link = { type = martial score = 0.56 innovation = innovation_catapult } # Onagers
link = { type = martial score = 0.4 innovation = innovation_quilted_armor }

# Civic Innovations
link = { type = civic score = 0.91 innovation = innovation_casus_belli }
link = { type = civic score = 0.91 innovation = innovation_city_planning }
link = { type = civic score = 0.44 innovation = innovation_crop_rotation }
link = { type = civic score = 0.29 innovation = innovation_currency_01 }
link = { type = civic score = 0.62 innovation = innovation_gavelkind }
link = { type = civic score = 0.54 innovation = innovation_ledger }
link = { type = civic score = 0.47 innovation = innovation_plenary_assemblies }
link = { type = civic score = 0.59 innovation = innovation_development_01 } # Public Works

# Regional Innovations (IMP martial)
link = { type = martial score = 0.96 innovation = innovation_elephantry }
link = { type = martial score = 0.9 innovation = innovation_war_camels }

# Cultural Innovations - skipped

@IohannesIohannium
Copy link
Collaborator Author

With the 150 AD conversion, technological mapping is no more needed

@MatthewForrester
Copy link
Contributor

MatthewForrester commented Mar 30, 2024

I am not Voldarius on the forum, but I have started doing this mapping work in the hope that it is helpful at some point. Attached is a mapping file. It contains entries in the format link = { ir = siege_speed_inv_3 ck3 = innovation_motte } where the I:R Invention and the CK3 Innovation are conceptually identical, or very similar. It also lists things like regional and cultural restrictions on Innovations as comments.

In addition, I have included a parallel set of entries in the format bonus = { ir = fort_maintenance_cost_inv ir = global_defensive_inv_3 ir = global_defensive_inv_1 ck3 = innovation_motte } This is because I noticed that I:R has more Inventions than CK3 has early Innovations. And simply linking conceptually identical items one-to-one has odd results, because sometimes this rewards early Inventions and ignores later ones. So these bonus entries are Inventions that might be seen as stepping-stones towards an Innovation. Since CK3 stores progress towards Innovations, my suggestion is that each Invention in a bonus entry could give a certain amount of progress towards that Innovation. I would suggest 25% and so I've not listed than more three universal, and one regional/cultural, Inventions in each line. I realize it would be up to whoever kindly implemented tech mapping to write code for this or completely ignore it.

I have also attached annotated versions of I:R's Martial and Civic invention files with the English localizations of important Inventions, since the names in script often have no relation to the concepts.

So far I have done Martial and Civic Inventions only, so this is a work in progress.

@IhateTrains IhateTrains pinned this issue Mar 30, 2024
@IhateTrains
Copy link
Member

@MatthewForrester thank you for the mappings so far! I'll try to implement this sooner than planned. As for the bonus entries, I like this idea, should be pretty simple to implement as well :)

@MatthewForrester
Copy link
Contributor

The PR contains the mapping from I:R Inventions to CK3 Innovations. It takes account of DLC, but not of any mods (including Invictus, which seems to make quite a few changes). Attached here are the annotated Inventions files for I:R for the benefit of anyone taking this work forward or bugfixing.

00_martial_inventions_annotated.txt
00_religious_inventions_annotated.txt
00_oratory_inventions_annotated.txt
00_civic_inventions_annotated.txt

@MatthewForrester
Copy link
Contributor

MatthewForrester commented Apr 21, 2024

@IhateTrains, thank you for all your hard work on this feature over the past week. I have tested the latest release on a couple of Innovations from a single save, and the conversion worked exactly as expected! ✨

I have started studying the Invictus-specific Inventions with a view to adding them to the mapping. How would like them to be added to the file? Shall I just add them to the mapping file as e.g. ir = Invictus_specific_Invention in the expectation that your parser will skip those entries when converting saves from vanilla?

Alternatively, I could add them in an Invictus-specific file or syntax, allowing CK3 Innovations to map to different Inventions from vanilla and Invictus saves. But I've not yet got far enough to even know whether that's even worth the effort.

Test Report
CK3 save has Mottes fully discovered and Onagers at 25%.

Mottes requires
siege_speed_inv_3 "Investment"

Onagers is innovation_catapult, which requires
siege_engineers_inv_4 "Tormenta"

The bonuses for it are
siege_speed_inv_5 "Ballistae"
siege_engineers_inv_5 "Siege Ramps"

So IR should show "Investment" and only 1 of "Ballistae" and "Siege Ramps", but not "Tormenta"

In fact, IR shows "Investment" and "Siege Ramps", but not "Ballistae" and not "Tormenta"

@IhateTrains
Copy link
Member

@MatthewForrester please do this:

Shall I just add them to the mapping file as e.g. ir = Invictus_specific_Invention in the expectation that your parser will skip those entries when converting saves from vanilla?

Mapping both vanilla and Invictus inventions to a single CK3 innovation is as simple as:

link = { ir = invention_vanilla ck3 = example_innovation }
link = { ir = invention_invictus ck3 = example_innovation }

Not a problem in bonuses, either. Can mix both in one bonus. The converter doesn't really care where the invention is from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants